task #5

Merged
Steins7 merged 35 commits from task into dev 2024-08-04 18:30:16 +00:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 93b383be49 - Show all commits

View File

@ -58,6 +58,11 @@ void task_start_scheduler(void)
} }
} }
uint32_t task_current_time(void)
{
return timestamp;
}
void task_start(TaskFunction function) void task_start(TaskFunction function)
{ {
for (uint8_t i = 0; i < MAX_TASK_NB; ++i) { for (uint8_t i = 0; i < MAX_TASK_NB; ++i) {
@ -101,7 +106,6 @@ bool task_is_running(TaskFunction function)
return false; return false;
} }
//--local functions------------------------------------------------------------- //--local functions-------------------------------------------------------------
static bool execute_task(struct Task* restrict task, uint8_t triggers) static bool execute_task(struct Task* restrict task, uint8_t triggers)

View File

@ -71,8 +71,7 @@ struct Task {
#define TASK_EXECUTE(task) _TASK_EXECUTE(task, _TASK_COUNT_INCR) #define TASK_EXECUTE(task) _TASK_EXECUTE(task, _TASK_COUNT_INCR)
void task_start_scheduler(void); void task_start_scheduler(void);
uint32_t task_current_time(void);
void task_declare();
void task_start(TaskFunction task); void task_start(TaskFunction task);
void task_stop(TaskFunction task); void task_stop(TaskFunction task);