static unsigned short generate_io_state( void *arg ) { for( ulString = 0; ulString < 3; ulString++ ) { if( uxParTextGetLED( ulString + 5 ) ) { pcStatus[ ulString ] = "checked"; } else { pcStatus[ ulString ] = ""; } } sprintf( uip_appdata, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED 2.5,"\ "<input type=\"checkbox\" name=\"LED1\" value=\"1\" %s>LED 2.6,"\ "<input type=\"checkbox\" name=\"LED2\" value=\"1\" %s>LED 2.7"\ "<p>"\ "<input type=\"text\" name=\"LCD\" value=\"Enter LCD text\" size=\"16\">", pcStatus[ 0 ], pcStatus[ 1 ], pcStatus[ 2 ] ); return strlen( uip_appdata ); }
static unsigned short generate_io_state( void *arg ) { extern long uxParTextGetLED( unsigned long ulLED ); const unsigned long ulLEDNo = 3; ( void ) arg; if( uxParTextGetLED( ulLEDNo ) == 0 ) { pcStatus = ""; } else { pcStatus = "checked"; } sprintf( uip_appdata, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p>", pcStatus ); return strlen( uip_appdata ); }