]> git.sur5r.net Git - freertos/commitdiff
Allow RX YRDK demos to work with Rev1 and Rev3 boards, and with any web browser.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 22 Dec 2010 15:18:30 +0000 (15:18 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 22 Dec 2010 15:18:30 +0000 (15:18 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1179 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

12 files changed:
Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/ParTest.c
Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/include/yrdkrx62ndef.h
Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c
Demo/RX600_RX62N-RDK_IAR/ParTest.c
Demo/RX600_RX62N-RDK_IAR/include/yrdkrx62ndef.h
Demo/RX600_RX62N-RDK_IAR/uIP_Task.c
Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/ParTest.c
Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/include/yrdkrx62ndef.h
Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c
Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c
Demo/RX600_RX62N-RSK_IAR/uIP_Task.c
Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c

index 0c30340443de6912872f9c5b03a18596a2e9ddf1..5389eddb6c020211ea218e397a428ac298e2879c 100644 (file)
@@ -185,62 +185,62 @@ long lReturn = pdFALSE;
        {\r
                switch( ulLED )\r
                {\r
-                       case 0  :       if( LED4 != 0 )\r
+                       case 0  :       if( LED4 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 1  :       if( LED5 != 0 )\r
+                       case 1  :       if( LED5 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 2  :       if( LED6 != 0 )\r
+                       case 2  :       if( LED6 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 3  :       if( LED7 != 0 )\r
+                       case 3  :       if( LED7 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 4  :       if( LED8 != 0 )\r
+                       case 4  :       if( LED8 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 5  :       if( LED9 != 0 )\r
+                       case 5  :       if( LED9 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 6  :       if( LED10 != 0 )\r
+                       case 6  :       if( LED10 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 7  :       if( LED11 != 0 )\r
+                       case 7  :       if( LED11 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 8  :       if( LED12 != 0 )\r
+                       case 8  :       if( LED12 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 9  :       if( LED13 != 0 )\r
+                       case 9  :       if( LED13 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 10 :       if( LED14 != 0 )\r
+                       case 10 :       if( LED14 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 11 :       if( LED15 != 0 )\r
+                       case 11 :       if( LED15 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
index 29a1acee7a9b3efbbf02c4504273da4e298640e3..779da356252e7a21a5b95c5010fd9c9f2c725c70 100644 (file)
@@ -40,8 +40,14 @@ Macro definitions
 #define     CMT0_CLK_SELECT (512)\r
 \r
 /* General Values */\r
-#define                LED_ON          (1)\r
-#define        LED_OFF                 (0)\r
+#ifdef LED_POSITIVE_LOGIC\r
+       #define         LED_ON          (1) \r
+       #define         LED_OFF                 (0)\r
+#else\r
+/* LEDs are using NEGATIVE LOGIC... */\r
+       #define         LED_ON          (0)\r
+       #define         LED_OFF                 (1)\r
+#endif\r
 #define        SET_BIT_HIGH    (1)\r
 #define        SET_BIT_LOW             (0)\r
 #define        SET_BYTE_HIGH   (0xFF)\r
index 59d0a7890c858790be7ab21f5006c5c250fda78e..0614e487c1bb8ebd3bbde8288fed1c49b8834081 100644 (file)
@@ -243,28 +243,41 @@ void vApplicationProcessFormInput( char *pcInputString )
 {\r
 char *c;\r
 \r
-       /* Process the form input sent by the IO page of the served HTML. */\r
-\r
-       c = strstr( pcInputString, "?" );\r
-    if( c )\r
-    {\r
-               /* Turn the LED's on or off in accordance with the check box status. */\r
-               if( strstr( c, "LED0=1" ) != NULL )\r
-               {\r
-                       /* Turn LEDs on. */\r
-                       vParTestSetLED( 7, 1 );\r
-                       vParTestSetLED( 8, 1 );\r
-                       vParTestSetLED( 9, 1 );\r
-                       vParTestSetLED( 10, 1 );\r
-               }\r
+       /* Only interested in processing form input if this is the IO page. */\r
+       c = strstr( pcInputString, "io.shtml" );\r
+       \r
+       if( c )\r
+       {\r
+               /* Is there a command in the string? */\r
+               c = strstr( pcInputString, "?" );\r
+           if( c )\r
+           {\r
+                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       if( strstr( c, "LED0=1" ) != NULL )\r
+                       {\r
+                               /* Turn the LEDs on. */\r
+                               vParTestSetLED( 7, 1 );\r
+                               vParTestSetLED( 8, 1 );\r
+                               vParTestSetLED( 9, 1 );\r
+                               vParTestSetLED( 10, 1 );\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Turn the LEDs off. */\r
+                               vParTestSetLED( 7, 0 );\r
+                               vParTestSetLED( 8, 0 );\r
+                               vParTestSetLED( 9, 0 );\r
+                               vParTestSetLED( 10, 0 );\r
+                       }\r
+           }\r
                else\r
                {\r
-                       /* Turn LED 4 off. */\r
+                       /* Commands to turn LEDs off are not always explicit. */\r
                        vParTestSetLED( 7, 0 );\r
                        vParTestSetLED( 8, 0 );\r
                        vParTestSetLED( 9, 0 );\r
                        vParTestSetLED( 10, 0 );\r
                }\r
-    }\r
+       }\r
 }\r
 \r
index fdaf559e7ca1c017a230a78564063cdfcd6773b0..0b5a11b25b2613982c33a208bdf758aac7d20104 100644 (file)
@@ -185,62 +185,62 @@ long lReturn = pdFALSE;
        {\r
                switch( ulLED )\r
                {\r
-                       case 0  :       if( LED4 != 0 )\r
+                       case 0  :       if( LED4 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 1  :       if( LED5 != 0 )\r
+                       case 1  :       if( LED5 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 2  :       if( LED6 != 0 )\r
+                       case 2  :       if( LED6 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 3  :       if( LED7 != 0 )\r
+                       case 3  :       if( LED7 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 4  :       if( LED8 != 0 )\r
+                       case 4  :       if( LED8 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 5  :       if( LED9 != 0 )\r
+                       case 5  :       if( LED9 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 6  :       if( LED10 != 0 )\r
+                       case 6  :       if( LED10 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 7  :       if( LED11 != 0 )\r
+                       case 7  :       if( LED11 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 8  :       if( LED12 != 0 )\r
+                       case 8  :       if( LED12 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 9  :       if( LED13 != 0 )\r
+                       case 9  :       if( LED13 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 10 :       if( LED14 != 0 )\r
+                       case 10 :       if( LED14 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 11 :       if( LED15 != 0 )\r
+                       case 11 :       if( LED15 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
index 29a1acee7a9b3efbbf02c4504273da4e298640e3..779da356252e7a21a5b95c5010fd9c9f2c725c70 100644 (file)
@@ -40,8 +40,14 @@ Macro definitions
 #define     CMT0_CLK_SELECT (512)\r
 \r
 /* General Values */\r
-#define                LED_ON          (1)\r
-#define        LED_OFF                 (0)\r
+#ifdef LED_POSITIVE_LOGIC\r
+       #define         LED_ON          (1) \r
+       #define         LED_OFF                 (0)\r
+#else\r
+/* LEDs are using NEGATIVE LOGIC... */\r
+       #define         LED_ON          (0)\r
+       #define         LED_OFF                 (1)\r
+#endif\r
 #define        SET_BIT_HIGH    (1)\r
 #define        SET_BIT_LOW             (0)\r
 #define        SET_BYTE_HIGH   (0xFF)\r
index 59d0a7890c858790be7ab21f5006c5c250fda78e..0614e487c1bb8ebd3bbde8288fed1c49b8834081 100644 (file)
@@ -243,28 +243,41 @@ void vApplicationProcessFormInput( char *pcInputString )
 {\r
 char *c;\r
 \r
-       /* Process the form input sent by the IO page of the served HTML. */\r
-\r
-       c = strstr( pcInputString, "?" );\r
-    if( c )\r
-    {\r
-               /* Turn the LED's on or off in accordance with the check box status. */\r
-               if( strstr( c, "LED0=1" ) != NULL )\r
-               {\r
-                       /* Turn LEDs on. */\r
-                       vParTestSetLED( 7, 1 );\r
-                       vParTestSetLED( 8, 1 );\r
-                       vParTestSetLED( 9, 1 );\r
-                       vParTestSetLED( 10, 1 );\r
-               }\r
+       /* Only interested in processing form input if this is the IO page. */\r
+       c = strstr( pcInputString, "io.shtml" );\r
+       \r
+       if( c )\r
+       {\r
+               /* Is there a command in the string? */\r
+               c = strstr( pcInputString, "?" );\r
+           if( c )\r
+           {\r
+                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       if( strstr( c, "LED0=1" ) != NULL )\r
+                       {\r
+                               /* Turn the LEDs on. */\r
+                               vParTestSetLED( 7, 1 );\r
+                               vParTestSetLED( 8, 1 );\r
+                               vParTestSetLED( 9, 1 );\r
+                               vParTestSetLED( 10, 1 );\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Turn the LEDs off. */\r
+                               vParTestSetLED( 7, 0 );\r
+                               vParTestSetLED( 8, 0 );\r
+                               vParTestSetLED( 9, 0 );\r
+                               vParTestSetLED( 10, 0 );\r
+                       }\r
+           }\r
                else\r
                {\r
-                       /* Turn LED 4 off. */\r
+                       /* Commands to turn LEDs off are not always explicit. */\r
                        vParTestSetLED( 7, 0 );\r
                        vParTestSetLED( 8, 0 );\r
                        vParTestSetLED( 9, 0 );\r
                        vParTestSetLED( 10, 0 );\r
                }\r
-    }\r
+       }\r
 }\r
 \r
index 6356763782ca07ad0169046bab7b915bbace81ba..e6e41f3aef27b3bee4729150d70c124361a5c328 100644 (file)
@@ -185,62 +185,62 @@ long lReturn = pdFALSE;
        {\r
                switch( ulLED )\r
                {\r
-                       case 0  :       if( LED4 != 0 )\r
+                       case 0  :       if( LED4 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 1  :       if( LED5 != 0 )\r
+                       case 1  :       if( LED5 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 2  :       if( LED6 != 0 )\r
+                       case 2  :       if( LED6 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 3  :       if( LED7 != 0 )\r
+                       case 3  :       if( LED7 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 4  :       if( LED8 != 0 )\r
+                       case 4  :       if( LED8 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 5  :       if( LED9 != 0 )\r
+                       case 5  :       if( LED9 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 6  :       if( LED10 != 0 )\r
+                       case 6  :       if( LED10 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 7  :       if( LED11 != 0 )\r
+                       case 7  :       if( LED11 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 8  :       if( LED12 != 0 )\r
+                       case 8  :       if( LED12 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 9  :       if( LED13 != 0 )\r
+                       case 9  :       if( LED13 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 10 :       if( LED14 != 0 )\r
+                       case 10 :       if( LED14 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
                                                break;\r
-                       case 11 :       if( LED15 != 0 )\r
+                       case 11 :       if( LED15 != LED_OFF )\r
                                                {\r
                                                        lReturn =  pdTRUE;\r
                                                }\r
index 29a1acee7a9b3efbbf02c4504273da4e298640e3..779da356252e7a21a5b95c5010fd9c9f2c725c70 100644 (file)
@@ -40,8 +40,14 @@ Macro definitions
 #define     CMT0_CLK_SELECT (512)\r
 \r
 /* General Values */\r
-#define                LED_ON          (1)\r
-#define        LED_OFF                 (0)\r
+#ifdef LED_POSITIVE_LOGIC\r
+       #define         LED_ON          (1) \r
+       #define         LED_OFF                 (0)\r
+#else\r
+/* LEDs are using NEGATIVE LOGIC... */\r
+       #define         LED_ON          (0)\r
+       #define         LED_OFF                 (1)\r
+#endif\r
 #define        SET_BIT_HIGH    (1)\r
 #define        SET_BIT_LOW             (0)\r
 #define        SET_BYTE_HIGH   (0xFF)\r
index 58caa5136e5d56ee38c0293844ab84854c272b47..58f5e4504e932a8e7b33cd21c1c72dfe3ca4a38c 100644 (file)
@@ -243,28 +243,41 @@ void vApplicationProcessFormInput( char *pcInputString )
 {\r
 char *c;\r
 \r
-       /* Process the form input sent by the IO page of the served HTML. */\r
-\r
-       c = strstr( pcInputString, "?" );\r
-    if( c )\r
-    {\r
-               /* Turn the LED's on or off in accordance with the check box status. */\r
-               if( strstr( c, "LED0=1" ) != NULL )\r
-               {\r
-                       /* Turn LEDs on. */\r
-                       vParTestSetLED( 7, 1 );\r
-                       vParTestSetLED( 8, 1 );\r
-                       vParTestSetLED( 9, 1 );\r
-                       vParTestSetLED( 10, 1 );\r
-               }\r
+       /* Only interested in processing form input if this is the IO page. */\r
+       c = strstr( pcInputString, "io.shtml" );\r
+       \r
+       if( c )\r
+       {\r
+               /* Is there a command in the string? */\r
+               c = strstr( pcInputString, "?" );\r
+           if( c )\r
+           {\r
+                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       if( strstr( c, "LED0=1" ) != NULL )\r
+                       {\r
+                               /* Turn the LEDs on. */\r
+                               vParTestSetLED( 7, 1 );\r
+                               vParTestSetLED( 8, 1 );\r
+                               vParTestSetLED( 9, 1 );\r
+                               vParTestSetLED( 10, 1 );\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Turn the LEDs off. */\r
+                               vParTestSetLED( 7, 0 );\r
+                               vParTestSetLED( 8, 0 );\r
+                               vParTestSetLED( 9, 0 );\r
+                               vParTestSetLED( 10, 0 );\r
+                       }\r
+           }\r
                else\r
                {\r
-                       /* Turn LED 4 off. */\r
+                       /* Commands to turn LEDs off are not always explicit. */\r
                        vParTestSetLED( 7, 0 );\r
                        vParTestSetLED( 8, 0 );\r
                        vParTestSetLED( 9, 0 );\r
                        vParTestSetLED( 10, 0 );\r
                }\r
-    }\r
+       }\r
 }\r
 \r
index b1f6f91f1d6d1e281206d06b227cc5a69c0379db..66efa5537970da17060d9c69bac876051703af23 100644 (file)
@@ -243,24 +243,35 @@ void vApplicationProcessFormInput( char *pcInputString )
 {\r
 char *c;\r
 \r
-       /* Process the form input sent by the IO page of the served HTML. */\r
-\r
-       c = strstr( pcInputString, "?" );\r
-    if( c )\r
-    {\r
-               /* Turn the LED's on or off in accordance with the check box status. */\r
-               if( strstr( c, "LED0=1" ) != NULL )\r
+       /* Only interested in processing form input if this is the IO page. */\r
+       c = strstr( pcInputString, "io.shtml" );\r
+       \r
+       if( c )\r
+       {\r
+               /* Is there a command in the string? */\r
+               c = strstr( pcInputString, "?" );\r
+               if( c )\r
                {\r
-                       /* Turn LEDs on. */\r
-                       vParTestSetLED( 3, 1 );\r
-                       vParTestSetLED( 4, 1 );\r
+                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       if( strstr( c, "LED0=1" ) != NULL )\r
+                       {\r
+                               /* Turn LEDs on. */\r
+                               vParTestSetLED( 3, 1 );\r
+                               vParTestSetLED( 4, 1 );\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Turn LED 4 off. */\r
+                               vParTestSetLED( 3, 0 );\r
+                               vParTestSetLED( 4, 0 );\r
+                       }\r
                }\r
                else\r
                {\r
-                       /* Turn LED 4 off. */\r
+                       /* Commands to turn LEDs off are not always explicit, turn LED 4\r
+                       off. */\r
                        vParTestSetLED( 3, 0 );\r
                        vParTestSetLED( 4, 0 );\r
                }\r
-    }\r
+       }\r
 }\r
-\r
index 6ee495cd0c386dd41eb1acfd38fab74b148a4036..5a5a589acdd16058ffec63305b7744e0f6db71c6 100644 (file)
@@ -243,24 +243,35 @@ void vApplicationProcessFormInput( char *pcInputString )
 {\r
 char *c;\r
 \r
-       /* Process the form input sent by the IO page of the served HTML. */\r
-\r
-       c = strstr( pcInputString, "?" );\r
-    if( c )\r
-    {\r
-               /* Turn the LED's on or off in accordance with the check box status. */\r
-               if( strstr( c, "LED0=1" ) != NULL )\r
+       /* Only interested in processing form input if this is the IO page. */\r
+       c = strstr( pcInputString, "io.shtml" );\r
+       \r
+       if( c )\r
+       {\r
+               /* Is there a command in the string? */\r
+               c = strstr( pcInputString, "?" );\r
+               if( c )\r
                {\r
-                       /* Turn LEDs on. */\r
-                       vParTestSetLED( 3, 1 );\r
-                       vParTestSetLED( 4, 1 );\r
+                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       if( strstr( c, "LED0=1" ) != NULL )\r
+                       {\r
+                               /* Turn LEDs on. */\r
+                               vParTestSetLED( 3, 1 );\r
+                               vParTestSetLED( 4, 1 );\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Turn LED 4 off. */\r
+                               vParTestSetLED( 3, 0 );\r
+                               vParTestSetLED( 4, 0 );\r
+                       }\r
                }\r
                else\r
                {\r
-                       /* Turn LED 4 off. */\r
+                       /* Commands to turn LEDs off are not always explicit, turn LED 4\r
+                       off. */\r
                        vParTestSetLED( 3, 0 );\r
                        vParTestSetLED( 4, 0 );\r
                }\r
-    }\r
+       }\r
 }\r
-\r
index b1f6f91f1d6d1e281206d06b227cc5a69c0379db..a571b083fb4e4b2da1bd632a9dae557405bd691c 100644 (file)
@@ -243,24 +243,36 @@ void vApplicationProcessFormInput( char *pcInputString )
 {\r
 char *c;\r
 \r
-       /* Process the form input sent by the IO page of the served HTML. */\r
-\r
-       c = strstr( pcInputString, "?" );\r
-    if( c )\r
-    {\r
-               /* Turn the LED's on or off in accordance with the check box status. */\r
-               if( strstr( c, "LED0=1" ) != NULL )\r
+       /* Only interested in processing form input if this is the IO page. */\r
+       c = strstr( pcInputString, "io.shtml" );\r
+       \r
+       if( c )\r
+       {\r
+               /* Is there a command in the string? */\r
+               c = strstr( pcInputString, "?" );\r
+               if( c )\r
                {\r
-                       /* Turn LEDs on. */\r
-                       vParTestSetLED( 3, 1 );\r
-                       vParTestSetLED( 4, 1 );\r
+                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       if( strstr( c, "LED0=1" ) != NULL )\r
+                       {\r
+                               /* Turn LEDs on. */\r
+                               vParTestSetLED( 3, 1 );\r
+                               vParTestSetLED( 4, 1 );\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Turn LED 4 off. */\r
+                               vParTestSetLED( 3, 0 );\r
+                               vParTestSetLED( 4, 0 );\r
+                       }\r
                }\r
                else\r
                {\r
-                       /* Turn LED 4 off. */\r
+                       /* Commands to turn LEDs off are not always explicit, turn LED 4\r
+                       off. */\r
                        vParTestSetLED( 3, 0 );\r
                        vParTestSetLED( 4, 0 );\r
                }\r
-    }\r
+       }\r
 }\r
 \r