diff options
| author | hathach <[email protected]> | 2013-04-25 16:41:00 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-25 16:41:00 +0700 |
| commit | 3763e22c9a91e9bb21f9fa3dc5dafc9eea6254b7 (patch) | |
| tree | a7dad3f9b4b3b3fd39e381119d6213fb0f7ac0f3 /tinyusb/host | |
| parent | 1ae548432099fde8ccf9b0be5de899b2168c1f41 (diff) | |
change OSAL_TASK_DEF to decouple variable name with task name
implement osal_task_delay for freeRTOS & non_os
getting both no_os & freertos running with mouse + keyboard
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/usbh.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index 3c1630b75..c62b75c48 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -89,7 +89,7 @@ static host_class_driver_t const usbh_class_drivers[TUSB_CLASS_MAX_CONSEC_NUMBER usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1] TUSB_CFG_ATTR_USBRAM; // including zero-address //------------- Enumeration Task Data -------------// -OSAL_TASK_DEF(enum_task_def, usbh_enumeration_task, 128, TUSB_CFG_OS_TASK_PRIO); +OSAL_TASK_DEF(enum_task_def, "tinyusb host", usbh_enumeration_task, 128, TUSB_CFG_OS_TASK_PRIO); OSAL_QUEUE_DEF(enum_queue_def, ENUM_QUEUE_DEPTH, uint32_t); osal_queue_handle_t enum_queue_hdl; STATIC_ uint8_t enum_data_buffer[TUSB_CFG_HOST_ENUM_BUFFER_SIZE] TUSB_CFG_ATTR_USBRAM; @@ -287,9 +287,7 @@ tusb_error_t enumeration_body_subtask(void) #ifndef _TEST_ // TODO finalize delay after reset, hack delay 100 ms, otherwise speed is detected as LOW in most cases - volatile uint32_t delay_us = 10000; - delay_us *= (SystemCoreClock / 1000000) / 3; - while(delay_us--); + osal_task_delay(100); #endif //------------- Get first 8 bytes of device descriptor to get Control Endpoint Size -------------// |
