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

Method canSend

RFM69.cpp:321–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321bool RFM69::canSend() {
322 if (_mode == RF69_MODE_RX && PAYLOADLEN == 0 && readRSSI() < CSMA_LIMIT) { // if signal stronger than -100dBm is detected assume channel activity
323 setMode(RF69_MODE_STANDBY);
324 return true;
325 }
326 return false;
327}
328
329void RFM69::send(uint16_t toAddress, const void* buffer, uint8_t bufferSize, bool requestACK) {
330 writeReg(REG_PACKETCONFIG2, (readReg(REG_PACKETCONFIG2) & 0xFB) | RF_PACKET2_RXRESTART); // avoid RX deadlocks

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected