Prepare RX MDK project for release.

This commit is contained in:
Richard Barry 2010-09-09 18:31:16 +00:00
parent 23ca0009e3
commit 3780491aeb
13 changed files with 304 additions and 293 deletions

View file

@ -115,7 +115,7 @@ clock_time_t clock_time( void )
void vuIP_Task( void *pvParameters )
{
portBASE_TYPE i;
portBASE_TYPE i, xDoneSomething;
uip_ipaddr_t xIPAddr;
struct timer periodic_timer, arp_timer;
@ -145,6 +145,8 @@ struct timer periodic_timer, arp_timer;
for( ;; )
{
xDoneSomething = pdFALSE;
/* Is there received data ready to be processed? */
uip_len = ( unsigned short ) ulEMACRead();
@ -164,6 +166,8 @@ struct timer periodic_timer, arp_timer;
uip_arp_out();
vEMACWrite();
}
xDoneSomething = pdTRUE;
}
else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) )
{
@ -176,42 +180,45 @@ struct timer periodic_timer, arp_timer;
{
vEMACWrite();
}
xDoneSomething = pdTRUE;
}
}
else
if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) )
{
if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) )
timer_reset( &periodic_timer );
for( i = 0; i < UIP_CONNS; i++ )
{
timer_reset( &periodic_timer );
for( i = 0; i < UIP_CONNS; i++ )
{
uip_periodic( i );
uip_periodic( i );
/* If the above function invocation resulted in data that
should be sent out on the network, the global variable
uip_len is set to a value > 0. */
if( uip_len > 0 )
{
uip_arp_out();
vEMACWrite();
}
}
/* Call the ARP timer function every 10 seconds. */
if( timer_expired( &arp_timer ) )
/* If the above function invocation resulted in data that
should be sent out on the network, the global variable
uip_len is set to a value > 0. */
if( uip_len > 0 )
{
timer_reset( &arp_timer );
uip_arp_timer();
uip_arp_out();
vEMACWrite();
}
}
else
/* Call the ARP timer function every 10 seconds. */
if( timer_expired( &arp_timer ) )
{
/* We did not receive a packet, and there was no periodic
processing to perform. Block for a fixed period. If a packet
is received during this period we will be woken by the ISR
giving us the Semaphore. */
xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 );
timer_reset( &arp_timer );
uip_arp_timer();
}
xDoneSomething = pdTRUE;
}
if( xDoneSomething == pdFALSE )
{
/* We did not receive a packet, and there was no periodic
processing to perform. Block for a fixed period. If a packet
is received during this period we will be woken by the ISR
giving us the Semaphore. */
xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 );
}
}
}
@ -245,18 +252,14 @@ char *c;
if( strstr( c, "LED0=1" ) != NULL )
{
/* Turn LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
vParTestSetLED( 3, 1 );
vParTestSetLED( 4, 1 );
}
else
{
/* Turn LED 4 off. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
vParTestSetLED( 3, 0 );
vParTestSetLED( 4, 0 );
}
}
}