internal function
| 472 | |
| 473 | // internal function |
| 474 | void RFM69::receiveBegin() { |
| 475 | DATALEN = 0; |
| 476 | SENDERID = 0; |
| 477 | TARGETID = 0; |
| 478 | PAYLOADLEN = 0; |
| 479 | ACK_REQUESTED = 0; |
| 480 | ACK_RECEIVED = 0; |
| 481 | #if defined(RF69_LISTENMODE_ENABLE) |
| 482 | RF69_LISTEN_BURST_REMAINING_MS = 0; |
| 483 | #endif |
| 484 | RSSI = 0; |
| 485 | if (readReg(REG_IRQFLAGS2) & RF_IRQFLAGS2_PAYLOADREADY) |
| 486 | writeReg(REG_PACKETCONFIG2, (readReg(REG_PACKETCONFIG2) & 0xFB) | RF_PACKET2_RXRESTART); // avoid RX deadlocks |
| 487 | writeReg(REG_DIOMAPPING1, RF_DIOMAPPING1_DIO0_01); // set DIO0 to "PAYLOADREADY" in receive mode |
| 488 | setMode(RF69_MODE_RX); |
| 489 | } |
| 490 | |
| 491 | // checks if a packet was received and/or puts transceiver in receive (ie RX or listen) mode |
| 492 | bool RFM69::receiveDone() { |
nothing calls this directly
no outgoing calls
no test coverage detected