[SX128x] Reworked driver exclusion
This commit is contained in:
parent
3dd3a471e5
commit
515551e7bc
8 changed files with 16 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include "SX1280.h"
|
#include "SX1280.h"
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
|
|
||||||
SX1280::SX1280(Module* mod) : SX1281(mod) {
|
SX1280::SX1280(Module* mod) : SX1281(mod) {
|
||||||
|
|
||||||
|
@ -111,3 +112,5 @@ float SX1280::getRangingResult() {
|
||||||
memcpy(&raw, data, sizeof(uint32_t));
|
memcpy(&raw, data, sizeof(uint32_t));
|
||||||
return((float)raw * (150.0/(4.096 * _bwKhz)));
|
return((float)raw * (150.0/(4.096 * _bwKhz)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef _RADIOLIB_SX1280_H
|
#if !defined(_RADIOLIB_SX1280_H) && !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
#define _RADIOLIB_SX1280_H
|
#define _RADIOLIB_SX1280_H
|
||||||
|
|
||||||
#include "../../TypeDef.h"
|
#include "../../TypeDef.h"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#include "SX1281.h"
|
#include "SX1281.h"
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
|
|
||||||
SX1281::SX1281(Module* mod) : SX128x(mod) {
|
SX1281::SX1281(Module* mod) : SX128x(mod) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef _RADIOLIB_SX1281_H
|
#if !defined(_RADIOLIB_SX1281_H) && !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
#define _RADIOLIB_SX1281_H
|
#define _RADIOLIB_SX1281_H
|
||||||
|
|
||||||
#include "../../TypeDef.h"
|
#include "../../TypeDef.h"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#include "SX1282.h"
|
#include "SX1282.h"
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
|
|
||||||
SX1282::SX1282(Module* mod) : SX1280(mod) {
|
SX1282::SX1282(Module* mod) : SX1280(mod) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef _RADIOLIB_SX1282_H
|
#if !defined(_RADIOLIB_SX1282_H) && !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
#define _RADIOLIB_SX1282_H
|
#define _RADIOLIB_SX1282_H
|
||||||
|
|
||||||
#include "../../TypeDef.h"
|
#include "../../TypeDef.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "SX128x.h"
|
#include "SX128x.h"
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
|
|
||||||
SX128x::SX128x(Module* mod) : PhysicalLayer(SX128X_FREQUENCY_STEP_SIZE, SX128X_MAX_PACKET_LENGTH) {
|
SX128x::SX128x(Module* mod) : PhysicalLayer(SX128X_FREQUENCY_STEP_SIZE, SX128X_MAX_PACKET_LENGTH) {
|
||||||
_mod = mod;
|
_mod = mod;
|
||||||
|
@ -1431,3 +1432,5 @@ int16_t SX128x::SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* d
|
||||||
return(ERR_NONE);
|
return(ERR_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef _RADIOLIB_SX128X_H
|
#if !defined(_RADIOLIB_SX128X_H) && !defined(RADIOLIB_EXCLUDE_SX128X)
|
||||||
#define _RADIOLIB_SX128X_H
|
#define _RADIOLIB_SX128X_H
|
||||||
|
|
||||||
#include "../../TypeDef.h"
|
#include "../../TypeDef.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue