【平头哥RVB2601创意应用开发】用于单片机调试的有线和无线串口屏
本帖最后由 serialworld 于 2022-5-20 18:21 编辑<p style="text-align:justify"> </p>
<p align="center" style="text-align:center"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span class="16" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">作品名称</font></span></span></b></span></span></p>
<p align="center" style="text-align:center"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:20.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">用于单片机调试的有线和无线串口屏</font></span></span></span></span></span></span></p>
<p align="right" style="text-align:right"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">作者:</font></span></span></b><b><span style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">serialworld</font></span></span></b></span></span></p>
<ul>
<li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span style="font-size:16.0000pt"><span style="background:#ffffff"><span style="font-family:微软雅黑"><font face="微软雅黑">项目背景</font></span></span></span></b></span></span></li>
</ul>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">单片调试时经常需要串口显示相关的信息,一般串口需要电脑屏幕的显示。单片机需要连接电脑来显示串口的信息。有时候使用电脑的屏幕显示不方便,如果直接使用一块可以显示串口信息的屏幕,开发调试时就比较方便。如果开发板和电脑距离比较远,使用无线串口功能就比较方便了。也可以通过无线串口连接开发板,方便调试和信息显示。也可以把</font>RVB2601开发板作为其他开发板的无线信息显示屏。</span></span></span></span></span></span></p>
<ul>
<li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span class="15" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">作品简介</font></span></span></b></span></span></li>
</ul>
<p style="text-indent:24.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal">CH2601 是基于玄铁 E906 的 RISC-V 生态芯片,最高主频 220MHz,支持 AliOS Things </span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">物联网操作系统、平头哥</font> <font face="微软雅黑">YoC 软件平台及平头哥剑池开发工具(CDK)。 </font></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">RVB2601是基于平头哥生态芯片CH2601的开发板,板载JTAG调试器,WiFi&BLE芯片 W800, </font></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">音频</font> <font face="微软雅黑">ADC-ES7210,音频 DAC-ES8156,128x64 OLED 屏幕,RGB 三色指示灯,用 </font></span></span></span></span></span></span></p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">户按键,及兼容</font> <font face="微软雅黑">Arduino 的扩展接口。</font></span></span></span></span></span></span></p>
<p style="margin-left:42px; text-indent:-31.5000pt; text-align:justify"> <span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">本项目是</font></span></span></span></span><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">利用</font>RVB2601屏幕和</span></span></span></span><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">串口及</font></span></span></span></span><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">无线功能可以设计一个有线或是无线的串口信息显示屏,方便</font></span></span></span></span></span></span></p>
<table>
<tbody>
<tr>
<td style="width:71.4167px; height:0px"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">显示单片机的调试信息。</font></span></span></span></span></p>
<p style="text-align:justify"> </p>
<ul>
<li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span class="15" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">系统框图</font></span></span></b></span></span></li>
</ul>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b> </b><span style="font-size:10.5000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">UART0可以接收其他单机系统的串口输出,OLED显示输出结果。使用下面标记的引脚可以接收其他单片机的串口输出的信息。</font></span></span></span></span></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"> </p>
<ul>
<li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span class="15" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">各部分功能说明</font></span></span></b><b><span class="15" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">和解析</font></span></span></b></span></span></li>
</ul>
<p class="p" style="text-indent:24.0000pt; text-align:left; margin-top:7px; margin-bottom:7px"><span style="font-size:12pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:'Times New Roman'"><font face="宋体">程序主要由</font>3<font face="宋体">个任务分别是</font><font face="Times New Roman">gui_lvgl_task </font><font face="宋体">显示数据,</font><font face="Times New Roman">led_task</font><font face="宋体">负责</font><font face="Times New Roman">led</font><font face="宋体">闪烁,</font><font face="Times New Roman">ch_input_task</font><font face="宋体">负责串口数据的输入。程序的基本功能是接收串口的输入并通过调用</font><font face="Times New Roman">lvgl GUI</font><font face="宋体">库在开发板自带的</font><font face="Times New Roman">OLED</font><font face="宋体">屏上显示串口的输入内容。</font></span></span></span></span></p>
<p class="p" style="text-indent:0.0000pt; text-align:left; margin-top:7px; margin-bottom:7px"><span style="font-size:12pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:'Times New Roman'"> aos_task_new("gui", gui_lvgl_task, NULL, 10 * 1024);</span></span></span></span></p>
<p class="p" style="text-indent:0.0000pt; text-align:left; margin-top:7px; margin-bottom:7px"><span style="font-size:12pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:'Times New Roman'"> aos_task_new("led", led_task, NULL, 10 * 1024);</span></span></span></span></p>
<p class="p" style="text-indent:0.0000pt; text-align:left; margin-top:7px; margin-bottom:7px"><span style="font-size:12pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:'Times New Roman'"> aos_task_new("getchar", ch_input_task, NULL, 10 * 1024); </span></span></span></span> </p>
<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span class="15" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">五、作品源码</font></span></span></b></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span class="15" style="font-size:12.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">/</font></span></span></b><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">* Copyright (C) 2015-2017 Alibaba Group Holding Limited</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">*/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/*********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* INCLUDES</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">*********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#define _DEFAULT_SOURCE /* needed for usleep() */</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include <stdio.h></font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include <stdlib.h></font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include <unistd.h></font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include <time.h></font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include <aos/aos.h></font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "aos/cli.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "app_init.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "lvgl.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "lv_label.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "oled.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "myled.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "console_uart.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/*********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* DEFINES</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">*********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#define TAG "app"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/**********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* TYPEDEFS</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">**********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/**********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* STATIC PROTOTYPES</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">**********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">// GUI</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">//static void gui_lvgl_task(void *arg);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">//</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/**********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* STATIC VARIABLES</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">**********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/**********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* MACROS</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">**********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/**********************</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* GLOBAL FUNCTIONS</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">**********************/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#define N 16</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">volatile uint32_t g_debug = 0;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">volatile uint32_t g_debug_v = 0;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">volatile char c;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">char myinput;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">char line1={'\0'};</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">char line2={'\0'};</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">char line3={'\0'};</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">char line4={'\0'};</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">int current_line=1;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">int update =0;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">aos_mutex_t input_mutex;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static lv_obj_t *p;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void gui_lvgl_task(void *arg);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void led_task(void *arg);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void ch_input_task(void *arg);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">void get_input(char *str);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">#include "csi_core.h"</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">/**</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* main</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">*/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">int main(void)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">board_yoc_init();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">myled_init();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">int ret = -1;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">/* 创建一个mutex */</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">ret = aos_mutex_new(&input_mutex);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">if (ret != 0) {</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">return 1;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_task_new("gui", gui_lvgl_task, NULL, 10 * 1024);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_task_new("led", led_task, NULL, 10 * 1024);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_task_new("getchar", ch_input_task, NULL, 10 * 1024); </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">return 0;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void gui_label_create(void)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">p = lv_label_create(lv_scr_act(), NULL);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_label_set_long_mode(p, LV_LABEL_LONG_BREAK);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_label_set_align(p, LV_LABEL_ALIGN_LEFT);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_obj_set_pos(p, 0, 0);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_obj_set_size(p, 128, 64);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_label_set_text(p, "EE world");</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_msleep(2000);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">// lv_label_set_long_mode(p, LV_LABEL_LONG_SROLL_CIRC);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void gui_lvgl_task(void *arg)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{ </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_init();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">/*Initialize for LittlevGL*/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">oled_init();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">/*Select display 1*/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">// demo_create();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">gui_label_create();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">// extern static lv_obj_t *p;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">while (1) {</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">/* Periodically call the lv_task handler.</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">* It could be done in a timer interrupt or an OS task too.*/</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_task_handler();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">// LOGD(TAG, "hello world!");</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">if(1 == aos_mutex_is_valid(&input_mutex))</font></span></span></span></span> <span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_mutex_lock(&input_mutex, AOS_WAIT_FOREVER); </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">if(update){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_label_set_text_fmt(p,"%s%s%s%s",line1, line2, line3, line4);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""> </span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">update = 0;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_mutex_unlock(&input_mutex);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">aos_msleep(10);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">lv_tick_inc(1);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void led_task(void *arg){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">while(1){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">myled_test();</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">static void ch_input_task(void *arg){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">while(1){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">for(int k = 0;k<N;k++)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">myinput ='\0';</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span> </span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">get_input(myinput);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">printf("%s",myinput);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_msleep(5);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">if(1 == aos_mutex_is_valid(&input_mutex))</font></span></span></span></span> <span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">aos_mutex_lock(&input_mutex, AOS_WAIT_FOREVER); </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">update = 1;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">if(current_line<=4){</font></span></span></span></span> </span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">switch(current_line++){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">case 1:</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line1,"%s",myinput);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">break;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">case 2:</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line2,"%s",myinput);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">break;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">case 3:</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line3,"%s",myinput);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">break;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">case 4:</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line4,"%s",myinput);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">break;</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">default:</font></span></span></span></span> </span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">break;</font></span></span></span></span> </span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">else {</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""> <span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">for(int k = 0;k<N;k++)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">line1 ='\0';</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line1,"%s",line2); </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">for(int k = 0;k<N;k++)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">line2 ='\0';</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line2,"%s",line3);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">for(int k = 0;k<N;k++)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">line3 ='\0';</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line3,"%s",line4);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">for(int k = 0;k<N;k++)</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">{</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">line4 ='\0';</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">sprintf(line4,"%s",myinput); </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">} </font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">aos_mutex_unlock(&input_mutex);</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span> </span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"> </p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">void get_input(char * str){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">for (int i=0,ch ='\0'; i<N ;++i){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">if(i == N-1){</font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">str<i> = '\0';</i></font></span></span></span></span></span></span></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">break;</font></span></span></span></span></span></span></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">if(i == N-2){</font></span></span></span></span></span></span></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">str<i> = '\r';</i></font></span></span></span></span></span></span></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">continue;</font></span></span></span></span></span></span></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">ch= uart_getc();</font></span></span></span></span></span></span></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">if(ch == '\n'){</font></span></span></span></span></span></span></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">str<i> = '\0';</i></font></span></span></span></span></span></span></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">break;</font></span></span></span></span></span></span></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">} else {</font></span></span></span></span> </span></span></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">str<i> =ch;</i></font></span></span></span></span><i> </i></span></span></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></i></i></p>
<p><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">getc();</font></span></span></span></span></span></span></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">if(ch == '\n'){</font></span></span></span></span></span></span></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">str<i> = '\0';</i></font></span></span></span></span></span></span></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">break;</font></span></span></span></span></span></span></i></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">} else {</font></span></span></span></span> </span></span></i></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">str<i> =ch;</i></font></span></span></span></span><i> </i></span></span></i></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"> <font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></i></i></i></i></p>
<p style="margin-left:28px; text-indent:21.0000pt; text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">}</font></span></span></span></span></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">六、视频</font></span></span></b><b><span class="15" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">演示(视频简介</font><font face="微软雅黑">+链接)</font></span></span></b></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><a href="https://occ.t-head.cn/community/post/detail?id=4044567325822296064"><b><u><span class="17" style="font-size:16.0000pt"><span style="font-family:微软雅黑"><span style="color:#800080"><span style="text-decoration:underline"><span style="text-underline:single"><font face="微软雅黑">https://occ.t-head.cn/community/post/detail?id=4044567325822296064</font></span></span></span></span></span></u></b></a></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i> </i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><span class="15" style="font-size:12.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">视频演示链接如下:</font></span></span></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">七、项目总结(项目文字总结</font><font face="微软雅黑">+帖子分享链接汇总)</font></span></span></b></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><a href="https://bbs.eeworld.com.cn/thread-1197618-1-1.html"><u><span class="18" style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#0000ff"><span style="text-decoration:underline"><span style="text-underline:single"><font face="微软雅黑">https://bbs.eeworld.com.cn/thread-1197618-1-1.html</font></span></span></span></span></span></u></a></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><a href="https://bbs.eeworld.com.cn/thread-1197779-1-1.html"><u><span class="18" style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#0000ff"><span style="text-decoration:underline"><span style="text-underline:single"><font face="微软雅黑">https://bbs.eeworld.com.cn/thread-1197779-1-1.html</font></span></span></span></span></span></u></a></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><a href="https://bbs.eeworld.com.cn/thread-1197900-1-1.html"><u><span class="18" style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#0000ff"><span style="text-decoration:underline"><span style="text-underline:single"><font face="微软雅黑">https://bbs.eeworld.com.cn/thread-1197900-1-1.html</font></span></span></span></span></span></u></a></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i> </i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b><span style="font-size:16.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">八、其他</font></span></span></b></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i><span style="font-size:10.5pt"><span style="font-family:"Times New Roman""><b> </b><b> </b><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><font face="微软雅黑">因时间和技术能力问题未实现无线串口的功能,需要进一步学习后实现。</font></span></span><span style="font-size:12.0000pt"><span style="font-family:微软雅黑"><span style="color:#000000"><span style="font-style:normal"><font face="微软雅黑">RVB2601仅仅当做串口屏使用有点大才小用了。</font></span></span></span></span></span></span></i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i> </i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i> </i></i></i></i></i></i></p>
<p style="text-align:justify"><i><i><i><i><i><i> </i></i></i></i></i></i></p>
<p>厉害厉害!</p>
页:
[1]