If display is on on the @BigCorvus board and we xmit the board browns out?

This commit is contained in:
geeksville
2020-08-28 17:38:23 -07:00
parent 7f214ffbb0
commit dffb6c2f06
9 changed files with 110 additions and 16 deletions

View File

@@ -34,6 +34,7 @@
// #include "rom/rtc.h"
#include "DSRRouter.h"
// #include "debug.h"
#include "SPILock.h"
#include "graphics/Screen.h"
#include "main.h"
#include "sleep.h"
@@ -220,6 +221,16 @@ void setup()
nrf52Setup();
#endif
// Init our SPI controller (must be before screen and lora)
initSPI();
#ifdef NRF52_SERIES
SPI.begin();
#else
// ESP32
SPI.begin(RF95_SCK, RF95_MISO, RF95_MOSI, RF95_NSS);
SPI.setFrequency(4000000);
#endif
// Initialize the screen first so we can show the logo while we start up everything else.
#ifdef ST7735_CS
screen.setup();
@@ -278,15 +289,6 @@ void setup()
digitalWrite(SX1262_ANT_SW, 1);
#endif
// Init our SPI controller
#ifdef NRF52_SERIES
SPI.begin();
#else
// ESP32
SPI.begin(RF95_SCK, RF95_MISO, RF95_MOSI, RF95_NSS);
SPI.setFrequency(4000000);
#endif
// MUST BE AFTER service.init, so we have our radio config settings (from nodedb init)
RadioInterface *rIf = NULL;