X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1c16ae399a9f924c15d9dec54cacb1320ff0a92f..d11ed10c5314c44dc01c06954d1d73d4894cbff8:/LUFA/Scheduler/Scheduler.h diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h index 904380cd3..f71736fd5 100644 --- a/LUFA/Scheduler/Scheduler.h +++ b/LUFA/Scheduler/Scheduler.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2009. + Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* - Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Permission to use, copy, modify, and distribute this software - and its documentation for any purpose and without fee is hereby - granted, provided that the above copyright notice appear in all - copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -33,6 +33,21 @@ * 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. * + * \deprecated This module is deprecated and will be removed in a future library release. + */ + +/** @defgroup Group_Scheduler Simple Task Scheduler - LUFA/Scheduler/Scheduler.h + * + * \deprecated This module is deprecated and will be removed in a future library release. + * + * \section Sec_Dependencies Module Source Dependencies + * The following files must be built with any user project that uses this module: + * - LUFA/Scheduler/Scheduler.c + * + * \section Module Description + * 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 persistent data marked with the static attribute. * * Usage Example: @@ -44,8 +59,8 @@ * * TASK_LIST * { - * { Task: MyTask1, TaskStatus: TASK_RUN, GroupID: 1 }, - * { Task: MyTask2, TaskStatus: TASK_RUN, GroupID: 1 }, + * { .Task = MyTask1, .TaskStatus = TASK_RUN, .GroupID = 1 }, + * { .Task = MyTask2, .TaskStatus = TASK_RUN, .GroupID = 1 }, * } * * int main(void) @@ -63,11 +78,6 @@ * // Implementation Here * } * \endcode - */ - -/** @defgroup Group_Scheduler Simple Task Scheduler - LUFA/Scheduler/Scheduler.h - * - * Simple round-robbin task scheduler. See Scheduler.h description for more details. * * @{ */ @@ -109,7 +119,7 @@ * \code * TASK_LIST * { - * { Task: MyTask1, TaskStatus: TASK_RUN, GroupID: 1 }, + * { .Task = MyTask1, .TaskStatus = TASK_RUN, .GroupID = 1 }, * // More task entries here * } * \endcode @@ -127,7 +137,7 @@ /** Task status mode constant, for passing to Scheduler_SetTaskMode() or Scheduler_SetGroupTaskMode(). */ #define TASK_STOP false - /* Psuedo-Functions: */ + /* Pseudo-Function Macros: */ #if defined(__DOXYGEN__) /** Starts the scheduler in its infinite loop, executing running tasks. This should be placed at the end * of the user application's main() function, as it can never return to the calling function. @@ -186,7 +196,7 @@ /** Resets the delay counter value to the current tick count. This should be called to reset the period * for a delay in a task which is dependant on the current tick value. * - * \param DelayCounter Counter which is storing the starting tick count for a given delay. + * \param[out] 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_ALWAYS_INLINE; @@ -201,8 +211,8 @@ /* Function Prototypes: */ /** Determines if the given tick delay has elapsed, based on the given . * - * \param Delay The delay to test for, measured in ticks - * \param DelayCounter The counter which is storing the starting tick value for the delay + * \param[in] Delay The delay to test for, measured in ticks + * \param[in] DelayCounter The counter which is storing the starting tick value for the delay * * \return Boolean true if the delay has elapsed, false otherwise * @@ -223,16 +233,16 @@ /** Sets the task mode for a given task. * - * \param Task Name of the task whose status is to be changed - * \param TaskStatus New task status for the task (TASK_RUN or TASK_STOP) + * \param[in] Task Name of the task whose status is to be changed + * \param[in] TaskStatus New task status for the task (TASK_RUN or TASK_STOP) */ void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus); /** Sets the task mode for a given task group ID, allowing for an entire group of tasks to have their * statuses changed at once. * - * \param GroupID Value of the task group ID whose status is to be changed - * \param TaskStatus New task status for tasks in the specified group (TASK_RUN or TASK_STOP) + * \param[in] GroupID Value of the task group ID whose status is to be changed + * \param[in] TaskStatus New task status for tasks in the specified group (TASK_RUN or TASK_STOP) */ void Scheduler_SetGroupTaskMode(const uint8_t GroupID, const bool TaskStatus); @@ -249,7 +259,7 @@ Scheduler_TotalTasks = TotalTasks; } - static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN ATTR_ALWAYS_INLINE; + static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) ATTR_NO_RETURN ATTR_ALWAYS_INLINE ATTR_DEPRECATED; static inline void Scheduler_GoSchedule(const uint8_t TotalTasks) { Scheduler_InitScheduler(TotalTasks);