X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6a10d6b465be27db090d760dc0fbe722c94e4344..af02b5b0c953931ce8b8925439972b1b4bd1d77e:/LUFA/Scheduler/Scheduler.h?ds=inline diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h index 39f94ef80..414b0b291 100644 --- a/LUFA/Scheduler/Scheduler.h +++ b/LUFA/Scheduler/Scheduler.h @@ -30,10 +30,10 @@ /** \file * - * Simple round-robbin cooperative scheduler for use in basic projects where non realtime tasks need + * 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. * - * For a task to yield it must return, thus each task should have persistant data marked with the static attribute. + * For a task to yield it must return, thus each task should have persistent data marked with the static attribute. * * Usage Example: * \code @@ -126,8 +126,8 @@ #define Scheduler_Start() Scheduler_GoSchedule(TOTAL_TASKS); /** Initializes the scheduler so that the scheduler functions can be called before the scheduler itself - * is started. This must be exeucted before any scheduler function calls other than Scheduler_Start(), - * and can be ommitted if no such functions could be called before the scheduler is started. + * is started. This must be executed before any scheduler function calls other than Scheduler_Start(), + * and can be omitted if no such functions could be called before the scheduler is started. */ #define Scheduler_Init() Scheduler_InitScheduler(TOTAL_TASKS); @@ -175,7 +175,7 @@ * \param DelayCounter Counter which is storing the starting tick count for a given delay. */ static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter) - ATTR_NON_NULL_PTR_ARG(1); + ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE; static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter) { ATOMIC_BLOCK(ATOMIC_RESTORESTATE) @@ -194,7 +194,7 @@ * * Usage Example: * \code - * static SchedulerDelayCounter_t DelayCounter = 10000; // Force immediate run on startup + * static SchedulerDelayCounter_t DelayCounter = 10000; // Force immediate run on start-up * * // Task runs every 10000 ticks, 10 seconds for this demo * if (Scheduler_HasDelayElapsed(10000, &DelayCounter)) @@ -229,12 +229,13 @@ #define MAX_DELAYCTR_COUNT 0xFFFF /* Inline Functions: */ + static inline void Scheduler_InitScheduler(const uint8_t TotalTasks) ATTR_ALWAYS_INLINE; static inline void Scheduler_InitScheduler(const uint8_t TotalTasks) { Scheduler_TotalTasks = TotalTasks; } - static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN; + static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN ATTR_ALWAYS_INLINE; static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) { Scheduler_InitScheduler(TotalTasks);