unsigned long fnHexStrHex(
CHAR *ucNewAdd);
ucNewAdd is a CHAR pointer to an input ASCII HEX value which will be converted to its binary value.
The input string may be terminated by any character below the ASCII '0', making it practical for also converting
inputs such as MAC addresses where each individual byte is terminated by a dash, or similar character.
The routine is insensitive to upper or lower case ASCII hex.
White space at the start of the input string is ignored.
The function returns an
unsigned long value containing the extracted value.
Examples
Example of extracting a number from an input string:
CHAR buf[] = " 1234aB";
unsigned long ulResult = fnHexStrHex(buf);
The resulting value is 0x1234ab
Related functions
fnDecStrHex();
Please use the
µTasker forum to ask specific questions.