rename ASSERT_ERR to TU_ASSERT_ERR to prevent conflict with user code

This commit is contained in:
hathach
2018-04-12 17:55:15 +07:00
parent 6d8f4bca47
commit 752a9f45d7
12 changed files with 43 additions and 39 deletions

View File

@@ -134,11 +134,11 @@ tusb_error_t hcd_init(void)
memclr_(&ehci_data, sizeof(ehci_data_t));
#if (CFG_TUSB_CONTROLLER_0_MODE & OPT_MODE_HOST)
ASSERT_ERR (hcd_controller_init(0));
TU_ASSERT_ERR (hcd_controller_init(0));
#endif
#if (CFG_TUSB_CONTROLLER_1_MODE & OPT_MODE_HOST)
ASSERT_ERR (hcd_controller_init(1));
TU_ASSERT_ERR (hcd_controller_init(1));
#endif
return TUSB_ERROR_NONE;
@@ -347,7 +347,7 @@ tusb_error_t hcd_pipe_control_close(uint8_t dev_addr)
if (dev_addr != 0)
{
ASSERT_ERR( list_remove_qhd( (ehci_link_t*) get_async_head( usbh_devices[dev_addr].core_id ),
TU_ASSERT_ERR( list_remove_qhd( (ehci_link_t*) get_async_head( usbh_devices[dev_addr].core_id ),
(ehci_link_t*) p_qhd) );
}
@@ -416,7 +416,7 @@ tusb_error_t hcd_pipe_queue_xfer(pipe_handle_t pipe_hdl, uint8_t buffer[], uint
tusb_error_t hcd_pipe_xfer(pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete)
{
ASSERT_ERR ( hcd_pipe_queue_xfer(pipe_hdl, buffer, total_bytes) );
TU_ASSERT_ERR ( hcd_pipe_queue_xfer(pipe_hdl, buffer, total_bytes) );
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle(pipe_hdl);
@@ -445,14 +445,14 @@ tusb_error_t hcd_pipe_close(pipe_handle_t pipe_hdl)
if ( pipe_hdl.xfer_type == TUSB_XFER_BULK )
{
ASSERT_ERR( list_remove_qhd(
TU_ASSERT_ERR( list_remove_qhd(
(ehci_link_t*) get_async_head( usbh_devices[pipe_hdl.dev_addr].core_id ),
(ehci_link_t*) p_qhd) );
}
#if EHCI_PERIODIC_LIST // TODO refractor/group this together
else
{
ASSERT_ERR( list_remove_qhd(
TU_ASSERT_ERR( list_remove_qhd(
get_period_head( usbh_devices[pipe_hdl.dev_addr].core_id, p_qhd->interval_ms ),
(ehci_link_t*) p_qhd) );
}