mirror of
https://github.com/goldenfishs/MRobot.git
synced 2025-05-04 00:10:54 +08:00
添加init保留msgq
This commit is contained in:
parent
fb944292aa
commit
fed6a1eb86
@ -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()); // 任务完成后结束自身
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user