Definition in file ParTest.c.
#include <avr32/io.h>
#include "FreeRTOS.h"
#include "task.h"
#include "partest.h"
Go to the source code of this file.
Defines | |
#define | partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) |
#define | partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) LED_COUNT ) |
Functions | |
void | vParTestInitialise (void) |
void | vParTestSetLED (unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue) |
void | vParTestToggleLED (unsigned portBASE_TYPE uxLED) |
Variables | |
static volatile unsigned portCHAR | ucCurrentOutputValue = partstALL_OUTPUTS_OFF |
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 ) |
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) LED_COUNT ) |
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 }
volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF [static] |