Manages the 1-wire bus

Dependents:   oldheating heating

Committer:
andrewboyson
Date:
Mon Apr 29 14:46:28 2019 +0000
Revision:
3:3204c80a9894
Parent:
2:79cad6a51fd0
Child:
4:822208cb5a13
Updated web library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 2:79cad6a51fd0 1 #include <stdio.h>
andrewboyson 2:79cad6a51fd0 2
andrewboyson 2:79cad6a51fd0 3 #include "http.h"
andrewboyson 3:3204c80a9894 4 #include "web-page-derived.h"
andrewboyson 3:3204c80a9894 5 #include "web-add.h"
andrewboyson 2:79cad6a51fd0 6
andrewboyson 2:79cad6a51fd0 7 void WebOneWireHtml()
andrewboyson 2:79cad6a51fd0 8 {
andrewboyson 2:79cad6a51fd0 9 HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 3:3204c80a9894 10 WebAddHeader("1-Wire", "settings.css", "1wire.js");
andrewboyson 3:3204c80a9894 11 WebAddNav(ONE_WIRE_PAGE);
andrewboyson 3:3204c80a9894 12 WebAddH1("1-Wire");
andrewboyson 2:79cad6a51fd0 13
andrewboyson 3:3204c80a9894 14 WebAddH2("1-wire bus timings");
andrewboyson 3:3204c80a9894 15 WebAddAjaxLabelled ("Scan time ms", "ajax-1-wire-scan-time" );
andrewboyson 3:3204c80a9894 16 WebAddAjaxLabelled ("Low start tweak", "ajax-1-wire-tweak-low" );
andrewboyson 3:3204c80a9894 17 WebAddAjaxLabelled ("Float start tweak", "ajax-1-wire-tweak-float" );
andrewboyson 3:3204c80a9894 18 WebAddAjaxLabelled ("Read start tweak", "ajax-1-wire-tweak-read" );
andrewboyson 3:3204c80a9894 19 WebAddAjaxLabelled ("High start tweak", "ajax-1-wire-tweak-high" );
andrewboyson 3:3204c80a9894 20 WebAddAjaxLabelled ("Release start tweak", "ajax-1-wire-tweak-release");
andrewboyson 3:3204c80a9894 21 WebAddAjaxInputToggle("One wire trace", "ajax-1-wire-trace" , "onewiretrace");
andrewboyson 2:79cad6a51fd0 22
andrewboyson 3:3204c80a9894 23 WebAddH2("DS18B20 1-wire devices");
andrewboyson 2:79cad6a51fd0 24 HttpAddText("<code id='ajax-device-values'></code>\r\n");
andrewboyson 2:79cad6a51fd0 25
andrewboyson 3:3204c80a9894 26 WebAddH2("ROMs");
andrewboyson 3:3204c80a9894 27 WebAddAjaxInputLabelId("ajax-name-0", 11, "ajax-rom-0", "rom0");
andrewboyson 3:3204c80a9894 28 WebAddAjaxInputLabelId("ajax-name-1", 11, "ajax-rom-1", "rom1");
andrewboyson 3:3204c80a9894 29 WebAddAjaxInputLabelId("ajax-name-2", 11, "ajax-rom-2", "rom2");
andrewboyson 3:3204c80a9894 30 WebAddAjaxInputLabelId("ajax-name-3", 11, "ajax-rom-3", "rom3");
andrewboyson 2:79cad6a51fd0 31
andrewboyson 3:3204c80a9894 32 WebAddEnd();
andrewboyson 2:79cad6a51fd0 33 }