kopia lustrzana https://github.com/jgromes/RadioLib
[SX127x/RF69] Added setFifoThreshold (#1309)
* [SX127x] Added setFifoThreshold * [SX127x] Added setFifoThreshold * Add setFifoThreshold to RF69 class. * Documentation update, about setFifoThreshold.pull/1310/head
rodzic
49868938d6
commit
cb45f4fe5e
|
@ -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);
|
||||
|
|
|
@ -648,6 +648,14 @@ class RF69: public PhysicalLayer {
|
|||
*/
|
||||
void clearFifoEmptyAction();
|
||||
|
||||
/*!
|
||||
\brief Set FIFO threshold level.
|
||||
Be aware that threshold is also set in setFifoFullAction method.
|
||||
setFifoThreshold method must be called AFTER calling setFifoFullAction!
|
||||
\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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -761,6 +761,14 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
void clearFifoEmptyAction();
|
||||
|
||||
/*!
|
||||
\brief Set FIFO threshold level.
|
||||
Be aware that threshold is also set in setFifoFullAction method.
|
||||
setFifoThreshold method must be called AFTER calling setFifoFullAction!
|
||||
\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.
|
||||
|
|
Ładowanie…
Reference in New Issue