From 0e120a760a32a3f8f46fbc534af40c7c2878457b Mon Sep 17 00:00:00 2001 From: jgromes Date: Tue, 30 Jun 2020 10:44:41 +0200 Subject: [PATCH] [nRF24] Reworked driver exclusion --- src/modules/nRF24/nRF24.cpp | 3 +++ src/modules/nRF24/nRF24.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/nRF24/nRF24.cpp b/src/modules/nRF24/nRF24.cpp index 73d25ee6..888b959f 100644 --- a/src/modules/nRF24/nRF24.cpp +++ b/src/modules/nRF24/nRF24.cpp @@ -1,4 +1,5 @@ #include "nRF24.h" +#if !defined(RADIOLIB_EXCLUDE_NRF24) nRF24::nRF24(Module* mod) : PhysicalLayer(NRF24_FREQUENCY_STEP_SIZE, NRF24_MAX_PACKET_LENGTH) { _mod = mod; @@ -568,3 +569,5 @@ void nRF24::SPItransfer(uint8_t cmd, bool write, uint8_t* dataOut, uint8_t* data spi->endTransaction(); digitalWrite(_mod->getCs(), HIGH); } + +#endif diff --git a/src/modules/nRF24/nRF24.h b/src/modules/nRF24/nRF24.h index a3205f78..55802bbe 100644 --- a/src/modules/nRF24/nRF24.h +++ b/src/modules/nRF24/nRF24.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_NRF24_H +#if !defined(_RADIOLIB_NRF24_H) && !defined(RADIOLIB_EXCLUDE_NRF24) #define _RADIOLIB_NRF24_H #include "../../Module.h"