From 48a80b22f5bc5b27cec1cc698bea785906528aed Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 14 Jun 2021 21:15:18 +0200 Subject: [PATCH] [SX128x] Added direct reception dummies --- src/modules/SX128x/SX128x.cpp | 12 ++++++++++++ src/modules/SX128x/SX128x.h | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/modules/SX128x/SX128x.cpp b/src/modules/SX128x/SX128x.cpp index 4aa05099..d67e2e14 100644 --- a/src/modules/SX128x/SX128x.cpp +++ b/src/modules/SX128x/SX128x.cpp @@ -1152,6 +1152,18 @@ uint8_t SX128x::random() { return(0); } +void SX126x::setDirectAction(void (*func)(void)) { + // SX128x is unable to perform direct mode reception + // this method is implemented only for PhysicalLayer compatibility + return(0); +} + +void SX126x::readBit(RADIOLIB_PIN_TYPE pin) { + // SX128x is unable to perform direct mode reception + // this method is implemented only for PhysicalLayer compatibility + return(0); +} + uint8_t SX128x::getStatus() { uint8_t data = 0; SPIreadCommand(SX128X_CMD_GET_STATUS, &data, 1); diff --git a/src/modules/SX128x/SX128x.h b/src/modules/SX128x/SX128x.h index 19b348fb..76e5209e 100644 --- a/src/modules/SX128x/SX128x.h +++ b/src/modules/SX128x/SX128x.h @@ -784,6 +784,20 @@ class SX128x: 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