From 1afe51faa12ad17f6f72d53b492e2720cfbe992f Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 29 Aug 2010 14:07:31 +0000 Subject: [PATCH] Fix up documentation - remove obsolete Scheduler Overview page, roll documentation into the documentation for the (deprecated) Simple Scheduler module. --- LUFA/ManPages/DevelopingWithLUFA.txt | 1 - LUFA/ManPages/Donating.txt | 2 +- LUFA/ManPages/SchedulerOverview.txt | 35 ---------------------------- LUFA/Scheduler/Scheduler.h | 32 +++++++++++++++++++------ 4 files changed, 26 insertions(+), 44 deletions(-) delete mode 100644 LUFA/ManPages/SchedulerOverview.txt diff --git a/LUFA/ManPages/DevelopingWithLUFA.txt b/LUFA/ManPages/DevelopingWithLUFA.txt index 8223c9257e..695d36c515 100644 --- a/LUFA/ManPages/DevelopingWithLUFA.txt +++ b/LUFA/ManPages/DevelopingWithLUFA.txt @@ -17,6 +17,5 @@ * \li \subpage Page_BuildLibrary - Building as a Linkable Library * \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers * \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software - * \li \subpage Page_SchedulerOverview - Overview of the Simple LUFA Scheduler (DEPRECATED) */ \ No newline at end of file diff --git a/LUFA/ManPages/Donating.txt b/LUFA/ManPages/Donating.txt index fff54adcb3..8a4d601ad5 100644 --- a/LUFA/ManPages/Donating.txt +++ b/LUFA/ManPages/Donating.txt @@ -9,7 +9,7 @@ * * \image html Author.jpg "Dean Camera, LUFA Developer" * - * I am a 20 year old University student studying for a double degree in Computer Science and Electronics Engineering. + * I am a 21 year old University student studying for a double degree in Computer Science and Electronics Engineering. * The development and support of this library requires much effort from myself, as I am the sole developer, maintainer * and supporter. Please consider donating a small amount to support this and my future Open Source projects - All * donations are greatly appreciated. diff --git a/LUFA/ManPages/SchedulerOverview.txt b/LUFA/ManPages/SchedulerOverview.txt deleted file mode 100644 index b59821fe0b..0000000000 --- a/LUFA/ManPages/SchedulerOverview.txt +++ /dev/null @@ -1,35 +0,0 @@ -/** \file - * - * This file contains special DoxyGen information for the generation of the main page and other special - * documentation pages. It is not a project source file. - */ - -/** \page Page_SchedulerOverview LUFA Scheduler Overview - * - * THE LUFA SCHEDULER IS NOW DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE. EXISTING CODE SHOULD CONVERT - * TO STANDARD LOOPS AS SHOWN IN THE CURRENT LIBRARY DEMOS. - * - * - * The LUFA library comes with a small, basic round-robbin scheduler which allows for small "tasks" to be executed - * continuously in sequence, and enabled/disabled at runtime. Unlike a conventional, complex RTOS scheduler, the - * LUFA scheduler is very simple in design and operation and is essentially a loop conditionally executing a series - * of functions. - * - * Each LUFA scheduler task should be written similar to an ISR; it should execute quickly (so that no one task - * hogs the processor, preventing another from running before some sort of timeout is exceeded). Unlike normal RTOS - * tasks, each LUFA scheduler task is a regular function, and thus must be designed to be called, and designed to - * return to the calling scheduler function repeatedly. Data which must be preserved between task calls should be - * declared as global or (preferably) as a static local variable inside the task. - * - * The scheduler consists of a task list, listing all the tasks which can be executed by the scheduler. Once started, - * each task is then called one after another, unless the task is stopped by another running task or interrupt. - * - * - * If desired, the LUFA scheduler does not need to be used in a LUFA powered application. A more conventional - * approach to application design can be used, or a proper scheduling RTOS inserted in the place of the LUFA scheduler. - * In the case of the former the USB task must be run manually repeatedly to maintain USB communications, and in the - * case of the latter a proper RTOS task must be set up to do the same. - * - * - * For more information on the LUFA scheduler, see the Scheduler.h file documentation. - */ diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h index 673a933f8e..b77ec54686 100644 --- a/LUFA/Scheduler/Scheduler.h +++ b/LUFA/Scheduler/Scheduler.h @@ -51,35 +51,53 @@ * * For a task to yield it must return, thus each task should have persistent data marked with the static attribute. * + * Each LUFA scheduler task should be written similar to an ISR; it should execute quickly (so that no one task + * hogs the processor, preventing another from running before some sort of timeout is exceeded). Unlike normal RTOS + * tasks, each LUFA scheduler task is a regular function, and thus must be designed to be called, and designed to + * return to the calling scheduler function repeatedly. Data which must be preserved between task calls should be + * declared as global or (preferably) as a static local variable inside the task. + * + * The scheduler consists of a task list, listing all the tasks which can be executed by the scheduler. Once started, + * each task is then called one after another, unless the task is stopped by another running task or interrupt. + * * Usage Example: * \code * #include * - * TASK(MyTask1); - * TASK(MyTask2); + * TASK(MyTask1); // Task prototype + * TASK(MyTask2); // Task prototype * * 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) * { - * Scheduler_Start(); + * Scheduler_Init(); + * + * // Other initialisation here + * + * Scheduler_Start(); * } * * TASK(MyTask1) * { - * // Implementation Here + * // Task implementation here * } * * TASK(MyTask2) * { - * // Implementation Here + * // Task implementation here * } * \endcode * + * If desired, the LUFA scheduler does not need to be used in a LUFA powered application. A more conventional + * approach to application design can be used, or a proper scheduling RTOS inserted in the place of the LUFA scheduler. + * In the case of the former the USB task must be run manually repeatedly to maintain USB communications, and in the + * case of the latter a proper RTOS task must be set up to do the same. + * * @{ */