diff options
| author | hathach <[email protected]> | 2018-03-29 13:28:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-29 13:28:30 +0700 |
| commit | d63d5d616074cc0ebf03dd0c6384f9b3d915547a (patch) | |
| tree | 4772b480ae87e4f0720af33e3563e013fa3fde20 /tinyusb/host | |
| parent | 1d33d4e07247107af6e8a14467852ed56734924c (diff) | |
more verify and assert clean up
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/ehci/ehci.c | 2 | ||||
| -rw-r--r-- | tinyusb/host/usbh.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index 3fc629fde..a14779ca2 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -958,7 +958,7 @@ static void qhd_init(ehci_qhd_t *p_qhd, uint8_t dev_addr, uint16_t max_packet_si {
if (TUSB_SPEED_HIGH == p_qhd->endpoint_speed)
{
- ASSERT_INT_WITHIN(1, 16, interval, VOID_RETURN);
+ TU_ASSERT( interval <= 16, VOID_RETURN);
if ( interval < 4) // sub milisecond interval
{
p_qhd->interval_ms = 0;
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index e0be32e3f..25856f6a8 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -128,7 +128,7 @@ static inline uint8_t get_configure_number_for_device(tusb_desc_device_t* dev_de //--------------------------------------------------------------------+
tusb_device_state_t tuh_device_get_state (uint8_t const dev_addr)
{
- ASSERT_INT_WITHIN(1, TUSB_CFG_HOST_DEVICE_MAX, dev_addr, TUSB_DEVICE_STATE_INVALID_PARAMETER);
+ TU_ASSERT( dev_addr <= TUSB_CFG_HOST_DEVICE_MAX, TUSB_DEVICE_STATE_INVALID_PARAMETER);
return (tusb_device_state_t) usbh_devices[dev_addr].state;
}
|
