diff options
| author | hathach <[email protected]> | 2018-02-28 16:45:54 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-02-28 16:45:54 +0700 |
| commit | 30124b9b02e067c967aca642823f3ed4cb7f618d (patch) | |
| tree | 5823eb3dfd498e85420d26b3924057bf272c42b4 /tinyusb/host/usbh.c | |
| parent | c961bb47feee422746f5aa81e48b00a50a4cbf0e (diff) | |
refactor osal queue API
Diffstat (limited to 'tinyusb/host/usbh.c')
| -rw-r--r-- | tinyusb/host/usbh.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index 37d772bdb..8d19f5f15 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -109,9 +109,8 @@ TUSB_CFG_ATTR_USBRAM usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1] //------------- Enumeration Task Data -------------/
enum { ENUM_QUEUE_DEPTH = 16 };
-OSAL_QUEUE_DEF(enum_queue_def, ENUM_QUEUE_DEPTH, uint32_t);
-STATIC_VAR osal_queue_handle_t enum_queue_hdl;
+STATIC_VAR osal_queue_t enum_queue_hdl;
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4) STATIC_VAR uint8_t enum_data_buffer[TUSB_CFG_HOST_ENUM_BUFFER_SIZE];
//------------- Reporter Task Data -------------//
@@ -144,7 +143,7 @@ tusb_error_t usbh_init(void) ASSERT_STATUS( hcd_init() );
//------------- Enumeration & Reporter Task init -------------//
- enum_queue_hdl = osal_queue_create( OSAL_QUEUE_REF(enum_queue_def) );
+ enum_queue_hdl = osal_queue_create( ENUM_QUEUE_DEPTH, sizeof(uint32_t) );
ASSERT_PTR(enum_queue_hdl, TUSB_ERROR_OSAL_QUEUE_FAILED);
osal_task_create(usbh_enumeration_task, "usbh", 200, NULL, TUSB_CFG_OS_TASK_PRIO, NULL);
|
