[LLCC68] Added get/set modem

This commit is contained in:
jgromes 2024-10-26 09:04:52 +01:00
parent 173d8cc202
commit 45bf96edc4
2 changed files with 23 additions and 0 deletions

View file

@ -116,4 +116,19 @@ int16_t LLCC68::checkDataRate(DataRate_t dr) {
return(state);
}
int16_t LLCC68::setModem(ModemType_t modem) {
switch(modem) {
case(ModemType_t::LoRa): {
return(this->begin());
} break;
case(ModemType_t::FSK): {
return(this->beginFSK());
} break;
case(ModemType_t::LRFHSS): {
return(this->beginLRFHSS());
} break;
}
return(RADIOLIB_ERR_WRONG_MODEM);
}
#endif

View file

@ -69,6 +69,14 @@ class LLCC68: public SX1262 {
\returns \ref status_codes
*/
int16_t checkDataRate(DataRate_t dr) override;
/*!
\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 - FSK, LoRa or LR-FHSS.
\returns \ref status_codes
*/
int16_t setModem(ModemType_t modem) override;
#if !RADIOLIB_GODMODE
private: