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

Method send

RFM69.cpp:329–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
331 uint32_t now = millis();
332 while (!canSend() && millis() - now < RF69_CSMA_LIMIT_MS){
333 receiveDone();
334#ifdef ESP8266
335 delay(1); // Give esp8266-based boards to handle background tasks. Seems to work better than yield();
336#endif
337 }
338 sendFrame(toAddress, buffer, bufferSize, requestACK, false);
339}
340
341// to increase the chance of getting a packet across, call this function instead of send
342// and it handles all the ACK requesting/retrying for you :)

Callers 1

CheckForWirelessHEXFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected