summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-08-24 21:34:51 +0700
committerhathach <[email protected]>2021-08-24 21:34:51 +0700
commit3debeb637acb49222f36fa08f904adc4f5d9e1b7 (patch)
treea0802244abf1361eab31a61d2475b28e7a432a34 /src/host
parent3c0c051df182cb7261e0f5eb6c52e84f860d0ae1 (diff)
test hid controller with rp2040
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 548456a40..51b8f85b6 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -252,7 +252,7 @@ bool tuh_vid_pid_get(uint8_t dev_addr, uint16_t* vid, uint16_t* pid)
tusb_speed_t tuh_speed_get (uint8_t dev_addr)
{
- return (tusb_speed_t) get_device(dev_addr)->speed;
+ return (tusb_speed_t) (dev_addr ? get_device(dev_addr)->speed : _dev0.speed);
}
#if CFG_TUSB_OS == OPT_OS_NONE