This removes the compatibility wrapper and applies the following
replacements:
sed -i 's/setRfSwitchState(LOW, LOW)/setRfSwitchState(Module::MODE_IDLE)/' src/modules/*/*.cpp
sed -i 's/setRfSwitchState(HIGH, LOW)/setRfSwitchState(Module::MODE_RX)/' src/modules/*/*.cpp
sed -i 's/setRfSwitchState(LOW, HIGH)/setRfSwitchState(Module::MODE_TX)/' src/modules/*/*.cpp
This gives all radios that use an rfswitch (i.e. have
a setRfSwitchPins() wrapper already) a wrapper method for
setRfSwitchTable() too. This wrapper just calls the same method on
Module, to make it easier for sketches to use it.
All radios that support RfSwitch define this method that simply forwards
to the `Module::setRfSwitchPins()` method. Previously, all these methods
duplicated the documentation as well, but this uses the doxygen \copydoc
to remove this duplication.
In commit a1f94d9f ([SX126x] Set DIO2 to RF switch by default), this was
changed for LoRa modulation in begin(), but since this is really
a board-specific attribute, independent of the modulation used, there is
no reason to have a different default for FSK (so this was probably just
forgotten).
This:
- Updates syncWord comments after changing it from uint16_t to uint8_t
in commit 55aff74a ([SX126x] Changed pin mapping, added reset,
changed LoRa sync word to 1B).
- Adds missing useRegulatorLDO comments forgoten in commit ea85a663
([SX126x] Pass useRegulatorLDO to SX1262/SX1261/SX1268).
- Makes useRegulatorLDO comments the same in all places (using the more
explicit version).
- Fixes a typo in the doxygen \parma -> \param command.
- all `begin()` now use macros for init values
- addressed other styling comments as per PR#612 review
Signed-off-by: Federico Maggi <federico.maggi@gmail.com>