+
+/*
+ * Return the board uptime.
+ */
+static int cgi_uptime(struct netconn *client, const char *name, char *revc_buf, size_t revc_len)
+{
+ (void)revc_buf;
+ (void)revc_len;
+ (void)name;
+
+
+
+ uint32_t m = status.up_time / 60;
+ uint32_t h = m / 60;
+ uint32_t s = status.up_time - (m * 60) - (h * 3600);
+
+ sprintf((char *)tx_buf, "[\"%ldh %ldm %lds\"]", h, m, s);
+
+ http_sendOk(client);
+ netconn_write(client, tx_buf, strlen((char *)tx_buf), NETCONN_COPY);
+ return 0;
+}
+
+/*
+ * Return the VR1 potentiometer voltage.
+ */
+static int cgi_resistor(struct netconn *client, const char *name, char *revc_buf, size_t revc_len)
+{
+ (void)revc_buf;
+ (void)revc_len;
+ (void)name;
+
+ uint16_t volt = ADC_RANGECONV(adc_read(1), 0, 3300);
+ sprintf((char *)tx_buf, "[ \"%d.%dV\" ]", volt / 1000, volt % 1000);
+
+ http_sendOk(client);
+ netconn_write(client, tx_buf, strlen((char *)tx_buf), NETCONN_COPY);
+ return 0;
+}
+
+/*
+ * Reply to client the request string.
+ */
+static int cgi_led(struct netconn *client, const char *name, char *revc_buf, size_t revc_len)
+{
+ (void)name;
+
+ http_sendOk(client);
+ netconn_write(client, revc_buf, revc_len, NETCONN_COPY);
+ return 0;
+}
+
+/*
+ * Reply to client the request string.
+ */