File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 36
36
#include "boards/board.h"
37
37
38
38
#include "supervisor/port.h"
39
+ #include "supervisor/background_callback.h"
40
+ #include "supervisor/usb.h"
39
41
#include "supervisor/shared/tick.h"
40
42
41
43
#include "common-hal/microcontroller/Pin.h"
@@ -114,13 +116,20 @@ uint32_t port_get_saved_word(void) {
114
116
return _ebss ;
115
117
}
116
118
119
+ static background_callback_t callback ;
120
+ static void usb_background_do (void * unused ) {
121
+ usb_background ();
122
+ }
123
+
117
124
volatile bool _tick_enabled ;
118
125
void board_timerhook (void )
119
126
{
120
127
// Do things common to all ports when the tick occurs
121
128
if (_tick_enabled ) {
122
129
supervisor_tick ();
123
130
}
131
+
132
+ background_callback_add (& callback , usb_background_do , NULL );
124
133
}
125
134
126
135
uint64_t port_get_raw_ticks (uint8_t * subticks ) {
You can’t perform that action at this time.
0 commit comments