[LoRaWAN] Fix Module* not needed without persistent storage
This commit is contained in:
parent
718dae3f35
commit
132aae944f
1 changed files with 3 additions and 2 deletions
|
@ -661,9 +661,10 @@ int16_t LoRaWANNode::beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t* nwkKe
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t LoRaWANNode::beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey, uint8_t* sNwkSIntKey, bool force) {
|
int16_t LoRaWANNode::beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey, uint8_t* sNwkSIntKey, bool force) {
|
||||||
|
#if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
|
||||||
|
// only needed for persistent storage
|
||||||
Module* mod = this->phyLayer->getMod();
|
Module* mod = this->phyLayer->getMod();
|
||||||
|
|
||||||
#if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
|
|
||||||
// check if we actually need to restart from a clean session
|
// check if we actually need to restart from a clean session
|
||||||
uint16_t checkSum = 0;
|
uint16_t checkSum = 0;
|
||||||
checkSum ^= LoRaWANNode::checkSum16(reinterpret_cast<uint8_t*>(&addr), 4);
|
checkSum ^= LoRaWANNode::checkSum16(reinterpret_cast<uint8_t*>(&addr), 4);
|
||||||
|
|
Loading…
Add table
Reference in a new issue