计算出小端模式两个字节代表的长度
小端模式:多字节时低字节在前
eg:char* p = {0x1E,0x00}代表为0x001E(十进制的30)
->int tem16 = 0;
tmp16 = ((unsigned short)(p[1] << 8)) | (unsigned char)p[0];
-->tem16 == 30
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html
小端模式:多字节时低字节在前
eg:char* p = {0x1E,0x00}代表为0x001E(十进制的30)
->int tem16 = 0;
tmp16 = ((unsigned short)(p[1] << 8)) | (unsigned char)p[0];
-->tem16 == 30