将16进制数据按照以下格式读入缓存或者写入到文件:
55 AA 01 85 00 00 8C 31 20 20 33 30 30 30 30 30 2E 31 35 53 6F 6C 61 72 52 69 76 65 72 2D 55 53 20 20 20 53 61 6D 69 6C 50 6F 77 65 72 20 20 20 20 20 20 57 58 30 30 30 30 30 30 30 31 00 00 00 00 00 00 30 32 2E 30 34 30 30 2E 31 35 32 00 01 F4 01 0A 14 02 08 84 04 00 61 05 00 A3 07 00 00 08 00 00 09 00 00 0A 00 00 0C 00 00 27 03 E8 28 03 E8 31 01 F4 32 08 98 33 01 F4 34 15 FF 11 00 00 17 00 00 18 00 00 19 00 00 1A 00 00 1B 00 00 1C 00 00 1C 98
读:
void transHexNum(char buf[], int index, int cHigh, int cLow)
{
//LOG_DEBUG("cHigh = %c, cLow = %c", cHigh, cLow);
if (cHigh >= '0' && cHigh <= '9')
{
buf[index] |= ((cHigh - '0') & 0xf) << 4;
}
else
{
switch (cHi