Files
MeshCore/variants/rak4631/RAK4631Board.cpp
Frieder Schrempf 8eb229bcf8 variants: RAK4631: Enable DC/DC regulator to reduce power consumption
The RAK4631/RAK4630 module are able to use the DC/DC converter. Enable
it to reduce power consumption.

Signed-off-by: Frieder Schrempf <frieder@fris.de>
2025-12-17 10:39:55 +01:00

26 lines
550 B
C++

#include <Arduino.h>
#include <Wire.h>
#include "RAK4631Board.h"
void RAK4631Board::begin() {
NRF52BoardDCDC::begin();
pinMode(PIN_VBAT_READ, INPUT);
#ifdef PIN_USER_BTN
pinMode(PIN_USER_BTN, INPUT_PULLUP);
#endif
#ifdef PIN_USER_BTN_ANA
pinMode(PIN_USER_BTN_ANA, INPUT_PULLUP);
#endif
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL);
#endif
Wire.begin();
pinMode(SX126X_POWER_EN, OUTPUT);
digitalWrite(SX126X_POWER_EN, HIGH);
delay(10); // give sx1262 some time to power up
}