|
|
@ -350,27 +350,24 @@
|
|
|
|
/* 0 is not a valid value for xTimerPeriodInTicks. */
|
|
|
|
/* 0 is not a valid value for xTimerPeriodInTicks. */
|
|
|
|
configASSERT( ( xTimerPeriodInTicks > 0 ) );
|
|
|
|
configASSERT( ( xTimerPeriodInTicks > 0 ) );
|
|
|
|
|
|
|
|
|
|
|
|
if( pxNewTimer != NULL )
|
|
|
|
/* Ensure the infrastructure used by the timer service task has been
|
|
|
|
{
|
|
|
|
* created/initialised. */
|
|
|
|
/* Ensure the infrastructure used by the timer service task has been
|
|
|
|
prvCheckForValidListAndQueue();
|
|
|
|
* created/initialised. */
|
|
|
|
|
|
|
|
prvCheckForValidListAndQueue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Initialise the timer structure members using the function
|
|
|
|
|
|
|
|
* parameters. */
|
|
|
|
|
|
|
|
pxNewTimer->pcTimerName = pcTimerName;
|
|
|
|
|
|
|
|
pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks;
|
|
|
|
|
|
|
|
pxNewTimer->pvTimerID = pvTimerID;
|
|
|
|
|
|
|
|
pxNewTimer->pxCallbackFunction = pxCallbackFunction;
|
|
|
|
|
|
|
|
vListInitialiseItem( &( pxNewTimer->xTimerListItem ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( uxAutoReload != pdFALSE )
|
|
|
|
/* Initialise the timer structure members using the function
|
|
|
|
{
|
|
|
|
* parameters. */
|
|
|
|
pxNewTimer->ucStatus |= tmrSTATUS_IS_AUTORELOAD;
|
|
|
|
pxNewTimer->pcTimerName = pcTimerName;
|
|
|
|
}
|
|
|
|
pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks;
|
|
|
|
|
|
|
|
pxNewTimer->pvTimerID = pvTimerID;
|
|
|
|
|
|
|
|
pxNewTimer->pxCallbackFunction = pxCallbackFunction;
|
|
|
|
|
|
|
|
vListInitialiseItem( &( pxNewTimer->xTimerListItem ) );
|
|
|
|
|
|
|
|
|
|
|
|
traceTIMER_CREATE( pxNewTimer );
|
|
|
|
if( uxAutoReload != pdFALSE )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pxNewTimer->ucStatus |= tmrSTATUS_IS_AUTORELOAD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
traceTIMER_CREATE( pxNewTimer );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*-----------------------------------------------------------*/
|
|
|
|
/*-----------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|