[PHY] Added set modem method

This commit is contained in:
jgromes 2024-10-25 20:47:28 +01:00
parent 64253f6e36
commit a2ca362176
2 changed files with 23 additions and 0 deletions

View file

@ -531,6 +531,11 @@ void PhysicalLayer::clearChannelScanAction() {
}
int16_t PhysicalLayer::setModem(ModemType_t modem) {
(void)modem;
return(RADIOLIB_ERR_UNSUPPORTED);
}
#if RADIOLIB_INTERRUPT_TIMING
void PhysicalLayer::setInterruptSetup(void (*func)(uint32_t)) {
Module* mod = getMod();

View file

@ -130,6 +130,16 @@ union ChannelScanConfig_t {
RSSIScanConfig_t rssi;
};
/*!
\enum ModemType_t
\brief Type of modem, used by setModem.
*/
enum ModemType_t {
FSK = 0,
LoRa,
LRFHSS,
};
/*!
\class PhysicalLayer
@ -644,6 +654,14 @@ class PhysicalLayer {
*/
virtual void clearChannelScanAction();
/*!
\brief Set modem for the radio to use. Will perform full reset and reconfigure the radio
using its default parameters.
\param modem Modem type to set. Not all modems are implemented by all radio modules!
\returns \ref status_codes
*/
virtual int16_t setModem(ModemType_t modem);
#if RADIOLIB_INTERRUPT_TIMING
/*!