[SX128x] Set default regulator mode to DC-DC
This commit is contained in:
parent
635c008e26
commit
5c0c7f32c3
2 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue