partest.h File Reference

Go to the source code of this file.

Defines

#define partstDEFAULT_PORT_ADDRESS   ( ( unsigned short ) 0x378 )

Functions

void vParTestInitialise (void)
void vParTestSetLED (unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue)
void vParTestToggleLED (unsigned portBASE_TYPE uxLED)


Define Documentation

#define partstDEFAULT_PORT_ADDRESS   ( ( unsigned short ) 0x378 )

Definition at line 57 of file partest.h.


Function Documentation

void vParTestInitialise ( void   ) 

Definition at line 64 of file ParTest.c.

References partstALL_OUTPUTS_OFF.

Referenced by main().

00065 {
00066     LED_Display( partstALL_OUTPUTS_OFF ); /* Start with all LEDs off. */
00067 }

void vParTestSetLED ( unsigned portBASE_TYPE  uxLED,
signed portBASE_TYPE  xValue 
)

Definition at line 70 of file ParTest.c.

References partstMAX_OUTPUT_LED, pdTRUE, portCHAR, ucCurrentOutputValue, vTaskSuspendAll(), and xTaskResumeAll().

Referenced by portTASK_FUNCTION(), and prvIndicateError().

00071 {
00072 unsigned portCHAR ucBit;
00073 
00074     if( uxLED >= partstMAX_OUTPUT_LED )
00075     {
00076         return;
00077     }
00078 
00079     ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
00080 
00081     vTaskSuspendAll();
00082     {
00083         if( xValue == pdTRUE )
00084         {
00085             ucCurrentOutputValue |= ucBit;
00086         }
00087         else
00088         {
00089             ucCurrentOutputValue &= ~ucBit;
00090         }
00091 
00092         LED_Display(ucCurrentOutputValue);
00093     }
00094     xTaskResumeAll();
00095 }

void vParTestToggleLED ( unsigned portBASE_TYPE  uxLED  ) 

Definition at line 98 of file ParTest.c.

References partstMAX_OUTPUT_LED, portCHAR, ucCurrentOutputValue, vTaskSuspendAll(), and xTaskResumeAll().

Referenced by portTASK_FUNCTION(), prvFlashCoRoutine(), prvIndicateError(), and vErrorChecks().

00099 {
00100 unsigned portCHAR ucBit;
00101 
00102       if( uxLED >= partstMAX_OUTPUT_LED )
00103       {
00104     return;
00105     }
00106 
00107     ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
00108 
00109     vTaskSuspendAll();
00110     {
00111         ucCurrentOutputValue ^= ucBit;
00112         LED_Display(ucCurrentOutputValue);
00113     }
00114     xTaskResumeAll();
00115 }


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