mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Make it possible to define TCXO and XTAL radio modules within one variant (#4492)
* Update main.cpp Add in TCXO_OPTIONAL variable for tcxoVoltage and a double-check for working in both modes. * Update SX126xInterface.cpp Make a change to the tcxoVoltage setting so that TCXO_OPTIONAL works if defined. * Update variant.h Added define for TCXO_OPTIONAL and the tcxoVoltage variable. Added detail on the compatible boards. --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ template <typename T> bool SX126xInterface<T>::init()
|
||||
0; // "TCXO reference voltage to be set on DIO3. Defaults to 1.6 V, set to 0 to skip." per
|
||||
// https://github.com/jgromes/RadioLib/blob/690a050ebb46e6097c5d00c371e961c1caa3b52e/src/modules/SX126x/SX126x.h#L471C26-L471C104
|
||||
// (DIO3 is free to be used as an IRQ)
|
||||
#else
|
||||
#elif !defined(TCXO_OPTIONAL)
|
||||
float tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE;
|
||||
// (DIO3 is not free to be used as an IRQ)
|
||||
#endif
|
||||
@@ -345,4 +345,4 @@ template <typename T> bool SX126xInterface<T>::sleep()
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user