/* Converts a character representation of a hex to real value.  */
static uint8_t ctoh(char c)
/* Converts a character representation of a hex to real value.  */
static uint8_t ctoh(char c)
{
    return (c & 0x10) ? c & 0xf : (c & 0xf) + 9;
}