File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757#include "supervisor/shared/stack.h"
5858#include "supervisor/serial.h"
5959
60+ #include "boards/board.h"
61+
6062#if CIRCUITPY_DISPLAYIO
6163#include "shared-module/displayio/__init__.h"
6264#endif
@@ -425,6 +427,9 @@ int __attribute__((used)) main(void) {
425427 // no SPI flash filesystem, and we might erase the existing one.
426428 filesystem_init (safe_mode == NO_SAFE_MODE , false);
427429
430+ // displays init after filesystem, since they could share the flash SPI
431+ board_init ();
432+
428433 // Reset everything and prep MicroPython to run boot.py.
429434 reset_port ();
430435 reset_board ();
Original file line number Diff line number Diff line change @@ -232,9 +232,6 @@ safe_mode_t port_init(void) {
232232 // Reset everything into a known state before board_init.
233233 reset_port ();
234234
235- // Init the board last so everything else is ready
236- board_init ();
237-
238235 #ifdef SAMD21
239236 if (PM -> RCAUSE .bit .BOD33 == 1 || PM -> RCAUSE .bit .BOD12 == 1 ) {
240237 return BROWNOUT ;
Original file line number Diff line number Diff line change @@ -76,9 +76,6 @@ safe_mode_t port_init(void) {
7676 // Reset everything into a known state before board_init.
7777 reset_port ();
7878
79- // Init the board last so everything else is ready
80- board_init ();
81-
8279 if (board_requests_safe_mode ()) {
8380 return USER_SAFE_MODE ;
8481 }
Original file line number Diff line number Diff line change @@ -92,9 +92,6 @@ safe_mode_t port_init(void) {
9292 rtc_init ();
9393 #endif
9494
95- // Will do usb_init() if chip supports USB.
96- board_init ();
97-
9895 return NO_SAFE_MODE ;
9996}
10097
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ safe_mode_t port_init(void) {
5050 stm32f4_peripherals_gpio_init ();
5151
5252 tick_init ();
53- board_init ();
5453
5554 return NO_SAFE_MODE ;
5655}
You can’t perform that action at this time.
0 commit comments