6

嵌入式软件设计(串口调试)

 1 year ago
source link: https://blog.csdn.net/feixiaoxing/article/details/125128924
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

嵌入式软件设计(串口调试)

费晓行 已于 2022-06-05 09:59:52 修改 24

【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing @163.com】

        串口一般是大家学习嵌入式遇到的第一个硬件协议。串口比较简单,常用的协议有232、485这些。实际开发中,串口用途很多,比如打印调试、固件下载、参数设置、上位机通讯等等。今天,可以趁着这个机会学习一下串口的基本编写方法。

1、查看main函数

        整个流程还是比较清晰的,主要是USART_Config函数、get_data函数、send_data函数。从代码内容看,这应该是一个loopback函数,主要把输入的内容再回环回去。

2、USART_Config函数


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK