atmel-samd: Start USB at the end so storage is initialized.

This commit is contained in:
Scott Shawcroft 2016-10-17 15:11:19 -07:00
parent aacb1adcd1
commit 46f6f9f899
1 changed files with 5 additions and 4 deletions

View File

@ -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