void SplitTwoCharToSend(int iIn, unsigned char* ucSendData, int& iDataLen)
{
unsigned char ucH;
unsigned char ucL;
ucH = (unsigned char)(iIn >> 8);//高位
ucL = (unsigned char)(iIn % ( 1 << 8));//低位
ucSendData[iDataLen++] = ucH;
ucSendData[iDataLen++] = ucL;
}
将1个整数拆分成2个字符发送出去
最新推荐文章于 2022-09-26 16:54:16 发布