uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
|
Background task scheduler. More...
Functions | |
void | process_background_tasks (void) |
Invokes registered background tasks if certain conditions are met. More... | |
void | init_background_tasks (background_task_t *const high_freq_tasks, uint8_t high_freq_tasks_size, background_task_t *const mid_freq_tasks, uint8_t mid_freq_tasks_size, background_task_t *const low_freq_tasks, uint8_t low_freq_tasks_size) |
Variables | |
static background_task_t * | high_frequency_tasks |
static uint8_t | high_frequency_tasks_size |
static background_task_t * | mid_frequency_tasks |
static uint8_t | mid_frequency_tasks_size |
static background_task_t * | low_frequency_tasks |
static uint8_t | low_frequency_tasks_size |
Background task scheduler.
void init_background_tasks | ( | background_task_t *const | high_freq_tasks, |
uint8_t | high_freq_tasks_size, | ||
background_task_t *const | mid_freq_tasks, | ||
uint8_t | mid_freq_tasks_size, | ||
background_task_t *const | low_freq_tasks, | ||
uint8_t | low_freq_tasks_size | ||
) |
void process_background_tasks | ( | void | ) |
Invokes registered background tasks if certain conditions are met.
This procedure must be called in the main loop of the program. If the CPU timer interrupt flag of CPU timer 0 is active, it is reset and the prescaler counters are incremented. If one of the prescalers reaches its target value, it is reset as well and the corresponding tasks are executed one by one.
|
static |
Internal | array of function pointers to high frequency tasks |
|
static |
Number | of high frequency tasks |
|
static |
Internal | array of function pointers to low frequency tasks |
|
static |
Number | of low frequency tasks |
|
static |
Internal | array of function pointers to medium frequency tasks |
|
static |
Number | of medium frequency tasks |