diff --git a/examples/app_hsv_cycle_example/Makefile b/examples/app_hsv_cycle_example/Makefile index 9b0f834..d4195f7 100644 --- a/examples/app_hsv_cycle_example/Makefile +++ b/examples/app_hsv_cycle_example/Makefile @@ -14,6 +14,9 @@ USED_MODULES = lib_rgb XCC_FLAGS = $(BUILD_FLAGS) +XMOS_MODULE_PATH = ../.. +XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1 + #============================================================================= # 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。 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 index b29a3aa..05e56be 100644 Binary files a/examples/app_hsv_cycle_example/bin/app_hsv_cycle_example.xe and b/examples/app_hsv_cycle_example/bin/app_hsv_cycle_example.xe differ diff --git a/examples/app_rgb_cycle_breathing_example/Makefile b/examples/app_rgb_cycle_breathing_example/Makefile index 9b0f834..6f52d97 100644 --- a/examples/app_rgb_cycle_breathing_example/Makefile +++ b/examples/app_rgb_cycle_breathing_example/Makefile @@ -14,6 +14,8 @@ USED_MODULES = lib_rgb XCC_FLAGS = $(BUILD_FLAGS) +XMOS_MODULE_PATH = ../.. +XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1 #============================================================================= # 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。 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 index 3a3590a..ddab217 100644 Binary files a/examples/app_rgb_cycle_breathing_example/bin/app_rgb_cycle_breathing_example.xe and b/examples/app_rgb_cycle_breathing_example/bin/app_rgb_cycle_breathing_example.xe differ diff --git a/examples/app_test_cycleHSV_with_vol_level_example/Makefile b/examples/app_test_cycleHSV_with_vol_level_example/Makefile index 9b0f834..d4195f7 100644 --- a/examples/app_test_cycleHSV_with_vol_level_example/Makefile +++ b/examples/app_test_cycleHSV_with_vol_level_example/Makefile @@ -14,6 +14,9 @@ USED_MODULES = lib_rgb XCC_FLAGS = $(BUILD_FLAGS) +XMOS_MODULE_PATH = ../.. +XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1 + #============================================================================= # 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。 diff --git a/examples/app_test_cycleHSV_with_vol_level_example/bin/app_test_cycleHSV_with_vol_level_example.xe b/examples/app_test_cycleHSV_with_vol_level_example/bin/app_test_cycleHSV_with_vol_level_example.xe index f3fe2c8..f13f981 100644 Binary files a/examples/app_test_cycleHSV_with_vol_level_example/bin/app_test_cycleHSV_with_vol_level_example.xe and b/examples/app_test_cycleHSV_with_vol_level_example/bin/app_test_cycleHSV_with_vol_level_example.xe differ diff --git a/examples/app_test_fill_gradient_with_groups/Makefile b/examples/app_test_fill_gradient_with_groups/Makefile index 9b0f834..d4195f7 100644 --- a/examples/app_test_fill_gradient_with_groups/Makefile +++ b/examples/app_test_fill_gradient_with_groups/Makefile @@ -14,6 +14,9 @@ USED_MODULES = lib_rgb XCC_FLAGS = $(BUILD_FLAGS) +XMOS_MODULE_PATH = ../.. +XCOMMON_DISABLE_AUTO_MODULE_SEARCH = 1 + #============================================================================= # 下面部分的 Makefile 包含了用于编译 XMOS 应用程序的公共构建基础设施。你无需编辑此处以下的内容。 diff --git a/examples/app_test_fill_gradient_with_groups/bin/app_test_fill_gradient_with_groups.xe b/examples/app_test_fill_gradient_with_groups/bin/app_test_fill_gradient_with_groups.xe index 18958cb..2339a56 100644 Binary files a/examples/app_test_fill_gradient_with_groups/bin/app_test_fill_gradient_with_groups.xe and b/examples/app_test_fill_gradient_with_groups/bin/app_test_fill_gradient_with_groups.xe differ diff --git a/lib_rgb/api/misc_utils.h b/lib_rgb/api/misc_utils.h index 7e5498b..8cb84dd 100644 --- a/lib_rgb/api/misc_utils.h +++ b/lib_rgb/api/misc_utils.h @@ -1,3 +1,5 @@ +#ifndef _MISC_UTILS_H +#define _MISC_UTILS_H #include #include @@ -11,3 +13,4 @@ * 直到到达中心点,完成反转过程。 */ void reverse_buf(uint32_t *start, size_t count); +#endif // _MISC_UTILS_H \ No newline at end of file diff --git a/lib_rgb/api/rgb_driver.h b/lib_rgb/api/rgb_driver.h index 22481d3..351829f 100644 --- a/lib_rgb/api/rgb_driver.h +++ b/lib_rgb/api/rgb_driver.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 diff --git a/lib_rgb/api/rgb_effect.h b/lib_rgb/api/rgb_effect.h index ad5a1e4..01b0cc2 100644 --- a/lib_rgb/api/rgb_effect.h +++ b/lib_rgb/api/rgb_effect.h @@ -1,8 +1,11 @@ -#ifndef RGB_EFFECT_H -#define RGB_EFFECT_H +#ifndef _RGB_EFFECT_H +#define _RGB_EFFECT_H #include #include +#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 \ No newline at end of file +#endif // _RGB_EFFECT_H \ No newline at end of file diff --git a/lib_rgb/api/volume_level.h b/lib_rgb/api/volume_level.h index cc104bf..43e2a7e 100644 --- a/lib_rgb/api/volume_level.h +++ b/lib_rgb/api/volume_level.h @@ -1,3 +1,6 @@ +#ifndef _VOLUME_LEVEL_H +#define _VOLUME_LEVEL_H + #include /** @@ -17,4 +20,6 @@ unsigned get_volume_level(int loudness_value); * 此函数定义了一系列响度值,并使用 get_volume_level 函数 * 来获取每个响度值对应的音量等级,然后打印出来。 */ -void volume_level_test(); \ No newline at end of file +void volume_level_test(); + +#endif // _VOLUME_LEVEL_H \ No newline at end of file