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

Function bufferChecksum

RFM69_OTA.cpp:553–558  ·  view source on GitHub ↗

=================================================================================================================== bufferChecksum() - compute 1 byte checksum on a byte stream ===================================================================================================================

Source from the content-addressed store, hash-verified

551// bufferChecksum() - compute 1 byte checksum on a byte stream
552//===================================================================================================================
553uint8_t bufferChecksum(uint8_t* buffer, uint8_t length) {
554 uint8_t checksum=0;
555 for (uint8_t i=0;i<length;i++)
556 checksum += buffer[i];
557 return (checksum^0xFF)+1;
558}
559
560//===================================================================================================================
561// prepareSendBuffer() - returns the final size of the buf

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected