Skip to content

Commit 9fd1032

Browse files
committed
supervisor: rename some locals for clarity
It's perfectly OK for these variables with static linkage to have the same name, but it's inconvenient for humans like me.
1 parent db43c56 commit 9fd1032

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

supervisor/shared/tick.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
static volatile uint64_t PLACE_IN_DTCM_BSS(background_ticks);
6868

69-
static background_callback_t callback;
69+
static background_callback_t tick_callback;
7070

7171
volatile uint64_t last_finished_tick = 0;
7272

@@ -119,7 +119,7 @@ void supervisor_tick(void) {
119119
#endif
120120
}
121121
#endif
122-
background_callback_add(&callback, supervisor_background_tasks, NULL);
122+
background_callback_add(&tick_callback, supervisor_background_tasks, NULL);
123123
}
124124

125125
uint64_t supervisor_ticks_ms64() {

supervisor/shared/usb/usb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ void usb_init(void) {
6464
tusb_init();
6565

6666
#if MICROPY_KBD_EXCEPTION
67-
// Set Ctrl+C as wanted char, tud_cdc_rx_wanted_cb() callback will be invoked when Ctrl+C is received
68-
// This callback always got invoked regardless of mp_interrupt_char value since we only set it once here
67+
// Set Ctrl+C as wanted char, tud_cdc_rx_wanted_cb() usb_callback will be invoked when Ctrl+C is received
68+
// This usb_callback always got invoked regardless of mp_interrupt_char value since we only set it once here
6969
tud_cdc_set_wanted_char(CHAR_CTRL_C);
7070
#endif
7171

@@ -83,14 +83,14 @@ void usb_background(void) {
8383
}
8484
}
8585

86-
static background_callback_t callback;
86+
static background_callback_t usb_callback;
8787
static void usb_background_do(void* unused) {
8888
usb_background();
8989
}
9090

9191
void usb_irq_handler(void) {
9292
tud_int_handler(0);
93-
background_callback_add(&callback, usb_background_do, NULL);
93+
background_callback_add(&usb_callback, usb_background_do, NULL);
9494
}
9595

9696
//--------------------------------------------------------------------+

0 commit comments

Comments
 (0)