mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
The startOTAUpdate() is the same for all NRF52 boards. Use a common implementation for all boards that currently have a specific implementation. The following boards currently have an empty startOTAUpdate() for whatever reasons and therefore are not inheriting NRF52BoardOTA to keep the same state: Nano G2 Ultra, Seeed SenseCAP T1000-E, Wio WM1110. Signed-off-by: Frieder Schrempf <frieder@fris.de>
40 lines
956 B
C++
40 lines
956 B
C++
#ifdef IKOKA_NRF52
|
|
|
|
#include <Arduino.h>
|
|
#include <Wire.h>
|
|
|
|
#include "IkokaNrf52Board.h"
|
|
|
|
void IkokaNrf52Board::begin() {
|
|
NRF52Board::begin();
|
|
|
|
// ensure we have pull ups on the screen i2c, this isn't always available
|
|
// in hardware and it should only be 20k ohms. Disable the pullups if we
|
|
// are using the rotated lcd breakout board
|
|
#if defined(DISPLAY_CLASS) && DISPLAY_ROTATION == 0
|
|
pinMode(PIN_WIRE_SDA, INPUT_PULLUP);
|
|
pinMode(PIN_WIRE_SCL, INPUT_PULLUP);
|
|
#endif
|
|
|
|
pinMode(PIN_VBAT, INPUT);
|
|
pinMode(VBAT_ENABLE, OUTPUT);
|
|
digitalWrite(VBAT_ENABLE, HIGH);
|
|
|
|
// required button pullup is handled as part of button initilization
|
|
// in target.cpp
|
|
|
|
#if defined(PIN_WIRE_SDA) && defined(PIN_WIRE_SCL)
|
|
Wire.setPins(PIN_WIRE_SDA, PIN_WIRE_SCL);
|
|
#endif
|
|
|
|
Wire.begin();
|
|
|
|
#ifdef P_LORA_TX_LED
|
|
pinMode(P_LORA_TX_LED, OUTPUT);
|
|
digitalWrite(P_LORA_TX_LED, HIGH);
|
|
#endif
|
|
|
|
delay(10); // give sx1262 some time to power up
|
|
}
|
|
|
|
#endif
|