diff options
| author | hathach <[email protected]> | 2013-04-10 02:34:40 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-10 02:34:40 +0700 |
| commit | 2d7fbb5153dcbeedf01378d1a02b8fe6e4ed400f (patch) | |
| tree | c8e685e6e060d086a16c0ed3ad1c35230a8f7fa3 /tinyusb/host/usbh.c | |
| parent | e14aa4197d290fc7f294d42d4886fb5892c9f360 (diff) | |
change keyboard_app.c & mouse_app.c from polling API to interrupt-based (callback isr)
and using OSAL for task-base demo
- fix ehci error with XFER_COMPLETE callback to usbh_isr, TD need to be freed & unlink before invoking
callback
- fix bug in usbh.c set device state to CONFIGURED right after SET_CONFIGURE control xfer
Diffstat (limited to 'tinyusb/host/usbh.c')
| -rw-r--r-- | tinyusb/host/usbh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index ccf1af249..e26ec5b46 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -248,7 +248,6 @@ void usbh_device_unplugged_isr(uint8_t hostid) //--------------------------------------------------------------------+ // ENUMERATION TASK //--------------------------------------------------------------------+ -//TODO reduce Cyclomatic Complexity OSAL_TASK_DECLARE(usbh_enumeration_task) { tusb_error_t error; @@ -398,6 +397,8 @@ OSAL_TASK_DECLARE(usbh_enumeration_task) ) ); + usbh_devices[new_addr].state = TUSB_DEVICE_STATE_CONFIGURED; + //------------- parse configuration & install drivers -------------// p_desc = enum_data_buffer + sizeof(tusb_descriptor_configuration_t); @@ -440,7 +441,6 @@ OSAL_TASK_DECLARE(usbh_enumeration_task) } } - usbh_devices[new_addr].state = TUSB_DEVICE_STATE_CONFIGURED; tusbh_device_mount_succeed_cb(new_addr); OSAL_TASK_LOOP_END |
