10进制转16进制
#define pj_hex_digits "0123456789abcdef"
void pj_val_to_hex_digit(unsigned value, char *p) //十进制转成16进制
{
*p++ = pj_hex_digits[ (value & 0xF0) >> 4 ];
*p = pj_hex_digits[ (value & 0x0F) ];
}
10进制转16进制
#define pj_hex_digits "0123456789abcdef"
void pj_val_to_hex_digit(unsigned value, char *p) //十进制转成16进制
{
*p++ = pj_hex_digits[ (value & 0xF0) >> 4 ];
*p = pj_hex_digits[ (value & 0x0F) ];
}