本文整理汇总了C++中USB_Device_EnableSOFEvents函数的典型用法代码示例。如果您正苦于以下问题:C++ USB_Device_EnableSOFEvents函数的具体用法?C++ USB_Device_EnableSOFEvents怎么用?C++ USB_Device_EnableSOFEvents使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了USB_Device_EnableSOFEvents函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EVENT_USB_Device_ConfigurationChanged
void EVENT_USB_Device_ConfigurationChanged(void) {
bool ConfigSuccess = true;
SerialDebug_printf("EVENT_USB_Device_ConfigurationChanged\r\n");
ConfigSuccess &= HID_Device_ConfigureEndpoints(&Joystick_HID_Interface);
USB_Device_EnableSOFEvents();
}
示例2: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
bool ConfigSuccess = true;
ConfigSuccess &= HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface);
USB_Device_EnableSOFEvents();
}
示例3: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged ( void ) {
bool ConfigSuccess = true;
ConfigSuccess &= HID_Device_ConfigureEndpoints ( &Keyboard_HID_Interface );
USB_Device_EnableSOFEvents();
//LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
示例4: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
if (!(HID_Device_ConfigureEndpoints(&Mouse_HID_Device_Interface)))
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
USB_Device_EnableSOFEvents();
}
示例5: EVENT_USB_Device_ConfigurationChanged
void
EVENT_USB_Device_ConfigurationChanged(void)
{
HID_Device_ConfigureEndpoints(&keyboardHIDIface);
HID_Device_ConfigureEndpoints(&genericHIDIface);
HID_Device_ConfigureEndpoints(&nkroHIDIface);
HID_Device_ConfigureEndpoints(&extrakeyHIDIface);
USB_Device_EnableSOFEvents();
}
示例6: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
bool ConfigSuccess = true;
ConfigSuccess &= HID_Device_ConfigureEndpoints(&Mouse_HID_Interface);
ConfigSuccess &= CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
USB_Device_EnableSOFEvents();
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
示例7: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void) {
bool success = HID_Device_ConfigureEndpoints(&kbd_device);
// TODO: Possibly signal this failure better.
// I don't think it can happen in practice.
if (!success) {
abort();
}
// Need this to call HID_Device_MillisecondElapsed.
USB_Device_EnableSOFEvents();
}
示例8: EVENT_USB_Device_ConfigurationChanged
void EVENT_USB_Device_ConfigurationChanged(void)
{
bool success = true;
success &= MS_Device_ConfigureEndpoints(&ms_device);
success &= HID_Device_ConfigureEndpoints(&keyboard_device);
// success &= CDC_Device_ConfigureEndpoints(&serial_device);
USB_Device_EnableSOFEvents();
if (!success) {
led_error(USB_ERROR);
}
}
示例9: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
bool ConfigSuccess = true;
#if defined(USB_CDC_CLASS) || defined(USB_COMP_MOUSE_CDC_CLASS)
ConfigSuccess &= CDC_Device_ConfigureEndpoints(CDC_IF_PTR);
#endif // #if defined(USB_CDC_CLASS) || defined(USB_COMP_MOUSE_CDC_CLASS)
#if defined(USB_MOUSE_CLASS) || defined(USB_COMP_MOUSE_CDC_CLASS)
ConfigSuccess &= HID_Device_ConfigureEndpoints(HID_Mouse_PTR);
USB_Device_EnableSOFEvents(); // USB Mouse Only??
#endif // #if defined(USB_MOUSE_CLASS) || defined(USB_COMP_MOUSE_CDC_CLASS)
USB_DEBUG_MSG("EVENT_USB_Device_ConfigurationChanged\r\n");
}
示例10: setup_usb
static void setup_usb(void)
{
// Leonardo needs. Without this USB device is not recognized.
USB_Disable();
USB_Init();
// for Console_Task
USB_Device_EnableSOFEvents();
print_set_sendchar(sendchar);
/* wait for USB startup & debug output */
uint8_t timeout = 255; // timeout when USB is not available
while (timeout-- &&USB_DeviceState != DEVICE_STATE_Configured) {
wait_ms(4);
#if defined(INTERRUPT_CONTROL_ENDPOINT)
;
#else
USB_USBTask();
#endif
}
print("USB configured.\n");
}
示例11: SetupHardware
static void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
// Leonardo needs. Without this USB device is not recognized.
USB_Disable();
USB_Init();
// for Console_Task
USB_Device_EnableSOFEvents();
print_set_sendchar(sendchar_func);
// SUART PD0:output, PD1:input
DDRD |= (1<<0);
PORTD |= (1<<0);
DDRD &= ~(1<<1);
PORTD |= (1<<1);
}
示例12: EVENT_USB_Device_ConfigurationChanged
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface);
USB_Device_EnableSOFEvents();
}
示例13: EVENT_USB_Device_ConfigurationChanged
void
EVENT_USB_Device_ConfigurationChanged(void) {
bool ok;
ok = HID_Device_ConfigureEndpoints(&stateMachine);
USB_Device_EnableSOFEvents();
}