21 lines
431 B
C++
21 lines
431 B
C++
#ifndef SYS_TASK_MANAGER_H
|
|||
|
|
#define SYS_TASK_MANAGER_H
|
||
|
|
|
||
|
|
#include <stdint.h>
|
||
|
|
#include "main.h"
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief 任务调度管理器。
|
||
|
|
* @note 负责维护节拍计数器与待执行任务位图。
|
||
|
|
*/
|
||
|
|
class TaskManager {
|
||
|
|
public:
|
||
|
|
static void init();
|
||
|
|
static void tick100us();
|
||
|
|
static uint32_t takePending();
|
||
|
|
static void set(uint32_t taskMask);
|
||
|
|
static task_scheduler_t &state();
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif /* SYS_TASK_MANAGER_H */
|