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

Function HandleSerialHandshake

RFM69_OTA.cpp:322–335  ·  view source on GitHub ↗

=================================================================================================================== HandleSerialHandshake() - handles the handshake with the serial port ===================================================================================================================

Source from the content-addressed store, hash-verified

320// HandleSerialHandshake() - handles the handshake with the serial port
321//===================================================================================================================
322uint8_t HandleSerialHandshake(RFM69& radio, uint16_t targetID, uint8_t isEOF, uint16_t TIMEOUT, uint16_t ACKTIMEOUT, uint8_t DEBUG)
323{
324 long now = millis();
325
326 while (millis()-now<TIMEOUT)
327 {
328 if (radio.sendWithRetry(targetID, isEOF ? "FLX?EOF" : "FLX?", isEOF?7:4, 2,ACKTIMEOUT))
329 if (radio.DATALEN >= 6 && radio.DATA[0]=='F' && radio.DATA[1]=='L' && radio.DATA[2]=='X' && radio.DATA[3]=='?')
330 return true;
331 }
332
333 if (DEBUG) Serial.println(F("Handshake fail"));
334 return false;
335}
336
337
338//===================================================================================================================

Callers 2

CheckForSerialHEXFunction · 0.85
HandleSerialHEXDataFunction · 0.85

Calls 1

sendWithRetryMethod · 0.45

Tested by

no test coverage detected