File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636#include "boards/board.h"
3737
3838#include "supervisor/port.h"
39+ #include "supervisor/background_callback.h"
40+ #include "supervisor/usb.h"
3941#include "supervisor/shared/tick.h"
4042
4143#include "common-hal/microcontroller/Pin.h"
@@ -114,13 +116,20 @@ uint32_t port_get_saved_word(void) {
114116 return _ebss ;
115117}
116118
119+ static background_callback_t callback ;
120+ static void usb_background_do (void * unused ) {
121+ usb_background ();
122+ }
123+
117124volatile bool _tick_enabled ;
118125void board_timerhook (void )
119126{
120127 // Do things common to all ports when the tick occurs
121128 if (_tick_enabled ) {
122129 supervisor_tick ();
123130 }
131+
132+ background_callback_add (& callback , usb_background_do , NULL );
124133}
125134
126135uint64_t port_get_raw_ticks (uint8_t * subticks ) {
You can’t perform that action at this time.
0 commit comments