/* 以下注释
* @Author: xuhongv@yeah.net xuhongv@yeah.net
* @Date: 2022-10-03 15:02:19
* @LastEditors: xuhongv@yeah.net xuhongv@yeah.net
* @LastEditTime: 2022-10-08 14:55:16
* @Description: Hello world
*/
#include <stdio.h> //standard input optput.header = 标准输入输出头文件,**.文件一般为头文件
#include <string.h> //字符串头文件
#include <FreeRTOS.h> //嵌入系统头文件
#include <task.h> //任务头文件
#include <blog.h> //私有文件需要查询手册
#include "bl_sys.h" //私有文件需要查询手册 猜测bl芯片系统头文件
void main(void) //主函数
{
printf("Hello World.\r\n"); //串口打印输出“Hello World.”,\r\n=转义字符;
for (int i = 10; i >= 0; i--) //for循环结构
{
printf("Restarting in %d seconds...\r\n", i); //串口打印输出多少秒
vTaskDelay(1000 / portTICK_PERIOD_MS); //延时函数
}
printf("Restarting now.\r\n"); //串口打印输出“现在重启”
bl_sys_reset_por(); //重启
}
----------------------
* @文件位置: \Ai-Thinker-WB2\applications\get-started\helloworld\helloworld\main.c
程序添加注释,还有问题,请留言!
|