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

  1. #pragma once
  2. #include <stdbool.h>
  3. #include "zlog.h"
  4. #include <stdint.h>
  5. typedef void (*taskfuction)();
  6. //״̬��
  7. typedef enum{
  8. idle,
  9. working,
  10. end,
  11. } status_t;
  12. typedef struct{
  13. uint32_t TaskNotify;//����֪ͨ�ź���
  14. status_t m_status;
  15. bool m_tasktransition;
  16. void (*m_taskfunc)();
  17. void (*init)(taskfuction);
  18. void (*start)(taskfuction);
  19. }Task_t;//�����ṹ��
  20. void Task_init(Task_t* task);
  21. void Task_start(taskfuction cb, Task_t* task);