Add API to access task's system time
This commit is contained in:
parent
dd1756221d
commit
93b383be49
@ -58,6 +58,11 @@ void task_start_scheduler(void)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t task_current_time(void)
|
||||
{
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
void task_start(TaskFunction function)
|
||||
{
|
||||
for (uint8_t i = 0; i < MAX_TASK_NB; ++i) {
|
||||
@ -101,7 +106,6 @@ bool task_is_running(TaskFunction function)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//--local functions-------------------------------------------------------------
|
||||
|
||||
static bool execute_task(struct Task* restrict task, uint8_t triggers)
|
||||
|
||||
@ -71,8 +71,7 @@ struct Task {
|
||||
#define TASK_EXECUTE(task) _TASK_EXECUTE(task, _TASK_COUNT_INCR)
|
||||
|
||||
void task_start_scheduler(void);
|
||||
|
||||
void task_declare();
|
||||
uint32_t task_current_time(void);
|
||||
|
||||
void task_start(TaskFunction task);
|
||||
void task_stop(TaskFunction task);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user