#include <iostream>
#include <stdio.h>

using namespace std;


uint8_t ascii_to_uint8(uint8_t hi, uint8_t low);


int main()
{
    uint8_t ret;

    printf("This is RT701 tests...\r\n");

    ret = ascii_to_uint8(0x33, 0x34);
    printf("Return: %u\r\n", ret);
}


uint8_t ascii_to_uint8(uint8_t hi, uint8_t low)
{
	hi = (hi >= 0x30 && hi <= 0x39) ? (hi - 0x30) : (hi - 0x41 + 0x0A);
	low = (low >= 0x30 && low <= 0x39) ? (low - 0x30) : (low - 0x41 + 0x0A);
	return ((hi << 4) + low );
}