Introduce setDIOMapping on the PhysicalLayer class which, by default, returns "not implemented"

pull/542/head
obones 2022-07-06 15:28:50 +02:00
rodzic 8ae092ac81
commit e421ab4272
3 zmienionych plików z 25 dodań i 0 usunięć

Wyświetl plik

@ -203,6 +203,16 @@
*/
#define RADIOLIB_ERR_LORA_HEADER_DAMAGED (-24)
/*!
\brief The requested functionality is not supported for this device
*/
#define RADIOLIB_ERR_UNSUPPORTED (-25)
/*!
\brief The specified DIO pin does not exist on this device
*/
#define RADIOLIB_ERR_INVALID_DIO_PIN (-26)
// RF69-specific status codes
/*!

Wyświetl plik

@ -246,3 +246,7 @@ void PhysicalLayer::updateDirectBuffer(uint8_t bit) {
}
}
}
int16_t PhysicalLayer::setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value) {
return(RADIOLIB_ERR_UNSUPPORTED);
}

Wyświetl plik

@ -300,6 +300,17 @@ class PhysicalLayer {
*/
uint8_t read();
/*!
\brief Configure DIO pin mapping to get a given signal on a DIO pin (if available).
\param pin Pin number onto which a signal is to be placed.
\param value The value that indicates which function to place on that pin. See chip datasheet for details.
\returns \ref status_codes
*/
virtual int16_t setDIOMapping(RADIOLIB_PIN_TYPE pin, uint8_t value);
protected:
void updateDirectBuffer(uint8_t bit);