summaryrefslogtreecommitdiff
path: root/tinyusb/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-01 11:17:11 +0700
committerhathach <[email protected]>2018-03-01 11:17:11 +0700
commita789fad4b7b23b8324e07ee4b9d08a145f5df0f9 (patch)
tree4591738b231d2229b863b7a61b9bb5bb1c69733c /tinyusb/class
parent30124b9b02e067c967aca642823f3ed4cb7f618d (diff)
clean up osal semaphore/queue/mutex
Diffstat (limited to 'tinyusb/class')
-rw-r--r--tinyusb/class/cdc_rndis_host.c2
-rw-r--r--tinyusb/class/msc_host.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/tinyusb/class/cdc_rndis_host.c b/tinyusb/class/cdc_rndis_host.c
index 0e31fcc9a..7f164fb48 100644
--- a/tinyusb/class/cdc_rndis_host.c
+++ b/tinyusb/class/cdc_rndis_host.c
@@ -89,7 +89,7 @@ tusb_error_t tusbh_cdc_rndis_get_mac_addr(uint8_t dev_addr, uint8_t mac_address[
// To enable the TASK_ASSERT style (quick return on false condition) in a real RTOS, a task must act as a wrapper
// and is used mainly to call subtasks. Within a subtask return statement can be called freely, the task with
// forever loop cannot have any return at all.
-OSAL_TASK_FUNCTION(cdch_rndis_task) (void* p_task_para)
+OSAL_TASK_FUNCTION(cdch_rndis_task) (void* param;)
{
OSAL_TASK_LOOP_BEGIN
diff --git a/tinyusb/class/msc_host.c b/tinyusb/class/msc_host.c
index 5dcc6f301..f4859c1eb 100644
--- a/tinyusb/class/msc_host.c
+++ b/tinyusb/class/msc_host.c
@@ -54,8 +54,7 @@
TUSB_CFG_ATTR_USBRAM STATIC_VAR msch_interface_t msch_data[TUSB_CFG_HOST_DEVICE_MAX];
//------------- Initalization Data -------------//
-OSAL_SEM_DEF(msch_semaphore);
-static osal_semaphore_handle_t msch_sem_hdl;
+static osal_semaphore_t msch_sem_hdl;
// buffer used to read scsi information when mounted, largest response data currently is inquiry
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4) STATIC_VAR uint8_t msch_buffer[sizeof(scsi_inquiry_data_t)];
@@ -291,7 +290,7 @@ tusb_error_t tuh_msc_write10(uint8_t dev_addr, uint8_t lun, void const * p_buffe
void msch_init(void)
{
memclr_(msch_data, sizeof(msch_interface_t)*TUSB_CFG_HOST_DEVICE_MAX);
- msch_sem_hdl = osal_semaphore_create( OSAL_SEM_REF(msch_semaphore) );
+ msch_sem_hdl = osal_semaphore_create(1, 0);
}
tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t const *p_interface_desc, uint16_t *p_length)