File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,14 @@ static volatile uint64_t PLACE_IN_DTCM_BSS(background_ticks);
52
52
#define WATCHDOG_EXCEPTION_CHECK () 0
53
53
#endif
54
54
55
+ static background_callback_t callback ;
56
+
57
+ extern void run_background_tasks (void );
58
+
59
+ void background_task_tick (void * unused ) {
60
+ run_background_tasks ();
61
+ }
62
+
55
63
void supervisor_tick (void ) {
56
64
#if CIRCUITPY_FILESYSTEM_FLUSH_INTERVAL_MS > 0
57
65
filesystem_tick ();
@@ -69,6 +77,7 @@ void supervisor_tick(void) {
69
77
#endif
70
78
}
71
79
#endif
80
+ background_callback_add (& callback , background_task_tick , NULL );
72
81
}
73
82
74
83
uint64_t supervisor_ticks_ms64 () {
@@ -84,11 +93,9 @@ uint32_t supervisor_ticks_ms32() {
84
93
return supervisor_ticks_ms64 ();
85
94
}
86
95
87
- extern void run_background_tasks (void );
88
96
89
97
void PLACE_IN_ITCM (supervisor_run_background_tasks_if_tick )() {
90
98
background_callback_run_all ();
91
- run_background_tasks ();
92
99
}
93
100
94
101
void mp_hal_delay_ms (mp_uint_t delay ) {
You can’t perform that action at this time.
0 commit comments