Skip to content

Commit 097af80

Browse files
committed
Fix ticks
In #7497 port_background_task was renamed to port_background_tick but the actual call site wasn't changed. This meant that it was no longer called! Rename more functions from task to tick to make it clearer which is which.
1 parent 76f9c18 commit 097af80

File tree

14 files changed

+44
-48
lines changed

14 files changed

+44
-48
lines changed

ports/atmel-samd/background.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@
4242
// PB03 is physical pin "SCL" on the Metro M4 express
4343
// so you can't use this code AND an i2c peripheral
4444
// at the same time unless you change this
45-
void port_start_background_task(void) {
45+
void port_start_background_tick(void) {
4646
REG_PORT_DIRSET1 = (1 << 3);
4747
REG_PORT_OUTSET1 = (1 << 3);
4848
}
4949

50-
void port_finish_background_task(void) {
50+
void port_finish_background_tick(void) {
5151
REG_PORT_OUTCLR1 = (1 << 3);
5252
}
5353
#else
54-
void port_start_background_task(void) {
54+
void port_start_background_tick(void) {
5555
}
56-
void port_finish_background_task(void) {
56+
void port_finish_background_tick(void) {
5757
}
5858
#endif
5959

ports/broadcom/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#include "py/runtime.h"
2929
#include "supervisor/port.h"
3030

31-
void port_start_background_task(void) {
31+
void port_start_background_tick(void) {
3232
}
33-
void port_finish_background_task(void) {
33+
void port_finish_background_tick(void) {
3434
}
3535

3636
void port_background_tick(void) {

ports/cxd56/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void port_background_tick(void) {
3434
}
3535
void port_background_task(void) {
3636
}
37-
void port_start_background_task(void) {
37+
void port_start_background_tick(void) {
3838
}
39-
void port_finish_background_task(void) {
39+
void port_finish_background_tick(void) {
4040
}

ports/espressif/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ void port_background_tick(void) {
5151
void port_background_task(void) {
5252
}
5353

54-
void port_start_background_task(void) {
54+
void port_start_background_tick(void) {
5555
}
5656

57-
void port_finish_background_task(void) {
57+
void port_finish_background_tick(void) {
5858
}

ports/litex/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void port_background_task(void) {
3434
}
3535
void port_background_tick(void) {
3636
}
37-
void port_start_background_task(void) {
37+
void port_start_background_tick(void) {
3838
}
39-
void port_finish_background_task(void) {
39+
void port_finish_background_tick(void) {
4040
}

ports/mimxrt10xx/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ void PLACE_IN_ITCM(port_background_task)(void) {
3737
void port_background_tick(void) {
3838
}
3939

40-
void port_start_background_task(void) {
40+
void port_start_background_tick(void) {
4141
}
4242

43-
void port_finish_background_task(void) {
43+
void port_finish_background_tick(void) {
4444
}

ports/nrf/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
#include "common-hal/audiopwmio/PWMAudioOut.h"
4545
#endif
4646

47-
void port_start_background_task(void) {
47+
void port_start_background_tick(void) {
4848
}
4949

50-
void port_finish_background_task(void) {
50+
void port_finish_background_tick(void) {
5151
}
5252

5353
void port_background_tick(void) {

ports/raspberrypi/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#include "py/runtime.h"
2929
#include "supervisor/port.h"
3030

31-
void port_start_background_task(void) {
31+
void port_start_background_tick(void) {
3232
}
3333

34-
void port_finish_background_task(void) {
34+
void port_finish_background_tick(void) {
3535
}
3636

3737
void port_background_tick(void) {

ports/stm/background.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void port_background_task(void) {
3737
}
3838
void port_background_tick(void) {
3939
}
40-
void port_start_background_task(void) {
40+
void port_start_background_tick(void) {
4141
}
42-
void port_finish_background_task(void) {
42+
void port_finish_background_tick(void) {
4343
}

py/circuitpy_mpconfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ struct _supervisor_allocation_node;
439439
const char *readline_hist[8]; \
440440
struct _supervisor_allocation_node *first_embedded_allocation; \
441441

442-
void supervisor_run_background_tasks_if_tick(void);
443-
#define RUN_BACKGROUND_TASKS (supervisor_run_background_tasks_if_tick())
442+
void background_callback_run_all(void);
443+
#define RUN_BACKGROUND_TASKS (background_callback_run_all())
444444

445445
#define MICROPY_VM_HOOK_LOOP RUN_BACKGROUND_TASKS;
446446
#define MICROPY_VM_HOOK_RETURN RUN_BACKGROUND_TASKS;

0 commit comments

Comments
 (0)