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); }