mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-31 03:55:46 +00:00
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>
26 lines
550 B
C++
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
|
|
} |