+ vQueueSetPollingInterruptAccess();\r
+\r
+ /* Exercise event groups from interrupts. */\r
+ vPeriodicEventGroupsProcessing();\r
+\r
+ /* Exercise giving mutexes from an interrupt. */\r
+ vInterruptSemaphorePeriodicTest();\r
+\r
+ /* Exercise using task notifications from an interrupt. */\r
+ xNotifyTaskFromISR();\r
+\r
+ /* Writes to stream buffer byte by byte to test the stream buffer trigger\r
+ level functionality. */\r
+ vPeriodicStreamBufferProcessing();\r
+\r
+ /* Writes a string to a string buffer four bytes at a time to demonstrate\r
+ a stream being sent from an interrupt to a task. */\r
+ vBasicStreamBufferSendFromISR();\r
+\r
+ /* For code coverage purposes. */\r
+ xTimerTask = xTimerGetTimerDaemonTaskHandle();\r
+ configASSERT( uxTaskPriorityGetFromISR( xTimerTask ) == configTIMER_TASK_PRIORITY );\r
+ ( void ) xTimerTask; /* In case configASSERT() is not defined. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvPendedFunction( void *pvParameter1, uint32_t ulParameter2 )\r
+{\r
+static uint32_t ulLastParameter1 = 1000UL, ulLastParameter2 = 0UL;\r
+uint32_t ulParameter1;\r
+\r
+ ulParameter1 = ( uint32_t ) pvParameter1;\r
+\r
+ /* Ensure the parameters are as expected. */\r
+ configASSERT( ulParameter1 == ( ulLastParameter1 + 1 ) );\r
+ configASSERT( ulParameter2 == ( ulLastParameter2 + 1 ) );\r
+\r
+ /* Remember the parameters for the next time the function is called. */\r
+ ulLastParameter1 = ulParameter1;\r
+ ulLastParameter2 = ulParameter2;\r
+\r
+ /* Remove compiler warnings in case configASSERT() is not defined. */\r
+ ( void ) ulLastParameter1;\r
+ ( void ) ulLastParameter2;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+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
+static void prvDemonstratePendingFunctionCall( void )\r
+{\r
+static uint32_t ulParameter1 = 1000UL, ulParameter2 = 0UL;\r
+const TickType_t xDontBlock = 0; /* This is called from the idle task so must *not* attempt to block. */\r
+\r
+ /* prvPendedFunction() just expects the parameters to be incremented by one\r
+ each time it is called. */\r
+ ulParameter1++;\r
+ ulParameter2++;\r
+\r
+ /* Pend the function call, sending the parameters. */\r
+ xTimerPendFunctionCall( prvPendedFunction, ( void * ) ulParameter1, ulParameter2, xDontBlock );\r