clean up osal semaphore/queue/mutex

This commit is contained in:
hathach
2018-03-01 11:17:11 +07:00
parent 30124b9b02
commit a789fad4b7
24 changed files with 225 additions and 249 deletions

View File

@@ -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

View File

@@ -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)