[SX128x] Set default regulator mode to DC-DC

This commit is contained in:
jgromes 2020-04-09 12:10:38 +02:00
parent 635c008e26
commit 5c0c7f32c3
2 changed files with 10 additions and 0 deletions

View file

@ -1034,6 +1034,11 @@ int16_t SX128x::config(uint8_t modem) {
state = SPIwriteCommand(SX128X_CMD_SET_CAD_PARAMS, data, 1);
RADIOLIB_ASSERT(state);
// set regulator mode to DC-DC
data[0] = SX128X_REGULATOR_DC_DC;
state = SPIwriteCommand(SX128X_CMD_SET_REGULATOR_MODE, data, 1);
RADIOLIB_ASSERT(state);
return(ERR_NONE);
}

View file

@ -318,6 +318,11 @@
#define SX128X_IRQ_NONE 0x0000 // 15 0 none
#define SX128X_IRQ_ALL 0xFFFF // 15 0 all
//SX128X_CMD_SET_REGULATOR_MODE
#define SX128X_REGULATOR_LDO 0x00 // 7 0 set regulator mode: LDO (default)
#define SX128X_REGULATOR_DC_DC 0x01 // 7 0 DC-DC
/*!
\class SX128x