@@ -85,7 +85,7 @@ void supervisor_tick(void) {
8585 background_callback_add (& tick_callback , supervisor_background_tick , NULL );
8686}
8787
88- uint64_t supervisor_get_raw_subticks (void ) {
88+ static uint64_t _get_raw_subticks (void ) {
8989 uint64_t ticks ;
9090 uint8_t subticks ;
9191 ticks = port_get_raw_ticks (& subticks );
@@ -104,7 +104,7 @@ uint32_t supervisor_ticks_ms32() {
104104}
105105
106106void mp_hal_delay_ms (mp_uint_t delay_ms ) {
107- uint64_t start_subtick = supervisor_get_raw_subticks ();
107+ uint64_t start_subtick = _get_raw_subticks ();
108108 // Convert delay from ms to subticks
109109 uint64_t delay_subticks = (delay_ms * (uint64_t )32768 ) / 1000 ;
110110 uint64_t end_subtick = start_subtick + delay_subticks ;
@@ -119,15 +119,15 @@ void mp_hal_delay_ms(mp_uint_t delay_ms) {
119119 break ;
120120 }
121121 // Recalculate remaining delay after running background tasks
122- remaining = end_subtick - supervisor_get_raw_subticks ();
122+ remaining = end_subtick - _get_raw_subticks ();
123123 // If remaining delay is less than 1 tick, idle loop until end of delay
124124 int64_t remaining_ticks = remaining / 32 ;
125125 if (remaining_ticks > 0 ) {
126126 port_interrupt_after_ticks (remaining_ticks );
127127 // Idle until an interrupt happens.
128128 port_idle_until_interrupt ();
129129 }
130- remaining = end_subtick - supervisor_get_raw_subticks ();
130+ remaining = end_subtick - _get_raw_subticks ();
131131 }
132132}
133133
0 commit comments