/*\r
- FreeRTOS V7.5.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
if( xTimerPeriodInTicks == ( portTickType ) 0U )\r
{\r
pxNewTimer = NULL;\r
- configASSERT( ( xTimerPeriodInTicks > 0 ) );\r
}\r
else\r
{\r
}\r
}\r
\r
+ /* 0 is not a valid value for xTimerPeriodInTicks. */\r
+ configASSERT( ( xTimerPeriodInTicks > 0 ) );\r
+\r
return ( xTimerHandle ) pxNewTimer;\r
}\r
/*-----------------------------------------------------------*/\r
case tmrCOMMAND_CHANGE_PERIOD :\r
pxTimer->xTimerPeriodInTicks = xMessage.xMessageValue;\r
configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );\r
+\r
+ /* The new period does not really have a reference, and can be\r
+ longer or shorter than the old one. The command time is \r
+ therefore set to the current time, and as the period cannot be\r
+ zero the next expiry time can only be in the future, meaning\r
+ (unlike for the xTimerStart() case above) there is no fail case\r
+ that needs to be handled here. */\r
( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow );\r
break;\r
\r