Allow RX YRDK demos to work with Rev1 and Rev3 boards, and with any web browser.

This commit is contained in:
Richard Barry 2010-12-22 15:18:30 +00:00
parent 7b9a3e0707
commit 6046eea342
12 changed files with 219 additions and 128 deletions

View file

@ -243,24 +243,35 @@ void vApplicationProcessFormInput( char *pcInputString )
{
char *c;
/* Process the form input sent by the IO page of the served HTML. */
c = strstr( pcInputString, "?" );
if( c )
{
/* Turn the LED's on or off in accordance with the check box status. */
if( strstr( c, "LED0=1" ) != NULL )
/* Only interested in processing form input if this is the IO page. */
c = strstr( pcInputString, "io.shtml" );
if( c )
{
/* Is there a command in the string? */
c = strstr( pcInputString, "?" );
if( c )
{
/* Turn LEDs on. */
vParTestSetLED( 3, 1 );
vParTestSetLED( 4, 1 );
/* Turn the LED's on or off in accordance with the check box status. */
if( strstr( c, "LED0=1" ) != NULL )
{
/* Turn LEDs on. */
vParTestSetLED( 3, 1 );
vParTestSetLED( 4, 1 );
}
else
{
/* Turn LED 4 off. */
vParTestSetLED( 3, 0 );
vParTestSetLED( 4, 0 );
}
}
else
{
/* Turn LED 4 off. */
/* Commands to turn LEDs off are not always explicit, turn LED 4
off. */
vParTestSetLED( 3, 0 );
vParTestSetLED( 4, 0 );
}
}
}
}