* new helper: AutoDiscoverRTCClock, which detects: DS3231 (on i2c addr 0x68), or RV3028 (on i2c addr 0x52)

* repeater and room server: ver bump (v5), now use AutoDiscoverRTCClock
* various Board::begin() now should do Wire.begin(), with custom pin mappings if needed
* examples removed: ping client/server, and test_admin
This commit is contained in:
Scott Powell
2025-02-25 19:00:07 +11:00
parent c4cc3dd1ec
commit a6a6bef371
13 changed files with 155 additions and 755 deletions

View File

@@ -20,6 +20,23 @@ static void disconnect_callback(uint16_t conn_handle, uint8_t reason)
MESH_DEBUG_PRINTLN("BLE client disconnected");
}
void RAK4631Board::begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
pinMode(PIN_VBAT_READ, INPUT);
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.begin(PIN_BOARD_SDA, PIN_BOARD_SCL);
#else
Wire.begin();
#endif
pinMode(SX126X_POWER_EN, OUTPUT);
digitalWrite(SX126X_POWER_EN, HIGH);
delay(10); // give sx1262 some time to power up
}
bool RAK4631Board::startOTAUpdate() {
// Config the peripheral connection with maximum bandwidth
// more SRAM required by SoftDevice

View File

@@ -25,17 +25,7 @@ protected:
uint8_t startup_reason;
public:
void begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
pinMode(PIN_VBAT_READ, INPUT);
pinMode(SX126X_POWER_EN, OUTPUT);
digitalWrite(SX126X_POWER_EN, HIGH);
delay(10); // give sx1262 some time to power up
}
void begin();
uint8_t getStartupReason() const override { return startup_reason; }
#define BATTERY_SAMPLES 8

View File

@@ -4,7 +4,23 @@
#include <bluefruit.h>
#include <Wire.h>
void T1000eBoard::begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.begin(PIN_BOARD_SDA, PIN_BOARD_SCL);
#else
Wire.begin();
#endif
// pinMode(PIN_VBAT_READ, INPUT);
// Doesn't seem to be a pwr en pin ...
// pinMode(LR1110_POWER_EN, OUTPUT);
// digitalWrite(LR1110_POWER_EN, HIGH);
delay(10); // give sx1262 some time to power up
}
#if 0
static BLEDfu bledfu;

View File

@@ -25,17 +25,7 @@ protected:
uint8_t startup_reason;
public:
void begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
// pinMode(PIN_VBAT_READ, INPUT);
// Doesn't seem to be a pwr en pin ...
// pinMode(LR1110_POWER_EN, OUTPUT);
// digitalWrite(LR1110_POWER_EN, HIGH);
delay(10); // give sx1262 some time to power up
}
void begin();
uint16_t getBattMilliVolts() override {
return 0;