From 6dac841b69478138da77ad3ad5b11bcbc1893af5 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 26 Oct 2024 08:46:21 +0100 Subject: [PATCH] [PHY] Added getModem --- src/protocols/PhysicalLayer/PhysicalLayer.cpp | 5 +++++ src/protocols/PhysicalLayer/PhysicalLayer.h | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.cpp b/src/protocols/PhysicalLayer/PhysicalLayer.cpp index 32071f59..1ad04e69 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.cpp +++ b/src/protocols/PhysicalLayer/PhysicalLayer.cpp @@ -536,6 +536,11 @@ int16_t PhysicalLayer::setModem(ModemType_t modem) { return(RADIOLIB_ERR_UNSUPPORTED); } +int16_t PhysicalLayer::getModem(ModemType_t* modem) { + (void)modem; + return(RADIOLIB_ERR_UNSUPPORTED); +} + #if RADIOLIB_INTERRUPT_TIMING void PhysicalLayer::setInterruptSetup(void (*func)(uint32_t)) { Module* mod = getMod(); diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.h b/src/protocols/PhysicalLayer/PhysicalLayer.h index 52b84963..c5467990 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.h +++ b/src/protocols/PhysicalLayer/PhysicalLayer.h @@ -662,6 +662,13 @@ class PhysicalLayer { */ virtual int16_t setModem(ModemType_t modem); + /*! + \brief Get modem currently in use by the radio. + \param modem Pointer to a variable to save the retrieved configuration into. + \returns \ref status_codes + */ + virtual int16_t getModem(ModemType_t* modem); + #if RADIOLIB_INTERRUPT_TIMING /*! @@ -720,6 +727,7 @@ class PhysicalLayer { friend class BellClient; friend class FT8Client; friend class LoRaWANNode; + friend class M17Client; }; #endif