Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume-Savaton-ESEO committed Aug 27, 2020
1 parent 0979698 commit 6af8b36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
17 changes: 11 additions & 6 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,19 +463,24 @@ <h3 id="gpio">General-purpose input/output</h3>

<ul>
<li>Push-buttons.</li>
<li>Switches.</li>
<li>Toggle switches.</li>
<li>LEDs.</li>
</ul>

<p>The inputs are arranged in an 8&times;4 grid at the bottom of the
<em>General-purpose I/O</em> section of the simulator.
Right-click on a cell to change its type.
Left-click to change the state of a button or switch.</p>

<p>It has the following 32-bit registers:</p>

<table>
<tr><th>Address (hex)</th> <th>Role</th> <th>Value</th></tr>
<tr><td style="text-align:center;"><code>D0000000</code></td> <td>Direction</td> <td>The configuration of each pin (0 for an output, 1 for an input).</td></tr>
<tr><td style="text-align:center;"><code>D0000004</code></td> <td>Interrupt enable</td> <td>Enable interrupts on input events.</td></tr>
<tr><td style="text-align:center;"><code>D0000008</code></td> <td>Rising-edge events</td> <td>Each bit is set to 1 if the corresponding input pin has changed from 0 to 1.</td></tr>
<tr><td style="text-align:center;"><code>D000000C</code></td> <td>Falling-edge events</td> <td>Each bit is set to 1 if the corresponding input pin has changed from 1 to 0.</td></tr>
<tr><td style="text-align:center;"><code>D0000010</code></td> <td>Data</td> <td>The current value of each input or output.</td></tr>
<tr><td style="text-align:center;"><code>D0000000</code></td> <td>Direction (dir)</td> <td>The configuration of each pin (0 for an output, 1 for an input).</td></tr>
<tr><td style="text-align:center;"><code>D0000004</code></td> <td>Interrupt enable (ien)</td> <td>Enable interrupts on input events.</td></tr>
<tr><td style="text-align:center;"><code>D0000008</code></td> <td>Rising-edge events (rev)</td> <td>Each bit is set to 1 if the corresponding input pin has changed from 0 to 1.</td></tr>
<tr><td style="text-align:center;"><code>D000000C</code></td> <td>Falling-edge events (fev)</td> <td>Each bit is set to 1 if the corresponding input pin has changed from 1 to 0.</td></tr>
<tr><td style="text-align:center;"><code>D0000010</code></td> <td>Value (val)</td> <td>The current value of each input or output.</td></tr>
</table>

<p>On reset, all pins are configured as outputs and interrupts are disabled.</p>
Expand Down
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,28 +195,28 @@ <h1>General-purpose I/O</h1>
<td class="reg" id="memd0000003"></td>
</tr>
<tr>
<th>d0000004 (int)</th>
<th>d0000004 (ien)</th>
<td class="reg" id="memd0000004"></td>
<td class="reg" id="memd0000005"></td>
<td class="reg" id="memd0000006"></td>
<td class="reg" id="memd0000007"></td>
</tr>
<tr>
<th>d0000008 (re)</th>
<th>d0000008 (rev)</th>
<td class="reg" id="memd0000008"></td>
<td class="reg" id="memd0000009"></td>
<td class="reg" id="memd000000a"></td>
<td class="reg" id="memd000000b"></td>
</tr>
<tr>
<th>d000000c (fe)</th>
<th>d000000c (fev)</th>
<td class="reg" id="memd000000c"></td>
<td class="reg" id="memd000000d"></td>
<td class="reg" id="memd000000e"></td>
<td class="reg" id="memd000000f"></td>
</tr>
<tr>
<th>d0000010 (data)</th>
<th>d0000010 (val)</th>
<td class="reg" id="memd0000010"></td>
<td class="reg" id="memd0000011"></td>
<td class="reg" id="memd0000012"></td>
Expand Down

0 comments on commit 6af8b36

Please sign in to comment.