[SX126x] Added missing XTAL check

This commit is contained in:
jgromes 2023-03-05 19:28:21 +01:00
parent 5ba6f41230
commit 823c0ff82c

View file

@ -1379,6 +1379,11 @@ void SX126x::readBit(RADIOLIB_PIN_TYPE pin) {
#endif
int16_t SX126x::setTCXO(float voltage, uint32_t delay) {
// check if TCXO is enabled at all
if(this->XTAL) {
return(RADIOLIB_ERR_INVALID_TCXO_VOLTAGE);
}
// set mode to standby
standby();