This commit is contained in:
Davide Lasagna 2023-03-21 19:56:21 +00:00
parent cd4575ebb0
commit b7e12f5c71
2 changed files with 2 additions and 2 deletions

View file

@ -436,7 +436,7 @@ int16_t SX126x::sleep(bool retainConfig) {
if(!retainConfig) { if(!retainConfig) {
sleepMode = RADIOLIB_SX126X_SLEEP_START_COLD | RADIOLIB_SX126X_SLEEP_RTC_OFF; sleepMode = RADIOLIB_SX126X_SLEEP_START_COLD | RADIOLIB_SX126X_SLEEP_RTC_OFF;
} }
int16_t state = _mod->SPIwriteStream(RADIOLIB_SX126X_CMD_SET_SLEEP, &sleepMode, 1, false); int16_t state = _mod->SPIwriteStream(RADIOLIB_SX126X_CMD_SET_SLEEP, &sleepMode, 1, false, false);
// wait for SX126x to safely enter sleep mode // wait for SX126x to safely enter sleep mode
_mod->delay(1); _mod->delay(1);

View file

@ -446,7 +446,7 @@ int16_t SX128x::sleep(bool retainConfig) {
if(!retainConfig) { if(!retainConfig) {
sleepConfig = RADIOLIB_SX128X_SLEEP_DATA_BUFFER_FLUSH | RADIOLIB_SX128X_SLEEP_DATA_RAM_FLUSH; sleepConfig = RADIOLIB_SX128X_SLEEP_DATA_BUFFER_FLUSH | RADIOLIB_SX128X_SLEEP_DATA_RAM_FLUSH;
} }
int16_t state = _mod->SPIwriteStream(RADIOLIB_SX128X_CMD_SET_SLEEP, &sleepConfig, 1, false); int16_t state = _mod->SPIwriteStream(RADIOLIB_SX128X_CMD_SET_SLEEP, &sleepConfig, 1, false, false);
// wait for SX128x to safely enter sleep mode // wait for SX128x to safely enter sleep mode
_mod->delay(1); _mod->delay(1);