Skip to content

Commit 9d43a25

Browse files
hathachdhalbert
authored andcommitted
update tinyusb to fix disconnect/suspend issue with #1681
1 parent 5b0c1c8 commit 9d43a25

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/tinyusb

Submodule tinyusb updated 121 files

supervisor/shared/usb/usb.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@ void tud_mount_cb(void) {
9292
void tud_umount_cb(void) {
9393
}
9494

95-
uint32_t tusb_hal_millis(void) {
96-
uint64_t ms;
97-
uint32_t us;
98-
current_tick(&ms, &us);
99-
return (uint32_t) ms;
95+
// Invoked when usb bus is suspended
96+
// remote_wakeup_en : if host allows us to perform remote wakeup
97+
// USB Specs: Within 7ms, device must draw an average current less than 2.5 mA from bus
98+
void tud_suspend_cb(bool remote_wakeup_en) {
10099
}
101100

101+
// Invoked when usb bus is resumed
102+
void tud_resume_cb(void) {
103+
}
102104

103105
// Invoked when cdc when line state changed e.g connected/disconnected
104106
// Use to reset to DFU when disconnect with 1200 bps

0 commit comments

Comments
 (0)