]> git.sur5r.net Git - freertos/commitdiff
Correct merge.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 16 Feb 2008 21:10:19 +0000 (21:10 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 16 Feb 2008 21:10:19 +0000 (21:10 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@195 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/MB91460_Softune/SRC/partest/partest.c

index 65ce8ee7e6961c4c0574fc1f2b78c1b184b5978f..fbbb48435663fd879cf597df034a365a02130bee 100644 (file)
 \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
@@ -74,18 +68,10 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
 {\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
@@ -94,31 +80,18 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
                                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
@@ -134,27 +107,6 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
                        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
@@ -163,64 +115,39 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
        /* 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