]> git.sur5r.net Git - freertos/commitdiff
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@202 1d2547de-c912-0410...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 17 Feb 2008 18:26:52 +0000 (18:26 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 17 Feb 2008 18:26:52 +0000 (18:26 +0000)
Demo/MB91460_Softune/SRC/partest/partest.c

index fbbb48435663fd879cf597df034a365a02130bee..3aa4e57daf80b77f64ed3d679ab04cf07f54c69f 100644 (file)
@@ -54,13 +54,21 @@ static unsigned portCHAR sState1[ partstNUM_LEDs ] = { pdFALSE };
 /*-----------------------------------------------------------*/\r
 void vParTestInitialise( void )\r
 {\r
+portBASE_TYPE x;\r
+\r
        /* Set port for LED outputs. */\r
-       DDR16 = 0xFF;\r
-       DDR25 = 0xFF;\r
+       DDR00 = 0xFF;\r
+       DDR09 = 0xFF;\r
 \r
        /* Start with LEDs off. */\r
-       PDR25 = 0x00;\r
-       PDR16 = 0x00;\r
+       PDR09 = 0xff;\r
+       PDR00 = 0xff;\r
+\r
+       for( x = 0; x < partstNUM_LEDs; x++ )\r
+       {\r
+               sState[ x ] = pdTRUE;\r
+               sState1[ x ] = pdTRUE;\r
+       }\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -73,11 +81,11 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
                        /* Toggle the state of the single genuine on board LED. */\r
                        if( sState[ uxLED ] )\r
                        {\r
-                               PDR25 |= ( 1 << uxLED );\r
+                               PDR09 |= ( 1 << uxLED );\r
                        }\r
                        else\r
                        {\r
-                               PDR25 &= ~( 1 << uxLED );\r
+                               PDR09 &= ~( 1 << uxLED );\r
                        }\r
                \r
                        sState[uxLED] = !( sState[ uxLED ] );\r
@@ -95,11 +103,11 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
                                /* Toggle the state of the single genuine on board LED. */\r
                                if( sState1[uxLED])     \r
                                {\r
-                                       PDR16 |= ( 1 << uxLED );\r
+                                       PDR00 |= ( 1 << uxLED );\r
                                }\r
                                else\r
                                {\r
-                                       PDR16 &= ~( 1 << uxLED );\r
+                                       PDR00 &= ~( 1 << uxLED );\r
                                }\r
                        \r
                                sState1[ uxLED ] = !( sState1[ uxLED ] );\r
@@ -119,12 +127,12 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
                {\r
                        if( xValue )\r
                        {\r
-                               PDR25 |= ( 1 << uxLED );\r
+                               PDR09 |= ( 1 << uxLED );\r
                                sState[ uxLED ] = 1;\r
                        }\r
                        else\r
                        {\r
-                               PDR25 &= ~( 1 << uxLED );\r
+                               PDR09 &= ~( 1 << uxLED );\r
                                sState[ uxLED ] = 0;\r
                        }\r
                }\r
@@ -138,12 +146,12 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
                {\r
                        if( xValue )\r
                        {\r
-                               PDR16 |= ( 1 << uxLED );\r
+                               PDR00 |= ( 1 << uxLED );\r
                                sState1[ uxLED ] = 1;\r
                        }\r
                        else\r
                        {\r
-                               PDR16 &= ~( 1 << uxLED );\r
+                               PDR00 &= ~( 1 << uxLED );\r
                                sState1[ uxLED ] = 0;\r
                        }\r
                }\r