新增:随响度响应的RGB灯组

This commit is contained in:
2023-11-12 22:24:17 +08:00
parent 5b227abc8b
commit 47eb373c63
16 changed files with 306 additions and 10 deletions

31
examples/Makefile Normal file
View File

@@ -0,0 +1,31 @@
# This variable should contain a space separated list of all
# the directories containing buildable applications (usually
# prefixed with the app_ prefix)
BUILD_SUBDIRS = ./app_rgb_cycle_breathing_example \
./app_hsv_cycle_example \
./app_volume_level_example \
./app_test_fill_gradient_with_groups \
# This variable should contain a space separated list of all
# the directories containing buildable plugins (usually
# prefixed with the plugin_ prefix)
PLUGIN_SUBDIRS =
# This variable should contain a space separated list of all
# the directories containing applications with a 'test' make target
TEST_SUBDIRS =
# Provided that the above variables are set you shouldn't need to modify
# the targets below here.
%.all:
cd $* && xmake BUILD_TEST_CONFIGS=1 all
%.clean:
cd $* && xmake BUILD_TEST_CONFIGS=1 clean
all: $(foreach x, $(BUILD_SUBDIRS), $x.all)
plugins: $(foreach x, $(PLUGIN_SUBDIRS), $x.all)
clean: $(foreach x, $(BUILD_SUBDIRS), $x.clean)
clean_plugins: $(foreach x, $(PLUGIN_SUBDIRS), $x.clean)
test: $(foreach x, $(TEST_SUBDIRS), $x.test)

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,24 @@
/** @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]:
{
test_fill_gradient_with_groups();
}
}
return 0; // 返回0表示程序正常结束
}

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,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表示程序正常结束
}