添加了用例

This commit is contained in:
2023-11-11 21:03:35 +08:00
parent f7d00e8b3d
commit 8b20421b50
6 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# `TARGET` 变量决定了应用程序编译的目标系统。它可以引用源目录中的一个 XN 文件,或者是在编译时作为 `--target` 选项的一个有效参数。
TARGET = XCORE-AI-EXPLORER
# 编译选项
# 构建应用程序时传递给 xcc 的参数
# O2: xcc编译器优化等级2
# report: 打开编译报告
# g: 生成调试信息
# fxscope: 使用 xSCOPE对代码进行跟踪默认使用xlink
BUILD_FLAGS = -O2 -g -DDEBUG_PRINT_ENABLE=1 -report -fxscope
USED_MODULES = lib_rgb
XCC_FLAGS = $(BUILD_FLAGS)
#=============================================================================
# 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。
XMOS_MAKE_PATH ?= ../..
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common

View File

@@ -0,0 +1,23 @@
/** @brief RGB循环呼吸
* @author Vergil Wong
* @date 2023-11-11
* @param
* @return
*/
#include "stdint.h"
#include <stdio.h> // 包含基本的输入输出函数
#include <platform.h> // 包含对封装的定义,引用以使用 on tile[] 语法
#include "rgb_effect.h"
int main() // 定义主函数
{
par
{
on tile[1]:
{
cycleRGB_driver();
}
}
return 0; // 返回0表示程序正常结束
}