[CC1101] Reworked macro configuration system
This commit is contained in:
parent
1d77d8bd55
commit
0c436e5ed8
2 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
#include "CC1101.h"
|
||||
#include <math.h>
|
||||
#if !defined(RADIOLIB_EXCLUDE_CC1101)
|
||||
#if !RADIOLIB_EXCLUDE_CC1101
|
||||
|
||||
CC1101::CC1101(Module* module) : PhysicalLayer(RADIOLIB_CC1101_FREQUENCY_STEP_SIZE, RADIOLIB_CC1101_MAX_PACKET_LENGTH) {
|
||||
this->mod = module;
|
||||
|
@ -935,7 +935,7 @@ int16_t CC1101::getChipVersion() {
|
|||
return(SPIgetRegValue(RADIOLIB_CC1101_REG_VERSION));
|
||||
}
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_DIRECT_RECEIVE)
|
||||
#if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
|
||||
void CC1101::setDirectAction(void (*func)(void)) {
|
||||
setGdo0Action(func, this->mod->hal->GpioInterruptRising);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#if !defined(_RADIOLIB_CC1101_H) && !defined(RADIOLIB_EXCLUDE_CC1101)
|
||||
#if !defined(_RADIOLIB_CC1101_H) && !RADIOLIB_EXCLUDE_CC1101
|
||||
#define _RADIOLIB_CC1101_H
|
||||
|
||||
#include "../../TypeDef.h"
|
||||
|
@ -922,7 +922,7 @@ class CC1101: 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 receveid in direct mode.
|
||||
\param func Pointer to interrupt service routine.
|
||||
|
@ -944,7 +944,7 @@ class CC1101: public PhysicalLayer {
|
|||
*/
|
||||
int16_t setDIOMapping(uint32_t pin, uint32_t value);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
|
||||
#if !RADIOLIB_GODMODE && !RADIOLIB_LOW_LEVEL
|
||||
protected:
|
||||
#endif
|
||||
Module* mod;
|
||||
|
@ -959,7 +959,7 @@ class CC1101: public PhysicalLayer {
|
|||
|
||||
void SPIsendCommand(uint8_t cmd);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE)
|
||||
#if !RADIOLIB_GODMODE
|
||||
protected:
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue