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.

37 lines
555 B

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