mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Minor updates to formatting and MISRA compliance of the PR used to update the vTaskDelayUntil() function to xTaskDelayUntil(). (#198)
This commit is contained in:
parent
6375d52250
commit
167ea16282
|
@ -816,7 +816,8 @@ void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
|
|||
* a fixed interface period.
|
||||
*
|
||||
* @return Value which can be used to check whether the task was actually delayed.
|
||||
* Will be pdTRUE if the task way delayed and pdFALSE otherwise.
|
||||
* Will be pdTRUE if the task way delayed and pdFALSE otherwise. A task will not
|
||||
* be delayed if the next expected wake time is in the past.
|
||||
*
|
||||
* Example usage:
|
||||
* <pre>
|
||||
|
@ -825,13 +826,14 @@ void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
|
|||
* {
|
||||
* TickType_t xLastWakeTime;
|
||||
* const TickType_t xFrequency = 10;
|
||||
* BaseType_t xWasDelayed;
|
||||
*
|
||||
* // Initialise the xLastWakeTime variable with the current time.
|
||||
* xLastWakeTime = xTaskGetTickCount ();
|
||||
* for( ;; )
|
||||
* {
|
||||
* // Wait for the next cycle.
|
||||
* BaseType_t xWasDelayed = xTaskDelayUntil( &xLastWakeTime, xFrequency );
|
||||
* xWasDelayed = xTaskDelayUntil( &xLastWakeTime, xFrequency );
|
||||
*
|
||||
* // Perform action here. xWasDelayed value can be used to determine
|
||||
* // whether a deadline was missed if the code here took too long.
|
||||
|
@ -843,9 +845,10 @@ void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
|
|||
*/
|
||||
BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime,
|
||||
const TickType_t xTimeIncrement ) PRIVILEGED_FUNCTION;
|
||||
|
||||
#define vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ) \
|
||||
{ \
|
||||
xTaskDelayUntil ( pxPreviousWakeTime , xTimeIncrement ); \
|
||||
( void ) xTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ); \
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue