[Si443x] Reworked driver exclusion

This commit is contained in:
jgromes 2020-06-30 10:44:22 +02:00
parent 515551e7bc
commit f05f1e9d82
8 changed files with 16 additions and 4 deletions

View file

@ -1,4 +1,5 @@
#include "Si4430.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
Si4430::Si4430(Module* mod) : Si4432(mod) {
@ -32,3 +33,5 @@ int16_t Si4430::setOutputPower(int8_t power) {
// set output power
return(_mod->SPIsetRegValue(SI443X_REG_TX_POWER, (uint8_t)((power + 8) / 3), 2, 0));
}
#endif

View file

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

View file

@ -1,4 +1,5 @@
#include "Si4431.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
Si4431::Si4431(Module* mod) : Si4432(mod) {
@ -25,3 +26,5 @@ int16_t Si4431::setOutputPower(int8_t power) {
// set output power
return(_mod->SPIsetRegValue(SI443X_REG_TX_POWER, (uint8_t)((power + 8) / 3), 2, 0));
}
#endif

View file

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

View file

@ -1,4 +1,5 @@
#include "Si4432.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
Si4432::Si4432(Module* mod) : Si443x(mod) {
@ -32,3 +33,5 @@ int16_t Si4432::setOutputPower(int8_t power) {
// set output power
return(_mod->SPIsetRegValue(SI443X_REG_TX_POWER, (uint8_t)((power + 1) / 3), 2, 0));
}
#endif

View file

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

View file

@ -1,4 +1,5 @@
#include "Si443x.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
Si443x::Si443x(Module* mod) : PhysicalLayer(SI443X_FREQUENCY_STEP_SIZE, SI443X_MAX_PACKET_LENGTH) {
_mod = mod;
@ -689,3 +690,5 @@ int16_t Si443x::directMode() {
state = _mod->SPIsetRegValue(SI443X_REG_MODULATION_MODE_CONTROL_2, SI443X_MODULATION_NONE, 1, 0);
return(state);
}
#endif

View file

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