summaryrefslogtreecommitdiff
path: root/tinyusb/device
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/device')
-rw-r--r--tinyusb/device/usbd.c5
-rw-r--r--tinyusb/device/usbd.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c
index c4552c3fc..790143320 100644
--- a/tinyusb/device/usbd.c
+++ b/tinyusb/device/usbd.c
@@ -147,10 +147,9 @@ STATIC_ASSERT(sizeof(usbd_task_event_t) <= 12, "size is not correct");
#define TUSB_CFG_OS_TASK_PRIO 0
#endif
-OSAL_SEM_DEF(usbd_control_xfer_semaphore_def);
static osal_queue_t usbd_queue_hdl;
-/*static*/ osal_semaphore_handle_t usbd_control_xfer_sem_hdl; // TODO may need to change to static with wrapper function
+/*static*/ osal_semaphore_t usbd_control_xfer_sem_hdl; // TODO may need to change to static with wrapper function
//--------------------------------------------------------------------+
// IMPLEMENTATION
@@ -166,7 +165,7 @@ tusb_error_t usbd_init (void)
usbd_queue_hdl = osal_queue_create(USBD_TASK_QUEUE_DEPTH, sizeof(usbd_task_event_t));
ASSERT_PTR(usbd_queue_hdl, TUSB_ERROR_OSAL_QUEUE_FAILED);
- usbd_control_xfer_sem_hdl = osal_semaphore_create( OSAL_SEM_REF(usbd_control_xfer_semaphore_def) );
+ usbd_control_xfer_sem_hdl = osal_semaphore_create(1, 0);
ASSERT_PTR(usbd_queue_hdl, TUSB_ERROR_OSAL_SEMAPHORE_FAILED);
osal_task_t usbd_hdl;
diff --git a/tinyusb/device/usbd.h b/tinyusb/device/usbd.h
index c2c5c702b..1c7f1b79a 100644
--- a/tinyusb/device/usbd.h
+++ b/tinyusb/device/usbd.h
@@ -99,7 +99,7 @@ bool tusbd_is_configured(uint8_t coreid) ATTR_WARN_UNUSED_RESULT;
//--------------------------------------------------------------------+
#ifdef _TINY_USB_SOURCE_FILE_
-extern osal_semaphore_handle_t usbd_control_xfer_sem_hdl;
+extern osal_semaphore_t usbd_control_xfer_sem_hdl;
tusb_error_t usbd_init(void);
void usbd_task( void* param);