\r
void vStartTimerDemoTask( portTickType xBasePeriodIn )\r
{\r
+ /* Start with the timer and counter arrays clear - this is only necessary\r
+ where the compiler does not clear them automatically on start up. */\r
+ memset( ucAutoReloadTimerCounters, 0x00, sizeof( ucAutoReloadTimerCounters ) );\r
+ memset( xAutoReloadTimers, 0x00, sizeof( xAutoReloadTimers ) );\r
+\r
/* Store the period from which all the timer periods will be generated from\r
(multiples of). */\r
xBasePeriod = xBasePeriodIn;\r
( void ) pvParameters;\r
\r
/* Create a one-shot timer for use later on in this test. */\r
- xOneShotTimer = xTimerCreate( "Oneshot Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */\r
- tmrdemoONE_SHOT_TIMER_PERIOD, /* The period for the timer. */\r
- pdFALSE, /* Don't auto-reload - hence a one shot timer. */\r
- ( void * ) 0, /* The timer identifier. In this case this is not used as the timer has its own callback. */\r
- prvOneShotTimerCallback ); /* The callback to be called when the timer expires. */\r
+ xOneShotTimer = xTimerCreate( ( const signed char * ) "Oneshot Timer",/* Text name to facilitate debugging. The kernel does not use this itself. */\r
+ tmrdemoONE_SHOT_TIMER_PERIOD, /* The period for the timer. */\r
+ pdFALSE, /* Don't auto-reload - hence a one shot timer. */\r
+ ( void * ) 0, /* The timer identifier. In this case this is not used as the timer has its own callback. */\r
+ prvOneShotTimerCallback ); /* The callback to be called when the timer expires. */\r
\r
if( xOneShotTimer == NULL )\r
{\r
and start a timer. These timers are being started before the scheduler has\r
been started, so their block times should get set to zero within the timer\r
API itself. */\r
- xAutoReloadTimers[ xTimer ] = xTimerCreate( "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */\r
+ xAutoReloadTimers[ xTimer ] = xTimerCreate( ( const signed char * )"FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */\r
( ( xTimer + ( portTickType ) 1 ) * xBasePeriod ),/* The period for the timer. The plus 1 ensures a period of zero is not specified. */\r
pdTRUE, /* Auto-reload is set to true. */\r
( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */\r
/* The timers queue should now be full, so it should be possible to create\r
another timer, but not possible to start it (the timer queue will not get\r
drained until the scheduler has been started. */\r
- xAutoReloadTimers[ configTIMER_QUEUE_LENGTH ] = xTimerCreate( "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */\r
- ( configTIMER_QUEUE_LENGTH * xBasePeriod ), /* The period for the timer. */\r
- pdTRUE, /* Auto-reload is set to true. */\r
- ( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */\r
- prvAutoReloadTimerCallback ); /* The callback executed when the timer expires. */\r
+ xAutoReloadTimers[ configTIMER_QUEUE_LENGTH ] = xTimerCreate( ( const signed char * ) "FR Timer", /* Text name to facilitate debugging. The kernel does not use this itself. */\r
+ ( configTIMER_QUEUE_LENGTH * xBasePeriod ), /* The period for the timer. */\r
+ pdTRUE, /* Auto-reload is set to true. */\r
+ ( void * ) xTimer, /* An identifier for the timer as all the auto reload timers use the same callback. */\r
+ prvAutoReloadTimerCallback ); /* The callback executed when the timer expires. */\r
\r
if( xAutoReloadTimers[ configTIMER_QUEUE_LENGTH ] == NULL )\r
{\r
\r
/* Create the timers that are used from the tick interrupt to test the timer\r
API functions that can be called from an ISR. */\r
- xISRAutoReloadTimer = xTimerCreate( "ISR AR", /* The text name given to the timer. */\r
- 0xffff, /* The timer is not given a period yet - this will be done from the tick hook, but a period of 0 is invalid. */\r
- pdTRUE, /* This is an auto reload timer. */\r
- ( void * ) NULL, /* The identifier is not required. */\r
- prvISRAutoReloadTimerCallback );/* The callback that is executed when the timer expires. */\r
-\r
- xISROneShotTimer = xTimerCreate( "ISR OS", /* The text name given to the timer. */\r
- 0xffff, /* The timer is not given a period yet - this will be done from the tick hook, but a period of 0 is invalid. */\r
- pdFALSE, /* This is a one shot timer. */\r
- ( void * ) NULL, /* The identifier is not required. */\r
- prvISROneShotTimerCallback ); /* The callback that is executed when the timer expires. */\r
+ xISRAutoReloadTimer = xTimerCreate( ( const signed char * ) "ISR AR", /* The text name given to the timer. */\r
+ 0xffff, /* The timer is not given a period yet - this will be done from the tick hook, but a period of 0 is invalid. */\r
+ pdTRUE, /* This is an auto reload timer. */\r
+ ( void * ) NULL, /* The identifier is not required. */\r
+ prvISRAutoReloadTimerCallback ); /* The callback that is executed when the timer expires. */\r
+\r
+ xISROneShotTimer = xTimerCreate( ( const signed char * ) "ISR OS", /* The text name given to the timer. */\r
+ 0xffff, /* The timer is not given a period yet - this will be done from the tick hook, but a period of 0 is invalid. */\r
+ pdFALSE, /* This is a one shot timer. */\r
+ ( void * ) NULL, /* The identifier is not required. */\r
+ prvISROneShotTimerCallback ); /* The callback that is executed when the timer expires. */\r
\r
if( ( xISRAutoReloadTimer == NULL ) || ( xISROneShotTimer == NULL ) )\r
{\r