Skip to content

Commit 6989126

Browse files
committed
Rename reload_next_character to reload_requested to make it match it's intended use
1 parent 567f3e3 commit 6989126

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ bool start_mp(safe_mode_t safe_mode) {
168168
reset_status_led();
169169

170170
if (result.return_code & PYEXEC_FORCED_EXIT) {
171-
return reload_next_character;
171+
return reload_requested;
172172
}
173173
}
174174

@@ -180,7 +180,7 @@ bool start_mp(safe_mode_t safe_mode) {
180180
#ifdef MICROPY_VM_HOOK_LOOP
181181
MICROPY_VM_HOOK_LOOP
182182
#endif
183-
if (reload_next_character) {
183+
if (reload_requested) {
184184
return true;
185185
}
186186

ports/atmel-samd/mphalport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int mp_hal_stdin_rx_chr(void) {
2828
#ifdef MICROPY_VM_HOOK_LOOP
2929
MICROPY_VM_HOOK_LOOP
3030
#endif
31-
// if (reload_next_character) {
31+
// if (reload_requested) {
3232
// return CHAR_CTRL_D;
3333
// }
3434
if (usb_bytes_available()) {

shared-bindings/supervisor/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(supervisor_set_rgb_status_brightness_obj, supervisor_s
100100
//| Reload the microcontroller (equivalent to hitting Ctrl-D at the REPL).
101101
//|
102102
STATIC mp_obj_t supervisor_reload(void) {
103-
reload_next_character = true;
103+
reload_requested = true;
104104

105105
MP_STATE_VM(mp_pending_exception) = MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception));
106106
#if MICROPY_ENABLE_SCHEDULER

supervisor/shared/autoreload.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@
3232
volatile uint32_t autoreload_delay_ms = 0;
3333
bool autoreload_enabled = false;
3434
static bool autoreload_suspended = false;
35-
volatile bool reload_next_character = false;
35+
volatile bool reload_requested = false;
3636

3737
inline void autoreload_tick() {
3838
if (autoreload_delay_ms == 0) {
3939
return;
4040
}
4141
if (autoreload_delay_ms == 1 && autoreload_enabled &&
42-
!autoreload_suspended && !reload_next_character) {
42+
!autoreload_suspended && !reload_requested) {
4343
mp_keyboard_interrupt();
44-
reload_next_character = true;
44+
reload_requested = true;
4545
}
4646
autoreload_delay_ms--;
4747
}
4848

4949
void autoreload_enable() {
5050
autoreload_enabled = true;
51-
reload_next_character = false;
51+
reload_requested = false;
5252
}
5353

5454
void autoreload_disable() {
@@ -73,5 +73,5 @@ void autoreload_start() {
7373

7474
void autoreload_stop() {
7575
autoreload_delay_ms = 0;
76-
reload_next_character = false;
76+
reload_requested = false;
7777
}

supervisor/shared/autoreload.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include <stdbool.h>
3131

32-
extern volatile bool reload_next_character;
32+
extern volatile bool reload_requested;
3333

3434
void autoreload_tick(void);
3535

0 commit comments

Comments
 (0)