解耦test,example,重构effect为C(解决 #4 #6)

This commit is contained in:
2023-11-25 16:36:04 +08:00
parent 5024b92298
commit 1d8c7663f1
20 changed files with 242 additions and 217 deletions

View File

@@ -1,14 +1,24 @@
/** @brief RGB循环呼吸
*
* 驱动HSV颜色空间中的颜色循环以实现连续的颜色渐变效果。
*
* 此函数初始化颜色值并进入一个无限循环不断地计算新的颜色值并更新LED阵列。
* 使用并发执行关键字 'par' 来实现循环内部的并行处理。这个函数假定运行环境支持并行关键字 'par'。
*
* 在此循环中,它首先使用当前颜色填充一个预定义大小的缓冲区,然后调用 `cycleHSV` 函数
* 来更新当前色相值并获取新的颜色。最后它打印出当前的GRB颜色值。
* @author Vergil Wong
* @date 2023-11-11
* @date 2023-11-25
* @param
* @return
*/
#include "stdint.h"
#include <stdio.h> // 包含基本的输入输出函数
#include <platform.h> // 包含对封装的定义,引用以使用 on tile[] 语法
#include "rgb_effect.h"
extern "C"
{
void hsv_cycle_example();
}
int main() // 定义主函数
{
@@ -16,7 +26,7 @@ int main() // 定义主函数
{
on tile[1]:
{
cycleHSV_driver();
hsv_cycle_example();
}
}
return 0; // 返回0表示程序正常结束