/*\r
- FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.\r
+ FreeRTOS V7.0.1 - Copyright (C) 2011 Real Time Engineers Ltd.\r
\r
\r
***************************************************************************\r
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
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
xEMACEventQueue = xQueueCreate( uipEVENT_QUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
/* Create and start the uIP timers. */\r
- xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
+ xARPTimer = xTimerCreate( ( signed char * ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */\r
( 10000UL / portTICK_RATE_MS ), /* Timer period. */\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipARP_TIMER,\r
prvUIPTimerCallback\r
);\r
\r
- xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer",\r
+ xPeriodicTimer = xTimerCreate( ( signed char * ) "PeriodicTimer",\r
( 500UL / portTICK_RATE_MS ),\r
pdTRUE, /* Autor-reload. */\r
( void * ) uipPERIODIC_TIMER,\r
{\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