added all assert check to osal_queue_send and osal_semaphore_post
This commit is contained in:
@@ -253,7 +253,7 @@ void usbh_xfer_isr(pipe_handle_t pipe_hdl, uint8_t class_code, tusb_event_t even
|
||||
{
|
||||
usbh_devices[ pipe_hdl.dev_addr ].control.pipe_status = event;
|
||||
// usbh_devices[ pipe_hdl.dev_addr ].control.xferred_bytes = xferred_bytes; not yet neccessary
|
||||
osal_semaphore_post( usbh_devices[ pipe_hdl.dev_addr ].control.sem_hdl );
|
||||
ASSERT( TUSB_ERROR_NONE == osal_semaphore_post( usbh_devices[ pipe_hdl.dev_addr ].control.sem_hdl ), VOID_RETURN);
|
||||
}else if (usbh_class_drivers[class_index].isr)
|
||||
{
|
||||
usbh_class_drivers[class_index].isr(pipe_hdl, event, xferred_bytes);
|
||||
@@ -265,22 +265,26 @@ void usbh_xfer_isr(pipe_handle_t pipe_hdl, uint8_t class_code, tusb_event_t even
|
||||
|
||||
void usbh_hub_port_plugged_isr(uint8_t hub_addr, uint8_t hub_port)
|
||||
{
|
||||
osal_queue_send(enum_queue_hdl,
|
||||
&(usbh_enumerate_t){
|
||||
.core_id = usbh_devices[hub_addr].core_id,
|
||||
.hub_addr = hub_addr,
|
||||
.hub_port = hub_port}
|
||||
);
|
||||
usbh_enumerate_t enum_entry =
|
||||
{
|
||||
.core_id = usbh_devices[hub_addr].core_id,
|
||||
.hub_addr = hub_addr,
|
||||
.hub_port = hub_port
|
||||
};
|
||||
|
||||
ASSERT( TUSB_ERROR_NONE == osal_queue_send(enum_queue_hdl, &enum_entry), VOID_RETURN );
|
||||
}
|
||||
|
||||
void usbh_hcd_rhport_plugged_isr(uint8_t hostid)
|
||||
{
|
||||
osal_queue_send(enum_queue_hdl,
|
||||
&(usbh_enumerate_t){
|
||||
.core_id = hostid,
|
||||
.hub_addr = 0,
|
||||
.hub_port = 0}
|
||||
);
|
||||
usbh_enumerate_t enum_entry =
|
||||
{
|
||||
.core_id = hostid,
|
||||
.hub_addr = 0,
|
||||
.hub_port = 0
|
||||
};
|
||||
|
||||
ASSERT( TUSB_ERROR_NONE == osal_queue_send(enum_queue_hdl, &enum_entry), VOID_RETURN );
|
||||
}
|
||||
|
||||
// a device unplugged on hostid, hub_addr, hub_port
|
||||
@@ -325,13 +329,14 @@ static void usbh_device_unplugged(uint8_t hostid, uint8_t hub_addr, uint8_t hub_
|
||||
|
||||
void usbh_hcd_rhport_unplugged_isr(uint8_t hostid)
|
||||
{
|
||||
osal_queue_send(enum_queue_hdl,
|
||||
&(usbh_enumerate_t)
|
||||
{
|
||||
.core_id = hostid,
|
||||
.hub_addr = 0,
|
||||
.hub_port = 0
|
||||
} );
|
||||
usbh_enumerate_t enum_entry =
|
||||
{
|
||||
.core_id = hostid,
|
||||
.hub_addr = 0,
|
||||
.hub_port = 0
|
||||
};
|
||||
|
||||
ASSERT( TUSB_ERROR_NONE == osal_queue_send(enum_queue_hdl, &enum_entry), VOID_RETURN );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user