diff --git a/src/modules/SX128x/SX1280.cpp b/src/modules/SX128x/SX1280.cpp index 2c4d09ee..b0d513ef 100644 --- a/src/modules/SX128x/SX1280.cpp +++ b/src/modules/SX128x/SX1280.cpp @@ -1,4 +1,5 @@ #include "SX1280.h" +#if !defined(RADIOLIB_EXCLUDE_SX128X) SX1280::SX1280(Module* mod) : SX1281(mod) { @@ -111,3 +112,5 @@ float SX1280::getRangingResult() { memcpy(&raw, data, sizeof(uint32_t)); return((float)raw * (150.0/(4.096 * _bwKhz))); } + +#endif diff --git a/src/modules/SX128x/SX1280.h b/src/modules/SX128x/SX1280.h index ea8c5a18..4c079ac4 100644 --- a/src/modules/SX128x/SX1280.h +++ b/src/modules/SX128x/SX1280.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX1280_H +#if !defined(_RADIOLIB_SX1280_H) && !defined(RADIOLIB_EXCLUDE_SX128X) #define _RADIOLIB_SX1280_H #include "../../TypeDef.h" diff --git a/src/modules/SX128x/SX1281.cpp b/src/modules/SX128x/SX1281.cpp index 4aa09b0d..c6b2b5eb 100644 --- a/src/modules/SX128x/SX1281.cpp +++ b/src/modules/SX128x/SX1281.cpp @@ -1,5 +1,8 @@ #include "SX1281.h" +#if !defined(RADIOLIB_EXCLUDE_SX128X) SX1281::SX1281(Module* mod) : SX128x(mod) { } + +#endif diff --git a/src/modules/SX128x/SX1281.h b/src/modules/SX128x/SX1281.h index 88037a09..6cb85192 100644 --- a/src/modules/SX128x/SX1281.h +++ b/src/modules/SX128x/SX1281.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX1281_H +#if !defined(_RADIOLIB_SX1281_H) && !defined(RADIOLIB_EXCLUDE_SX128X) #define _RADIOLIB_SX1281_H #include "../../TypeDef.h" diff --git a/src/modules/SX128x/SX1282.cpp b/src/modules/SX128x/SX1282.cpp index 847a36d1..2a77ffcd 100644 --- a/src/modules/SX128x/SX1282.cpp +++ b/src/modules/SX128x/SX1282.cpp @@ -1,5 +1,8 @@ #include "SX1282.h" +#if !defined(RADIOLIB_EXCLUDE_SX128X) SX1282::SX1282(Module* mod) : SX1280(mod) { } + +#endif diff --git a/src/modules/SX128x/SX1282.h b/src/modules/SX128x/SX1282.h index 09f92075..8b677d95 100644 --- a/src/modules/SX128x/SX1282.h +++ b/src/modules/SX128x/SX1282.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX1282_H +#if !defined(_RADIOLIB_SX1282_H) && !defined(RADIOLIB_EXCLUDE_SX128X) #define _RADIOLIB_SX1282_H #include "../../TypeDef.h" diff --git a/src/modules/SX128x/SX128x.cpp b/src/modules/SX128x/SX128x.cpp index 112417f5..1dda7d8c 100644 --- a/src/modules/SX128x/SX128x.cpp +++ b/src/modules/SX128x/SX128x.cpp @@ -1,4 +1,5 @@ #include "SX128x.h" +#if !defined(RADIOLIB_EXCLUDE_SX128X) SX128x::SX128x(Module* mod) : PhysicalLayer(SX128X_FREQUENCY_STEP_SIZE, SX128X_MAX_PACKET_LENGTH) { _mod = mod; @@ -1431,3 +1432,5 @@ int16_t SX128x::SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* d return(ERR_NONE); } } + +#endif diff --git a/src/modules/SX128x/SX128x.h b/src/modules/SX128x/SX128x.h index 755bc443..bd403a29 100644 --- a/src/modules/SX128x/SX128x.h +++ b/src/modules/SX128x/SX128x.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SX128X_H +#if !defined(_RADIOLIB_SX128X_H) && !defined(RADIOLIB_EXCLUDE_SX128X) #define _RADIOLIB_SX128X_H #include "../../TypeDef.h"