File tree Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change 69
69
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
70
70
// --------------------------------------------------------------------+
71
71
72
- #define USBD_STACK_SZ (4096 )
73
-
74
- // --------------------------------------------------------------------+
75
- // Forward USB interrupt events to TinyUSB IRQ Handler
76
- // --------------------------------------------------------------------+
77
- // extern "C" void USBD_IRQHandler(void) {
78
- // tud_int_handler(0);
79
- // }
80
-
81
- // --------------------------------------------------------------------+
82
- // Porting API
83
- // --------------------------------------------------------------------+
84
-
85
- // USB Device Driver task
86
- // This top level thread processes all usb events and invokes callbacks
87
- static void usb_device_task (void *param) {
88
- (void )param;
89
- while (1 ) tud_task (); // RTOS forever loop
90
- }
72
+ // Note: persist mode is mostly copied from esp32-hal-tinyusb.c from arduino-esp32 core.
91
73
92
74
typedef enum {
93
75
RESTART_NO_PERSIST,
@@ -150,6 +132,19 @@ static void configure_pins(usb_hal_context_t *usb)
150
132
}
151
133
}
152
134
135
+ // --------------------------------------------------------------------+
136
+ // Porting API
137
+ // --------------------------------------------------------------------+
138
+
139
+ #define USBD_STACK_SZ (4096 )
140
+
141
+ // USB Device Driver task
142
+ // This top level thread processes all usb events and invokes callbacks
143
+ static void usb_device_task (void *param) {
144
+ (void )param;
145
+ while (1 ) tud_task (); // RTOS forever loop
146
+ }
147
+
153
148
void TinyUSB_Port_InitDevice (uint8_t rhport) {
154
149
(void )rhport;
155
150
You can’t perform that action at this time.
0 commit comments