diff --git a/src/protocols/LoRaWAN/LoRaWAN.cpp b/src/protocols/LoRaWAN/LoRaWAN.cpp index 5729f834..333623a1 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.cpp +++ b/src/protocols/LoRaWAN/LoRaWAN.cpp @@ -919,7 +919,7 @@ int16_t LoRaWANNode::activateOTAA(uint8_t joinDr, LoRaWANJoinEvent_t *joinEvent) modeCfg.transmit.data = joinRequestMsg; modeCfg.transmit.len = RADIOLIB_LORAWAN_JOIN_REQUEST_LEN; modeCfg.transmit.addr = 0; - state = this->phyLayer->stageMode(RADIOLIB_RADIO_MODE_TX, modeCfg); + state = this->phyLayer->stageMode(RADIOLIB_RADIO_MODE_TX, &modeCfg); RADIOLIB_ASSERT(state); // if requested, delay until transmitting JoinRequest @@ -1334,7 +1334,7 @@ int16_t LoRaWANNode::transmitUplink(const LoRaWANChannel_t* chnl, uint8_t* in, u modeCfg.transmit.data = in; modeCfg.transmit.len = len; modeCfg.transmit.addr = 0; - state = this->phyLayer->stageMode(RADIOLIB_RADIO_MODE_TX, modeCfg); + state = this->phyLayer->stageMode(RADIOLIB_RADIO_MODE_TX, &modeCfg); RADIOLIB_ASSERT(state); // if requested, wait until transmitting uplink @@ -1431,7 +1431,7 @@ int16_t LoRaWANNode::receiveCommon(uint8_t dir, const LoRaWANChannel_t* dlChanne modeCfg.receive.irqFlags = RADIOLIB_IRQ_RX_DEFAULT_FLAGS; modeCfg.receive.irqMask = RADIOLIB_IRQ_RX_DEFAULT_MASK; modeCfg.receive.len = 0; - state = this->phyLayer->stageMode(RADIOLIB_RADIO_MODE_RX, modeCfg); + state = this->phyLayer->stageMode(RADIOLIB_RADIO_MODE_RX, &modeCfg); RADIOLIB_ASSERT(state); // wait for the start of the Rx window diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.cpp b/src/protocols/PhysicalLayer/PhysicalLayer.cpp index bf9075aa..d96f300f 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.cpp +++ b/src/protocols/PhysicalLayer/PhysicalLayer.cpp @@ -537,7 +537,7 @@ int16_t PhysicalLayer::getModem(ModemType_t* modem) { return(RADIOLIB_ERR_UNSUPPORTED); } -int16_t PhysicalLayer::stageMode(RadioModeType_t mode, RadioModeConfig_t cfg) { +int16_t PhysicalLayer::stageMode(RadioModeType_t mode, RadioModeConfig_t* cfg) { (void)mode; (void)cfg; return(RADIOLIB_ERR_UNSUPPORTED); diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.h b/src/protocols/PhysicalLayer/PhysicalLayer.h index 693ac3df..5b159d9b 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.h +++ b/src/protocols/PhysicalLayer/PhysicalLayer.h @@ -737,10 +737,10 @@ class PhysicalLayer { /*! \brief Stage mode of the radio to be launched later using launchMode. \param mode Radio mode to prepare. - \param cfg Confioguration of this mode (mode-dependent). + \param cfg Configuration of this mode (mode-dependent). \returns \ref status_codes */ - virtual int16_t stageMode(RadioModeType_t mode, RadioModeConfig_t cfg); + virtual int16_t stageMode(RadioModeType_t mode, RadioModeConfig_t* cfg); /*! \brief Launch previously staged mode. @@ -770,7 +770,6 @@ class PhysicalLayer { #endif uint32_t irqMap[10] = { 0 }; RadioModeType_t stagedMode = RADIOLIB_RADIO_MODE_NONE; - RadioModeConfig_t stagedConfig = { .standby = { .mode = 0 } }; #if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE void updateDirectBuffer(uint8_t bit);