include/convutil.h
static inline int chex2i(char c) {
	if (c >= 'a')
		return (c - 'a' + 10);
	else if (c >= 'A')
		return (c - 'A' + 10);

	return (c - '0');
}
/**
 * @brief	Convert ASCII hex character to integer.
 *
 * @param	c : Hex character to convert
 *
 * @return 	converted value.  -1 if wrong character
 */
@brief       Convert ASCII hex character to integer.
@param       c : Hex character to convert

@return      converted value.  -1 if wrong character
@brief Convert ASCII hex character to integer . @param c : Hex character to convert @return converted value . - 1 if wrong character
static inline int chex2i(char c) {
	if (c >= 'a')
		return (c - 'a' + 10);
	else if (c >= 'A')
		return (c - 'A' + 10);
	return (c - '0');
}
static inline int chex2i ( char c ) { if ( c >= ' ' ) return ( c - ' ' + 10 ) ; else if ( c >= ' ' ) return ( c - ' ' + 10 ) ; return ( c - ' ' ) ; }
@brief       Convert ASCII hex character to integer.
@brief Convert ASCII hex character to integer .