1 parent aacb1ad commit 46f6f9fCopy full SHA for 46f6f9f
1 file changed
atmel-samd/main.c
@@ -196,6 +196,11 @@ int main(int argc, char **argv) {
196
stack_top = (char*)&stack_dummy;
197
reset_mp();
198
199
+ // Start USB after getting everything going.
200
+ #ifdef USB_REPL
201
+ udc_start();
202
+ #endif
203
+
204
// Main script is finished, so now go into REPL mode.
205
// The REPL mode can change, or it can request a soft reset.
206
int exit_code = 0;
@@ -327,10 +332,6 @@ void samd21_init(void) {
327
332
// pin_conf.direction = PORT_PIN_DIR_OUTPUT;
328
333
// port_pin_set_config(MICROPY_HW_LED1, &pin_conf);
329
334
// port_pin_set_output_level(MICROPY_HW_LED1, false);
330
-
331
- #ifdef USB_REPL
- udc_start();
- #endif
335
}
336
337
#endif
0 commit comments