[SX127x] Added setFifoThreshold

This commit is contained in:
Szczepan 2024-11-03 11:05:10 +01:00
parent 72ecc275af
commit 4e79d33bd3
2 changed files with 10 additions and 0 deletions

View file

@ -504,6 +504,10 @@ void SX127x::clearFifoEmptyAction() {
clearDio1Action();
}
void SX127x::setFifoThreshold(uint8_t threshold) {
this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_FIFO_THRESH, threshold, 5, 0);
}
void SX127x::setFifoFullAction(void (*func)(void)) {
// set the interrupt
this->mod->SPIsetRegValue(RADIOLIB_SX127X_REG_FIFO_THRESH, RADIOLIB_SX127X_FIFO_THRESH, 5, 0);

View file

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