yarf 0.1
Yet Another RepRap Firmware
|
The periodic scheduler allows tasks to be executed at periodic intervals. More...
Go to the source code of this file.
Data Structures | |
struct | periodic_task |
Task that can be scheduled by the periodic scheduler. More... | |
Typedefs | |
typedef struct periodic_task | periodic_task_t |
Task that can be scheduled by the periodic scheduler. | |
Functions | |
void | periodic_init (void) |
Initializes the periodic scheduler. | |
void | periodic_task_set (periodic_task_t *task, void(*f)(void), unsigned long ms) |
Initializes a periodic task to execute a given function at constant intervals of a given number of milliseconds. | |
void | periodic_add (periodic_task_t *task) |
Adds a periodic task to the list of tasks to execute. | |
void | periodic_remove (periodic_task_t *task) |
Removes a periodic task from the list of tasks to execute. |
The periodic scheduler allows tasks to be executed at periodic intervals.
Definition in file periodic.h.
void periodic_add | ( | periodic_task_t * | task | ) |
Adds a periodic task to the list of tasks to execute.
After calling this function for a specific task, that task will be executed at its corresponding interval.
task | pointer to the periodic task to add |
Definition at line 62 of file periodic.c.
void periodic_remove | ( | periodic_task_t * | task | ) |
Removes a periodic task from the list of tasks to execute.
After calling this function for a specific task, that task will no longer be executed by the periodic scheduler.
task | pointer to the periodic task to remove |
Definition at line 72 of file periodic.c.
void periodic_task_set | ( | periodic_task_t * | task, |
void(*)(void) | f, | ||
unsigned long | ms | ||
) |
Initializes a periodic task to execute a given function at constant intervals of a given number of milliseconds.
task | pointer to the periodic task structure to initialize |
f | pointer to the function to execute when the periodic task needs to run |
ms | number of milliseconds in between the periodic executions of the task |
Definition at line 53 of file periodic.c.