add tud_connected()

which return true as long as we receive the very first SETUP packet from
host.
This commit is contained in:
hathach
2020-11-24 21:49:12 +07:00
parent 2bfcd446a5
commit 148eea1417
2 changed files with 9 additions and 1 deletions

View File

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