summaryrefslogtreecommitdiff
path: root/tinyusb/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-04-12 17:55:15 +0700
committerhathach <[email protected]>2018-04-12 17:55:15 +0700
commit752a9f45d70959e36cf8c0cf3a5cd0c24731635e (patch)
tree518c66e1efc12a0cf74ff256a96ccedecb9ef4ef /tinyusb/host
parent6d8f4bca47d31ba4d114aa216042913031c56f1a (diff)
rename ASSERT_ERR to TU_ASSERT_ERR to prevent conflict with user code
Diffstat (limited to 'tinyusb/host')
-rw-r--r--tinyusb/host/ehci/ehci.c12
-rw-r--r--tinyusb/host/ohci/ohci.c4
-rw-r--r--tinyusb/host/usbh.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index 6ca89b837..d710d048b 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -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) );
}
diff --git a/tinyusb/host/ohci/ohci.c b/tinyusb/host/ohci/ohci.c
index e8fa264eb..5788aac94 100644
--- a/tinyusb/host/ohci/ohci.c
+++ b/tinyusb/host/ohci/ohci.c
@@ -484,7 +484,7 @@ static tusb_error_t pipe_queue_xfer(pipe_handle_t pipe_hdl, uint8_t buffer[], u
td_insert_to_ed(p_ed, p_gtd);
}else
{
- ASSERT_ERR(TUSB_ERROR_NOT_SUPPORTED_YET);
+ TU_ASSERT_ERR(TUSB_ERROR_NOT_SUPPORTED_YET);
}
return TUSB_ERROR_NONE;
@@ -497,7 +497,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( pipe_queue_xfer(pipe_hdl, buffer, total_bytes, true) );
+ TU_ASSERT_ERR( pipe_queue_xfer(pipe_hdl, buffer, total_bytes, true) );
tusb_xfer_type_t xfer_type = ed_get_xfer_type( ed_from_pipe_handle(pipe_hdl) );
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index 6e94ccd4e..73e6835ec 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -144,7 +144,7 @@ tusb_error_t usbh_init(void)
{
memclr_(usbh_devices, sizeof(usbh_device_info_t)*(CFG_TUSB_HOST_DEVICE_MAX+1));
- ASSERT_ERR( hcd_init() );
+ TU_ASSERT_ERR( hcd_init() );
//------------- Enumeration & Reporter Task init -------------//
enum_queue_hdl = osal_queue_create( ENUM_QUEUE_DEPTH, sizeof(uint32_t) );
@@ -223,7 +223,7 @@ tusb_error_t usbh_pipe_control_open(uint8_t dev_addr, uint8_t max_packet_size)
osal_semaphore_reset( usbh_devices[dev_addr].control.sem_hdl );
osal_mutex_reset( usbh_devices[dev_addr].control.mutex_hdl );
- ASSERT_ERR( hcd_pipe_control_open(dev_addr, max_packet_size) );
+ TU_ASSERT_ERR( hcd_pipe_control_open(dev_addr, max_packet_size) );
return TUSB_ERROR_NONE;
}
@@ -231,7 +231,7 @@ tusb_error_t usbh_pipe_control_open(uint8_t dev_addr, uint8_t max_packet_size)
static inline tusb_error_t usbh_pipe_control_close(uint8_t dev_addr) ATTR_ALWAYS_INLINE;
static inline tusb_error_t usbh_pipe_control_close(uint8_t dev_addr)
{
- ASSERT_ERR( hcd_pipe_control_close(dev_addr) );
+ TU_ASSERT_ERR( hcd_pipe_control_close(dev_addr) );
return TUSB_ERROR_NONE;
}