基本上我想做的是
例如:'a' hex equivalant is 0x61
,我可以拆分61
为6
and1
并将它们存储为'6'
and'1'
吗?
缓冲区正在接收这样的数据:
rx_dataframe.data[0] is H'00,'.'// H' is Hex equivalant and '' is ASCII value
rx_dataframe.data[0] is H'31,'1'
rx_dataframe.data[0] is H'32,'2'
rx_dataframe.data[0] is H'33,'3'
我需要转换hex values 0x00,0x31,0x32,0x33
为 char 值'0','0','3','1','3','2';'3','3'
并将它们存储在tx_buff_data[];
我想要我的tx_buff_data
样子
tx_buff_data[0] have H'30,'0'
tx_buff_data[1] have H'30,'0'
tx_buff_data[2] have H'33,'3'
tx_buff_data[3] have H'31,'1'
tx_buff_data[4] have H'33,'3'
tx_buff_data[5] have H'32,'2'
tx_buff_data[6] have H'33,'3'
tx_buff_data[7] have H'33,'3'