#define partstFIO2_BITS ( ( unsigned long ) 0x0000007C )\r
#define partstFIO1_BITS ( ( unsigned long ) 0xB0000000 )\r
#define partstNUM_LEDS ( 5 )\r
-#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xff )\r
+#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xff )\r
\r
/*-----------------------------------------------------------\r
* Simple parallel port IO routines.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
+void vParTestSetLED( unsigned long ulLEDIn, signed long xValue )\r
{\r
-unsigned portLONG ulLED = partstFIRST_IO;\r
+unsigned long ulLED = partstFIRST_IO;\r
\r
- if( uxLED < partstNUM_LEDS )\r
+ /* Used to set and clear LEDs on FIO2. */\r
+\r
+ if( ulLEDIn < partstNUM_LEDS )\r
{\r
/* Rotate to the wanted bit of port */\r
- ulLED <<= ( unsigned portLONG ) uxLED;\r
+ ulLED <<= ( unsigned long ) ulLEDIn;\r
\r
/* Set of clear the output. */\r
if( xValue )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
+void vParTestToggleLED( unsigned long ulLEDIn )\r
{\r
-unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;\r
+unsigned long ulLED = partstFIRST_IO, ulCurrentState;\r
+\r
+ /* Used to toggle LEDs on FIO2. */\r
\r
- if( uxLED < partstNUM_LEDS )\r
+ if( ulLEDIn < partstNUM_LEDS )\r
{\r
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED\r
attached. */\r
- ulLED <<= ( unsigned portLONG ) uxLED;\r
+ ulLED <<= ( unsigned long ) ulLEDIn;\r
\r
/* If this bit is already set, clear it, and visa versa. */\r
ulCurrentState = GPIO2->FIOPIN;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-unsigned portBASE_TYPE uxParTextGetLED( unsigned portBASE_TYPE uxLED )\r
+long lParTestGetLEDState( void )\r
{\r
-unsigned portLONG ulLED = partstFIRST_IO;\r
-\r
- ulLED <<= ( unsigned portLONG ) uxLED;\r
-\r
- return ( GPIO2->FIOPIN & ulLED );\r
+ /* Returns the state of the LEDs on FIO1. */\r
+ if( ( GPIO1->FIOPIN & partstFIO1_BITS ) != 0 )\r
+ {\r
+ return pdFALSE;\r
+ }\r
+ else\r
+ {\r
+ return pdTRUE;\r
+ }\r
}\r
/*-----------------------------------------------------------*/\r
\r
-long lParTestGetLEDState( unsigned portBASE_TYPE uxLED )\r
+void vParTestSetLEDState( long lState )\r
{\r
- return 0;\r
+ /* Used to set and clear the LEDs on FIO1. */\r
+ if( lState != pdFALSE )\r
+ {\r
+ GPIO1->FIOSET = partstFIO1_BITS;\r
+ }\r
+ else\r
+ {\r
+ GPIO1->FIOCLR = partstFIO1_BITS;\r
+ }\r
}\r
/*-----------------------------------------------------------*/\r
\r
<session>
<Bookmarks/>
<Breakpoints>
- <BreakpointListItem line="184" action="" hardwareBreakpoint="" trigger="" useHWbreakpoint="false" group="Breakpoints" type="Breakpoint" state="2" counter="0" isFunctionBreakpoint="false" filename="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Host\usbhost_lpc17xx.c" expression="" />
- <BreakpointListItem line="46" action="" hardwareBreakpoint="" trigger="" useHWbreakpoint="false" group="Breakpoints" type="Breakpoint" state="2" counter="0" isFunctionBreakpoint="false" filename="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Main\usbhost_task.c" expression="" />
+ <BreakpointListItem line="184" action="" hardwareBreakpoint="" trigger="" useHWbreakpoint="false" group="Breakpoints" type="Breakpoint" state="4" counter="0" isFunctionBreakpoint="false" filename="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Host\usbhost_lpc17xx.c" expression="" />
+ <BreakpointListItem line="46" action="" hardwareBreakpoint="" trigger="" useHWbreakpoint="false" group="Breakpoints" type="Breakpoint" state="4" counter="0" isFunctionBreakpoint="false" filename="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Main\usbhost_task.c" expression="" />
</Breakpoints>
<ExecutionCountWindow/>
<Memory1>
<ProjectSessionItem path="RTOSDemo" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files" name="unnamed" />
- <ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;NXPUSBHostLite" name="unnamed" />
</Project>
<Register1>
<RegisterWindow openNodes="CPU;CPU/xPSR;CPU/CFBP;CPU/CFBP/CONTROL[0];CPU/CFBP/CONTROL[1]" binaryNodes="" unsignedNodes="" visibleGroups="CPU" decimalNodes="" octalNodes="" asciiNodes="" />
<Watches active="0" update="Never" />
</Watch4>
<Files>
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\main.c" y="96" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\main.c" left="0" selected="0" name="unnamed" top="82" />
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Main\usbhost_task.c" y="45" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Main\usbhost_task.c" left="0" selected="0" name="unnamed" top="21" />
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Host\usbhost_lpc17xx.c" y="332" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Host\usbhost_lpc17xx.c" left="0" selected="0" name="unnamed" top="172" />
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\FreeRTOSConfig.h" y="55" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\FreeRTOSConfig.h" left="0" selected="0" name="unnamed" top="40" />
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\webserver\emac.c" y="59" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\webserver\emac.c" left="0" selected="0" name="unnamed" top="44" />
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Fat\usbhost_fat.c" y="0" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Fat\usbhost_fat.c" left="0" selected="0" name="unnamed" top="0" />
+ <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="10" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\main.c" y="304" path="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\main.c" left="0" selected="1" name="unnamed" top="0" />
</Files>
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\CORTEX_LPC1768_GCC_Rowley\UsbHost\Uart" fileDialogDefaultFilter="*.*" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Flash Debug" />
</session>
/*\r
- FreeRTOS.org V5.3.1 - Copyright (C) 2003-2009 Richard Barry.\r
+ FreeRTOS.org V5.4.0 - Copyright (C) 2003-2009 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
* In addition to the standard demo tasks, the following tasks and tests are\r
* defined and/or created within this file:\r
*\r
- * "LCD" task - the LCD task is a 'gatekeeper' task. It is the only task that\r
- * is permitted to access the display directly. Other tasks wishing to write a\r
- * message to the LCD send the message on a queue to the LCD task instead of\r
- * accessing the LCD themselves. The LCD task just blocks on the queue waiting\r
- * for messages - waking and displaying the messages as they arrive. The use\r
- * of a gatekeeper in this manner permits both tasks and interrupts to write to\r
- * the LCD without worrying about mutual exclusion. This is demonstrated by the\r
- * check hook (see below) which sends messages to the display even though it\r
- * executes from an interrupt context.\r
- *\r
* "Check" hook - This only executes fully every five seconds from the tick\r
* hook. Its main function is to check that all the standard demo tasks are\r
- * still operational. Should any unexpected behaviour be discovered within a\r
- * demo task then the tick hook will write an error to the LCD (via the LCD task).\r
- * If all the demo tasks are executing with their expected behaviour then the\r
- * check hook writes PASS to the LCD (again via the LCD task), as described above.\r
- * The check hook also toggles LED 4 each time it executes.\r
- *\r
- * LED tasks - These just demonstrate how multiple instances of a single task\r
- * definition can be created. Each LED task simply toggles an LED. The task\r
- * parameter is used to pass the number of the LED to be toggled into the task.\r
+ * still operational. The status can be viewed using on the Task Stats page\r
+ * served by the WEB server.\r
*\r
* "uIP" task - This is the task that handles the uIP stack. All TCP/IP\r
* processing is performed in this task.\r
*/\r
\r
-/* Standard includes. */\r
-#include <stdio.h>\r
-\r
/* Scheduler includes. */\r
#include "FreeRTOS.h"\r
#include "task.h"\r
-#include "queue.h"\r
-#include "semphr.h"\r
\r
/* Demo app includes. */\r
#include "BlockQ.h"\r
\r
/*-----------------------------------------------------------*/\r
\r
-/* The number of LED tasks that will be created. */\r
-#define mainNUM_LED_TASKS ( 6 )\r
-\r
/* The time between cycles of the 'check' functionality (defined within the\r
-tick hook. */\r
+tick hook). */\r
#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
\r
/* Task priorities. */\r
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define mainUIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
-#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainFLASH_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
handling library calls. */\r
#define mainBASIC_WEB_STACK_SIZE ( configMINIMAL_STACK_SIZE * 4 )\r
\r
-/* The length of the queue used to send messages to the LCD task. */\r
-#define mainQUEUE_SIZE ( 3 )\r
+/* The message displayed by the WEB server when all tasks are executing\r
+without an error being reported. */\r
+#define mainPASS_STATUS_MESSAGE "All tasks are executing without error."\r
\r
-/* The task that is toggled by the check task. */\r
-#define mainCHECK_TASK_LED ( 4 )\r
/*-----------------------------------------------------------*/\r
\r
/*\r
*/\r
static void prvSetupHardware( void );\r
\r
-/*\r
- * Very simple task that toggles an LED.\r
- */\r
-static void vLEDTask( void *pvParameters );\r
-\r
/*\r
* The task that handles the uIP stack. All TCP/IP processing is performed in\r
* this task.\r
extern void vuIP_Task( void *pvParameters );\r
\r
/*\r
- * The LCD gatekeeper task as described in the comments at the top of this file.\r
- * */\r
-static void vLCDTask( void *pvParameters );\r
+ * Simply returns the current status message for display on served WEB pages.\r
+ */\r
+char *pcGetTaskStatusMessage( void );\r
\r
/*-----------------------------------------------------------*/\r
\r
-/* The queue used to send messages to the LCD task. */\r
-xQueueHandle xLCDQueue;\r
+/* Holds the status message displayed by the WEB server. */\r
+static char *pcStatusMessage = mainPASS_STATUS_MESSAGE;\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Create the uIP task. The WEB server runs in this task. */\r
xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL );\r
\r
- /* Create the queue used by the LCD task. Messages for display on the LCD\r
- are received via this queue. */\r
- xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );\r
-\r
- /* Start the LCD gatekeeper task - as described in the comments at the top\r
- of this file. */\r
- xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE * 2, NULL, mainLCD_TASK_PRIORITY, NULL );\r
-\r
/* Start the scheduler. */\r
vTaskStartScheduler();\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vLCDTask( void *pvParameters )\r
-{\r
-xLCDMessage xMessage;\r
-unsigned long ulRow = 0;\r
-char cIPAddr[ 17 ]; /* To fit max IP address length of xxx.xxx.xxx.xxx\0 */\r
-\r
- ( void ) pvParameters;\r
-\r
- /* The LCD gatekeeper task as described in the comments at the top of this\r
- file. */\r
-\r
- /* Initialise the LCD and display a startup message that includes the\r
- configured IP address. */\r
- sprintf( cIPAddr, "%d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );\r
-\r
- for( ;; )\r
- {\r
- /* Wait for a message to arrive to be displayed. */\r
- while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS );\r
-\r
- }\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
void vApplicationTickHook( void )\r
{\r
-static xLCDMessage xMessage = { "PASS" };\r
static unsigned portLONG ulTicksSinceLastDisplay = 0;\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Called from every tick interrupt as described in the comments at the top\r
of this file.\r
/* Has an error been found in any task? */\r
if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: GEN Q";\r
+ pcStatusMessage = "An error has been detected in the Generic Queue test/demo.";\r
}\r
else if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: PEEK Q";\r
+ pcStatusMessage = "An error has been detected in the Peek Queue test/demo.";\r
}\r
else if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: BLOCK Q";\r
+ pcStatusMessage = "An error has been detected in the Block Queue test/demo.";\r
}\r
else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: BLOCK TIME";\r
+ pcStatusMessage = "An error has been detected in the Block Time test/demo.";\r
}\r
else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: SEMAPHR";\r
+ pcStatusMessage = "An error has been detected in the Semaphore test/demo.";\r
}\r
else if( xArePollingQueuesStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: POLL Q";\r
+ pcStatusMessage = "An error has been detected in the Poll Queue test/demo.";\r
}\r
else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: INT MATH";\r
+ pcStatusMessage = "An error has been detected in the Int Math test/demo.";\r
}\r
else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
{\r
- xMessage.pcMessage = "ERROR: REC MUTEX";\r
+ pcStatusMessage = "An error has been detected in the Mutex test/demo.";\r
}\r
-\r
- /* Send the message to the OLED gatekeeper for display. The\r
- xHigherPriorityTaskWoken parameter is not actually used here\r
- as this function is running in the tick interrupt anyway - but\r
- it must still be supplied. */\r
- xHigherPriorityTaskWoken = pdFALSE;\r
- xQueueSendFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken );\r
-\r
- /* Also toggle and LED. This can be done from here because in this port\r
- the LED toggling functions don't use critical sections. */\r
- vParTestToggleLED( mainCHECK_TASK_LED );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
+char *pcGetTaskStatusMessage( void )\r
+{\r
+ /* Not bothered about a critical section here. */\r
+ return pcStatusMessage;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
void prvSetupHardware( void )\r
{\r
/* Disable peripherals power. */\r
collecting run time statistical information - basically the percentage\r
of CPU time that each task is utilising. It is called automatically when\r
the scheduler is started (assuming configGENERATE_RUN_TIME_STATS is set\r
- to 1. */\r
+ to 1). */\r
\r
/* Power up and feed the timer. */\r
SC->PCONP |= 0x02UL;\r
used. */\r
for( x = 0; x < NUM_TX_FRAG; x++ )\r
{\r
- TX_DESC_PACKET( x ) = NULL;\r
+ TX_DESC_PACKET( x ) = ( unsigned long ) NULL;\r
TX_DESC_CTRL( x ) = 0;\r
TX_STAT_INFO( x ) = 0;\r
}\r
{\r
unsigned long ul;\r
\r
- /* Mark a buffer as free for use. */\r
+ /* Return a buffer to the pool of free buffers. */\r
for( ul = 0; ul < ETH_NUM_BUFFERS; ul++ )\r
{\r
if( ETH_BUF( ul ) == ( unsigned long ) pucBuffer )\r
\r
/* Check to see if the Tx descriptor is free, indicated by its buffer being\r
NULL. */\r
- while( TX_DESC_PACKET( emacTX_DESC_INDEX ) != NULL )\r
+ while( TX_DESC_PACKET( emacTX_DESC_INDEX ) != ( unsigned long ) NULL )\r
{\r
/* Wait for the Tx descriptor to become available. */\r
vTaskDelay( emacBUFFER_WAIT_DELAY );\r
{\r
/* The Tx buffer is no longer required. */\r
prvReturnBuffer( ( unsigned char * ) TX_DESC_PACKET( emacTX_DESC_INDEX ) );\r
- TX_DESC_PACKET( emacTX_DESC_INDEX ) = NULL;\r
+ TX_DESC_PACKET( emacTX_DESC_INDEX ) = ( unsigned long ) NULL;\r
}\r
}\r
\r
/*---------------------------------------------------------------------------*/\r
\r
extern void vTaskList( signed char *pcWriteBuffer );\r
-static char cCountBuf[ 32 ];\r
+extern char *pcGetTaskStatusMessage( void );\r
+static char cCountBuf[ 128 ];\r
long lRefreshCount = 0;\r
static unsigned short\r
generate_rtos_stats(void *arg)\r
{\r
( void ) arg;\r
lRefreshCount++;\r
- sprintf( cCountBuf, "<p><br>Refresh count = %d", (int)lRefreshCount );\r
+ sprintf( cCountBuf, "<p><br>Refresh count = %d<p><br>%s", (int)lRefreshCount, pcGetTaskStatusMessage() );\r
vTaskList( uip_appdata );\r
strcat( uip_appdata, cCountBuf );\r
\r
\r
static unsigned short generate_io_state( void *arg )\r
{\r
-extern long lParTestGetLEDState( unsigned long ulLED );\r
+extern long lParTestGetLEDState( void );\r
\r
( void ) arg;\r
\r
- if( lParTestGetLEDState( 1 << 7 ) == 0 )\r
+ /* Get the state of the LEDs that are on the FIO1 port. */\r
+ if( lParTestGetLEDState() )\r
{\r
pcStatus = "";\r
}\r
}\r
\r
sprintf( uip_appdata,\r
- "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED 7"\\r
- "<p>"\\r
- "<input type=\"text\" name=\"LCD\" value=\"Enter LCD text\" size=\"16\">",\r
- pcStatus );\r
+ "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p>", pcStatus );\r
\r
return strlen( uip_appdata );\r
}\r
#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