Skip to content

Commit bfc1fc5

Browse files
authored
fix(usb): uninitilized variable warning message
1 parent b333bf2 commit bfc1fc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: cores/esp32/USB.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,15 @@ static bool tinyusb_device_suspended = false;
100100
void tud_mount_cb(void) {
101101
tinyusb_device_mounted = true;
102102
arduino_usb_event_data_t p;
103+
p.suspend.remote_wakeup_en = 0;
103104
arduino_usb_event_post(ARDUINO_USB_EVENTS, ARDUINO_USB_STARTED_EVENT, &p, sizeof(arduino_usb_event_data_t), portMAX_DELAY);
104105
}
105106

106107
// Invoked when device is unmounted
107108
void tud_umount_cb(void) {
108109
tinyusb_device_mounted = false;
109110
arduino_usb_event_data_t p;
111+
p.suspend.remote_wakeup_en = 0;
110112
arduino_usb_event_post(ARDUINO_USB_EVENTS, ARDUINO_USB_STOPPED_EVENT, &p, sizeof(arduino_usb_event_data_t), portMAX_DELAY);
111113
}
112114

@@ -123,6 +125,7 @@ void tud_suspend_cb(bool remote_wakeup_en) {
123125
void tud_resume_cb(void) {
124126
tinyusb_device_suspended = false;
125127
arduino_usb_event_data_t p;
128+
p.suspend.remote_wakeup_en = 0;
126129
arduino_usb_event_post(ARDUINO_USB_EVENTS, ARDUINO_USB_RESUME_EVENT, &p, sizeof(arduino_usb_event_data_t), portMAX_DELAY);
127130
}
128131

0 commit comments

Comments
 (0)