[SX127x] Reworked macro configuration system
This commit is contained in:
parent
49feff6df2
commit
34c861cfbe
14 changed files with 27 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
|||
#include "SX1272.h"
|
||||
#include <math.h>
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX1272::SX1272(Module* mod) : SX127x(mod) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "../../Module.h"
|
||||
#include "SX127x.h"
|
||||
|
@ -271,7 +271,7 @@ class SX1272: public SX127x {
|
|||
*/
|
||||
int16_t explicitHeader();
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
protected:
|
||||
#endif
|
||||
int16_t setBandwidthRaw(uint8_t newBandwidth);
|
||||
|
@ -282,7 +282,7 @@ class SX1272: public SX127x {
|
|||
int16_t configFSK();
|
||||
void errataFix(bool rx);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
bool ldroAuto = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "SX1273.h"
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX1273::SX1273(Module* mod) : SX1272(mod) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "SX1272.h"
|
||||
|
||||
|
@ -56,7 +56,7 @@ class SX1273: public SX1272 {
|
|||
*/
|
||||
int16_t setDataRate(DataRate_t dr) override;
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "SX1276.h"
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX1276::SX1276(Module* mod) : SX1278(mod) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "SX1278.h"
|
||||
|
||||
|
@ -63,7 +63,7 @@ class SX1276: public SX1278 {
|
|||
*/
|
||||
int16_t setFrequency(float freq);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "SX1277.h"
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX1277::SX1277(Module* mod) : SX1278(mod) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "SX1278.h"
|
||||
|
||||
|
@ -77,7 +77,7 @@ class SX1277: public SX1278 {
|
|||
*/
|
||||
int16_t setDataRate(DataRate_t dr) override;
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "SX1278.h"
|
||||
#include <math.h>
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX1278::SX1278(Module* mod) : SX127x(mod) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "../../Module.h"
|
||||
#include "SX127x.h"
|
||||
|
@ -282,7 +282,7 @@ class SX1278: public SX127x {
|
|||
*/
|
||||
int16_t explicitHeader();
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
protected:
|
||||
#endif
|
||||
int16_t setBandwidthRaw(uint8_t newBandwidth);
|
||||
|
@ -293,7 +293,7 @@ class SX1278: public SX127x {
|
|||
int16_t configFSK();
|
||||
void errataFix(bool rx);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
bool ldroAuto = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "SX1279.h"
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX1279::SX1279(Module* mod) : SX1278(mod) {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "SX1278.h"
|
||||
|
||||
|
@ -63,7 +63,7 @@ class SX1279: public SX1278 {
|
|||
*/
|
||||
int16_t setFrequency(float freq);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "SX127x.h"
|
||||
#include <math.h>
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
SX127x::SX127x(Module* mod) : PhysicalLayer(RADIOLIB_SX127X_FREQUENCY_STEP_SIZE, RADIOLIB_SX127X_MAX_PACKET_LENGTH) {
|
||||
this->mod = mod;
|
||||
|
@ -1628,7 +1628,7 @@ int16_t SX127x::invertIQ(bool enable) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||
#if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
|
||||
void SX127x::setDirectAction(void (*func)(void)) {
|
||||
setDio1Action(func, this->mod->hal->GpioInterruptRising);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_SX127X)
|
||||
#if !RADIOLIB_EXCLUDE_SX127X
|
||||
|
||||
#include "../../Module.h"
|
||||
|
||||
|
@ -1150,7 +1150,7 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t invertIQ(bool enable) override;
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||
#if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
|
||||
/*!
|
||||
\brief Set interrupt service routine function to call when data bit is received in direct mode.
|
||||
\param func Pointer to interrupt service routine.
|
||||
|
@ -1218,12 +1218,12 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t setRSSIThreshold(float dbm);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
|
||||
#if !RADIOLIB_GODMODE && !RADIOLIB_LOW_LEVEL
|
||||
protected:
|
||||
#endif
|
||||
Module* mod;
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
protected:
|
||||
#endif
|
||||
|
||||
|
@ -1245,7 +1245,7 @@ class SX127x: public PhysicalLayer {
|
|||
int16_t directMode();
|
||||
int16_t setPacketMode(uint8_t mode, uint8_t len);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
float dataRate = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue