[Si443x] Reworked macro configuration system

This commit is contained in:
jgromes 2023-11-27 19:40:57 +01:00
parent f0f9200269
commit 77c9b2875d
8 changed files with 19 additions and 19 deletions

View file

@ -1,5 +1,5 @@
#include "Si4430.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
Si4430::Si4430(Module* mod) : Si4432(mod) {

View file

@ -3,7 +3,7 @@
#include "../../TypeDef.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
#include "../../Module.h"
#include "Si4432.h"
@ -53,11 +53,11 @@ class Si4430: public Si4432 {
*/
int16_t setOutputPower(int8_t power);
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
protected:
#endif
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
private:
#endif
};

View file

@ -1,5 +1,5 @@
#include "Si4431.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
Si4431::Si4431(Module* mod) : Si4432(mod) {

View file

@ -3,7 +3,7 @@
#include "../../TypeDef.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
#include "../../Module.h"
#include "Si4432.h"
@ -46,11 +46,11 @@ class Si4431: public Si4432 {
*/
int16_t setOutputPower(int8_t power);
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
protected:
#endif
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
private:
#endif
};

View file

@ -1,5 +1,5 @@
#include "Si4432.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
Si4432::Si4432(Module* mod) : Si443x(mod) {

View file

@ -3,7 +3,7 @@
#include "../../TypeDef.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
#include "../../Module.h"
#include "Si443x.h"
@ -53,11 +53,11 @@ class Si4432: public Si443x {
*/
int16_t setOutputPower(int8_t power);
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
protected:
#endif
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
private:
#endif
};

View file

@ -1,6 +1,6 @@
#include "Si443x.h"
#include <math.h>
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
Si443x::Si443x(Module* mod) : PhysicalLayer(RADIOLIB_SI443X_FREQUENCY_STEP_SIZE, RADIOLIB_SI443X_MAX_PACKET_LENGTH) {
this->mod = mod;
@ -623,7 +623,7 @@ int16_t Si443x::getChipVersion() {
return(this->mod->SPIgetRegValue(RADIOLIB_SI443X_REG_DEVICE_VERSION));
}
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
#if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
void Si443x::setDirectAction(void (*func)(void)) {
setIrqAction(func);
}

View file

@ -3,7 +3,7 @@
#include "../../TypeDef.h"
#if !defined(RADIOLIB_EXCLUDE_SI443X)
#if !RADIOLIB_EXCLUDE_SI443X
#include "../../Module.h"
@ -797,7 +797,7 @@ class Si443x: public PhysicalLayer {
*/
int16_t getChipVersion();
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
#if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
/*!
\brief Set interrupt service routine function to call when data bit is received in direct mode.
\param func Pointer to interrupt service routine.
@ -825,12 +825,12 @@ class Si443x: public PhysicalLayer {
*/
int16_t variablePacketLengthMode(uint8_t maxLen = RADIOLIB_SI443X_MAX_PACKET_LENGTH);
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
#if !RADIOLIB_GODMODE && !RADIOLIB_LOW_LEVEL
protected:
#endif
Module* mod;
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
protected:
#endif
@ -845,7 +845,7 @@ class Si443x: public PhysicalLayer {
int16_t setFrequencyRaw(float newFreq);
int16_t setPacketMode(uint8_t mode, uint8_t len);
#if !defined(RADIOLIB_GODMODE)
#if !RADIOLIB_GODMODE
private:
#endif
bool findChip();