[SX127x] Added common CAD methods

This commit is contained in:
jgromes 2023-08-12 18:43:26 +02:00
parent 58da2a28ac
commit ea4018d310
2 changed files with 19 additions and 0 deletions

View file

@ -472,6 +472,14 @@ void SX127x::clearPacketSentAction() {
this->clearDio0Action();
}
void SX127x::setChannelScanAction(void (*func)(void)) {
this->setDio0Action(func, this->mod->hal->GpioInterruptRising);
}
void SX127x::clearChannelScanAction() {
this->clearDio0Action();
}
void SX127x::setFifoEmptyAction(void (*func)(void)) {
// set DIO1 to the FIFO empty event (the register setting is done in startTransmit)
setDio1Action(func, this->mod->hal->GpioInterruptRising);

View file

@ -738,6 +738,17 @@ class SX127x: public PhysicalLayer {
*/
void clearPacketSentAction();
/*!
\brief Sets interrupt service routine to call when a channel scan is finished.
\param func ISR to call.
*/
void setChannelScanAction(void (*func)(void));
/*!
\brief Clears interrupt service routine to call when a channel scan is finished.
*/
void clearChannelScanAction();
/*!
\brief Set interrupt service routine function to call when FIFO is empty.
\param func Pointer to interrupt service routine.