/* Returns 1 if data is ready ... */ uint8_t nrf24_dataReady() { // See note in getData() function - just checking RX_DR isn't good enough uint8_t status = nrf24_getStatus(); // We can short circuit on RX_DR, but if it's not set, we still need // to check the FIFO for any pending packets if ( status & (1 << RX_DR) ) { return 1; } return !nrf24_rxFifoEmpty();; }
/* Returns 1 if data is ready ... */ uint8_t nrf24_dataReady() { //Call the netstack RDC function and copy the packet buffer //attributes like in the other one // See note in getData() function - just checking RX_DR isn't good enough uint8_t status = nrf24_getStatus(); // We can short circuit on RX_DR, but if it's not set, we still need // to check the FIFO for any pending packets if ( status & (1 << RX_DR) ) { return 1; } return !nrf24_rxFifoEmpty();; }