jeelabs / jeelib

JeeLib for Arduino IDE: Ports, RF12, and RF69 drivers from JeeLabs
https://jeelabs.org/202x/sw/jeelib/
The Unlicense
489 stars 215 forks source link

Examine possibly loss of incoming packet when using RF69::canSend () #95

Closed JohnOH closed 8 years ago

JohnOH commented 8 years ago

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.

JohnOH commented 8 years ago

Raised in error.