50 lines
1.0 KiB
C
50 lines
1.0 KiB
C
|
#include "nuc_task.h"
|
|||
|
#include "nuc.h"
|
|||
|
#include "TopDefine.h"//事件组的一些东西
|
|||
|
#include "FreeRTOS.h"
|
|||
|
#include "attrTask.h"
|
|||
|
#include <cmsis_os2.h>
|
|||
|
|
|||
|
#ifdef DEBUG
|
|||
|
|
|||
|
NUC_t cmd_fromnuc;
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
void Task_nuc(void *argument)
|
|||
|
{
|
|||
|
(void)argument; /* 未使用argument,消除警告 */
|
|||
|
|
|||
|
// const uint32_t delay_tick = osKernelGetTickFreq() / TASK_FREQ_AI;
|
|||
|
|
|||
|
NUC_Init(&cmd_fromnuc);
|
|||
|
|
|||
|
uint32_t tick = osKernelGetTickCount();
|
|||
|
|
|||
|
while(1)
|
|||
|
{
|
|||
|
NUC_StartReceiving();
|
|||
|
|
|||
|
NUC_RawParse(&cmd_fromnuc);
|
|||
|
|
|||
|
// if(NUC_WaitDmaCplt())
|
|||
|
// {
|
|||
|
// NUC_RawParse(&cmd_fromnuc);
|
|||
|
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// NUC_HandleOffline(&cmd_fromnuc);
|
|||
|
// }
|
|||
|
|
|||
|
//消息队列的东西以后加
|
|||
|
// osMessageQueueReset(task_runtime.msgq.cmd.raw.nuc);
|
|||
|
// osMessageQueuePut(task_runtime.msgq.cmd.raw.nuc,&(cmd_fromnuc),0,0);
|
|||
|
osDelay(2);
|
|||
|
|
|||
|
// tick += delay_tick; /* 计算下一个唤醒时刄1ķ*/
|
|||
|
// osDelayUntil(tick);
|
|||
|
|
|||
|
}
|
|||
|
}
|