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 ) 8 ) |
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 ) 8 ) |
| void vParTestInitialise | ( | void | ) |
Definition at line 63 of file ParTest.c.
References partstALL_OUTPUTS_OFF.
Referenced by main().
00064 { 00065 LED_Display(partstALL_OUTPUTS_OFF); /* Start with all LEDs off. */ 00066 }
| void vParTestSetLED | ( | unsigned portBASE_TYPE | uxLED, | |
| signed portBASE_TYPE | xValue | |||
| ) |
Definition at line 69 of file ParTest.c.
References partstMAX_OUTPUT_LED, and ucCurrentOutputValue.
00070 { 00071 unsigned portCHAR ucBit; 00072 00073 if( uxLED >= partstMAX_OUTPUT_LED ) 00074 { 00075 return; 00076 } 00077 00078 ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; 00079 00080 vTaskSuspendAll(); 00081 { 00082 if( xValue == pdTRUE ) 00083 { 00084 ucCurrentOutputValue |= ucBit; 00085 } 00086 else 00087 { 00088 ucCurrentOutputValue &= ~ucBit; 00089 } 00090 00091 LED_Display(ucCurrentOutputValue); 00092 } 00093 xTaskResumeAll(); 00094 }
| void vParTestToggleLED | ( | unsigned portBASE_TYPE | uxLED | ) |
Definition at line 97 of file ParTest.c.
References partstMAX_OUTPUT_LED, and ucCurrentOutputValue.
00098 { 00099 unsigned portCHAR ucBit; 00100 00101 if( uxLED >= partstMAX_OUTPUT_LED ) 00102 { 00103 return; 00104 } 00105 00106 ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED; 00107 00108 vTaskSuspendAll(); 00109 { 00110 ucCurrentOutputValue ^= ucBit; 00111 LED_Display(ucCurrentOutputValue); 00112 } 00113 xTaskResumeAll(); 00114 }
volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF [static] |
1.5.5