comtest2.h File Reference

Go to the source code of this file.

Functions

void vAltStartComTestTasks (unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED)
portBASE_TYPE xAreComTestTasksStillRunning (void)


Function Documentation

void vAltStartComTestTasks ( unsigned portBASE_TYPE  uxPriority,
unsigned long  ulBaudRate,
unsigned portBASE_TYPE  uxLED 
)

Definition at line 142 of file comtest.c.

References comBUFFER_LEN, comSTACK_SIZE, uxBaseLED, xSerialPortInitMinimal(), and xTaskCreate.

00143 {
00144     /* Initialise the com port then spawn the Rx and Tx tasks. */
00145     uxBaseLED = uxLED;
00146     xSerialPortInitMinimal( ulBaudRate, comBUFFER_LEN );
00147 
00148     /* The Tx task is spawned with a lower priority than the Rx task. */
00149     xTaskCreate( vComTxTask, ( signed char * ) "COMTx", comSTACK_SIZE, NULL, uxPriority - 1, ( xTaskHandle * ) NULL );
00150     xTaskCreate( vComRxTask, ( signed char * ) "COMRx", comSTACK_SIZE, NULL, uxPriority, ( xTaskHandle * ) NULL );
00151 }

portBASE_TYPE xAreComTestTasksStillRunning ( void   ) 

Definition at line 269 of file comtest.c.

References comINITIAL_RX_COUNT_VALUE, pdFALSE, pdTRUE, portBASE_TYPE, and uxRxLoops.

00270 {
00271 portBASE_TYPE xReturn;
00272 
00273     /* If the count of successful reception loops has not changed than at
00274     some time an error occurred (i.e. a character was received out of sequence)
00275     and we will return false. */
00276     if( uxRxLoops == comINITIAL_RX_COUNT_VALUE )
00277     {
00278         xReturn = pdFALSE;
00279     }
00280     else
00281     {
00282         xReturn = pdTRUE;
00283     }
00284 
00285     /* Reset the count of successful Rx loops.  When this function is called
00286     again we expect this to have been incremented. */
00287     uxRxLoops = comINITIAL_RX_COUNT_VALUE;
00288 
00289     return xReturn;
00290 }


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