Merge Rowan's html code + slightly update styles
[matches/MCTX3420.git] / testing / MCTXWeb / public_html / pintest.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3   <head>
4     <title>BeagleBone Black Pin Test</title>
5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6     <!--[if lte IE 8]>
7       <script language="javascript" type="text/javascript" src="static/excanvas.min.js"></script>
8     <![endif]-->
9     <script type="text/javascript" src="static/jquery-1.10.1.min.js"></script>
10     <script type="text/javascript" src="static/jquery.flot.min.js"></script>
11     <script type="text/javascript" src="static/base64.js"></script>
12     <script type="text/javascript" src="static/mctx.gui.js"></script>
13     <script type="text/javascript" src="static/mctx.pintest.js"></script>
14     
15     <link rel="stylesheet" type="text/css" href="static/style.css">
16     <link rel="stylesheet" type="text/css" href="static/nav-menu.css">
17     <script type="text/javascript">
18       $(document).ready(function () {
19         $("#errorlog").setErrorLog();
20         $("#gpio-menu").populateDropdown(mctx.pintest.gpios, "GPIO ");
21         $("#pwm-menu").populateDropdown(mctx.pintest.pwms, "PWM ");
22         
23         $("#gpio-go").click(function () {
24           if ($("#gpio-menu").val()) {
25             $("#gpio-container").exportGPIO($("#gpio-menu"));
26           }
27         });
28         $("#pwm-go").click(function () {
29           if ($("#pwm-menu").val()) {
30             $("#pwm-container").exportPWM($("#pwm-menu"));
31           }
32         });
33         $("#adc-controls").trigger("reset").setADCControl();
34       });
35     </script>
36   </head>
37   
38   <body>
39     <div id="header">
40       <div id="leftnav">
41         <a href="http://www.uwa.edu.au/" target="_blank">
42           <img alt = "The University of Western Australia"
43           src="static/uwacrest-text.png">
44         </a>
45         <span id="title">BBB pin test</span>
46       </div>
47       <div id="rightnav">
48         <div id="menu-container" class="nav-menu">
49         </div>
50         <span id="date">
51           <script type="text/javascript">getDate();</script>
52         </span>
53       </div>
54       <div class="clear"></div>
55     </div>
56     <!-- End header -->
57     
58     <div id="content">
59       <div id="sidebar">
60         <div class="widget">
61           <div class="title">Info</div>
62           <p>This test page gives control over the BBB's pins.
63           Select a pin that you wish to use from the relevant drop-down
64           menu and click 'Go'.</p>
65           <p>A new widget will appear with controls relevant to that pin.</p>
66           <p>Make sure to check the error log to see if something goes wrong.</p>
67         </div>
68         <div class="widget">
69           <div class="title">Pin out diagram</div>
70           <p>To see the pin out diagram of the BBB, click <a href="">here</a>.</p>
71         </div>
72         <div class="widget">
73           <div class="title">Unexport?</div>
74           <p>
75             To 'unexport' a pin means to disable it. Apart from the obvious
76             use case, sometimes this can be required if you use two PWM channels
77             that share the same frequency base.
78           </p>
79           <p>
80             You won't be able to change
81             the frequency until you unexport one of them.
82           </p>
83         </div>
84         <div class="widget">
85           <div class="title">PWM explained</div>
86           <p>
87             The BBB has up to 8 PWM channels, with 6 having enhanced 
88             resolution.
89           </p>
90           <p>
91             However, those 6 are paired, meaning that each pair must share the
92             same frequency (although the duty cycle can be different).
93           </p>
94         </div>
95       </div>
96       <!-- End sidebar -->
97
98       <div id="main">
99         <div class="widget">
100           <div class="title">Dashboard</div>
101           <table>
102             <tr>
103               <td>
104                 GPIO <select id="gpio-menu"></select>
105                 <input type="button" id="gpio-go" value="Go">
106               </td>
107               <td>
108                 PWM <select id="pwm-menu"></select>
109                 <input type="button" id="pwm-go" value="Go">
110               </td>
111             </tr>
112           </table>
113             
114           <div class="sub-title">Error log</div>
115           <textarea id="errorlog" wrap="off" rows="4" cols="30" readonly></textarea>
116         </div>
117
118         <div class="widget">
119           <div class="title">Analogue input (ADC)</div>
120           <form class="controls" action="#" id="adc-controls">
121             <table class="centre">
122               <tr>
123                 <td>AIN</td><th>0</th><th>1</th><th>2</th><th>3</th>
124                 <th>4</th><th>5</th><th>6</th><th>7</th>
125               </tr>
126               <tr>
127                 <td>Value</td>
128                 <td><input name="0" type="text" readonly></td>
129                 <td><input name="1" type="text" readonly></td>
130                 <td><input name="2" type="text" readonly></td>
131                 <td><input name="3" type="text" readonly></td>
132                 <td><input name="4" type="text" readonly></td>
133                 <td><input name="5" type="text" readonly></td>
134                 <td><input name="6" type="text" readonly></td>
135                 <td><input name="7" type="text" readonly></td>
136               </tr>
137               <tr>
138                 <td>Export</td>
139                 <td><input name="0" type="checkbox"></td>
140                 <td><input name="1" type="checkbox"></td>
141                 <td><input name="2" type="checkbox"></td>
142                 <td><input name="3" type="checkbox"></td>
143                 <td><input name="4" type="checkbox"></td>
144                 <td><input name="5" type="checkbox"></td>
145                 <td><input name="6" type="checkbox"></td>
146                 <td><input name="7" type="checkbox"></td>
147               </tr>
148             </table>
149           </form>
150         </div>
151         
152         <div class="widget" id="gpio-container">
153           <div class="title">GPIO controls</div>
154         </div>
155         
156         <div class="widget" id="pwm-container">
157           <div class="title">PWM controls</div>
158         </div>
159       </div>
160       <!-- End main content -->
161     </div>
162   </body>
163 </html>

UCC git Repository :: git.ucc.asn.au