添加init保留msgq

This commit is contained in:
RB 2025-04-30 12:28:52 +08:00
parent fb944292aa
commit fed6a1eb86

View File

@ -25,8 +25,9 @@ void Task_Init(void *argument) {
{{thread_creation_code}} {{thread_creation_code}}
// 创建消息队列 // 创建消息队列
/* USER MESSAGE BEGIN */
task_runtime.msgq.user_msg= osMessageQueueNew(2u, 10, NULL); task_runtime.msgq.user_msg= osMessageQueueNew(2u, 10, NULL);
/* USER MESSAGE END */
osKernelUnlock(); // 解锁内核 osKernelUnlock(); // 解锁内核
osThreadTerminate(osThreadGetId()); // 任务完成后结束自身 osThreadTerminate(osThreadGetId()); // 任务完成后结束自身
} }