diff options
| author | hathach <[email protected]> | 2018-08-13 18:10:23 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-08-13 18:10:23 +0700 |
| commit | e07b1acbed02fff395c91b421b7fdf6c7cda61a4 (patch) | |
| tree | 8773b56b7236567fd9ec6dafc99c5de58127ecc9 /src/class/hid | |
| parent | b07124c623107da46b1125b28092828f487e8c45 (diff) | |
rename VERIFY to TU_VERIFY to avoid conflict with application
Diffstat (limited to 'src/class/hid')
| -rw-r--r-- | src/class/hid/hid_device.c | 12 | ||||
| -rw-r--r-- | src/class/hid/hid_host.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 0527c14bf..410359e6d 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -125,7 +125,7 @@ bool tud_hid_generic_ready(void) bool tud_hid_generic_report(uint8_t report_id, void const* report, uint8_t len)
{
- VERIFY( tud_hid_generic_ready() && (len < REPORT_BUFSIZE) );
+ TU_VERIFY( tud_hid_generic_ready() && (len < REPORT_BUFSIZE) );
hidd_interface_t * p_hid = &_hidd_itf[ITF_IDX_GENERIC];
@@ -159,7 +159,7 @@ bool tud_hid_keyboard_is_boot_protocol(void) static bool hidd_kbd_report(hid_keyboard_report_t const *p_report)
{
- VERIFY( tud_hid_keyboard_ready() );
+ TU_VERIFY( tud_hid_keyboard_ready() );
hidd_interface_t * p_hid = _kbd_rpt.itf;
@@ -253,7 +253,7 @@ bool tud_hid_mouse_is_boot_protocol(void) static bool hidd_mouse_report(hid_mouse_report_t const *p_report)
{
- VERIFY( tud_hid_mouse_ready() );
+ TU_VERIFY( tud_hid_mouse_ready() );
hidd_interface_t * p_hid = _mse_rpt.itf;
memcpy(p_hid->report_buf, p_report, sizeof(hid_mouse_report_t));
@@ -277,7 +277,7 @@ bool tud_hid_mouse_data(uint8_t buttons, int8_t x, int8_t y, int8_t scroll, int8 bool tud_hid_mouse_move(int8_t x, int8_t y)
{
- VERIFY( tud_hid_mouse_ready() );
+ TU_VERIFY( tud_hid_mouse_ready() );
hidd_interface_t * p_hid = _mse_rpt.itf;
uint8_t prev_buttons = p_hid->report_buf[0];
@@ -287,7 +287,7 @@ bool tud_hid_mouse_move(int8_t x, int8_t y) bool tud_hid_mouse_scroll(int8_t vertical, int8_t horizontal)
{
- VERIFY( tud_hid_mouse_ready() );
+ TU_VERIFY( tud_hid_mouse_ready() );
hidd_interface_t * p_hid = _mse_rpt.itf;
uint8_t prev_buttons = p_hid->report_buf[0];
@@ -390,7 +390,7 @@ tusb_error_t hidd_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, u TU_ASSERT(p_hid, ERR_TUD_INVALID_DESCRIPTOR);
}
- VERIFY(p_hid->desc_report, ERR_TUD_INVALID_DESCRIPTOR);
+ TU_VERIFY(p_hid->desc_report, ERR_TUD_INVALID_DESCRIPTOR);
TU_ASSERT( dcd_edpt_open(rhport, desc_edpt), ERR_TUD_EDPT_OPEN_FAILED );
p_hid->itf_num = desc_itf->bInterfaceNumber;
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index fa617c5b0..369dad638 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -77,7 +77,7 @@ tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_int //------------- parameters validation -------------//
// TODO change to use is configured function
TU_ASSERT (TUSB_DEVICE_STATE_CONFIGURED == tuh_device_get_state(dev_addr), TUSB_ERROR_DEVICE_NOT_READY);
- VERIFY (report, TUSB_ERROR_INVALID_PARA);
+ TU_VERIFY (report, TUSB_ERROR_INVALID_PARA);
TU_ASSSERT (!hcd_pipe_is_busy(p_hid->pipe_hdl), TUSB_ERROR_INTERFACE_IS_BUSY);
TU_ASSERT_ERR( hcd_pipe_xfer(p_hid->pipe_hdl, report, p_hid->report_size, true) ) ;
|
