[RF69] Reworked driver exclusion

This commit is contained in:
jgromes 2020-06-30 10:42:47 +02:00
parent 67e36f4ed9
commit 984cfac319
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,5 @@
#include "RF69.h"
#if !defined(RADIOLIB_EXCLUDE_RF69)
RF69::RF69(Module* module) : PhysicalLayer(RF69_FREQUENCY_STEP_SIZE, RF69_MAX_PACKET_LENGTH) {
_mod = module;
@ -342,7 +343,7 @@ int16_t RF69::readData(uint8_t* data, size_t len) {
// set mode to standby
int16_t state = standby();
RADIOLIB_ASSERT(state);
// get packet length
size_t length = len;
if(len == RF69_MAX_PACKET_LENGTH) {
@ -836,3 +837,5 @@ void RF69::clearIRQFlags() {
_mod->SPIwriteRegister(RF69_REG_IRQ_FLAGS_1, 0b11111111);
_mod->SPIwriteRegister(RF69_REG_IRQ_FLAGS_2, 0b11111111);
}
#endif

View file

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