diff --git a/examples/app_hsv_cycle_example/Makefile b/examples/app_hsv_cycle_example/Makefile new file mode 100644 index 0000000..9b0f834 --- /dev/null +++ b/examples/app_hsv_cycle_example/Makefile @@ -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 \ No newline at end of file diff --git a/examples/app_hsv_cycle_example/bin/app_hsv_cycle_example.xe b/examples/app_hsv_cycle_example/bin/app_hsv_cycle_example.xe new file mode 100644 index 0000000..3cf0dd7 Binary files /dev/null and b/examples/app_hsv_cycle_example/bin/app_hsv_cycle_example.xe differ diff --git a/examples/app_hsv_cycle_example/src/main.xc b/examples/app_hsv_cycle_example/src/main.xc new file mode 100644 index 0000000..3b257f8 --- /dev/null +++ b/examples/app_hsv_cycle_example/src/main.xc @@ -0,0 +1,23 @@ +/** @brief RGB循环呼吸 + * @author Vergil Wong + * @date 2023-11-11 + * @param + * @return + */ + +#include "stdint.h" +#include // 包含基本的输入输出函数 +#include // 包含对封装的定义,引用以使用 on tile[] 语法 +#include "rgb_effect.h" + +int main() // 定义主函数 +{ + par + { + on tile[1]: + { + cycleRGB_driver(); + } + } + return 0; // 返回0,表示程序正常结束 +} diff --git a/examples/app_rgb_cycle_breathing_example/Makefile b/examples/app_rgb_cycle_breathing_example/Makefile new file mode 100644 index 0000000..9b0f834 --- /dev/null +++ b/examples/app_rgb_cycle_breathing_example/Makefile @@ -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 \ No newline at end of file diff --git a/examples/app_rgb_cycle_breathing_example/bin/app_rgb_cycle_breathing_example.xe b/examples/app_rgb_cycle_breathing_example/bin/app_rgb_cycle_breathing_example.xe new file mode 100644 index 0000000..87ed32a Binary files /dev/null and b/examples/app_rgb_cycle_breathing_example/bin/app_rgb_cycle_breathing_example.xe differ diff --git a/examples/app_rgb_cycle_breathing_example/src/main.xc b/examples/app_rgb_cycle_breathing_example/src/main.xc new file mode 100644 index 0000000..11fc944 --- /dev/null +++ b/examples/app_rgb_cycle_breathing_example/src/main.xc @@ -0,0 +1,23 @@ +/** @brief 循环输出整个HSV色域 + * @author Vergil Wong + * @date 2023-11-11 + * @param + * @return + */ + +#include "stdint.h" +#include // 包含基本的输入输出函数 +#include // 包含对封装的定义,引用以使用 on tile[] 语法 +#include "rgb_effect.h" + +int main() // 定义主函数 +{ + par + { + on tile[1]: + { + cycleHSV_driver(); + } + } + return 0; // 返回0,表示程序正常结束 +}