WB2 示例代码入门---helloworld

[复制链接]
查看1141 | 回复6 | 2023-9-8 16:16:46 | 显示全部楼层 |阅读模式
/* 以下注释
* @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


程序添加注释,还有问题,请留言!


回复

使用道具 举报

ai_mcu | 2023-9-8 16:21:04 | 显示全部楼层
就喜欢这种每行都注释的
明天总会更好
回复 支持 反对

使用道具 举报

爱笑 | 2023-9-8 16:28:00 | 显示全部楼层
打卡!
用心做好保姆工作
回复

使用道具 举报

496199544 | 2023-9-8 16:37:16 | 显示全部楼层
老师怎么在windows里装wb2环境
回复 支持 反对

使用道具 举报

jkernet | 2023-9-8 19:33:00 来自手机 | 显示全部楼层
学习打卡
回复

使用道具 举报

LV36 | 2023-9-9 08:09:22 | 显示全部楼层
hello
回复

使用道具 举报

ifwz1729 | 2023-9-15 17:29:40 | 显示全部楼层
学习
知足常乐
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则