|
爱科技、爱创意、爱折腾、爱极致,我们都是技术控
您需要 登录 才可以下载或查看,没有账号?立即注册
x
大家帮我看看串口每发送一个数据后在发送一个结束符,0XFF 0XFF 0XFF 看以下代码发送的是以文本,还是十六进制发送的。
e_count = 0;
SendData(0xFF);
SendData(0xFF);
SendData(0xFF);
void SendData(BYTE dat);
void SendString(char *s)
{
while (*s) //Check the end of the string
{
SendData(*s++); //Send current char and increment string ptr
}
}
if(re_buf[13]>99)
{
SendData(tt/100 + 0x30);
SendData(tt/10%10 + 0x30);
SendData(tt%10 + 0x30);
}
else if(re_buf[13]>9)
{
SendData(tt/10 + 0x30);
SendData(tt%10 + 0x30);
}
else
{
SendData(tt%10 + 0x30);
}
e_count = 0;
SendData(0xFF);
SendData(0xFF);
SendData(0xFF);
}
}
}
|
|