[LR11x0] Rework generic IRQ to allow multiple flags
This commit is contained in:
parent
644d0ecef8
commit
ef5ee1f089
2 changed files with 2 additions and 17 deletions
|
@ -480,10 +480,9 @@ int16_t LR11x0::startReceive(uint32_t timeout, uint32_t irqFlags, uint32_t irqMa
|
|||
// set DIO mapping
|
||||
uint32_t irq = irqFlags;
|
||||
if(timeout != RADIOLIB_LR11X0_RX_TIMEOUT_INF) {
|
||||
irq |= RADIOLIB_LR11X0_IRQ_TIMEOUT;
|
||||
irq |= (1UL << RADIOLIB_IRQ_TIMEOUT);
|
||||
}
|
||||
|
||||
state = setDioIrqParams(irq);
|
||||
state = setDioIrqParams(getIrqMapped(irq));
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// clear interrupt flags
|
||||
|
@ -1353,12 +1352,6 @@ RadioLibTime_t LR11x0::calculateRxTimeout(RadioLibTime_t timeoutUs) {
|
|||
return(timeout);
|
||||
}
|
||||
|
||||
int16_t LR11x0::irqRxDoneRxTimeout(uint32_t &irqFlags, uint32_t &irqMask) {
|
||||
irqFlags = RADIOLIB_LR11X0_IRQ_RX_DONE | RADIOLIB_LR11X0_IRQ_TIMEOUT; // flags that can appear in the IRQ register
|
||||
irqMask = irqFlags; // on LR11x0, these are the same
|
||||
return(RADIOLIB_ERR_NONE);
|
||||
}
|
||||
|
||||
uint32_t LR11x0::getIrqFlags() {
|
||||
return((uint32_t)this->getIrqStatus());
|
||||
}
|
||||
|
|
|
@ -1216,14 +1216,6 @@ class LR11x0: public PhysicalLayer {
|
|||
*/
|
||||
RadioLibTime_t calculateRxTimeout(RadioLibTime_t timeoutUs) override;
|
||||
|
||||
/*!
|
||||
\brief Create the flags that make up RxDone and RxTimeout used for receiving downlinks
|
||||
\param irqFlags The flags for which IRQs must be triggered
|
||||
\param irqMask Mask indicating which IRQ triggers a DIO
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t irqRxDoneRxTimeout(uint32_t &irqFlags, uint32_t &irqMask) override;
|
||||
|
||||
/*!
|
||||
\brief Read currently active IRQ flags.
|
||||
\returns IRQ flags.
|
||||
|
|
Loading…
Add table
Reference in a new issue