diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2016-10-17 15:11:19 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2016-10-21 15:44:09 -0700 |
| commit | 46f6f9f899f69ca678ef6f3facc5096e57a9787d (patch) | |
| tree | f7a689eb689f1855cf00b67917c51bfeec6d16b3 | |
| parent | aacb1adcd10f6325719bfe4faa0c8593eef94016 (diff) | |
atmel-samd: Start USB at the end so storage is initialized.
| -rw-r--r-- | atmel-samd/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/atmel-samd/main.c b/atmel-samd/main.c index 6d781e796..cd1eafc23 100644 --- a/atmel-samd/main.c +++ b/atmel-samd/main.c @@ -196,6 +196,11 @@ int main(int argc, char **argv) { stack_top = (char*)&stack_dummy; reset_mp(); + // Start USB after getting everything going. + #ifdef USB_REPL + udc_start(); + #endif + // Main script is finished, so now go into REPL mode. // The REPL mode can change, or it can request a soft reset. int exit_code = 0; @@ -327,10 +332,6 @@ void samd21_init(void) { // pin_conf.direction = PORT_PIN_DIR_OUTPUT; // port_pin_set_config(MICROPY_HW_LED1, &pin_conf); // port_pin_set_output_level(MICROPY_HW_LED1, false); - - #ifdef USB_REPL - udc_start(); - #endif } #endif |
