forked from PAWPAW/lib_rgb
新增:随响度响应的RGB灯组
This commit is contained in:
21
examples/app_volume_level_example/Makefile
Normal file
21
examples/app_volume_level_example/Makefile
Normal 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
|
||||
Binary file not shown.
25
examples/app_volume_level_example/src/main.xc
Normal file
25
examples/app_volume_level_example/src/main.xc
Normal file
@@ -0,0 +1,25 @@
|
||||
/** @brief 循环输出整个HSV色域
|
||||
* @author Vergil Wong
|
||||
* @date 2023-11-11
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
||||
#include "stdint.h"
|
||||
#include <stdio.h> // 包含基本的输入输出函数
|
||||
#include <platform.h> // 包含对封装的定义,引用以使用 on tile[] 语法
|
||||
#include "volume_level.h"
|
||||
#include "rgb_effect.h"
|
||||
|
||||
int main() // 定义主函数
|
||||
{
|
||||
par
|
||||
{
|
||||
on tile[1]:
|
||||
{
|
||||
// volume_level_test();
|
||||
test_cycleHSV_with_vol_level();
|
||||
}
|
||||
}
|
||||
return 0; // 返回0,表示程序正常结束
|
||||
}
|
||||
Reference in New Issue
Block a user