forked from PAWPAW/lib_rgb
修复了头文件定义,现在定义effect即可使用其他方法
- 例程中使用手动路径搜索 - 防止头文件被多次包含
This commit is contained in:
@@ -14,6 +14,9 @@ USED_MODULES = lib_rgb
|
||||
|
||||
XCC_FLAGS = $(BUILD_FLAGS)
|
||||
|
||||
XMOS_MODULE_PATH = ../..
|
||||
XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1
|
||||
|
||||
#=============================================================================
|
||||
# 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。
|
||||
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,8 @@ USED_MODULES = lib_rgb
|
||||
|
||||
XCC_FLAGS = $(BUILD_FLAGS)
|
||||
|
||||
XMOS_MODULE_PATH = ../..
|
||||
XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1
|
||||
#=============================================================================
|
||||
# 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。
|
||||
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,9 @@ USED_MODULES = lib_rgb
|
||||
|
||||
XCC_FLAGS = $(BUILD_FLAGS)
|
||||
|
||||
XMOS_MODULE_PATH = ../..
|
||||
XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1
|
||||
|
||||
#=============================================================================
|
||||
# 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。
|
||||
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,9 @@ USED_MODULES = lib_rgb
|
||||
|
||||
XCC_FLAGS = $(BUILD_FLAGS)
|
||||
|
||||
XMOS_MODULE_PATH = ../..
|
||||
XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1
|
||||
|
||||
#=============================================================================
|
||||
# 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
#ifndef _MISC_UTILS_H
|
||||
#define _MISC_UTILS_H
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -11,3 +13,4 @@
|
||||
* 直到到达中心点,完成反转过程。
|
||||
*/
|
||||
void reverse_buf(uint32_t *start, size_t count);
|
||||
#endif // _MISC_UTILS_H
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef RGB_DRIVER_H
|
||||
#define RGB_DRIVER_H
|
||||
#ifndef _RGB_DRIVER_H
|
||||
#define _RGB_DRIVER_H
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
@@ -29,4 +29,4 @@ void output_24bit_value_serially(uint32_t value);
|
||||
*/
|
||||
void output_rgb_array(uint32_t buf[], uint32_t num_rgbs);
|
||||
|
||||
#endif // RGB_DRIVER_H
|
||||
#endif // _RGB_DRIVER_H
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#ifndef RGB_EFFECT_H
|
||||
#define RGB_EFFECT_H
|
||||
#ifndef _RGB_EFFECT_H
|
||||
#define _RGB_EFFECT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "rgb_driver.h"
|
||||
#include "volume_level.h"
|
||||
#include "misc_utils.h"
|
||||
|
||||
/**
|
||||
* 定义渐变方向的枚举类型。
|
||||
@@ -162,4 +165,4 @@ void test_HSV_to_RGB();
|
||||
* 如果所有LED的颜色都正确,测试通过;否则,输出错误信息并标记测试失败。
|
||||
*/
|
||||
void test_fill_gradient_with_groups();
|
||||
#endif // RGB_EFFECT_H
|
||||
#endif // _RGB_EFFECT_H
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef _VOLUME_LEVEL_H
|
||||
#define _VOLUME_LEVEL_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
@@ -17,4 +20,6 @@ unsigned get_volume_level(int loudness_value);
|
||||
* 此函数定义了一系列响度值,并使用 get_volume_level 函数
|
||||
* 来获取每个响度值对应的音量等级,然后打印出来。
|
||||
*/
|
||||
void volume_level_test();
|
||||
void volume_level_test();
|
||||
|
||||
#endif // _VOLUME_LEVEL_H
|
||||
Reference in New Issue
Block a user