mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Prepare for release.
This commit is contained in:
parent
079f9f4ee2
commit
9dace4de75
6 changed files with 86 additions and 175 deletions
|
@ -269,7 +269,7 @@ long x, lNextBuffer = 0;
|
|||
used. */
|
||||
for( x = 0; x < NUM_TX_FRAG; x++ )
|
||||
{
|
||||
TX_DESC_PACKET( x ) = NULL;
|
||||
TX_DESC_PACKET( x ) = ( unsigned long ) NULL;
|
||||
TX_DESC_CTRL( x ) = 0;
|
||||
TX_STAT_INFO( x ) = 0;
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ static void prvReturnBuffer( unsigned char *pucBuffer )
|
|||
{
|
||||
unsigned long ul;
|
||||
|
||||
/* Mark a buffer as free for use. */
|
||||
/* Return a buffer to the pool of free buffers. */
|
||||
for( ul = 0; ul < ETH_NUM_BUFFERS; ul++ )
|
||||
{
|
||||
if( ETH_BUF( ul ) == ( unsigned long ) pucBuffer )
|
||||
|
@ -470,7 +470,7 @@ unsigned long ulAttempts = 0UL;
|
|||
|
||||
/* Check to see if the Tx descriptor is free, indicated by its buffer being
|
||||
NULL. */
|
||||
while( TX_DESC_PACKET( emacTX_DESC_INDEX ) != NULL )
|
||||
while( TX_DESC_PACKET( emacTX_DESC_INDEX ) != ( unsigned long ) NULL )
|
||||
{
|
||||
/* Wait for the Tx descriptor to become available. */
|
||||
vTaskDelay( emacBUFFER_WAIT_DELAY );
|
||||
|
@ -594,7 +594,7 @@ long lHigherPriorityTaskWoken = pdFALSE;
|
|||
{
|
||||
/* The Tx buffer is no longer required. */
|
||||
prvReturnBuffer( ( unsigned char * ) TX_DESC_PACKET( emacTX_DESC_INDEX ) );
|
||||
TX_DESC_PACKET( emacTX_DESC_INDEX ) = NULL;
|
||||
TX_DESC_PACKET( emacTX_DESC_INDEX ) = ( unsigned long ) NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -208,14 +208,15 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr))
|
|||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
extern void vTaskList( signed char *pcWriteBuffer );
|
||||
static char cCountBuf[ 32 ];
|
||||
extern char *pcGetTaskStatusMessage( void );
|
||||
static char cCountBuf[ 128 ];
|
||||
long lRefreshCount = 0;
|
||||
static unsigned short
|
||||
generate_rtos_stats(void *arg)
|
||||
{
|
||||
( void ) arg;
|
||||
lRefreshCount++;
|
||||
sprintf( cCountBuf, "<p><br>Refresh count = %d", (int)lRefreshCount );
|
||||
sprintf( cCountBuf, "<p><br>Refresh count = %d<p><br>%s", (int)lRefreshCount, pcGetTaskStatusMessage() );
|
||||
vTaskList( uip_appdata );
|
||||
strcat( uip_appdata, cCountBuf );
|
||||
|
||||
|
@ -239,11 +240,12 @@ unsigned long ulString;
|
|||
|
||||
static unsigned short generate_io_state( void *arg )
|
||||
{
|
||||
extern long lParTestGetLEDState( unsigned long ulLED );
|
||||
extern long lParTestGetLEDState( void );
|
||||
|
||||
( void ) arg;
|
||||
|
||||
if( lParTestGetLEDState( 1 << 7 ) == 0 )
|
||||
/* Get the state of the LEDs that are on the FIO1 port. */
|
||||
if( lParTestGetLEDState() )
|
||||
{
|
||||
pcStatus = "";
|
||||
}
|
||||
|
@ -253,10 +255,7 @@ extern long lParTestGetLEDState( unsigned long ulLED );
|
|||
}
|
||||
|
||||
sprintf( uip_appdata,
|
||||
"<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED 7"\
|
||||
"<p>"\
|
||||
"<input type=\"text\" name=\"LCD\" value=\"Enter LCD text\" size=\"16\">",
|
||||
pcStatus );
|
||||
"<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p>", pcStatus );
|
||||
|
||||
return strlen( uip_appdata );
|
||||
}
|
||||
|
|
|
@ -69,12 +69,10 @@
|
|||
#include "EthDev.h"
|
||||
#include "ParTest.h"
|
||||
|
||||
#include "LPC17xx.h"
|
||||
#include "core_cm3.h"
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* How long to wait before attempting to connect the MAC again. */
|
||||
#define uipINIT_WAIT 100
|
||||
#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )
|
||||
|
||||
/* Shortcut to the header within the Rx buffer. */
|
||||
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])
|
||||
|
@ -145,9 +143,12 @@ extern void ( vEMAC_ISR_Wrapper )( void );
|
|||
portENTER_CRITICAL();
|
||||
{
|
||||
EMAC->IntEnable = ( INT_RX_DONE | INT_TX_DONE );
|
||||
/* set the interrupt priority */
|
||||
|
||||
/* Set the interrupt priority to the max permissible to cause some
|
||||
interrupt nesting. */
|
||||
NVIC_SetPriority( ENET_IRQn, configMAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||
/* enable the interrupt */
|
||||
|
||||
/* Enable the interrupt. */
|
||||
NVIC_EnableIRQ( ENET_IRQn );
|
||||
prvSetMACAddress();
|
||||
}
|
||||
|
@ -245,52 +246,23 @@ struct uip_eth_addr xAddr;
|
|||
|
||||
void vApplicationProcessFormInput( portCHAR *pcInputString )
|
||||
{
|
||||
char *c, *pcText;
|
||||
static portCHAR cMessageForDisplay[ 32 ];
|
||||
extern xQueueHandle xLCDQueue;
|
||||
xLCDMessage xLCDMessage;
|
||||
char *c;
|
||||
extern void vParTestSetLEDState( long lState );
|
||||
|
||||
/* Process the form input sent by the IO page of the served HTML. */
|
||||
|
||||
c = strstr( pcInputString, "?" );
|
||||
if( c )
|
||||
{
|
||||
/* Turn LED's on or off in accordance with the check box status. */
|
||||
/* Turn the FIO1 LED's on or off in accordance with the check box status. */
|
||||
if( strstr( c, "LED0=1" ) != NULL )
|
||||
{
|
||||
/* Set LED7. */
|
||||
vParTestSetLED( 1 << 7, 1 );
|
||||
vParTestSetLEDState( pdTRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Clear LED7. */
|
||||
vParTestSetLED( 1 << 7, 0 );
|
||||
vParTestSetLEDState( pdFALSE );
|
||||
}
|
||||
|
||||
/* Find the start of the text to be displayed on the LCD. */
|
||||
pcText = strstr( c, "LCD=" );
|
||||
pcText += strlen( "LCD=" );
|
||||
|
||||
/* Terminate the file name for further processing within uIP. */
|
||||
*c = 0x00;
|
||||
|
||||
/* Terminate the LCD string. */
|
||||
c = strstr( pcText, " " );
|
||||
if( c != NULL )
|
||||
{
|
||||
*c = 0x00;
|
||||
}
|
||||
|
||||
/* Add required spaces. */
|
||||
while( ( c = strstr( pcText, "+" ) ) != NULL )
|
||||
{
|
||||
*c = ' ';
|
||||
}
|
||||
|
||||
/* Write the message to the LCD. */
|
||||
strcpy( cMessageForDisplay, pcText );
|
||||
xLCDMessage.pcMessage = cMessageForDisplay;
|
||||
xQueueSend( xLCDQueue, &xLCDMessage, portMAX_DELAY );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue