[SX126x] Reworked driver exclusion

This commit is contained in:
jgromes 2020-06-30 10:43:41 +02:00
parent 893d8a905f
commit 58ddfb8b51
8 changed files with 16 additions and 4 deletions

View file

@ -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

View file

@ -1,4 +1,4 @@
#ifndef _RADIOLIB_SX1261_H
#if !defined(_RADIOLIB_SX1261_H) && !defined(RADIOLIB_EXCLUDE_SX126X)
#define _RADIOLIB_SX1261_H
#include "../../TypeDef.h"

View file

@ -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

View file

@ -1,4 +1,4 @@
#ifndef _RADIOLIB_SX1262_H
#if !defined(_RADIOLIB_SX1262_H) && !defined(RADIOLIB_EXCLUDE_SX126X)
#define _RADIOLIB_SX1262_H
#include "../../TypeDef.h"

View file

@ -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

View file

@ -1,4 +1,4 @@
#ifndef _RADIOLIB_SX1268_H
#if !defined(_RADIOLIB_SX1268_H) && !defined(RADIOLIB_EXCLUDE_SX126X)
#define _RADIOLIB_SX1268_H
#include "../../TypeDef.h"

View file

@ -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

View file

@ -1,4 +1,4 @@
#ifndef _RADIOLIB_SX126X_H
#if !defined(_RADIOLIB_SX126X_H) && !defined(RADIOLIB_EXCLUDE_SX126X)
#define _RADIOLIB_SX126X_H
#include "../../TypeDef.h"