From 03e0b5793156bcafc46e630854c003faa9b5b6b5 Mon Sep 17 00:00:00 2001 From: Vergil_Wong Date: Sun, 26 Nov 2023 10:19:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=B4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib_rgb/api/rgb_driver.h | 1 + lib_rgb/src/rgb_driver.xc | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_rgb/api/rgb_driver.h b/lib_rgb/api/rgb_driver.h index 68451ed..bbf43e3 100644 --- a/lib_rgb/api/rgb_driver.h +++ b/lib_rgb/api/rgb_driver.h @@ -2,6 +2,7 @@ #define RGB_DRIVER_H #include #include +#include "misc_utils.h" //TODO: 在XUA工程环境中测试 // 在Makefile中定义编译选项,以使用xua配置项覆盖定义 diff --git a/lib_rgb/src/rgb_driver.xc b/lib_rgb/src/rgb_driver.xc index e2e12ef..7645e67 100644 --- a/lib_rgb/src/rgb_driver.xc +++ b/lib_rgb/src/rgb_driver.xc @@ -7,9 +7,8 @@ #include "rgb_driver.h" // 如果灯的显示没有出现问题,不要修改这些宏 -#define MICROSECONDS 100 -#define RT23_RST_DELAY (MICROSECONDS * 200000) // 200 ms 当前没有使用,因为引脚通常自动拉低 -#define T0H_DELAY (33) // 0.3 μs, assuming MICROSECONDS is 100 times the actual microsecond count +#define RT23_RST_DELAY (MICRO_SECOND * 200000) // 200 ms 当前没有使用,因为引脚通常自动拉低 +#define T0H_DELAY (33) // 0.3 μs, assuming MICRO_SECOND is 100 times the actual microsecond count #define T1H_DELAY (63) // 0.6 μs #define T0L_DELAY (93) // 0.9 μs #define T1L_DELAY (63) // 0.6 μs