summaryrefslogtreecommitdiff
path: root/atmel-samd/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-05-12 16:45:38 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-05-12 16:45:38 -0700
commit7672bf773637b008f4e5a334bcbd0a91c5ac95b2 (patch)
treeba3cd8749cb93b83d922b4bcaa5996847ccee9ad /atmel-samd/main.c
parente0f931afd3268229a291c5c8a2bef12bde697da3 (diff)
atmel-samd: Rename auto-reset to auto-reload to reduce confusion with physical reset buttons.
Diffstat (limited to 'atmel-samd/main.c')
-rw-r--r--atmel-samd/main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/atmel-samd/main.c b/atmel-samd/main.c
index da9c08019..0dfd2d471 100644
--- a/atmel-samd/main.c
+++ b/atmel-samd/main.c
@@ -38,7 +38,7 @@
#define INTERNAL_CIRCUITPY_CONFIG_START_ADDR (0x00040000 - 0x010000 - 0x100)
#endif
-#include "autoreset.h"
+#include "autoreload.h"
#include "flash_api.h"
#include "mpconfigboard.h"
#include "rgb_led_status.h"
@@ -84,7 +84,7 @@ void init_flash_fs(void) {
FRESULT res = f_mount(&vfs->fatfs, vfs->str, 1);
if (res == FR_NO_FILESYSTEM) {
- // no filesystem, or asked to reset it, so create a fresh one
+ // no filesystem so create a fresh one
// We are before USB initializes so temporarily undo the USB_WRITEABLE
// requirement.
@@ -120,8 +120,8 @@ static char heap[16384];
void reset_mp(void) {
reset_status_led();
new_status_color(0x8f008f);
- autoreset_stop();
- autoreset_enable();
+ autoreload_stop();
+ autoreload_enable();
// Sync the file systems in case any used RAM from the GC to cache. As soon
// as we re-init the GC all bets are off on the cache.
@@ -245,10 +245,10 @@ bool maybe_run(const char* filename, pyexec_result_t* exec_result) {
bool start_mp(void) {
bool cdc_enabled_at_start = mp_cdc_enabled;
- #ifdef AUTORESET_DELAY_MS
+ #ifdef CIRCUITPY_AUTORELOAD_DELAY_MS
if (cdc_enabled_at_start) {
mp_hal_stdout_tx_str("\r\n");
- mp_hal_stdout_tx_str("Auto-soft reset is on. Simply save files over USB to run them or enter REPL to disable.\r\n");
+ mp_hal_stdout_tx_str("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\r\n");
}
#endif
@@ -269,7 +269,7 @@ bool start_mp(void) {
reset_status_led();
if (result.return_code & PYEXEC_FORCED_EXIT) {
- return reset_next_character;
+ return reload_next_character;
}
// If not is USB mode then do not skip the repl.
@@ -309,11 +309,11 @@ bool start_mp(void) {
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP
#endif
- if (reset_next_character) {
+ if (reload_next_character) {
return true;
}
if (usb_rx_count > 0) {
- // Skip REPL if reset was requested.
+ // Skip REPL if reload was requested.
return receive_usb() == CHAR_CTRL_D;
}
@@ -322,12 +322,12 @@ bool start_mp(void) {
mp_hal_stdout_tx_str("\r\n\r\n");
}
- if (!cdc_enabled_at_start && autoreset_is_enabled()) {
- mp_hal_stdout_tx_str("Auto-soft reset is on. Simply save files over USB to run them or enter REPL to disable.\r\n");
+ if (!cdc_enabled_at_start && autoreload_is_enabled()) {
+ mp_hal_stdout_tx_str("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\r\n");
} else {
- mp_hal_stdout_tx_str("Auto-soft reset is off.\r\n");
+ mp_hal_stdout_tx_str("Auto-reload is off.\r\n");
}
- mp_hal_stdout_tx_str("Press any key to enter the REPL. Use CTRL-D to soft reset.\r\n");
+ mp_hal_stdout_tx_str("Press any key to enter the REPL. Use CTRL-D to reload.\r\n");
}
if (cdc_enabled_before && !mp_cdc_enabled) {
cdc_enabled_at_start = false;
@@ -529,13 +529,13 @@ int main(void) {
// Main script is finished, so now go into REPL mode.
- // The REPL mode can change, or it can request a soft reset.
+ // The REPL mode can change, or it can request a reload.
int exit_code = PYEXEC_FORCED_EXIT;
bool skip_repl = true;
bool first_run = true;
for (;;) {
if (!skip_repl) {
- autoreset_disable();
+ autoreload_disable();
new_status_color(REPL_RUNNING);
if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) {
exit_code = pyexec_raw_repl();