From 059358bfb4587c7adb5286faf2afb90b2b17712b Mon Sep 17 00:00:00 2001 From: RB Date: Sat, 12 Apr 2025 23:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E7=AE=A1can=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MDK-ARM/mini_croe.uvoptx | 2 +- User/task/mointor.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/MDK-ARM/mini_croe.uvoptx b/MDK-ARM/mini_croe.uvoptx index 203f9d5..33127a8 100644 --- a/MDK-ARM/mini_croe.uvoptx +++ b/MDK-ARM/mini_croe.uvoptx @@ -207,7 +207,7 @@ 0 1 - 0 + 1 0 0 0 diff --git a/User/task/mointor.c b/User/task/mointor.c index 9781b55..b4bb020 100644 --- a/User/task/mointor.c +++ b/User/task/mointor.c @@ -10,7 +10,6 @@ /* Private variables -------------------------------------------------------- */ /* Private function --------------------------------------------------------- */ /* Exported functions ------------------------------------------------------- */ -extern CAN_t can; void Task_Monitor(void *argument) { (void)argument; // 消除未使用参数的警告 @@ -30,13 +29,6 @@ void Task_Monitor(void *argument) { while (1) { tick += delay_tick; /* 计算下一个唤醒时刻 */ - // 检测 mailbox 是否存在 0x04 - if (can.mailbox.sick == 0x04) { - // 如果检测到 0x04,重置 CAN 线程 - osThreadTerminate(osThreadGetId()); // 终止当前线程 - osThreadNew(Task_Can, NULL, NULL); // 创建新的 CAN 线程 - } - // TODO: 监控任务的具体实现 BSP_LED_Set(BSP_LED_GREEN, BSP_LED_TAGGLE, 0); osDelayUntil(tick); /* 运行结束,等待下一次唤醒 */