]> git.sur5r.net Git - freertos/blobdiff - Demo/CORTEX_Kinetis_K60_Tower_IAR/uIP_Task.c
Remove unused variable warning.
[freertos] / Demo / CORTEX_Kinetis_K60_Tower_IAR / uIP_Task.c
index 43aadc6a7e6f5f8182a87899b5536e19f4defac4..c28c2d33cd57b0113ae1fa267f6a9f7b4c4836fb 100644 (file)
@@ -72,7 +72,7 @@
 #include "ParTest.h"\r
 \r
 /* The buffer used by the uIP stack to both receive and send.  In this case,\r
-because the Ethernet driver has been modified to be zero copy - the uip_buf\r
+because the Ethernet driver is implemented to be zero copy - the uip_buf\r
 variable is just a pointer to an Ethernet buffer, and not a buffer in its own\r
 right. */\r
 extern unsigned char *uip_buf;\r
@@ -90,15 +90,9 @@ driver to the uIP stack. */
 /* A block time of zero simply means "don't block". */\r
 #define uipDONT_BLOCK                          0UL\r
 \r
-/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT    ( 100 / portTICK_RATE_MS )\r
-\r
 /* Shortcut to the header within the Rx buffer. */\r
 #define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
 \r
-/* Standard constant. */\r
-#define uipTOTAL_FRAME_HEADER_SIZE     54\r
-\r
 /*-----------------------------------------------------------*/\r
 \r
 /*\r
@@ -138,7 +132,7 @@ clock_time_t clock_time( void )
 \r
 void vuIP_Task( void *pvParameters )\r
 {\r
-portBASE_TYPE i;\r
+long i;\r
 unsigned long ulNewEvent = 0UL, ulUIP_Events = 0UL;\r
 unsigned short usPacketLength;\r
 \r
@@ -161,7 +155,6 @@ unsigned short usPacketLength;
                {\r
                        uip_len = usPacketLength;\r
                        \r
-                       /* Standard uIP loop taken from the uIP manual. */\r
                        if( xHeader->type == htons( UIP_ETHTYPE_IP ) )\r
                        {\r
                                uip_arp_ipin();\r
@@ -319,6 +312,7 @@ static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT;
 void vApplicationProcessFormInput( char *pcInputString )\r
 {\r
 char *c;\r
+const unsigned long ulYellowLED = 2UL;\r
 \r
        /* Only interested in processing form input if this is the IO page. */\r
        c = strstr( pcInputString, "io.shtml" );\r
@@ -329,25 +323,22 @@ char *c;
                c = strstr( pcInputString, "?" );\r
            if( c )\r
            {\r
-                       /* Turn the LED's on or off in accordance with the check box status. */\r
+                       /* Turn the LEDs 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( 3, 1 );\r
-                               vParTestSetLED( 4, 1 );\r
+                               vParTestSetLED( ulYellowLED, pdTRUE );\r
                        }\r
                        else\r
                        {\r
                                /* Turn the LEDs off. */\r
-                               vParTestSetLED( 3, 0 );\r
-                               vParTestSetLED( 4, 0 );\r
+                               vParTestSetLED( ulYellowLED, pdFALSE );\r
                        }\r
            }\r
                else\r
                {\r
-                       /* Commands to turn LEDs off are not always explicit. */\r
-                       vParTestSetLED( 3, 0 );\r
-                       vParTestSetLED( 4, 0 );\r
+                       /* Some browsers will only imply that a check box is off. */\r
+                       vParTestSetLED( ulYellowLED, pdFALSE );\r
                }\r
        }\r
 }\r