From ee9e77d2791110d3e7966d854fa2f6aa6190c5d3 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 14 Jun 2021 21:15:38 +0200 Subject: [PATCH] [nRF24] Added direct reception dummies --- src/modules/nRF24/nRF24.cpp | 12 ++++++++++++ src/modules/nRF24/nRF24.h | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/modules/nRF24/nRF24.cpp b/src/modules/nRF24/nRF24.cpp index 64f47806..30c46ba0 100644 --- a/src/modules/nRF24/nRF24.cpp +++ b/src/modules/nRF24/nRF24.cpp @@ -511,6 +511,18 @@ uint8_t nRF24::random() { return(0); } +void nRF24::setDirectAction(void (*func)(void)) { + // nRF24 is unable to perform direct mode actions + // this method is implemented only for PhysicalLayer compatibility + return(0); +} + +void nRF24::readBit(RADIOLIB_PIN_TYPE pin) { + // nRF24 is unable to perform direct mode actions + // this method is implemented only for PhysicalLayer compatibility + return(0); +} + void nRF24::clearIRQ() { // clear status bits _mod->SPIsetRegValue(NRF24_REG_STATUS, NRF24_RX_DR | NRF24_TX_DS | NRF24_MAX_RT, 6, 4); diff --git a/src/modules/nRF24/nRF24.h b/src/modules/nRF24/nRF24.h index 7a13c1b7..08c867fa 100644 --- a/src/modules/nRF24/nRF24.h +++ b/src/modules/nRF24/nRF24.h @@ -471,6 +471,20 @@ class nRF24: public PhysicalLayer { */ uint8_t random(); + /*! + \brief Dummy method, to ensure PhysicalLayer compatibility. + + \param func Ignored. + */ + void setDirectAction(void (*func)(void)); + + /*! + \brief Dummy method, to ensure PhysicalLayer compatibility. + + \param pin Ignored. + */ + void readBit(RADIOLIB_PIN_TYPE pin); + #if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL) protected: #endif