diff options
| author | hathach <[email protected]> | 2013-01-31 13:11:50 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-01-31 13:11:50 +0700 |
| commit | 1b963f6a7117d754c47e860159ac0aa90d1db6dc (patch) | |
| tree | 775a8d0a163956a56dc01057545798e11b832efa /tinyusb/host | |
| parent | bef17fb67fc283cdc8cbda068d122c2a95c3b880 (diff) | |
change cmock ignore to args only
implementing usbh_host.c
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/usbd_host.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tinyusb/host/usbd_host.c b/tinyusb/host/usbd_host.c index 5ddaaaef5..c3489525d 100644 --- a/tinyusb/host/usbd_host.c +++ b/tinyusb/host/usbd_host.c @@ -58,9 +58,11 @@ //--------------------------------------------------------------------+ STATIC_ usbh_device_info_t device_info_pool[TUSB_CFG_HOST_DEVICE_MAX]; -#define ENUM_DEPTH 2 -//STATIC_ osal_queue_t queue_enumerate; -//STATIC_ uint8_t queue_enumerate_buffer[ENUM_DEPTH*sizeof(usbh_enumerate_t)]; +OSAL_TASK_DEF(enumeration_task, usbh_enumerate_task, 128, OSAL_PRIO_HIGH); + +#define ENUM_QUEUE_DEPTH 5 +OSAL_DEF_QUEUE(enumeration_queue, ENUM_QUEUE_DEPTH, uin32_t); +osal_queue_handle_t enumeration_queue_hdl; //--------------------------------------------------------------------+ // PUBLIC API (Parameter Verification is required) @@ -77,7 +79,11 @@ tusbh_device_status_t tusbh_device_status_get (tusb_handle_device_t const device tusb_error_t usbh_init(void) { memset(device_info_pool, 0, sizeof(usbh_device_info_t)*TUSB_CFG_HOST_DEVICE_MAX); -// ASSERT_STATUS(osal_queue_create()); + + ASSERT_STATUS( osal_task_create(&enumeration_task) ); + enumeration_queue_hdl = osal_queue_create(&enumeration_queue); + ASSERT_PTR(enumeration_queue_hdl, TUSB_ERROR_OSAL_QUEUE_FAILED); + return TUSB_ERROR_NONE; } |
