You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
478 B

#pragma once
#include <stdbool.h>
#include "zlog.h"
#include <stdint.h>
typedef void (*taskfuction)();
//状态机
typedef enum{
idle,
working,
end,
} status_t;
typedef struct{
uint32_t TaskNotify;//任务通知信号量
status_t m_status;
bool m_tasktransition;
void (*m_taskfunc)();
void (*init)(taskfuction);
void (*start)(taskfuction);
}Task_t;//任务结构体
void Task_init(Task_t* task);
void Task_start(taskfuction cb, Task_t* task);