QPeek.h File Reference

Go to the source code of this file.

Functions

void vStartQueuePeekTasks (void)
portBASE_TYPE xAreQueuePeekTasksStillRunning (void)


Function Documentation

void vStartQueuePeekTasks ( void   ) 

Definition at line 107 of file QPeek.c.

References configMINIMAL_STACK_SIZE, portCHAR, portLONG, prvHighestPriorityPeekTask(), prvHighPriorityPeekTask(), prvLowPriorityPeekTask(), prvMediumPriorityPeekTask(), qpeekHIGH_PRIORITY, qpeekHIGHEST_PRIORITY, qpeekLOW_PRIORITY, qpeekMEDIUM_PRIORITY, qpeekQUEUE_LENGTH, vQueueAddToRegistry, xHighestPriorityTask, xHighPriorityTask, xMediumPriorityTask, xQueueCreate(), and xTaskCreate.

00108 {
00109 xQueueHandle xQueue;
00110 
00111     /* Create the queue that we are going to use for the test/demo. */
00112     xQueue = xQueueCreate( qpeekQUEUE_LENGTH, sizeof( unsigned portLONG ) );
00113 
00114     /* vQueueAddToRegistry() adds the queue to the queue registry, if one is
00115     in use.  The queue registry is provided as a means for kernel aware 
00116     debuggers to locate queues and has no purpose if a kernel aware debugger
00117     is not being used.  The call to vQueueAddToRegistry() will be removed
00118     by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 
00119     defined to be less than 1. */
00120     vQueueAddToRegistry( xQueue, ( signed portCHAR * ) "QPeek_Test_Queue" );
00121 
00122     /* Create the demo tasks and pass it the queue just created.  We are
00123     passing the queue handle by value so it does not matter that it is declared
00124     on the stack here. */
00125     xTaskCreate( prvLowPriorityPeekTask, ( signed portCHAR * )"PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL );
00126     xTaskCreate( prvMediumPriorityPeekTask, ( signed portCHAR * )"PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask );
00127     xTaskCreate( prvHighPriorityPeekTask, ( signed portCHAR * )"PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask );
00128     xTaskCreate( prvHighestPriorityPeekTask, ( signed portCHAR * )"PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask );
00129 }

portBASE_TYPE xAreQueuePeekTasksStillRunning ( void   ) 

Definition at line 428 of file QPeek.c.

References pdTRUE, portLONG, ulLoopCounter, and xErrorDetected.

00429 {
00430 static unsigned portLONG ulLastLoopCounter = 0;
00431 
00432     /* If the demo task is still running then we expect the loopcounter to
00433     have incremented since this function was last called. */
00434     if( ulLastLoopCounter == ulLoopCounter )
00435     {
00436         xErrorDetected = pdTRUE;
00437     }
00438 
00439     ulLastLoopCounter = ulLoopCounter;
00440 
00441     /* Errors detected in the task itself will have latched xErrorDetected
00442     to true. */
00443 
00444     return !xErrorDetected;
00445 }


Generated on Thu Dec 17 20:02:01 2009 for AVR32 UC3 - FreeRTOS Real Time Kernel by  doxygen 1.5.5