在例程simple_center中,Display_printf(dispHandle, SC_ROW_SEPARATOR, 0, "SimpleCentral_processAppMsg event:%d\r\n", pMsg->hdr.event);为什么会有乱码,怎么去除
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
在例程simple_center中,Display_printf(dispHandle, SC_ROW_SEPARATOR, 0, "SimpleCentral_processAppMsg event:%d\r\n", pMsg->hdr.event);为什么会有乱码,怎么去除
您好,
1.你这个打印的信息是在单独接的显示屏还是电脑上?
2.麻烦把您的上下文用的代码 贴上来 (这个Display_printf是在那里调用的)
3.在其他的例程中调用printf是否也会出现乱码?
1.显示在电脑上
2.上下文如下图
3.例程simple_peripheral没有乱码
1.需要确保appEventStrings[pMsg->hdr.event] pMsg->hdr.event的值要小于appEventStrings范围
2.你需要查看参数有效性
3.可以打印多个语句,检查、是哪个有问题
应该跟你说的这些没关系,在SimpleCentral_init接口中,调用的打印也是有乱码
Display driver使用了ANSI格式,您的串口调试助手不支持ANSI格式(或者是没有打开这个选项)。
Display选项中关掉Enable ANSI试试:
Best regards,
Shuyang