MCPcopy Create free account
hub / github.com/LowPowerLab/RFM69 / receiveBegin

Method receiveBegin

RFM69.cpp:474–489  ·  view source on GitHub ↗

internal function

Source from the content-addressed store, hash-verified

472
473// internal function
474void 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
492bool RFM69::receiveDone() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected