diff --git a/src/modules/nRF24/nRF24.cpp b/src/modules/nRF24/nRF24.cpp index 0133b732..e0c4c57d 100644 --- a/src/modules/nRF24/nRF24.cpp +++ b/src/modules/nRF24/nRF24.cpp @@ -503,6 +503,12 @@ int16_t nRF24::setEncoding(uint8_t encoding) { return(ERR_NONE); } +uint8_t nRF24::random() { + // nRF24 is unable to measure RSSI, hence no TRNG + // 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 d1e7a8b3..d4943a04 100644 --- a/src/modules/nRF24/nRF24.h +++ b/src/modules/nRF24/nRF24.h @@ -464,6 +464,13 @@ class nRF24: public PhysicalLayer { */ int16_t setEncoding(uint8_t encoding) override; + /*! + \brief Dummy random method, to ensure PhysicalLayer compatibility. + + \returns Always returns 0. + */ + uint8_t random(); + #ifndef RADIOLIB_GODMODE private: #endif