xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken );\r
}\r
}\r
-\r
- configASSERT( xReturn );\r
+ \r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
the time this task thinks it is now, even if a command to\r
switch lists due to a tick count overflow is already waiting in\r
the timer queue. */\r
- prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime );\r
+ if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) == pdTRUE )\r
+ {\r
+ /* The timer expired before it was added to the active timer\r
+ list. Reload it now. The callback will get executed before\r
+ this function exits. */\r
+ if( pxTimer->uxAutoReload == pdTRUE )\r
+ {\r
+ xTimerGenericCommand( pxTimer, tmrCOMMAND_START, xNextExpireTime, NULL, tmrNO_DELAY ); /* Should it be xNextExpireTime or ( xNextExpireTime + pxTimer->xTimerPeriodInTicks )? I think the former. */\r
+ }\r
+ }\r
}\r
\r
/* Call the timer callback. */\r
{\r
/* Has the expiry time elapsed between the command to start/reset a\r
timer was issued, and the time the command was processed? */\r
- if( ( xTimeNow - xCommandTime ) >= pxTimer->xTimerPeriodInTicks )\r
+ if( ( ( portTickType ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks )\r
{\r
/* The time between a command being issued and the command being\r
processed actually exceeds the timers period. */\r
{\r
/* The timer expired before it was added to the active timer\r
list. Process it now. */\r
- /* Call the timer callback. */\r
pxTimer->pxCallbackFunction( ( xTimerHandle ) pxTimer );\r
\r
if( pxTimer->uxAutoReload == pdTRUE )\r