Skip to content

Commit 363b2b0

Browse files
committed
Add OTA support for all NRF52 boards
To reduce the number of different code paths, add OTA support for the remaining NRF52 boards. Signed-off-by: Frieder Schrempf <frieder@fris.de>
1 parent 3fe5a04 commit 363b2b0

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

variants/nano_g2_ultra/nano-g2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
#define PIN_VBAT_READ (0 + 2)
3636
#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB)
3737

38-
class NanoG2Ultra : public NRF52Board {
38+
class NanoG2Ultra : public NRF52Board, public NRF52BoardOTA {
3939
public:
40+
NanoG2Ultra() : NRF52BoardOTA("Nano_G2_OTA") {}
4041
void begin();
4142
uint16_t getBattMilliVolts() override;
4243
bool startOTAUpdate(const char *id, char reply[]) override;

variants/t1000-e/T1000eBoard.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
#include <Arduino.h>
55
#include <helpers/NRF52Board.h>
66

7-
class T1000eBoard : public NRF52BoardDCDC {
7+
class T1000eBoard : public NRF52BoardDCDC, public NRF52BoardOTA {
88
protected:
99
uint8_t btn_prev_state;
1010

1111
public:
12+
T1000eBoard() : NRF52BoardOTA("T1000E_OTA") {}
1213
void begin();
1314

1415
uint16_t getBattMilliVolts() override {
@@ -91,4 +92,4 @@ class T1000eBoard : public NRF52BoardDCDC {
9192
}
9293

9394
// bool startOTAUpdate(const char* id, char reply[]) override;
94-
};
95+
};

variants/wio_wm1110/WioWM1110Board.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
#endif
1212
#define Serial Serial1
1313

14-
class WioWM1110Board : public NRF52BoardDCDC {
14+
class WioWM1110Board : public NRF52BoardDCDC, public NRF52BoardOTA {
1515
public:
16+
WioWM1110Board() : NRF52BoardOTA("WioWM1110 OTA") {}
1617
void begin();
1718

1819
#if defined(LED_GREEN)

0 commit comments

Comments
 (0)