Skip to content

Commit bbeed82

Browse files
committed
atmel-samd: Run boot.py and main.py at startup and soft reboot.
1 parent e569486 commit bbeed82

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

atmel-samd/main.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ void reset_mp() {
173173
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
174174

175175
pin_init0();
176+
177+
pyexec_file("boot.py");
178+
pyexec_file("main.py");
176179
}
177180

178181
int main(int argc, char **argv) {
@@ -189,15 +192,6 @@ int main(int argc, char **argv) {
189192
int stack_dummy;
190193
reset_mp();
191194

192-
#if MICROPY_REPL_EVENT_DRIVEN
193-
pyexec_event_repl_init();
194-
for (;;) {
195-
int c = mp_hal_stdin_rx_chr();
196-
if (pyexec_event_repl_process_char(c)) {
197-
break;
198-
}
199-
}
200-
#else
201195
// Main script is finished, so now go into REPL mode.
202196
// The REPL mode can change, or it can request a soft reset.
203197
int exit_code = 0;
@@ -215,7 +209,6 @@ int main(int argc, char **argv) {
215209
break;
216210
}
217211
}
218-
#endif
219212
mp_deinit();
220213
return 0;
221214
}

0 commit comments

Comments
 (0)