It may be possible to discard an incoming packet if canSend gets called immediately after IRQ_ENABLE in the interrupt handler below.
void RF69::interrupt_compat () {
if (rxstate == TXRECV) {
// The following line attempts to stop further interrupts
writeReg(REG_DIOMAPPING1, 0x40); // Interrupt on PayloadReady
rssi = readReg(REG_RSSIVALUE);
IRQ_ENABLE; // allow nested interrupts from here on
.
.
.
.rest of interrupt handler.
It may be possible to discard an incoming packet if canSend gets called immediately after IRQ_ENABLE in the interrupt handler below.
void RF69::interrupt_compat () { if (rxstate == TXRECV) { // The following line attempts to stop further interrupts writeReg(REG_DIOMAPPING1, 0x40); // Interrupt on PayloadReady rssi = readReg(REG_RSSIVALUE); IRQ_ENABLE; // allow nested interrupts from here on . . . .rest of interrupt handler.