示例#1
0
/*
 * Get hex byte
 */
unsigned char
inhx32_gethexb(char *s)
{
	if (strlen(s) > 1)
		return inhx32_gethexn(s[0]) << 4 | inhx32_gethexn(s[1]);
	return 0;
}
示例#2
0
/*
 * Get hex byte
 */
uint8_t
inhx32_gethexb(char *s)
{
	if (strlen(s) > 1)
		return inhx32_gethexn(s[0]) << 4 | inhx32_gethexn(s[1]);
	return 0;
}