\r
#define partstNUM_LEDs 8\r
\r
-static unsigned portCHAR sState[ 2 ] = { 0xFF, 0xFF };\r
-static unsigned portSHORT sState1[ partstNUM_LEDs ] = { pdFALSE };\r
+static unsigned portCHAR sState[ partstNUM_LEDs ] = { pdFALSE };\r
+static unsigned portCHAR sState1[ partstNUM_LEDs ] = { pdFALSE };\r
+\r
\r
/*-----------------------------------------------------------*/\r
void vParTestInitialise( void )\r
{\r
-<<<<<<< .mine\r
/* Set port for LED outputs. */\r
DDR16 = 0xFF;\r
- DDR25=0xFF;\r
+ DDR25 = 0xFF;\r
\r
/* Start with LEDs off. */\r
- PDR16 = 0x00;\r
PDR25 = 0x00;\r
-=======\r
- DDR00 = 0xFF;\r
- PDR00 = 0xFF;\r
- DDR09 = 0xFF;\r
- PDR09 = 0xFF;\r
->>>>>>> .r192\r
+ PDR16 = 0x00;\r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
if( uxLED < partstNUM_LEDs )\r
{\r
-<<<<<<< .mine\r
taskENTER_CRITICAL();\r
-=======\r
- vTaskSuspendAll();\r
-\r
- /* Toggle the state of the single genuine on board LED. */\r
- if( ( sState[ 0 ] & ( ( unsigned portCHAR ) ( 1 << uxLED ) ) ) == 0 )\r
->>>>>>> .r192\r
- {\r
-<<<<<<< .mine\r
+ { \r
/* Toggle the state of the single genuine on board LED. */\r
- if( sState[ uxLED ]) \r
+ if( sState[ uxLED ] )\r
{\r
PDR25 |= ( 1 << uxLED );\r
}\r
PDR25 &= ~( 1 << uxLED );\r
}\r
\r
- sState[ uxLED ] = !( sState[ uxLED ] );\r
+ sState[uxLED] = !( sState[ uxLED ] );\r
} \r
taskEXIT_CRITICAL();\r
-=======\r
- PDR09 |= ( 1 << uxLED );\r
- sState[ 0 ] |= ( 1 << uxLED );\r
- }\r
- else\r
- {\r
- PDR09 &= ~( 1 << uxLED );\r
- sState[ 0 ] &= ~( 1 << uxLED );\r
- }\r
-\r
- xTaskResumeAll();\r
->>>>>>> .r192\r
}\r
-<<<<<<< .mine\r
else\r
{\r
uxLED -= partstNUM_LEDs;\r
\r
if( uxLED < partstNUM_LEDs )\r
- {\r
+ { \r
taskENTER_CRITICAL();\r
- {\r
+ { \r
/* Toggle the state of the single genuine on board LED. */\r
if( sState1[uxLED]) \r
{\r
taskEXIT_CRITICAL();\r
}\r
}\r
-=======\r
- else\r
- {\r
- vTaskSuspendAll();\r
-\r
- uxLED -= partstNUM_LEDs;\r
-\r
- if( ( sState[ 1 ] & ( ( unsigned portCHAR ) ( 1 << uxLED ) ) ) == 0 )\r
- {\r
- PDR00 |= ( 1 << uxLED );\r
- sState[ 1 ] |= ( 1 << uxLED );\r
- }\r
- else\r
- {\r
- PDR00 &= ~( 1 << uxLED );\r
- sState[ 1 ] &= ~( 1 << uxLED );\r
- }\r
-\r
- xTaskResumeAll();\r
- }\r
->>>>>>> .r192\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* Set or clear the output [in this case show or hide the '*' character. */\r
if( uxLED < partstNUM_LEDs )\r
{\r
- vTaskSuspendAll();\r
+ taskENTER_CRITICAL();\r
{\r
if( xValue )\r
{\r
- PDR09 &= ~( 1 << uxLED );\r
- sState[ 0 ] &= ~( 1 << uxLED );\r
+ PDR25 |= ( 1 << uxLED );\r
+ sState[ uxLED ] = 1;\r
}\r
else\r
{\r
- PDR09 |= ( 1 << uxLED );\r
- sState[ 0 ] |= ( 1 << uxLED );\r
+ PDR25 &= ~( 1 << uxLED );\r
+ sState[ uxLED ] = 0;\r
}\r
}\r
-\r
- xTaskResumeAll();\r
+ taskEXIT_CRITICAL();\r
}\r
-<<<<<<< .mine\r
else \r
{\r
uxLED -= partstNUM_LEDs;\r
\r
- if( uxLED < partstNUM_LEDs )\r
- {\r
- taskENTER_CRITICAL();\r
- {\r
- if( xValue )\r
- {\r
- PDR16 |= (1 << uxLED);\r
- sState1[uxLED] = 1;\r
- }\r
- else\r
- {\r
- PDR16 &= ~(1 << uxLED);\r
- sState1[uxLED] = 0;\r
- }\r
- }\r
- taskEXIT_CRITICAL();\r
- }\r
- }\r
-=======\r
- else\r
- {\r
- vTaskSuspendAll();\r
+ taskENTER_CRITICAL();\r
{\r
if( xValue )\r
{\r
- PDR00 &= ~( 1 << uxLED );\r
- sState[ 1 ] &= ~( 1 << uxLED );\r
+ PDR16 |= ( 1 << uxLED );\r
+ sState1[ uxLED ] = 1;\r
}\r
else\r
{\r
- PDR00 |= ( 1 << uxLED );\r
- sState[ 1 ] |= ( 1 << uxLED );\r
+ PDR16 &= ~( 1 << uxLED );\r
+ sState1[ uxLED ] = 0;\r
}\r
}\r
-\r
- xTaskResumeAll();\r
+ taskEXIT_CRITICAL();\r
}\r
->>>>>>> .r192\r
}\r
\r