From bfed720526896852e33ea2d48a3cff8981be957d Mon Sep 17 00:00:00 2001 From: Zhangwen <13970730+mkc46119@user.noreply.gitee.com> Date: Tue, 15 Apr 2025 11:29:39 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A1.=E4=BF=AE=E5=A4=8D=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2cpu=E4=B8=BAstc8h8k=E5=90=8ELED=E7=AE=A1=E8=84=9A?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/app/task_btn.c | 2 +- source/bsp/bsp_led.c | 10 +++++----- source/bsp/bsp_led.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/app/task_btn.c b/source/app/task_btn.c index 54644c9..dccc63b 100644 --- a/source/app/task_btn.c +++ b/source/app/task_btn.c @@ -31,7 +31,7 @@ void L3_task_btn_handler(void) } break; case KEY_DOWN: - RED_LED = ~RED_LED; + BULE_LED = ~BULE_LED; L0_uart0_uchex(g_Key); L0_uart0_0d0a(); g_Key = KEY_NULL; diff --git a/source/bsp/bsp_led.c b/source/bsp/bsp_led.c index 99b11de..d4427f4 100644 --- a/source/bsp/bsp_led.c +++ b/source/bsp/bsp_led.c @@ -2,28 +2,28 @@ void L2_led_init() { - D_HighI_P1(BITN2); + D_HighI_P1(BITN4); D_HighI_P4(BITN7); GREEN_LED = LED_OFF; - RED_LED = LED_OFF; + BULE_LED = LED_OFF; } void L2_GREEN_LED_ON(void) { GREEN_LED = LED_ON; - RED_LED = LED_OFF; + BULE_LED = LED_OFF; } void L2_RED_LED_ON(void) { GREEN_LED = LED_OFF; - RED_LED = LED_ON; + BULE_LED = LED_ON; } void L2_LED_OFF(void) { GREEN_LED = LED_OFF; - RED_LED = LED_OFF; + BULE_LED = LED_OFF; } diff --git a/source/bsp/bsp_led.h b/source/bsp/bsp_led.h index 71705e6..acbf26c 100644 --- a/source/bsp/bsp_led.h +++ b/source/bsp/bsp_led.h @@ -4,8 +4,8 @@ #include "bsp_config.h" -#define GREEN_LED P12 //双色红灯 -#define RED_LED P47 //双色绿灯 +#define GREEN_LED P14 //绿灯 +#define BULE_LED P47 //蓝灯 #define LED_ON 0 #define LED_OFF 1