atmel-samd: Add message for when auto reset is off. Fixes #112
This commit is contained in:
parent
be1ed7aae4
commit
f5caf86870
@ -54,6 +54,10 @@ void autoreset_disable() {
|
||||
autoreset_enabled = false;
|
||||
}
|
||||
|
||||
inline bool autoreset_is_enabled() {
|
||||
return autoreset_enabled;
|
||||
}
|
||||
|
||||
void autoreset_start() {
|
||||
autoreset_delay_ms = AUTORESET_DELAY_MS;
|
||||
}
|
||||
|
@ -37,5 +37,6 @@ void autoreset_start(void);
|
||||
void autoreset_stop(void);
|
||||
void autoreset_enable(void);
|
||||
void autoreset_disable(void);
|
||||
bool autoreset_is_enabled(void);
|
||||
|
||||
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_AUTORESET_H__
|
||||
|
@ -259,7 +259,7 @@ bool start_mp(void) {
|
||||
#ifdef AUTORESET_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.\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");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -330,10 +330,14 @@ bool start_mp(void) {
|
||||
if (!cdc_enabled_before && mp_cdc_enabled) {
|
||||
if (cdc_enabled_at_start) {
|
||||
mp_hal_stdout_tx_str("\r\n\r\n");
|
||||
} else {
|
||||
mp_hal_stdout_tx_str("Auto-soft reset is on. Simply save files over USB to run them.\r\n");
|
||||
}
|
||||
mp_hal_stdout_tx_str("Press any key to enter the REPL and disable auto-reset. Use CTRL-D to soft reset.\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");
|
||||
} else {
|
||||
mp_hal_stdout_tx_str("Auto-soft reset is off.\r\n");
|
||||
}
|
||||
mp_hal_stdout_tx_str("Press any key to enter the REPL. Use CTRL-D to soft reset.\r\n");
|
||||
}
|
||||
if (cdc_enabled_before && !mp_cdc_enabled) {
|
||||
cdc_enabled_at_start = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user