Use common NRF52 begin() and deduplicate() startup reason init

Use a common begin() method that can be called from derived classes
to contain the shared initialization code.

Signed-off-by: Frieder Schrempf <frieder@fris.de>
Este cometimento está contido em:
Frieder Schrempf
2025-12-17 10:26:57 +01:00
ascendente 87b0e432bb
cometimento 93d1560d14
41 ficheiros modificados com 26 adições e 128 eliminações
+1 -2
Ver ficheiro
@@ -20,8 +20,7 @@ static void disconnect_callback(uint16_t conn_handle, uint8_t reason)
}
void HeltecMeshPocket::begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
NRF52Board::begin();
Serial.begin(115200);
pinMode(PIN_VBAT_READ, INPUT);