diff options
| author | hathach <[email protected]> | 2013-10-29 17:16:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-10-29 17:16:41 +0700 |
| commit | d9ce879df84f6098e431736a297d4239d6f8eb2a (patch) | |
| tree | 7ff1677d602937d4232849954bd0caa61e66e2ff /tinyusb/device | |
| parent | cb0a02f8c9734af86ea86b0571bf1c6026d15dff (diff) | |
able to enumerate mouse + keyboard (missing timing at set configured though)
Diffstat (limited to 'tinyusb/device')
| -rw-r--r-- | tinyusb/device/usbd.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c index 0cb008776..bf202f6d8 100644 --- a/tinyusb/device/usbd.c +++ b/tinyusb/device/usbd.c @@ -127,17 +127,23 @@ tusb_error_t usbh_set_configure_received(uint8_t coreid, uint8_t config_number) uint16_t length = 0; #if TUSB_CFG_DEVICE_HID_KEYBOARD - tusb_descriptor_interface_t const * p_interface = &app_tusb_desc_configuration.keyboard_interface; - usbd_devices[coreid].interface2class[p_interface->bInterfaceNumber] = p_interface->bInterfaceClass; + tusb_descriptor_interface_t const * p_kbd_interface = &app_tusb_desc_configuration.keyboard_interface; + usbd_devices[coreid].interface2class[p_kbd_interface->bInterfaceNumber] = p_kbd_interface->bInterfaceClass; - if (usbd_class_drivers[p_interface->bInterfaceClass].open ) + if (usbd_class_drivers[p_kbd_interface->bInterfaceClass].open ) { - usbd_class_drivers[p_interface->bInterfaceClass].open(coreid, p_interface, &length); + usbd_class_drivers[p_kbd_interface->bInterfaceClass].open(coreid, p_kbd_interface, &length); } #endif #if TUSB_CFG_DEVICE_HID_MOUSE - ASSERT_STATUS( hidd_open(0, &app_tusb_desc_configuration.mouse_interface, &length) ); + tusb_descriptor_interface_t const * p_mouse_interface = &app_tusb_desc_configuration.mouse_interface; + usbd_devices[coreid].interface2class[p_mouse_interface->bInterfaceNumber] = p_mouse_interface->bInterfaceClass; + + if (usbd_class_drivers[p_mouse_interface->bInterfaceClass].open ) + { + usbd_class_drivers[p_mouse_interface->bInterfaceClass].open(coreid, p_mouse_interface, &length); + } #endif } |
