Minor updates to formatting and MISRA compliance of the PR used to update the vTaskDelayUntil() function to xTaskDelayUntil(). (#198)

This commit is contained in:
RichardBarry 2020-10-10 21:42:38 -07:00 committed by GitHub
parent 6375d52250
commit 167ea16282
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ); \
}