将十进制1000,转化为十六进制,则为0x03E8,如果得到高低位,high=0x03,low=0xE8
BYTE high;
BYTE low;
int temp_data1=nWeightValue;
high=BYTE(temp_data1 >>8);
int temp_data2=nWeightValue;
low=BYTE((temp_data2<<8)>>8);
将十进制1000,转化为十六进制,则为0x03E8,如果得到高低位,high=0x03,low=0xE8
BYTE high;
BYTE low;
int temp_data1=nWeightValue;
high=BYTE(temp_data1 >>8);
int temp_data2=nWeightValue;
low=BYTE((temp_data2<<8)>>8);
转载于:https://my.oschina.net/lvguidong/blog/618868