File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ void autoreset_disable() {
54
54
autoreset_enabled = false;
55
55
}
56
56
57
+ inline bool autoreset_is_enabled () {
58
+ return autoreset_enabled ;
59
+ }
60
+
57
61
void autoreset_start () {
58
62
autoreset_delay_ms = AUTORESET_DELAY_MS ;
59
63
}
Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ void autoreset_start(void);
37
37
void autoreset_stop (void );
38
38
void autoreset_enable (void );
39
39
void autoreset_disable (void );
40
+ bool autoreset_is_enabled (void );
40
41
41
42
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_AUTORESET_H__
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ bool start_mp(void) {
259
259
#ifdef AUTORESET_DELAY_MS
260
260
if (cdc_enabled_at_start ) {
261
261
mp_hal_stdout_tx_str ("\r\n" );
262
- mp_hal_stdout_tx_str ("Auto-soft reset is on. Simply save files over USB to run them.\r\n" );
262
+ 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" );
263
263
}
264
264
#endif
265
265
@@ -330,10 +330,14 @@ bool start_mp(void) {
330
330
if (!cdc_enabled_before && mp_cdc_enabled ) {
331
331
if (cdc_enabled_at_start ) {
332
332
mp_hal_stdout_tx_str ("\r\n\r\n" );
333
+ }
334
+
335
+ if (!cdc_enabled_at_start && autoreset_is_enabled ()) {
336
+ 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" );
333
337
} else {
334
- mp_hal_stdout_tx_str ("Auto-soft reset is on. Simply save files over USB to run them .\r\n" );
338
+ mp_hal_stdout_tx_str ("Auto-soft reset is off .\r\n" );
335
339
}
336
- mp_hal_stdout_tx_str ("Press any key to enter the REPL and disable auto-reset . Use CTRL-D to soft reset.\r\n" );
340
+ mp_hal_stdout_tx_str ("Press any key to enter the REPL. Use CTRL-D to soft reset.\r\n" );
337
341
}
338
342
if (cdc_enabled_before && !mp_cdc_enabled ) {
339
343
cdc_enabled_at_start = false;
You can’t perform that action at this time.
0 commit comments