[MOD] Convert end of RF switch mode to macro (https://github.com/jgromes/RadioLib/actions/runs/4337180408)
This commit is contained in:
parent
e920e1bf07
commit
5ba6f41230
4 changed files with 8 additions and 14 deletions
|
@ -8,8 +8,6 @@
|
||||||
mbed::PwmOut *pwmPin = NULL;
|
mbed::PwmOut *pwmPin = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const Module::RfSwitchMode_t Module::END_OF_MODE_TABLE = {Module::MODE_END_OF_TABLE, {}};
|
|
||||||
|
|
||||||
Module::Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio):
|
Module::Module(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE gpio):
|
||||||
_cs(cs),
|
_cs(cs),
|
||||||
_irq(irq),
|
_irq(irq),
|
||||||
|
|
16
src/Module.h
16
src/Module.h
|
@ -7,6 +7,14 @@
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Value to use as the last element in a mode table to indicate the
|
||||||
|
* end of the table.
|
||||||
|
*
|
||||||
|
* See setRfSwitchTable() for details.
|
||||||
|
*/
|
||||||
|
#define END_OF_MODE_TABLE { Module::MODE_END_OF_TABLE, {} }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Module
|
\class Module
|
||||||
|
|
||||||
|
@ -56,14 +64,6 @@ class Module {
|
||||||
MODE_TX,
|
MODE_TX,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
|
||||||
* Value to use as the last element in a mode table to indicate the
|
|
||||||
* end of the table.
|
|
||||||
*
|
|
||||||
* See setRfSwitchTable() for details.
|
|
||||||
*/
|
|
||||||
static const RfSwitchMode_t END_OF_MODE_TABLE;
|
|
||||||
|
|
||||||
#if defined(RADIOLIB_BUILD_ARDUINO)
|
#if defined(RADIOLIB_BUILD_ARDUINO)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -11,8 +11,6 @@ This file is licensed under the MIT License: https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
#include <SubGhz.h>
|
#include <SubGhz.h>
|
||||||
|
|
||||||
const Module::RfSwitchMode_t STM32WLx::END_OF_MODE_TABLE = {Module::MODE_END_OF_TABLE, {}};
|
|
||||||
|
|
||||||
STM32WLx::STM32WLx(STM32WLx_Module* mod) : SX1262(mod) {
|
STM32WLx::STM32WLx(STM32WLx_Module* mod) : SX1262(mod) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,6 @@ class STM32WLx : public SX1262 {
|
||||||
/*! High power transmission mode */
|
/*! High power transmission mode */
|
||||||
MODE_TX_HP,
|
MODE_TX_HP,
|
||||||
};
|
};
|
||||||
/*! \copydoc Module::END_OF_MODE_TABLE */
|
|
||||||
static const Module::RfSwitchMode_t END_OF_MODE_TABLE;
|
|
||||||
|
|
||||||
// basic methods
|
// basic methods
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue