pfodParser 3.61.0 The pfodParser library is handles commands sent from the Android pfodApp, pfodApp supports WiFi, BLE, Bluetooth and SMS connections

HexConversionUtils.h
Go to the documentation of this file.
1 #ifndef hexConversionUtils_h
2 #define hexConversionUtils_h
6 /*
7 * (c)2014-2017 Forward Computing and Control Pty. Ltd.
8 * NSW Australia, www.forward.com.au
9 * This code is not warranted to be fit for any purpose. You may only use it at your own risk.
10 * This code may be freely used for both private and commercial use
11 * Provide this copyright is maintained.
12 */
13
14 extern "C" {
15
21 int isAllHex(const char *str);
22
34 unsigned int asciiToHex(const char *str, unsigned char *result, unsigned int maxHexLen);
35
45 int hexToAscii(const unsigned char *hex, unsigned int hexLen, char *str, unsigned int maxStrLen);
46 }
47
48
49 #endif // hexConversionUtilsr_h
50
isAllHex
int isAllHex(const char *str)
hexConversionUtils for Arduino
asciiToHex
unsigned int asciiToHex(const char *str, unsigned char *result, unsigned int maxHexLen)
Converts pairs of hex digits (upper or lower case) to bytes i.e.
hexToAscii
int hexToAscii(const unsigned char *hex, unsigned int hexLen, char *str, unsigned int maxStrLen)
Converts bytes to hex digits and adds terminating null i.e.