LUFA Library
120219
|
Simple round-robbin pseudo-task scheduler. More...
#include "../Common/Common.h"
Data Structures | |
struct | TaskEntry_t |
Scheduler Task List Entry Structure. More... | |
Defines | |
#define | TASK(name) void name (void) |
#define | TASK_LIST TaskEntry_t Scheduler_TaskList[] = |
#define | TASK_MAX_DELAY (MAX_DELAYCTR_COUNT - 1) |
#define | TASK_RUN true |
#define | TASK_STOP false |
Typedefs | |
typedef void(* | TaskPtr_t )(void) |
typedef uint_least16_t | SchedulerDelayCounter_t |
Functions | |
void | Scheduler_Start (void) |
void | Scheduler_Init (void) |
static void | Scheduler_ResetDelay (SchedulerDelayCounter_t *const DelayCounter) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
bool | Scheduler_HasDelayElapsed (const uint_least16_t Delay, SchedulerDelayCounter_t *const DelayCounter) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(2) |
void | Scheduler_SetTaskMode (const TaskPtr_t Task, const bool TaskStatus) |
void | Scheduler_SetGroupTaskMode (const uint_least8_t GroupID, const bool TaskStatus) |
Variables | |
TaskEntry_t | Scheduler_TaskList [] |
volatile uint_least8_t | Scheduler_TotalTasks |
volatile SchedulerDelayCounter_t | Scheduler_TickCounter |
Simple round-robbin cooperative scheduler for use in basic projects where non real-time tasks need to be executed. Each task is executed in sequence, and can be enabled or disabled individually or as a group.