uint8_t convert( char * src){ uint8_t ret = 0,d; while(*src) { if( *src >= '0' && *src <= '9') d = *src - '0'; else if( *src >= 'a' && *src <= 'f') d = *src - 'a' + 10; else if( *src >= 'A' && *src <= 'Z') d = *src - 'A' + 10; else { printf("字符串有不可识别字符。"); return exit(0); }; ret= ret * 16 + d; src ++; } return ret;}