summaryrefslogtreecommitdiff
path: root/tinyusb/class
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/class
parent6d8f4bca47d31ba4d114aa216042913031c56f1a (diff)
rename ASSERT_ERR to TU_ASSERT_ERR to prevent conflict with user code
Diffstat (limited to 'tinyusb/class')
-rw-r--r--tinyusb/class/custom_class_host.c4
-rw-r--r--tinyusb/class/hid/hid_host.c2
-rw-r--r--tinyusb/class/msc/msc_host.c24
3 files changed, 15 insertions, 15 deletions
diff --git a/tinyusb/class/custom_class_host.c b/tinyusb/class/custom_class_host.c
index 6aca2bfb3..20b06d184 100644
--- a/tinyusb/class/custom_class_host.c
+++ b/tinyusb/class/custom_class_host.c
@@ -73,7 +73,7 @@ static tusb_error_t cush_validate_paras(uint8_t dev_addr, uint16_t vendor_id, ui
//--------------------------------------------------------------------+
tusb_error_t tusbh_custom_read(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id, void * p_buffer, uint16_t length)
{
- ASSERT_ERR( cush_validate_paras(dev_addr, vendor_id, product_id, p_buffer, length) );
+ TU_ASSERT_ERR( cush_validate_paras(dev_addr, vendor_id, product_id, p_buffer, length) );
if ( !hcd_pipe_is_idle(custom_interface[dev_addr-1].pipe_in) )
{
@@ -87,7 +87,7 @@ tusb_error_t tusbh_custom_read(uint8_t dev_addr, uint16_t vendor_id, uint16_t pr
tusb_error_t tusbh_custom_write(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id, void const * p_data, uint16_t length)
{
- ASSERT_ERR( cush_validate_paras(dev_addr, vendor_id, product_id, p_data, length) );
+ TU_ASSERT_ERR( cush_validate_paras(dev_addr, vendor_id, product_id, p_data, length) );
if ( !hcd_pipe_is_idle(custom_interface[dev_addr-1].pipe_out) )
{
diff --git a/tinyusb/class/hid/hid_host.c b/tinyusb/class/hid/hid_host.c
index 65bb36b15..69f86ee0b 100644
--- a/tinyusb/class/hid/hid_host.c
+++ b/tinyusb/class/hid/hid_host.c
@@ -80,7 +80,7 @@ tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_int
VERIFY (report, TUSB_ERROR_INVALID_PARA);
TU_ASSSERT (!hcd_pipe_is_busy(p_hid->pipe_hdl), TUSB_ERROR_INTERFACE_IS_BUSY);
- ASSERT_ERR( hcd_pipe_xfer(p_hid->pipe_hdl, report, p_hid->report_size, true) ) ;
+ TU_ASSERT_ERR( hcd_pipe_xfer(p_hid->pipe_hdl, report, p_hid->report_size, true) ) ;
return TUSB_ERROR_NONE;
}
diff --git a/tinyusb/class/msc/msc_host.c b/tinyusb/class/msc/msc_host.c
index dcdfa4d53..afe7032a6 100644
--- a/tinyusb/class/msc/msc_host.c
+++ b/tinyusb/class/msc/msc_host.c
@@ -116,16 +116,16 @@ static tusb_error_t msch_command_xfer(msch_interface_t * p_msch, void* p_buffer)
{ // there is data phase
if (p_msch->cbw.dir & TUSB_DIR_IN_MASK)
{
- ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false) );
- ASSERT_ERR( hcd_pipe_queue_xfer(p_msch->bulk_in , p_buffer, p_msch->cbw.xfer_bytes) );
+ TU_ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false) );
+ TU_ASSERT_ERR( hcd_pipe_queue_xfer(p_msch->bulk_in , p_buffer, p_msch->cbw.xfer_bytes) );
}else
{
- ASSERT_ERR( hcd_pipe_queue_xfer(p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t)) );
- ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_out , p_buffer, p_msch->cbw.xfer_bytes, false) );
+ TU_ASSERT_ERR( hcd_pipe_queue_xfer(p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t)) );
+ TU_ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_out , p_buffer, p_msch->cbw.xfer_bytes, false) );
}
}
- ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_in , (uint8_t*) &p_msch->csw, sizeof(msc_csw_t), true) );
+ TU_ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_in , (uint8_t*) &p_msch->csw, sizeof(msc_csw_t), true) );
return TUSB_ERROR_NONE;
}
@@ -149,7 +149,7 @@ tusb_error_t tusbh_msc_inquiry(uint8_t dev_addr, uint8_t lun, uint8_t *p_data)
memcpy(p_msch->cbw.command, &cmd_inquiry, p_msch->cbw.cmd_len);
- ASSERT_ERR ( msch_command_xfer(p_msch, p_data) );
+ TU_ASSERT_ERR ( msch_command_xfer(p_msch, p_data) );
return TUSB_ERROR_NONE;
}
@@ -174,7 +174,7 @@ tusb_error_t tusbh_msc_read_capacity10(uint8_t dev_addr, uint8_t lun, uint8_t *p
memcpy(p_msch->cbw.command, &cmd_read_capacity10, p_msch->cbw.cmd_len);
- ASSERT_ERR ( msch_command_xfer(p_msch, p_data) );
+ TU_ASSERT_ERR ( msch_command_xfer(p_msch, p_data) );
return TUSB_ERROR_NONE;
}
@@ -199,7 +199,7 @@ tusb_error_t tuh_msc_request_sense(uint8_t dev_addr, uint8_t lun, uint8_t *p_dat
memcpy(p_msch->cbw.command, &cmd_request_sense, p_msch->cbw.cmd_len);
- ASSERT_ERR ( msch_command_xfer(p_msch, p_data) );
+ TU_ASSERT_ERR ( msch_command_xfer(p_msch, p_data) );
return TUSB_ERROR_NONE;
}
@@ -225,8 +225,8 @@ tusb_error_t tuh_msc_test_unit_ready(uint8_t dev_addr, uint8_t lun, msc_csw_t *
memcpy(p_msch->cbw.command, &cmd_test_unit_ready, p_msch->cbw.cmd_len);
// TODO MSCH refractor test uinit ready
- ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false) );
- ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_in , (uint8_t*) p_csw, sizeof(msc_csw_t), true) );
+ TU_ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false) );
+ TU_ASSERT_ERR( hcd_pipe_xfer(p_msch->bulk_in , (uint8_t*) p_csw, sizeof(msc_csw_t), true) );
return TUSB_ERROR_NONE;
}
@@ -252,7 +252,7 @@ tusb_error_t tuh_msc_read10(uint8_t dev_addr, uint8_t lun, void * p_buffer, uin
memcpy(p_msch->cbw.command, &cmd_read10, p_msch->cbw.cmd_len);
- ASSERT_ERR ( msch_command_xfer(p_msch, p_buffer));
+ TU_ASSERT_ERR ( msch_command_xfer(p_msch, p_buffer));
return TUSB_ERROR_NONE;
}
@@ -278,7 +278,7 @@ tusb_error_t tuh_msc_write10(uint8_t dev_addr, uint8_t lun, void const * p_buffe
memcpy(p_msch->cbw.command, &cmd_write10, p_msch->cbw.cmd_len);
- ASSERT_ERR ( msch_command_xfer(p_msch, (void*) p_buffer));
+ TU_ASSERT_ERR ( msch_command_xfer(p_msch, (void*) p_buffer));
return TUSB_ERROR_NONE;
}