summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/tusb_types.h3
-rw-r--r--src/host/usbh.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index 5ab15aa3c..2b4ceb69c 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -48,7 +48,8 @@ typedef enum
{
TUSB_SPEED_FULL = 0,
TUSB_SPEED_LOW ,
- TUSB_SPEED_HIGH
+ TUSB_SPEED_HIGH,
+ TUSB_SPEED_INVALID = 0xff,
}tusb_speed_t;
/// defined base on USB Specs Endpoint's bmAttributes
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 10ae991f4..f278f4d94 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -153,7 +153,7 @@ tusb_device_state_t tuh_device_get_state (uint8_t const dev_addr)
tusb_speed_t tuh_device_get_speed (uint8_t const dev_addr)
{
- TU_ASSERT( dev_addr <= CFG_TUSB_HOST_DEVICE_MAX, TUSB_DEVICE_STATE_UNPLUG);
+ TU_ASSERT( dev_addr <= CFG_TUSB_HOST_DEVICE_MAX, TUSB_SPEED_INVALID);
return (tusb_speed_t) _usbh_devices[dev_addr].speed;
}