本帖最后由 daatyu 于 2020-8-20 15:34 编辑
n76e003串口1打印数据输出:12 34 56 78,第二次输出00 00 56 78,这就不对了
uint8_t Txbuf[4];
uint32_t Txdata;
Txbuf[0] = 0x12;
Txbuf[1] = 0x34;
Txbuf[2] = 0x56;
Txbuf[3] = 0x78;
for (i = 0; i < 4; i++)
Send_Data_To_UART1(Txbuf);
Txdata = MAKELONG(Txbuf[0],Txbuf[1],Txbuf[2],Txbuf[3]);
Send_Data_To_UART1(TBYTE3(Txdata));
Send_Data_To_UART1(TBYTE2(Txdata));
Send_Data_To_UART1(TBYTE1(Txdata));
Send_Data_To_UART1(TBYTE0(Txdata));
|