sick_dt35/User/task/mointor.c
2025-04-02 16:20:48 +08:00

27 lines
1.1 KiB
C

/* Includes ----------------------------------------------------------------- */
#include "device\can.h"
#include "task\user_task.h"
#include "bsp\led.h"
/* Private typedef ---------------------------------------------------------- */
/* Private define ----------------------------------------------------------- */
/* Private macro ------------------------------------------------------------ */
/* Private variables -------------------------------------------------------- */
/* Private function --------------------------------------------------------- */
/* Exported functions ------------------------------------------------------- */
void Task_Monitor(void *argument) {
(void)argument; // 消除未使用参数的警告
// BSP_WS2812_Init(); // 初始化 WS2812 LED
while (1) {
BSP_LED_SET(BSP_LED1, BSP_LED_TAGGLE); // 切换 LED 状态
// BSP_WS2812_Set(255, 0, 0); // 设置为红色
HAL_Delay(1000); // 延时 1 秒
// BSP_WS2812_Set(0, 255, 0); // 设置为绿色
// HAL_Delay(1000); // 延时 1 秒
// BSP_WS2812_Set(0, 0, 255); // 设置为蓝色
// HAL_Delay(1000); // 延时 1 秒
}
}