From 513fbdfdbfa89decd3fe155c1cae755b1491b557 Mon Sep 17 00:00:00 2001 From: stark1898y <1658608470@qq.com> Date: Mon, 24 Feb 2025 18:14:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=EF=BC=8C=E8=BF=98=E6=98=AF?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .mrs/launch.json | 2 +- APP/peripheral_main.c | 1 + BSP/src/bsp_key.c | 1 - BSP/src/bsp_valve.c | 12 ++++++------ 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.mrs/launch.json b/.mrs/launch.json index 880761a..2de4e41 100644 --- a/.mrs/launch.json +++ b/.mrs/launch.json @@ -10,7 +10,7 @@ "useLocalOpenOCD": true, "executable": "c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/openocd.exe", "configOptions": [ - "-f \"c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/wch-riscv.cfg\"" + "-f \"c:/MounRiver/MounRiver_Studio2/resources/app/resources/win32/components/WCH/OpenOCD/OpenOCD/bin/wch-riscv.cfg\" -c \"chip_id CH584/5\"" ], "gdbport": 3333, "telnetport": 4444, diff --git a/APP/peripheral_main.c b/APP/peripheral_main.c index 93ac32f..7300677 100644 --- a/APP/peripheral_main.c +++ b/APP/peripheral_main.c @@ -51,6 +51,7 @@ void app_task_handler(TeAppEvtType app_evt_type) switch (app_evt_type) { case kKeyShort: + tmos_set_event(vavle_task_id, VAVLE_DECT_SWITCH_START_EVT); logDebug("button short press"); key_press_cnt++; logDebug("key_press_cnt = %d", key_press_cnt); diff --git a/BSP/src/bsp_key.c b/BSP/src/bsp_key.c index 65cfc08..95d0a62 100644 --- a/BSP/src/bsp_key.c +++ b/BSP/src/bsp_key.c @@ -295,7 +295,6 @@ void KEY_ProcessLoop(void) key_wakeup_flag = 0; tmos_set_event(key_task_id, KEY_SCAN_EVT); - tmos_set_event(vavle_task_id, VAVLE_DECT_SWITCH_START_EVT); logDebug("KEY_ProcessLoop"); } } diff --git a/BSP/src/bsp_valve.c b/BSP/src/bsp_valve.c index 0239fd0..282bf71 100644 --- a/BSP/src/bsp_valve.c +++ b/BSP/src/bsp_valve.c @@ -555,12 +555,12 @@ static uint16_t VAVLE_Task_ProcessEvent(uint8_t task_id, uint16_t events) VavleDect_Switch(); valve_switch_dect_flag = 1; - // logDebug("LED显示状态"); - // // tmos_set_event(led_task_id, LED_SHOW_START_EVT); - // BSP_BlockSleep(); - // BSP_RequestBoost(); - // DelayMs(1); - // ShowLed(); + logDebug("LED显示状态"); + // tmos_set_event(led_task_id, LED_SHOW_START_EVT); + BSP_BlockSleep(); + BSP_RequestBoost(); + DelayMs(1); + ShowLed(); return (events ^ VAVLE_DECT_SWITCH_END_EVT); }