mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
clean up
This commit is contained in:
parent
e561f4f4c6
commit
3265f0b770
@ -114,7 +114,7 @@ void tud_cdc_xfer_cb(uint8_t coreid, tusb_event_t event, cdc_pipeid_t pipe_id, u
|
||||
void cdc_serial_app_init(void)
|
||||
{
|
||||
sem_hdl = osal_semaphore_create(1, 0);
|
||||
ASSERT_PTR( sem_hdl, VOID_RETURN);
|
||||
VERIFY(sem_hdl, );
|
||||
|
||||
osal_task_create(cdc_serial_app_task, "cdc", 128, NULL, CDC_SERIAL_APP_TASK_PRIO);
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ tusb_error_t hidd_open(uint8_t coreid, tusb_descriptor_interface_t const * p_int
|
||||
hidd_class_driver_t const * const p_driver = &hidd_class_driver[p_interface_desc->bInterfaceProtocol];
|
||||
hidd_interface_t * const p_hid = p_driver->p_interface;
|
||||
|
||||
ASSERT_PTR(p_hid, TUSB_ERROR_FAILED);
|
||||
VERIFY(p_hid, TUSB_ERROR_FAILED);
|
||||
|
||||
VERIFY( hal_dcd_pipe_open(coreid, p_desc_endpoint, &p_hid->ept_handle), TUSB_ERROR_DCD_FAILED );
|
||||
|
||||
@ -286,7 +286,7 @@ tusb_error_t hidd_open(uint8_t coreid, tusb_descriptor_interface_t const * p_int
|
||||
p_hid->p_report_desc = (p_interface_desc->bInterfaceProtocol == HID_PROTOCOL_KEYBOARD) ? tusbd_descriptor_pointers.p_hid_keyboard_report : tusbd_descriptor_pointers.p_hid_mouse_report;
|
||||
p_hid->report_length = p_desc_hid->wReportLength;
|
||||
|
||||
ASSERT_PTR(p_hid->p_report_desc, TUSB_ERROR_DESCRIPTOR_CORRUPTED);
|
||||
VERIFY(p_hid->p_report_desc, TUSB_ERROR_DESCRIPTOR_CORRUPTED);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -169,10 +169,10 @@ tusb_error_t usbd_init (void)
|
||||
|
||||
//------------- Task init -------------//
|
||||
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);
|
||||
VERIFY(usbd_queue_hdl, TUSB_ERROR_OSAL_QUEUE_FAILED);
|
||||
|
||||
usbd_control_xfer_sem_hdl = osal_semaphore_create(1, 0);
|
||||
ASSERT_PTR(usbd_queue_hdl, TUSB_ERROR_OSAL_SEMAPHORE_FAILED);
|
||||
VERIFY(usbd_queue_hdl, TUSB_ERROR_OSAL_SEMAPHORE_FAILED);
|
||||
|
||||
osal_task_create(usbd_task, "usbd", TUC_DEVICE_STACKSIZE, NULL, TUSB_CFG_OS_TASK_PRIO);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user