more verify and assert clean up

This commit is contained in:
hathach
2018-03-29 13:28:30 +07:00
parent 1d33d4e072
commit d63d5d6160
4 changed files with 15 additions and 36 deletions

View File

@@ -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;
}