diff options
| author | hathach <[email protected]> | 2018-03-01 11:17:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-01 11:17:11 +0700 |
| commit | a789fad4b7b23b8324e07ee4b9d08a145f5df0f9 (patch) | |
| tree | 4591738b231d2229b863b7a61b9bb5bb1c69733c /demos/device/src | |
| parent | 30124b9b02e067c967aca642823f3ed4cb7f618d (diff) | |
clean up osal semaphore/queue/mutex
Diffstat (limited to 'demos/device/src')
| -rw-r--r-- | demos/device/src/cdc_device_app.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/demos/device/src/cdc_device_app.c b/demos/device/src/cdc_device_app.c index f7008585c..2319e01e9 100644 --- a/demos/device/src/cdc_device_app.c +++ b/demos/device/src/cdc_device_app.c @@ -51,9 +51,7 @@ enum { SERIAL_BUFFER_SIZE = 64 }; //--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
//--------------------------------------------------------------------+
-OSAL_SEM_DEF(cdcd_semaphore);
-
-static osal_semaphore_handle_t sem_hdl;
+static osal_semaphore_t sem_hdl;
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
@@ -115,7 +113,7 @@ void tusbd_cdc_xfer_cb(uint8_t coreid, tusb_event_t event, cdc_pipeid_t pipe_id, //--------------------------------------------------------------------+
void cdcd_serial_app_init(void)
{
- sem_hdl = osal_semaphore_create( OSAL_SEM_REF(cdcd_semaphore) );
+ sem_hdl = osal_semaphore_create(1, 0);
ASSERT_PTR( sem_hdl, VOID_RETURN);
osal_task_create(cdcd_serial_app_task, "cdc", 128, NULL, CDC_SERIAL_APP_TASK_PRIO, NULL);
|
