diff --git a/src/modules/SX126x/SX1261.cpp b/src/modules/SX126x/SX1261.cpp index a78d2578..b0b626c2 100644 --- a/src/modules/SX126x/SX1261.cpp +++ b/src/modules/SX126x/SX1261.cpp @@ -1,4 +1,5 @@ #include "SX1261.h" +#if !defined(RADIOLIB_EXCLUDE_SX126X) SX1261::SX1261(Module* mod): SX1262(mod) { @@ -24,3 +25,5 @@ int16_t SX1261::setOutputPower(int8_t power) { // restore OCP configuration return(writeRegister(SX126X_REG_OCP_CONFIGURATION, &ocp, 1)); } + +#endif diff --git a/src/modules/SX126x/SX1261.h b/src/modules/SX126x/SX1261.h index 2dca7ed1..5b6f9ef6 100644 --- a/src/modules/SX126x/SX1261.h +++ b/src/modules/SX126x/SX1261.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX1261_H +#if !defined(_RADIOLIB_SX1261_H) && !defined(RADIOLIB_EXCLUDE_SX126X) #define _RADIOLIB_SX1261_H #include "../../TypeDef.h" diff --git a/src/modules/SX126x/SX1262.cpp b/src/modules/SX126x/SX1262.cpp index 7d1f6efe..1ce049af 100644 --- a/src/modules/SX126x/SX1262.cpp +++ b/src/modules/SX126x/SX1262.cpp @@ -1,4 +1,5 @@ #include "SX1262.h" +#if !defined(RADIOLIB_EXCLUDE_SX126X) SX1262::SX1262(Module* mod) : SX126x(mod) { @@ -90,3 +91,5 @@ int16_t SX1262::setOutputPower(int8_t power) { // restore OCP configuration return(writeRegister(SX126X_REG_OCP_CONFIGURATION, &ocp, 1)); } + +#endif diff --git a/src/modules/SX126x/SX1262.h b/src/modules/SX126x/SX1262.h index e33f568b..b268759b 100644 --- a/src/modules/SX126x/SX1262.h +++ b/src/modules/SX126x/SX1262.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX1262_H +#if !defined(_RADIOLIB_SX1262_H) && !defined(RADIOLIB_EXCLUDE_SX126X) #define _RADIOLIB_SX1262_H #include "../../TypeDef.h" diff --git a/src/modules/SX126x/SX1268.cpp b/src/modules/SX126x/SX1268.cpp index 6b7f3ad2..04cd370f 100644 --- a/src/modules/SX126x/SX1268.cpp +++ b/src/modules/SX126x/SX1268.cpp @@ -1,4 +1,5 @@ #include "SX1268.h" +#if !defined(RADIOLIB_EXCLUDE_SX126X) SX1268::SX1268(Module* mod) : SX126x(mod) { @@ -83,3 +84,5 @@ int16_t SX1268::setOutputPower(int8_t power) { // restore OCP configuration return(writeRegister(SX126X_REG_OCP_CONFIGURATION, &ocp, 1)); } + +#endif diff --git a/src/modules/SX126x/SX1268.h b/src/modules/SX126x/SX1268.h index 5b203b72..76f01c1e 100644 --- a/src/modules/SX126x/SX1268.h +++ b/src/modules/SX126x/SX1268.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX1268_H +#if !defined(_RADIOLIB_SX1268_H) && !defined(RADIOLIB_EXCLUDE_SX126X) #define _RADIOLIB_SX1268_H #include "../../TypeDef.h" diff --git a/src/modules/SX126x/SX126x.cpp b/src/modules/SX126x/SX126x.cpp index 3a8aecaa..900a835c 100644 --- a/src/modules/SX126x/SX126x.cpp +++ b/src/modules/SX126x/SX126x.cpp @@ -1,4 +1,5 @@ #include "SX126x.h" +#if !defined(RADIOLIB_EXCLUDE_SX126X) SX126x::SX126x(Module* mod) : PhysicalLayer(SX126X_FREQUENCY_STEP_SIZE, SX126X_MAX_PACKET_LENGTH) { _mod = mod; @@ -1677,3 +1678,5 @@ int16_t SX126x::SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* d return(ERR_NONE); } } + +#endif diff --git a/src/modules/SX126x/SX126x.h b/src/modules/SX126x/SX126x.h index ae2216d6..26881c8c 100644 --- a/src/modules/SX126x/SX126x.h +++ b/src/modules/SX126x/SX126x.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX126X_H +#if !defined(_RADIOLIB_SX126X_H) && !defined(RADIOLIB_EXCLUDE_SX126X) #define _RADIOLIB_SX126X_H #include "../../TypeDef.h"