summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-11-24 21:49:12 +0700
committerhathach <[email protected]>2020-11-24 21:49:12 +0700
commit148eea141798cd9aefea49aaedc06c885ab7a3aa (patch)
treeb3f01aadf3ffe84355a2f4ede31f212ecc306e11 /src/device/usbd.h
parent2bfcd446a58d987d2275774c985471198cf43328 (diff)
add tud_connected()
which return true as long as we receive the very first SETUP packet from host.
Diffstat (limited to 'src/device/usbd.h')
-rw-r--r--src/device/usbd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index ef248e4ca..360567743 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -56,6 +56,9 @@ extern void dcd_int_handler(uint8_t rhport);
// Get current bus speed
tusb_speed_t tud_speed_get(void);
+// Check if device is connected (may not mounted/configured yet)
+bool tud_connected(void);
+
// Check if device is connected and configured
bool tud_mounted(void);