Tidy up the RDK/Renesas/RX port to get rid of compiler warnings, and correct some of the variable naming.

This commit is contained in:
Richard Barry 2010-09-12 21:02:55 +00:00
parent 2cf67be590
commit f43bd20a6d
9 changed files with 6805 additions and 6723 deletions

View file

@ -157,7 +157,7 @@ static void prvResetEverything( void );
/*-----------------------------------------------------------*/
/* Points to the Rx descriptor currently in use. */
static ethfifo *xCurrentRxDesc = NULL;
static ethfifo *pxCurrentRxDesc = NULL;
/* The buffer used by the uIP stack to both receive and send. This points to
one of the Ethernet buffers when its actually in use. */
@ -246,8 +246,8 @@ unsigned long ulBytesReceived;
if( ulBytesReceived > 0 )
{
xCurrentRxDesc->status &= ~( FP1 | FP0 );
xCurrentRxDesc->status |= ACT;
pxCurrentRxDesc->status &= ~( FP1 | FP0 );
pxCurrentRxDesc->status |= ACT;
if( EDMAC.EDRRR.LONG == 0x00000000L )
{
@ -259,10 +259,10 @@ unsigned long ulBytesReceived;
the buffer that contains the received data. */
prvReturnBuffer( uip_buf );
uip_buf = ( void * ) xCurrentRxDesc->buf_p;
uip_buf = ( void * ) pxCurrentRxDesc->buf_p;
/* Move onto the next buffer in the ring. */
xCurrentRxDesc = xCurrentRxDesc->next;
pxCurrentRxDesc = pxCurrentRxDesc->next;
}
return ulBytesReceived;
@ -372,7 +372,7 @@ long x;
pxDescriptor->next = &( xTxDescriptors[ 0 ] );
/* Use the first Rx descriptor to start with. */
xCurrentRxDesc = &( xRxDescriptors[ 0 ] );
pxCurrentRxDesc = &( xRxDescriptors[ 0 ] );
}
/*-----------------------------------------------------------*/
@ -444,17 +444,17 @@ static unsigned long prvCheckRxFifoStatus( void )
{
unsigned long ulReturn = 0;
if( ( xCurrentRxDesc->status & ACT ) != 0 )
if( ( pxCurrentRxDesc->status & ACT ) != 0 )
{
/* Current descriptor is still active. */
}
else if( ( xCurrentRxDesc->status & FE ) != 0 )
else if( ( pxCurrentRxDesc->status & FE ) != 0 )
{
/* Frame error. Clear the error. */
xCurrentRxDesc->status &= ~( FP1 | FP0 | FE );
xCurrentRxDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF );
xCurrentRxDesc->status |= ACT;
xCurrentRxDesc = xCurrentRxDesc->next;
pxCurrentRxDesc->status &= ~( FP1 | FP0 | FE );
pxCurrentRxDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF );
pxCurrentRxDesc->status |= ACT;
pxCurrentRxDesc = pxCurrentRxDesc->next;
if( EDMAC.EDRRR.LONG == 0x00000000UL )
{
@ -466,9 +466,9 @@ unsigned long ulReturn = 0;
{
/* The descriptor contains a frame. Because of the size of the buffers
the frame should always be complete. */
if( ( xCurrentRxDesc->status & FP0 ) == FP0 )
if( ( pxCurrentRxDesc->status & FP0 ) == FP0 )
{
ulReturn = xCurrentRxDesc->size;
ulReturn = pxCurrentRxDesc->size;
}
else
{
@ -515,7 +515,7 @@ static void prvConfigureEtherCAndEDMAC( void )
#ifdef __LIT
EDMAC.EDMR.BIT.DE = 1;
#endif
EDMAC.RDLAR = ( void * ) xCurrentRxDesc; /* Initialaize Rx Descriptor List Address */
EDMAC.RDLAR = ( void * ) pxCurrentRxDesc; /* Initialaize Rx Descriptor List Address */
EDMAC.TDLAR = &( xTxDescriptors[ 0 ] ); /* Initialaize Tx Descriptor List Address */
EDMAC.TRSCER.LONG = 0x00000000; /* Copy-back status is RFE & TFE only */
EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */

View file

@ -70,6 +70,7 @@ static PT_THREAD( nullfunction ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) ptr;
( void ) PT_YIELD_FLAG;
PSOCK_END( &s->sout );
}
@ -102,6 +103,8 @@ static PT_THREAD( file_stats ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) PT_YIELD_FLAG;
PSOCK_GENERATOR_SEND( &s->sout, generate_file_stats, strchr(ptr, ' ') + 1 );
PSOCK_END( &s->sout );
@ -126,11 +129,11 @@ static unsigned short generate_tcp_stats( void *arg )
struct httpd_state *s = ( struct httpd_state * ) arg;
conn = &uip_conns[s->count];
return sprintf( ( char * ) uip_appdata,
return sprintf( ( char * ) uip_appdata,
"<tr><td>%d</td><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n", htons(conn->lport),
htons(conn->ripaddr.u16[0]) >> 8, htons(conn->ripaddr.u16[0]) & 0xff, htons(conn->ripaddr.u16[1]) >> 8,
htons(conn->ripaddr.u16[1]) & 0xff, htons(conn->rport), states[conn->tcpstateflags & UIP_TS_MASK], conn->nrtx, conn->timer,
(uip_outstanding(conn)) ? '*' : ' ', (uip_stopped(conn)) ? '!' : ' ' );
(uip_outstanding(conn)) ? '*' : ' ', (uip_stopped(conn)) ? '!' : ' ' );
}
/*---------------------------------------------------------------------------*/
@ -138,6 +141,7 @@ static PT_THREAD( tcp_stats ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) ptr;
( void ) PT_YIELD_FLAG;
for( s->count = 0; s->count < UIP_CONNS; ++s->count )
{
if( (uip_conns[s->count].tcpstateflags & UIP_TS_MASK) != UIP_CLOSED )
@ -160,6 +164,7 @@ static PT_THREAD( net_stats ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) ptr;
( void ) PT_YIELD_FLAG;
#if UIP_STATISTICS
for( s->count = 0; s->count < sizeof(uip_stat) / sizeof(uip_stats_t); ++s->count )
{
@ -192,6 +197,7 @@ static PT_THREAD( rtos_stats ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) ptr;
( void ) PT_YIELD_FLAG;
PSOCK_GENERATOR_SEND( &s->sout, generate_rtos_stats, NULL );
PSOCK_END( &s->sout );
}
@ -223,7 +229,7 @@ static unsigned short generate_io_state( void *arg )
/*---------------------------------------------------------------------------*/
extern void vTaskGetRunTimeStats( signed char *pcWriteBuffer );
extern unsigned short usMaxJitter;
static char cJitterBuffer;
static char cJitterBuffer[ 200 ];
static unsigned short generate_runtime_stats( void *arg )
{
( void ) arg;
@ -238,6 +244,7 @@ static unsigned short generate_runtime_stats( void *arg )
}
#else
{
( void ) cJitterBuffer;
strcpy( uip_appdata, "<p>Run time stats are only available in the debug_with_optimisation build configuration.<p>" );
}
#endif
@ -252,6 +259,7 @@ static PT_THREAD( run_time ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) ptr;
( void ) PT_YIELD_FLAG;
PSOCK_GENERATOR_SEND( &s->sout, generate_runtime_stats, NULL );
PSOCK_END( &s->sout );
}
@ -261,6 +269,7 @@ static PT_THREAD( led_io ( struct httpd_state *s, char *ptr ) )
{
PSOCK_BEGIN( &s->sout );
( void ) ptr;
( void ) PT_YIELD_FLAG;
PSOCK_GENERATOR_SEND( &s->sout, generate_io_state, NULL );
PSOCK_END( &s->sout );
}