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

pull/1/head
Richard Barry 14 years ago
parent 7b9a3e0707
commit 6046eea342

@ -185,62 +185,62 @@ long lReturn = pdFALSE;
{
switch( ulLED )
{
case 0 : if( LED4 != 0 )
case 0 : if( LED4 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 1 : if( LED5 != 0 )
case 1 : if( LED5 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 2 : if( LED6 != 0 )
case 2 : if( LED6 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 3 : if( LED7 != 0 )
case 3 : if( LED7 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 4 : if( LED8 != 0 )
case 4 : if( LED8 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 5 : if( LED9 != 0 )
case 5 : if( LED9 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 6 : if( LED10 != 0 )
case 6 : if( LED10 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 7 : if( LED11 != 0 )
case 7 : if( LED11 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 8 : if( LED12 != 0 )
case 8 : if( LED12 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 9 : if( LED13 != 0 )
case 9 : if( LED13 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 10 : if( LED14 != 0 )
case 10 : if( LED14 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 11 : if( LED15 != 0 )
case 11 : if( LED15 != LED_OFF )
{
lReturn = pdTRUE;
}

@ -40,8 +40,14 @@ Macro definitions
#define CMT0_CLK_SELECT (512)
/* General Values */
#define LED_ON (1)
#define LED_OFF (0)
#ifdef LED_POSITIVE_LOGIC
#define LED_ON (1)
#define LED_OFF (0)
#else
/* LEDs are using NEGATIVE LOGIC... */
#define LED_ON (0)
#define LED_OFF (1)
#endif
#define SET_BIT_HIGH (1)
#define SET_BIT_LOW (0)
#define SET_BYTE_HIGH (0xFF)

@ -243,28 +243,41 @@ 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 )
{
/* Turn LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
}
/* 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 the LED's on or off in accordance with the check box status. */
if( strstr( c, "LED0=1" ) != NULL )
{
/* Turn the LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
}
else
{
/* Turn the LEDs off. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
}
}
else
{
/* Turn LED 4 off. */
/* Commands to turn LEDs off are not always explicit. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
}
}
}
}

@ -185,62 +185,62 @@ long lReturn = pdFALSE;
{
switch( ulLED )
{
case 0 : if( LED4 != 0 )
case 0 : if( LED4 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 1 : if( LED5 != 0 )
case 1 : if( LED5 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 2 : if( LED6 != 0 )
case 2 : if( LED6 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 3 : if( LED7 != 0 )
case 3 : if( LED7 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 4 : if( LED8 != 0 )
case 4 : if( LED8 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 5 : if( LED9 != 0 )
case 5 : if( LED9 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 6 : if( LED10 != 0 )
case 6 : if( LED10 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 7 : if( LED11 != 0 )
case 7 : if( LED11 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 8 : if( LED12 != 0 )
case 8 : if( LED12 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 9 : if( LED13 != 0 )
case 9 : if( LED13 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 10 : if( LED14 != 0 )
case 10 : if( LED14 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 11 : if( LED15 != 0 )
case 11 : if( LED15 != LED_OFF )
{
lReturn = pdTRUE;
}

@ -40,8 +40,14 @@ Macro definitions
#define CMT0_CLK_SELECT (512)
/* General Values */
#define LED_ON (1)
#define LED_OFF (0)
#ifdef LED_POSITIVE_LOGIC
#define LED_ON (1)
#define LED_OFF (0)
#else
/* LEDs are using NEGATIVE LOGIC... */
#define LED_ON (0)
#define LED_OFF (1)
#endif
#define SET_BIT_HIGH (1)
#define SET_BIT_LOW (0)
#define SET_BYTE_HIGH (0xFF)

@ -243,28 +243,41 @@ 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 )
{
/* Turn LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
}
/* 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 the LED's on or off in accordance with the check box status. */
if( strstr( c, "LED0=1" ) != NULL )
{
/* Turn the LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
}
else
{
/* Turn the LEDs off. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
}
}
else
{
/* Turn LED 4 off. */
/* Commands to turn LEDs off are not always explicit. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
}
}
}
}

@ -185,62 +185,62 @@ long lReturn = pdFALSE;
{
switch( ulLED )
{
case 0 : if( LED4 != 0 )
case 0 : if( LED4 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 1 : if( LED5 != 0 )
case 1 : if( LED5 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 2 : if( LED6 != 0 )
case 2 : if( LED6 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 3 : if( LED7 != 0 )
case 3 : if( LED7 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 4 : if( LED8 != 0 )
case 4 : if( LED8 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 5 : if( LED9 != 0 )
case 5 : if( LED9 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 6 : if( LED10 != 0 )
case 6 : if( LED10 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 7 : if( LED11 != 0 )
case 7 : if( LED11 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 8 : if( LED12 != 0 )
case 8 : if( LED12 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 9 : if( LED13 != 0 )
case 9 : if( LED13 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 10 : if( LED14 != 0 )
case 10 : if( LED14 != LED_OFF )
{
lReturn = pdTRUE;
}
break;
case 11 : if( LED15 != 0 )
case 11 : if( LED15 != LED_OFF )
{
lReturn = pdTRUE;
}

@ -40,8 +40,14 @@ Macro definitions
#define CMT0_CLK_SELECT (512)
/* General Values */
#define LED_ON (1)
#define LED_OFF (0)
#ifdef LED_POSITIVE_LOGIC
#define LED_ON (1)
#define LED_OFF (0)
#else
/* LEDs are using NEGATIVE LOGIC... */
#define LED_ON (0)
#define LED_OFF (1)
#endif
#define SET_BIT_HIGH (1)
#define SET_BIT_LOW (0)
#define SET_BYTE_HIGH (0xFF)

@ -243,28 +243,41 @@ 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 )
{
/* Turn LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
}
/* 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 the LED's on or off in accordance with the check box status. */
if( strstr( c, "LED0=1" ) != NULL )
{
/* Turn the LEDs on. */
vParTestSetLED( 7, 1 );
vParTestSetLED( 8, 1 );
vParTestSetLED( 9, 1 );
vParTestSetLED( 10, 1 );
}
else
{
/* Turn the LEDs off. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
}
}
else
{
/* Turn LED 4 off. */
/* Commands to turn LEDs off are not always explicit. */
vParTestSetLED( 7, 0 );
vParTestSetLED( 8, 0 );
vParTestSetLED( 9, 0 );
vParTestSetLED( 10, 0 );
}
}
}
}

@ -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 );
}
}
}
}

@ -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 );
}
}
}
}

@ -243,24 +243,36 @@ 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 );
}
}
}
}

Loading…
Cancel
Save