Lines Matching full:the

8  * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 /*lint -save -e537 This headers are only multiply included if the application code
52 /* IDs for commands that can be sent/received on the timer queue. These are to
53 * be used solely through the macros that make up the public software timer API,
54 * as defined below. The commands that are sent from interrupts must use the
55 * highest numbers as tmrFIRST_FROM_ISR_COMMAND is used to determine if the task
56 * or interrupt version of the queue send function should be used. */
76 * reference the subject timer in calls to other software timer API functions
79 struct tmrTimerControl; /* The old naming convention is used to prevent breaking kernel aware debug…
83 * Defines the prototype to which timer callback functions must conform.
88 * Defines the prototype to which functions used with the
101 * Creates a new software timer instance, and returns a handle by which the
104 * Internally, within the FreeRTOS implementation, software timers use a block
105 * of memory, in which the timer data structure is stored. If a software timer
106 * is created using xTimerCreate() then the required memory is automatically
107 * dynamically allocated inside the xTimerCreate() function. (see
109 * xTimerCreateStatic() then the application writer must provide the memory that
110 * will get used by the software timer. xTimerCreateStatic() therefore allows a
113 * Timers are created in the dormant state. The xTimerStart(), xTimerReset(),
116 * timer into the active state.
118 * @param pcTimerName A text name that is assigned to the timer. This is done
119 * purely to assist debugging. The kernel itself only ever references a timer
122 * @param xTimerPeriodInTicks The timer period. The time is defined in tick
123 * periods so the constant portTICK_PERIOD_MS can be used to convert a time that
124 * has been specified in milliseconds. For example, if the timer must expire
126 * Alternatively, if the timer must expire after 500ms, then xPeriod can be set
130 * @param xAutoReload If xAutoReload is set to pdTRUE then the timer will
131 * expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.
132 * If xAutoReload is set to pdFALSE then the timer will be a one-shot timer and
133 * enter the dormant state after it expires.
135 * @param pvTimerID An identifier that is assigned to the timer being created.
136 * Typically this would be used in the timer callback function to identify which
137 * timer expired when the same callback function is assigned to more than one
140 * @param pxCallbackFunction The function to call when the timer expires.
141 * Callback functions must have the prototype defined by TimerCallbackFunction_t,
144 * @return If the timer is successfully created then a handle to the newly
145 * created timer is returned. If the timer cannot be created because there is
146 * insufficient FreeRTOS heap remaining to allocate the timer
153 * // An array to hold handles to the created timers.
156 * // An array to hold a count of the number of times each timer expires.
160 * // The callback function does nothing but count the number of times the
161 * // associated timer expires, and stop the timer once the timer has expired
168 * // Optionally do something if the pxTimer parameter is NULL.
174 * // Increment the number of times that pxTimer has expired.
177 * // If the timer has expired 10 times then stop it from running.
190 * // Create then start some timers. Starting the timers before the scheduler
191 * // has been started means the timers will start running immediately that
192 * // the scheduler starts.
195 … xTimers[ x ] = xTimerCreate( "Timer", // Just a text name, not used by the kernel.
196 * ( 100 * ( x + 1 ) ), // The timer period in ticks.
197 …* pdTRUE, // The timers will auto-reload them…
199 …* vTimerCallback // Each timer calls the same callba…
204 * // The timer was not created.
208 * // Start the timer. No block time is specified, and even if one was
209 * // it would be ignored because the scheduler has not yet been
213 * // The timer could not be set into the Active state.
222 * // Starting the scheduler will start the timers running as they have already
223 * // been set into the active state.
247 * Creates a new software timer instance, and returns a handle by which the
250 * Internally, within the FreeRTOS implementation, software timers use a block
251 * of memory, in which the timer data structure is stored. If a software timer
252 * is created using xTimerCreate() then the required memory is automatically
253 * dynamically allocated inside the xTimerCreate() function. (see
255 * xTimerCreateStatic() then the application writer must provide the memory that
256 * will get used by the software timer. xTimerCreateStatic() therefore allows a
259 * Timers are created in the dormant state. The xTimerStart(), xTimerReset(),
262 * timer into the active state.
264 * @param pcTimerName A text name that is assigned to the timer. This is done
265 * purely to assist debugging. The kernel itself only ever references a timer
268 * @param xTimerPeriodInTicks The timer period. The time is defined in tick
269 * periods so the constant portTICK_PERIOD_MS can be used to convert a time that
270 * has been specified in milliseconds. For example, if the timer must expire
272 * Alternatively, if the timer must expire after 500ms, then xPeriod can be set
274 * equal to 1000. The timer period must be greater than 0.
276 * @param xAutoReload If xAutoReload is set to pdTRUE then the timer will
277 * expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.
278 * If xAutoReload is set to pdFALSE then the timer will be a one-shot timer and
279 * enter the dormant state after it expires.
281 * @param pvTimerID An identifier that is assigned to the timer being created.
282 * Typically this would be used in the timer callback function to identify which
283 * timer expired when the same callback function is assigned to more than one
286 * @param pxCallbackFunction The function to call when the timer expires.
287 * Callback functions must have the prototype defined by TimerCallbackFunction_t,
291 * will be then be used to hold the software timer's data structures, removing
292 * the need for the memory to be allocated dynamically.
294 * @return If the timer is created then a handle to the created timer is
300 * // The buffer used to hold the software timer's data structure.
303 * // A variable that will be incremented by the software timer's callback
308 * // it when the software timer was created. After the 5th increment the
309 * // callback function stops the software timer.
315 * // Obtain the address of the variable to increment from the timer ID.
318 * // Increment the variable to show the timer callback has executed.
321 * // If this callback has executed the required number of times, stop the
333 * // Create the software time. xTimerCreateStatic() has an extra parameter
334 * // than the normal xTimerCreate() API function. The parameter is a pointer
335 * // to the StaticTimer_t structure that will hold the software timer
336 * // structure. If the parameter is passed as NULL then the structure will be
338 …* xTimer = xTimerCreateStatic( "T1", // Text name for the task. Helps debugging o…
339 * xTimerPeriod, // The period of the timer in ticks.
341 … ( void * ) &uxVariableToIncrement, // A variable incremented by the software timer's ca…
342 …* prvTimerCallback, // The function to execute when the timer exp…
343 …* &xTimerBuffer ); // The buffer that will hold the software tim…
345 * // The scheduler has not started yet so a block time is not used.
352 * // Starting the scheduler will start the timers running as they have already
353 * // been set into the active state.
373 * Returns the ID assigned to the timer.
375 * IDs are assigned to timers using the pvTimerID parameter of the call to
376 * xTimerCreated() that was used to create the timer, and by calling the
379 * If the same callback function is assigned to multiple timers then the timer
382 * @param xTimer The timer being queried.
384 * @return The ID assigned to the timer being queried.
388 * See the xTimerCreate() API function example usage scenario.
395 * Sets the ID assigned to the timer.
397 * IDs are assigned to timers using the pvTimerID parameter of the call to
398 * xTimerCreated() that was used to create the timer.
400 * If the same callback function is assigned to multiple timers then the timer
403 * @param xTimer The timer being updated.
405 * @param pvNewID The ID to assign to the timer.
409 * See the xTimerCreate() API function example usage scenario.
423 * Timers are created in the dormant state. The xTimerStart(), xTimerReset(),
425 * xTimerChangePeriodFromISR() API functions can all be used to transition a timer into the
428 * @param xTimer The timer being queried.
430 * @return pdFALSE will be returned if the timer is dormant. A value other than
431 * pdFALSE will be returned if the timer is active.
454 * Simply returns the handle of the timer service/daemon task. It it not valid
455 * to call xTimerGetTimerDaemonTaskHandle() before the scheduler has been started.
462 * Timer functionality is provided by a timer service/daemon task. Many of the
463 * public FreeRTOS timer API functions send commands to the timer service task
464 * through a queue called the timer command queue. The timer command queue is
465 * private to the kernel itself and is not directly accessible to application
466 * code. The length of the timer command queue is set by the
469 * xTimerStart() starts a timer that was previously created using the
470 * xTimerCreate() API function. If the timer had already been started and was
471 * already in the active state, then xTimerStart() has equivalent functionality
472 * to the xTimerReset() API function.
474 * Starting a timer ensures the timer is in the active state. If the timer
475 * is not stopped, deleted, or reset in the mean time, the callback function
476 * associated with the timer will get called 'n' ticks after xTimerStart() was
477 * called, where 'n' is the timers defined period.
479 * It is valid to call xTimerStart() before the scheduler has been started, but
480 * when this is done the timer will not actually start until the scheduler is
481 * started, and the timers expiry time will be relative to when the scheduler is
484 * The configUSE_TIMERS configuration constant must be set to 1 for xTimerStart()
487 * @param xTimer The handle of the timer being started/restarted.
489 * @param xTicksToWait Specifies the time, in ticks, that the calling task should
490 * be held in the Blocked state to wait for the start command to be successfully
491 * sent to the timer command queue, should the queue already be full when
493 * before the scheduler is started.
495 * @return pdFAIL will be returned if the start command could not be sent to
496 * the timer command queue even after xTicksToWait ticks had passed. pdPASS will
497 * be returned if the command was successfully sent to the timer command queue.
498 * When the command is actually processed will depend on the priority of the
499 * timer service/daemon task relative to other tasks in the system, although the
500 * timers expiry time is relative to when xTimerStart() is actually called. The
501 * timer service/daemon task priority is set by the configTIMER_TASK_PRIORITY
506 * See the xTimerCreate() API function example usage scenario.
515 * Timer functionality is provided by a timer service/daemon task. Many of the
516 * public FreeRTOS timer API functions send commands to the timer service task
517 * through a queue called the timer command queue. The timer command queue is
518 * private to the kernel itself and is not directly accessible to application
519 * code. The length of the timer command queue is set by the
522 * xTimerStop() stops a timer that was previously started using either of the
523 * The xTimerStart(), xTimerReset(), xTimerStartFromISR(), xTimerResetFromISR(),
526 * Stopping a timer ensures the timer is not in the active state.
528 * The configUSE_TIMERS configuration constant must be set to 1 for xTimerStop()
531 * @param xTimer The handle of the timer being stopped.
533 * @param xTicksToWait Specifies the time, in ticks, that the calling task should
534 * be held in the Blocked state to wait for the stop command to be successfully
535 * sent to the timer command queue, should the queue already be full when
537 * before the scheduler is started.
539 * @return pdFAIL will be returned if the stop command could not be sent to
540 * the timer command queue even after xTicksToWait ticks had passed. pdPASS will
541 * be returned if the command was successfully sent to the timer command queue.
542 * When the command is actually processed will depend on the priority of the
543 * timer service/daemon task relative to other tasks in the system. The timer
544 * service/daemon task priority is set by the configTIMER_TASK_PRIORITY
549 * See the xTimerCreate() API function example usage scenario.
560 * Timer functionality is provided by a timer service/daemon task. Many of the
561 * public FreeRTOS timer API functions send commands to the timer service task
562 * through a queue called the timer command queue. The timer command queue is
563 * private to the kernel itself and is not directly accessible to application
564 * code. The length of the timer command queue is set by the
567 * xTimerChangePeriod() changes the period of a timer that was previously
568 * created using the xTimerCreate() API function.
570 * xTimerChangePeriod() can be called to change the period of an active or
573 * The configUSE_TIMERS configuration constant must be set to 1 for
576 * @param xTimer The handle of the timer that is having its period changed.
578 * @param xNewPeriod The new period for xTimer. Timer periods are specified in
579 * tick periods, so the constant portTICK_PERIOD_MS can be used to convert a time
580 * that has been specified in milliseconds. For example, if the timer must
582 * if the timer must expire after 500ms, then xNewPeriod can be set to
586 * @param xTicksToWait Specifies the time, in ticks, that the calling task should
587 * be held in the Blocked state to wait for the change period command to be
588 * successfully sent to the timer command queue, should the queue already be
590 * xTimerChangePeriod() is called before the scheduler is started.
592 * @return pdFAIL will be returned if the change period command could not be
593 * sent to the timer command queue even after xTicksToWait ticks had passed.
594 * pdPASS will be returned if the command was successfully sent to the timer
595 * command queue. When the command is actually processed will depend on the
596 * priority of the timer service/daemon task relative to other tasks in the
597 * system. The timer service/daemon task priority is set by the
602 * // This function assumes xTimer has already been created. If the timer
603 * // referenced by xTimer is already active when it is called, then the timer
604 * // is deleted. If the timer referenced by xTimer is not active when it is
605 * // called, then the period of the timer is set to 500ms and the timer is
617 * // cause the timer to start. Block for a maximum of 100 ticks if the
618 * // change period command cannot immediately be sent to the timer
622 * // The command was successfully sent.
626 * // The command could not be sent, even after waiting for 100 ticks
639 * Timer functionality is provided by a timer service/daemon task. Many of the
640 * public FreeRTOS timer API functions send commands to the timer service task
641 * through a queue called the timer command queue. The timer command queue is
642 * private to the kernel itself and is not directly accessible to application
643 * code. The length of the timer command queue is set by the
646 * xTimerDelete() deletes a timer that was previously created using the
649 * The configUSE_TIMERS configuration constant must be set to 1 for
652 * @param xTimer The handle of the timer being deleted.
654 * @param xTicksToWait Specifies the time, in ticks, that the calling task should
655 * be held in the Blocked state to wait for the delete command to be
656 * successfully sent to the timer command queue, should the queue already be
658 * is called before the scheduler is started.
660 * @return pdFAIL will be returned if the delete command could not be sent to
661 * the timer command queue even after xTicksToWait ticks had passed. pdPASS will
662 * be returned if the command was successfully sent to the timer command queue.
663 * When the command is actually processed will depend on the priority of the
664 * timer service/daemon task relative to other tasks in the system. The timer
665 * service/daemon task priority is set by the configTIMER_TASK_PRIORITY
670 * See the xTimerChangePeriod() API function example usage scenario.
678 * Timer functionality is provided by a timer service/daemon task. Many of the
679 * public FreeRTOS timer API functions send commands to the timer service task
680 * through a queue called the timer command queue. The timer command queue is
681 * private to the kernel itself and is not directly accessible to application
682 * code. The length of the timer command queue is set by the
685 * xTimerReset() re-starts a timer that was previously created using the
686 * xTimerCreate() API function. If the timer had already been started and was
687 * already in the active state, then xTimerReset() will cause the timer to
689 * called. If the timer was in the dormant state then xTimerReset() has
690 * equivalent functionality to the xTimerStart() API function.
692 * Resetting a timer ensures the timer is in the active state. If the timer
693 * is not stopped, deleted, or reset in the mean time, the callback function
694 * associated with the timer will get called 'n' ticks after xTimerReset() was
695 * called, where 'n' is the timers defined period.
697 * It is valid to call xTimerReset() before the scheduler has been started, but
698 * when this is done the timer will not actually start until the scheduler is
699 * started, and the timers expiry time will be relative to when the scheduler is
702 * The configUSE_TIMERS configuration constant must be set to 1 for xTimerReset()
705 * @param xTimer The handle of the timer being reset/started/restarted.
707 * @param xTicksToWait Specifies the time, in ticks, that the calling task should
708 * be held in the Blocked state to wait for the reset command to be successfully
709 * sent to the timer command queue, should the queue already be full when
711 * before the scheduler is started.
713 * @return pdFAIL will be returned if the reset command could not be sent to
714 * the timer command queue even after xTicksToWait ticks had passed. pdPASS will
715 * be returned if the command was successfully sent to the timer command queue.
716 * When the command is actually processed will depend on the priority of the
717 * timer service/daemon task relative to other tasks in the system, although the
718 * timers expiry time is relative to when xTimerStart() is actually called. The
719 * timer service/daemon task priority is set by the configTIMER_TASK_PRIORITY
725 * // without a key being pressed, then the LCD back-light is switched off. In
726 * // this case, the timer is a one-shot timer.
730 * // The callback function assigned to the one-shot timer. In this case the
734 * // The timer expired, therefore 5 seconds must have passed since a key
735 * // was pressed. Switch off the LCD back-light.
739 * // The key press event handler.
742 * // Ensure the LCD back-light is on, then reset the timer that is
743 * // responsible for turning the back-light off after 5 seconds of
744 * // key inactivity. Wait 10 ticks for the command to be successfully sent
749 * // The reset command was not executed successfully. Take appropriate
753 * // Perform the rest of the key processing here.
760 * // Create then start the one-shot timer that is responsible for turning
761 * // the back-light off if no keys are pressed within a 5 second period.
762 …lightTimer = xTimerCreate( "BacklightTimer", // Just a text name, not used by the kernel.
763 * ( 5000 / portTICK_PERIOD_MS), // The timer period in ticks.
764 * pdFALSE, // The timer is a one-shot timer.
765 …* 0, // The id is not used by the cal…
766 … vBacklightTimerCallback // The callback function that switches the L…
771 * // The timer was not created.
775 * // Start the timer. No block time is specified, and even if one was
776 * // it would be ignored because the scheduler has not yet been
780 * // The timer could not be set into the Active state.
788 * // Starting the scheduler will start the timer running as it has already
789 * // been set into the active state.
807 * @param xTimer The handle of the timer being started/restarted.
809 * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most
810 * of its time in the Blocked state, waiting for messages to arrive on the timer
811 * command queue. Calling xTimerStartFromISR() writes a message to the timer
812 * command queue, so has the potential to transition the timer service/daemon
813 * task out of the Blocked state. If calling xTimerStartFromISR() causes the
814 * timer service/daemon task to leave the Blocked state, and the timer service/
815 * daemon task has a priority equal to or greater than the currently executing
816 * task (the task that was interrupted), then *pxHigherPriorityTaskWoken will
817 * get set to pdTRUE internally within the xTimerStartFromISR() function. If
819 * be performed before the interrupt exits.
821 * @return pdFAIL will be returned if the start command could not be sent to
822 * the timer command queue. pdPASS will be returned if the command was
823 * successfully sent to the timer command queue. When the command is actually
824 * processed will depend on the priority of the timer service/daemon task
825 * relative to other tasks in the system, although the timers expiry time is
826 * relative to when xTimerStartFromISR() is actually called. The timer
827 * service/daemon task priority is set by the configTIMER_TASK_PRIORITY
834 * // without a key being pressed, then the LCD back-light is switched off. In
835 * // this case, the timer is a one-shot timer, and unlike the example given for
836 * // the xTimerReset() function, the key press event handler is an interrupt
839 * // The callback function assigned to the one-shot timer. In this case the
843 * // The timer expired, therefore 5 seconds must have passed since a key
844 * // was pressed. Switch off the LCD back-light.
848 * // The key press interrupt service routine.
853 * // Ensure the LCD back-light is on, then restart the timer that is
854 * // responsible for turning the back-light off after 5 seconds of
860 * // as both cause the timer to re-calculate its expiry time.
865 * // The start command was not executed successfully. Take appropriate
869 * // Perform the rest of the key processing here.
872 * // should be performed. The syntax required to perform a context switch
874 * // compiler. Inspect the demos for the port you are using to find the
878 * // Call the interrupt safe yield function here (actual function
879 * // depends on the FreeRTOS port being used).
894 * @param xTimer The handle of the timer being stopped.
896 * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most
897 * of its time in the Blocked state, waiting for messages to arrive on the timer
898 * command queue. Calling xTimerStopFromISR() writes a message to the timer
899 * command queue, so has the potential to transition the timer service/daemon
900 * task out of the Blocked state. If calling xTimerStopFromISR() causes the
901 * timer service/daemon task to leave the Blocked state, and the timer service/
902 * daemon task has a priority equal to or greater than the currently executing
903 * task (the task that was interrupted), then *pxHigherPriorityTaskWoken will
904 * get set to pdTRUE internally within the xTimerStopFromISR() function. If
906 * be performed before the interrupt exits.
908 * @return pdFAIL will be returned if the stop command could not be sent to
909 * the timer command queue. pdPASS will be returned if the command was
910 * successfully sent to the timer command queue. When the command is actually
911 * processed will depend on the priority of the timer service/daemon task
912 * relative to other tasks in the system. The timer service/daemon task
913 * priority is set by the configTIMER_TASK_PRIORITY configuration constant.
918 * // an interrupt occurs, the timer should be simply stopped.
920 * // The interrupt service routine that stops the timer.
925 * // The interrupt has occurred - simply stop the timer.
931 * // The stop command was not executed successfully. Take appropriate
936 * // should be performed. The syntax required to perform a context switch
938 * // compiler. Inspect the demos for the port you are using to find the
942 * // Call the interrupt safe yield function here (actual function
943 * // depends on the FreeRTOS port being used).
959 * @param xTimer The handle of the timer that is having its period changed.
961 * @param xNewPeriod The new period for xTimer. Timer periods are specified in
962 * tick periods, so the constant portTICK_PERIOD_MS can be used to convert a time
963 * that has been specified in milliseconds. For example, if the timer must
965 * if the timer must expire after 500ms, then xNewPeriod can be set to
969 * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most
970 * of its time in the Blocked state, waiting for messages to arrive on the timer
971 * command queue. Calling xTimerChangePeriodFromISR() writes a message to the
972 * timer command queue, so has the potential to transition the timer service/
973 * daemon task out of the Blocked state. If calling xTimerChangePeriodFromISR()
974 * causes the timer service/daemon task to leave the Blocked state, and the
975 * timer service/daemon task has a priority equal to or greater than the
976 * currently executing task (the task that was interrupted), then
977 * *pxHigherPriorityTaskWoken will get set to pdTRUE internally within the
979 * this value to pdTRUE then a context switch should be performed before the
982 * @return pdFAIL will be returned if the command to change the timers period
983 * could not be sent to the timer command queue. pdPASS will be returned if the
984 * command was successfully sent to the timer command queue. When the command
985 * is actually processed will depend on the priority of the timer service/daemon
986 * task relative to other tasks in the system. The timer service/daemon task
987 * priority is set by the configTIMER_TASK_PRIORITY configuration constant.
992 * // an interrupt occurs, the period of xTimer should be changed to 500ms.
994 * // The interrupt service routine that changes the period of xTimer.
999 * // The interrupt has occurred - change the period of xTimer to 500ms.
1005 * // The command to change the timers period was not executed
1010 * // should be performed. The syntax required to perform a context switch
1012 * // compiler. Inspect the demos for the port you are using to find the
1016 * // Call the interrupt safe yield function here (actual function
1017 * // depends on the FreeRTOS port being used).
1032 * @param xTimer The handle of the timer that is to be started, reset, or
1035 * @param pxHigherPriorityTaskWoken The timer service/daemon task spends most
1036 * of its time in the Blocked state, waiting for messages to arrive on the timer
1037 * command queue. Calling xTimerResetFromISR() writes a message to the timer
1038 * command queue, so has the potential to transition the timer service/daemon
1039 * task out of the Blocked state. If calling xTimerResetFromISR() causes the
1040 * timer service/daemon task to leave the Blocked state, and the timer service/
1041 * daemon task has a priority equal to or greater than the currently executing
1042 * task (the task that was interrupted), then *pxHigherPriorityTaskWoken will
1043 * get set to pdTRUE internally within the xTimerResetFromISR() function. If
1045 * be performed before the interrupt exits.
1047 * @return pdFAIL will be returned if the reset command could not be sent to
1048 * the timer command queue. pdPASS will be returned if the command was
1049 * successfully sent to the timer command queue. When the command is actually
1050 * processed will depend on the priority of the timer service/daemon task
1051 * relative to other tasks in the system, although the timers expiry time is
1052 * relative to when xTimerResetFromISR() is actually called. The timer service/daemon
1053 * task priority is set by the configTIMER_TASK_PRIORITY configuration constant.
1059 * // without a key being pressed, then the LCD back-light is switched off. In
1060 * // this case, the timer is a one-shot timer, and unlike the example given for
1061 * // the xTimerReset() function, the key press event handler is an interrupt
1064 * // The callback function assigned to the one-shot timer. In this case the
1068 * // The timer expired, therefore 5 seconds must have passed since a key
1069 * // was pressed. Switch off the LCD back-light.
1073 * // The key press interrupt service routine.
1078 * // Ensure the LCD back-light is on, then reset the timer that is
1079 * // responsible for turning the back-light off after 5 seconds of
1085 * // as both cause the timer to re-calculate its expiry time.
1090 * // The reset command was not executed successfully. Take appropriate
1094 * // Perform the rest of the key processing here.
1097 * // should be performed. The syntax required to perform a context switch
1099 * // compiler. Inspect the demos for the port you are using to find the
1103 * // Call the interrupt safe yield function here (actual function
1104 * // depends on the FreeRTOS port being used).
1120 * Used from application interrupt service routines to defer the execution of a
1121 * function to the RTOS daemon task (the timer service task, hence this function
1128 * to the RTOS daemon task.
1130 * A mechanism is provided that allows the interrupt to return directly to the
1131 * task that will subsequently execute the pended callback function. This
1132 * allows the callback function to execute contiguously in time with the
1133 * interrupt - just as if the callback had executed in the interrupt itself.
1135 * @param xFunctionToPend The function to execute from the timer service/
1136 * daemon task. The function must conform to the PendedFunction_t
1139 * @param pvParameter1 The value of the callback function's first parameter.
1140 * The parameter has a void * type to allow it to be used to pass any type.
1141 * For example, unsigned longs can be cast to a void *, or the void * can be
1144 * @param ulParameter2 The value of the callback function's second parameter.
1147 * will result in a message being sent to the timer daemon task. If the
1148 * priority of the timer daemon task (which is set using
1149 * configTIMER_TASK_PRIORITY in FreeRTOSConfig.h) is higher than the priority of
1150 * the currently running task (the task the interrupt interrupted) then
1153 * requested before the interrupt exits. For that reason
1154 * *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the
1157 * @return pdPASS is returned if the message was successfully sent to the
1163 * // The callback function that will execute in the context of the daemon task.
1169 * // The interface that requires servicing is passed in the second
1170 * // parameter. The first parameter is not used in this case.
1173 * // ...Perform the processing here...
1181 * // Query the hardware to determine which interface needs processing.
1184 * // The actual processing is to be deferred to a task. Request the
1185 * // vProcessInterface() callback function is executed, passing in the
1186 * // number of the interface that needs processing. The interface to
1187 * // service is passed in the second parameter. The first parameter is
1193 * // switch should be requested. The macro used is port specific and will
1195 * // the documentation page for the port being used.
1213 * Used to defer the execution of a function to the RTOS daemon task (the timer
1217 * @param xFunctionToPend The function to execute from the timer service/
1218 * daemon task. The function must conform to the PendedFunction_t
1221 * @param pvParameter1 The value of the callback function's first parameter.
1222 * The parameter has a void * type to allow it to be used to pass any type.
1223 * For example, unsigned longs can be cast to a void *, or the void * can be
1226 * @param ulParameter2 The value of the callback function's second parameter.
1229 * sent to the timer daemon task on a queue. xTicksToWait is the amount of
1230 * time the calling task should remain in the Blocked state (so not using any
1231 * processing time) for space to become available on the timer queue if the
1234 * @return pdPASS is returned if the message was successfully sent to the
1246 * Returns the name that was assigned to a timer when the timer was created.
1248 * @param xTimer The handle of the timer being queried.
1250 * @return The name assigned to the timer specified by the xTimer parameter.
1257 * Updates a timer to be either an auto-reload timer, in which case the timer
1259 * which case the timer will only expire once unless it is manually restarted.
1261 * @param xTimer The handle of the timer being updated.
1263 * @param xAutoReload If xAutoReload is set to pdTRUE then the timer will
1264 * expire repeatedly with a frequency set by the timer's period (see the
1265 * xTimerPeriodInTicks parameter of the xTimerCreate() API function). If
1266 * xAutoReload is set to pdFALSE then the timer will be a one-shot timer and
1267 * enter the dormant state after it expires.
1275 * Queries a timer to determine if it is an auto-reload timer, in which case the timer
1277 * which case the timer will only expire once unless it is manually restarted.
1279 * @param xTimer The handle of the timer being queried.
1281 * @return If the timer is an auto-reload timer then pdTRUE is returned, otherwise
1289 * Queries a timer to determine if it is an auto-reload timer, in which case the timer
1291 * which case the timer will only expire once unless it is manually restarted.
1293 * @param xTimer The handle of the timer being queried.
1295 * @return If the timer is an auto-reload timer then pdTRUE is returned, otherwise
1303 * Returns the period of a timer.
1305 * @param xTimer The handle of the timer being queried.
1307 * @return The period of the timer in ticks.
1314 * Returns the time in ticks at which the timer will expire. If this is less
1315 * than the current tick count then the expiry time has overflowed from the
1318 * @param xTimer The handle of the timer being queried.
1320 * @return If the timer is running then the time in ticks at which the timer
1321 * will next expire is returned. If the timer is not running then the return
1331 * buffer. This is the same buffer that is supplied at the time of
1334 * @param xTimer The timer for which to retrieve the buffer.
1336 * @param ppxTaskBuffer Used to return a pointer to the timers's data
1339 * @return pdTRUE if the buffer was retrieved, pdFALSE otherwise.
1347 * Functions beyond this part are not part of the public API and are intended
1348 * for use by the kernel only.
1371 …* This function is used to provide a statically allocated block of memory to FreeRTOS to hold the
1375 * @param ppxTimerTaskStackBuffer A handle to a statically allocated Stack buffer for the idle task
1376 …* @param pulTimerTaskStackSize A pointer to the number of elements that will fit in the allocate…
1392 * This hook function is called form the timer task once when the task starts running.