]> git.sur5r.net Git - freertos/blobdiff - Demo/CORTEX_A2F200_IAR_and_Keil/WebServer/httpd-cgi.c
Tidy up the IAR SmartFusion demo reading for release.
[freertos] / Demo / CORTEX_A2F200_IAR_and_Keil / WebServer / httpd-cgi.c
index 38ea41fa24c3b7e11eea5e584de7b8188628b15f..ab3facf0aaaf144a0e55b1ab87797584e78a7a0e 100644 (file)
@@ -49,6 +49,7 @@
 #include "apps/httpd/httpd.h"\r
 #include "apps/httpd/httpd-cgi.h"\r
 #include "apps/httpd/httpd-fs.h"\r
+#include "mss_ace.h"\r
 \r
 #include <stdio.h>\r
 #include <string.h>\r
@@ -210,6 +211,8 @@ static unsigned short generate_io_state( void *arg )
 {\r
        extern long lParTestGetLEDState( unsigned long ulLED );\r
        ( void ) arg;\r
+       unsigned short usRawVoltage;\r
+       const ace_channel_handle_t xVoltageChannel = ( ace_channel_handle_t ) 0;\r
 \r
        /* Are the dynamically setable LEDs currently on or off? */\r
        if( lParTestGetLEDState( 3 ) )\r
@@ -221,7 +224,8 @@ static unsigned short generate_io_state( void *arg )
                pcStatus = "";\r
        }\r
 \r
-       sprintf( uip_appdata, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p>", pcStatus );\r
+       usRawVoltage = ( unsigned short ) ACE_get_ppe_sample( xVoltageChannel );        \r
+       sprintf( uip_appdata, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p><p>Raw voltage input is %d", pcStatus, usRawVoltage );\r
 \r
        return strlen( uip_appdata );\r
 }\r