今天添加串口设备,串口ESP8266,使用uart2通信,因为uart1作为调试串口了。
在uart.c中,会初始化uart底层,此时确保uart.h中 RT_USING_UART2是define的就行
建立线程
启动线程
查看debug串口
msh >ps
thread pri status sp stack size max used left tick error
-------- ---- ------- ---------- ---------- ---------- ---------- ---
wifi 0x14 suspend 0x00000084 0x00000100 0x0000009c 0x00000014 000
led 0x14 suspend 0x0000007c 0x00000100 0x0000007c 0x00000014 000
tshell 0x19 ready 0x0000008c 0x00000400 0x0000013c 0x00000006 000
tidle 0x1f ready 0x00000050 0x00000100 0x00000050 0x0000001a 000
查看uart2串口,
Hello Wi-Fi!
Hello Wi-Fi!
Hello Wi-Fi!
Hello Wi-Fi!
Hello Wi-Fi!
Hello Wi-Fi!
Hello Wi-Fi!
至此,wifi使用的串口通了,下面就是对接wifi了
转载于http://blog.csdn.net/iamlvshijie/article/details/55001124