Add setFifoThreshold to RF69 class.

This commit is contained in:
Szczepan 2024-11-03 15:20:24 +01:00
parent bca180c962
commit 68ebbf59b7
2 changed files with 10 additions and 0 deletions

View file

@ -321,6 +321,10 @@ void RF69::clearFifoEmptyAction() {
clearDio1Action();
}
void RF69::setFifoThreshold(uint8_t threshold) {
this->mod->SPIsetRegValue(RADIOLIB_RF69_REG_FIFO_THRESH, threshold, 6, 0);
}
void RF69::setFifoFullAction(void (*func)(void)) {
// set the interrupt
this->mod->SPIsetRegValue(RADIOLIB_RF69_REG_FIFO_THRESH, RADIOLIB_RF69_FIFO_THRESH, 6, 0);

View file

@ -648,6 +648,12 @@ class RF69: public PhysicalLayer {
*/
void clearFifoEmptyAction();
/*!
\brief Set FIFO threshold level.
\param Threshold level.
*/
void setFifoThreshold(uint8_t threshold);
/*!
\brief Set interrupt service routine function to call when FIFO is full.
\param func Pointer to interrupt service routine.