+static void prvTestTimerCallback( TimerHandle_t xTimer )\r
+{\r
+ /* This is the callback function for the timer accessed by\r
+ prvDemonstrateTimerQueryFunctions(). The callback does not do anything. */\r
+ ( void ) xTimer;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvDemonstrateTimerQueryFunctions( void )\r
+{\r
+static TimerHandle_t xTimer = NULL;\r
+const char *pcTimerName = "TestTimer";\r
+volatile TickType_t xExpiryTime;\r
+const TickType_t xDontBlock = 0;\r
+\r
+ if( xTimer == NULL )\r
+ {\r
+ xTimer = xTimerCreate( pcTimerName, portMAX_DELAY, pdTRUE, NULL, prvTestTimerCallback );\r
+\r
+ if( xTimer != NULL )\r
+ {\r
+ /* Called from the idle task so a block time must not be\r
+ specified. */\r
+ xTimerStart( xTimer, xDontBlock );\r
+ }\r
+ }\r
+\r
+ if( xTimer != NULL )\r
+ {\r
+ /* Demonstrate querying a timer's name. */\r
+ configASSERT( strcmp( pcTimerGetName( xTimer ), pcTimerName ) == 0 );\r
+\r
+ /* Demonstrate querying a timer's period. */\r
+ configASSERT( xTimerGetPeriod( xTimer ) == portMAX_DELAY );\r
+\r
+ /* Demonstrate querying a timer's next expiry time, although nothing is\r
+ done with the returned value. Note if the expiry time is less than the\r
+ maximum tick count then the expiry time has overflowed from the current\r
+ time. In this case the expiry time was set to portMAX_DELAY, so it is\r
+ expected to be less than the current time until the current time has\r
+ itself overflowed. */\r
+ xExpiryTime = xTimerGetExpiryTime( xTimer );\r
+ ( void ) xExpiryTime;\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r