实现了对运行指示灯,错误指示灯和水泵的控制函数封装

This commit is contained in:
2026-02-11 21:05:37 +08:00
parent 9e66a650d2
commit a30497958a
5 changed files with 80 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#include "dx_wf_24.h"
#include "elog.h"
#include "string.h"
#include "device_ctrl.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -132,7 +133,9 @@ void StartDefaultTask(void *argument)
/* Infinite loop */
for (;;) {
HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin);
Device_Control(DEVICE_LED_RUN, 1); // 打开运行灯
osDelay(1000);
Device_Control(DEVICE_LED_RUN, 0); // 关闭运行灯
osDelay(1000);
}
/* USER CODE END StartDefaultTask */