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

Function validHexString

RFM69_OTA.cpp:572–576  ·  view source on GitHub ↗

=================================================================================================================== validHexString() - walk a char stream and check all chars are valid ascii HEX chars ===================================================================================================================

Source from the content-addressed store, hash-verified

570// validHexString() - walk a char stream and check all chars are valid ascii HEX chars
571//===================================================================================================================
572uint8_t validHexString(char* hex, uint16_t expectedByteCount) {
573 for (uint16_t i=0;i<expectedByteCount*2;i++)
574 if (hex[i]<48 || (hex[i]>57 && hex[i]< 65) || hex[i]>70) return false;
575 return true;
576}
577
578//===================================================================================================================
579// resetUsingWatchdog() - Use watchdog to reset the MCU

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected