/* While we find nice hex chars, build an int. Return number of chars processed.  */
static int hexToInt(char **ptr, unsigned long *intValue)
/* While we find nice hex chars, build an int. Return number of chars processed.  */
static int hexToInt(char **ptr, unsigned long *intValue)
{
	int count = 0, ch;
	*_value = 0;
	while (**ptr) {
		ch = hex(**ptr);
		if (ch < 0)
			break;
		*_value = (*_value << 4) | ((uint8_t) ch & 0xf);
		count++;
		(*ptr)++;
	}
	return count;
}