Move board_init to main.c

crypto-aes
Lucian Copeland 3 years ago
parent b9bed98538
commit 100409961a
  1. 5
      main.c
  2. 3
      ports/atmel-samd/supervisor/port.c
  3. 3
      ports/mimxrt10xx/supervisor/port.c
  4. 3
      ports/nrf/supervisor/port.c
  5. 1
      ports/stm32f4/supervisor/port.c

@ -57,6 +57,8 @@
#include "supervisor/shared/stack.h"
#include "supervisor/serial.h"
#include "boards/board.h"
#if CIRCUITPY_DISPLAYIO
#include "shared-module/displayio/__init__.h"
#endif
@ -425,6 +427,9 @@ int __attribute__((used)) main(void) {
// no SPI flash filesystem, and we might erase the existing one.
filesystem_init(safe_mode == NO_SAFE_MODE, false);
// displays init after filesystem, since they could share the flash SPI
board_init();
// Reset everything and prep MicroPython to run boot.py.
reset_port();
reset_board();

@ -232,9 +232,6 @@ safe_mode_t port_init(void) {
// Reset everything into a known state before board_init.
reset_port();
// Init the board last so everything else is ready
board_init();
#ifdef SAMD21
if (PM->RCAUSE.bit.BOD33 == 1 || PM->RCAUSE.bit.BOD12 == 1) {
return BROWNOUT;

@ -76,9 +76,6 @@ safe_mode_t port_init(void) {
// Reset everything into a known state before board_init.
reset_port();
// Init the board last so everything else is ready
board_init();
if (board_requests_safe_mode()) {
return USER_SAFE_MODE;
}

@ -92,9 +92,6 @@ safe_mode_t port_init(void) {
rtc_init();
#endif
// Will do usb_init() if chip supports USB.
board_init();
return NO_SAFE_MODE;
}

@ -50,7 +50,6 @@ safe_mode_t port_init(void) {
stm32f4_peripherals_gpio_init();
tick_init();
board_init();
return NO_SAFE_MODE;
}

Loading…
Cancel
Save