16位数据拆分成2个8位数据例子:
unsigned int _16wei; unsigned char gao8,di8; gao8 = (_16wei >> 8) & 0xff; di8 = _16wei & 0xff;2个8位数据合并成1个16位数据例子:
unsigned int _16wei; unsigned char gao8,di8; _16wei = (gao8 << 8) | di8;
16位数据拆分成2个8位数据例子:
unsigned int _16wei; unsigned char gao8,di8; gao8 = (_16wei >> 8) & 0xff; di8 = _16wei & 0xff;2个8位数据合并成1个16位数据例子:
unsigned int _16wei; unsigned char gao8,di8; _16wei = (gao8 << 8) | di8;