]> git.sur5r.net Git - freertos/blobdiff - Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c
Tidy up the IAR SmartFusion demo reading for release.
[freertos] / Demo / CORTEX_A2F200_IAR_and_Keil / uIP_Task.c
index 3a6ea91e6867efdfd921cc7d1fec4f8ca9fefb06..b3e150b7fec93fbbf38405f716dd8c3e845d88d0 100644 (file)
@@ -159,8 +159,8 @@ clock_time_t clock_time( void )
 void vuIP_Task( void *pvParameters )\r
 {\r
 portBASE_TYPE i;\r
-unsigned long ulNewEvent = 0UL;\r
-unsigned long ulUIP_Events = 0UL;\r
+unsigned long ulNewEvent = 0UL, ulUIP_Events = 0UL;\r
+long lPacketLength;\r
 \r
        /* Just to prevent compiler warnings about the unused parameter. */\r
        ( void ) pvParameters;\r
@@ -174,11 +174,13 @@ unsigned long ulUIP_Events = 0UL;
        for( ;; )\r
        {\r
                /* Is there received data ready to be processed? */\r
-               uip_len = MSS_MAC_rx_packet();\r
+               lPacketLength = MSS_MAC_rx_packet();\r
 \r
                /* Statements to be executed if data has been received on the Ethernet. */\r
-               if( ( uip_len > 0 ) && ( uip_buf != NULL ) )\r
+               if( ( lPacketLength > 0 ) && ( uip_buf != NULL ) )\r
                {\r
+                       uip_len = ( u16_t ) lPacketLength;\r
+                       \r
                        /* Standard uIP loop taken from the uIP manual. */\r
                        if( xHeader->type == htons( UIP_ETHTYPE_IP ) )\r
                        {\r
@@ -356,7 +358,7 @@ void vEMACWrite( void )
 {\r
 const long lMaxAttempts = 10;\r
 long lAttempt;\r
-const portTickType xShortDelay = ( 10 / portTICK_RATE_MS );\r
+const portTickType xShortDelay = ( 5 / portTICK_RATE_MS );\r
 \r
        /* Try to send data to the Ethernet.  Keep trying for a while if data cannot\r
        be sent immediately.  Note that this will actually cause the data to be sent\r