5859390743ceecc3c2b79c05340f77e05dfefe23 galt Wed Feb 13 16:50:07 2013 -0800 adding functions to decode hexstring to byte diff --git src/inc/hex.h src/inc/hex.h index 8bc2e4e..ba96653 100644 --- src/inc/hex.h +++ src/inc/hex.h @@ -1,15 +1,23 @@ #ifndef HEX_H #define HEX_H char nibbleToHex(char n); /* convert nibble to hexidecimal character. 0 <= n <= 15. */ void byteToHex(unsigned char n, char *hex); /* convert byte to two hexidecimal characters. 0 <= n <= 255. */ char *byteToHexString(unsigned char n); /* convert byte to hexidecimal string. 0 <= n <= 255. */ +/* Reverse Functions */ + +char hexToNibble(char n); +/* convert hexidecimal character to nibble. 0-9a-f. */ + +unsigned char hexToByte(char *hex); +/* convert byte to hexidecimal characters. 0 <= n <= 255. */ + #endif /* HEX_H */