#include "EthDev.h"\r
#include "ParTest.h"\r
\r
-#include "LPC17xx.h"\r
-#include "core_cm3.h"\r
/*-----------------------------------------------------------*/\r
\r
/* How long to wait before attempting to connect the MAC again. */\r
-#define uipINIT_WAIT 100\r
+#define uipINIT_WAIT ( 100 / portTICK_RATE_MS )\r
\r
/* Shortcut to the header within the Rx buffer. */\r
#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
portENTER_CRITICAL();\r
{\r
EMAC->IntEnable = ( INT_RX_DONE | INT_TX_DONE );\r
- /* set the interrupt priority */\r
+\r
+ /* Set the interrupt priority to the max permissible to cause some\r
+ interrupt nesting. */\r
NVIC_SetPriority( ENET_IRQn, configMAX_SYSCALL_INTERRUPT_PRIORITY );\r
- /* enable the interrupt */\r
+\r
+ /* Enable the interrupt. */\r
NVIC_EnableIRQ( ENET_IRQn );\r
prvSetMACAddress();\r
}\r
\r
void vApplicationProcessFormInput( portCHAR *pcInputString )\r
{\r
-char *c, *pcText;\r
-static portCHAR cMessageForDisplay[ 32 ];\r
-extern xQueueHandle xLCDQueue;\r
-xLCDMessage xLCDMessage;\r
+char *c;\r
+extern void vParTestSetLEDState( long lState );\r
\r
/* Process the form input sent by the IO page of the served HTML. */\r
\r
c = strstr( pcInputString, "?" );\r
if( c )\r
{\r
- /* Turn LED's on or off in accordance with the check box status. */\r
+ /* Turn the FIO1 LED's on or off in accordance with the check box status. */\r
if( strstr( c, "LED0=1" ) != NULL )\r
{\r
- /* Set LED7. */\r
- vParTestSetLED( 1 << 7, 1 );\r
+ vParTestSetLEDState( pdTRUE );\r
}\r
else\r
{\r
- /* Clear LED7. */\r
- vParTestSetLED( 1 << 7, 0 );\r
+ vParTestSetLEDState( pdFALSE );\r
}\r
-\r
- /* Find the start of the text to be displayed on the LCD. */\r
- pcText = strstr( c, "LCD=" );\r
- pcText += strlen( "LCD=" );\r
-\r
- /* Terminate the file name for further processing within uIP. */\r
- *c = 0x00;\r
-\r
- /* Terminate the LCD string. */\r
- c = strstr( pcText, " " );\r
- if( c != NULL )\r
- {\r
- *c = 0x00;\r
- }\r
-\r
- /* Add required spaces. */\r
- while( ( c = strstr( pcText, "+" ) ) != NULL )\r
- {\r
- *c = ' ';\r
- }\r
-\r
- /* Write the message to the LCD. */\r
- strcpy( cMessageForDisplay, pcText );\r
- xLCDMessage.pcMessage = cMessageForDisplay;\r
- xQueueSend( xLCDQueue, &xLCDMessage, portMAX_DELAY );\r
}\r
}\r
\r