crhook.h File Reference

Go to the source code of this file.

Functions

void vStartHookCoRoutines (void)
portBASE_TYPE xAreHookCoRoutinesStillRunning (void)


Function Documentation

void vStartHookCoRoutines ( void   ) 

Definition at line 133 of file crhook.c.

References hookHOOK_QUEUE_LENGTH, hookNO_BLOCK_TIME, hookNUM_HOOK_CO_ROUTINES, mainHOOK_CR_PRIORITY, portBASE_TYPE, prvHookCoRoutine(), xCoRoutineCreate(), xHookRxQueues, xHookTxQueues, xQueueCreate(), and xQueueSend.

00134 {
00135 unsigned portBASE_TYPE uxIndex, uxValueToPost = 0;
00136 
00137     for( uxIndex = 0; uxIndex < hookNUM_HOOK_CO_ROUTINES; uxIndex++ )
00138     {
00139         /* Create a queue to transmit to and receive from each 'hook' 
00140         co-routine. */
00141         xHookRxQueues[ uxIndex ] = xQueueCreate( hookHOOK_QUEUE_LENGTH, sizeof( unsigned portBASE_TYPE ) );
00142         xHookTxQueues[ uxIndex ] = xQueueCreate( hookHOOK_QUEUE_LENGTH, sizeof( unsigned portBASE_TYPE ) );
00143 
00144         /* To start things off the tick hook function expects the queue it 
00145         uses to receive data to contain a value.  */
00146         xQueueSend( xHookRxQueues[ uxIndex ], &uxValueToPost, hookNO_BLOCK_TIME );
00147 
00148         /* Create the 'hook' co-routine itself. */
00149         xCoRoutineCreate( prvHookCoRoutine, mainHOOK_CR_PRIORITY, uxIndex );
00150     }
00151 }

portBASE_TYPE xAreHookCoRoutinesStillRunning ( void   ) 

Definition at line 245 of file crhook.c.

References pdFALSE, pdTRUE, and xCoRoutineErrorDetected.

00246 {
00247     if( xCoRoutineErrorDetected )
00248     {
00249         return pdFALSE;
00250     }
00251     else
00252     {
00253         return pdTRUE;
00254     }
00255 }


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