annotate venus/src/periph/keypad.v @ 62:a1b55af7f04d

clamping diode pair for the buzzer driving circuit
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 01 Dec 2021 19:26:29 +0000
parents 9de8e7a43160
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This Verilog module encapsulates the keypad of FC Venus.
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * As currently implemented, KBC/KBR crosspoint choices correspond
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * to TI's D-Sample, but they can be freely changed by the PCB layout
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * engineer by editing this Verilog module and regenerating the netlist.
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 module keypad (GND, KBC, KBR, PWON);
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 input GND;
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 input [4:0] KBC;
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 output [4:0] KBR;
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 output PWON;
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 keyswitch_wrap S401 (KBC[3], KBR[0]); /* left soft key */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 keyswitch_wrap S402 (KBC[4], KBR[2]); /* navigation up */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 keyswitch_wrap S403 (KBC[3], KBR[2]); /* right soft key */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 keyswitch_wrap S404 (KBC[4], KBR[0]); /* navigation left */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 keyswitch_wrap S405 (KBC[4], KBR[4]); /* navigation center */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 keyswitch_wrap S406 (KBC[4], KBR[1]); /* navigation right */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 keyswitch_wrap S407 (KBC[0], KBR[0]); /* green CALL or SEND button */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 keyswitch_wrap S408 (KBC[4], KBR[3]); /* navigation down */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 keyswitch_wrap S410 (KBC[0], KBR[1]); /* 1 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 keyswitch_wrap S411 (KBC[1], KBR[1]); /* 2 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 keyswitch_wrap S412 (KBC[2], KBR[1]); /* 3 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 keyswitch_wrap S413 (KBC[0], KBR[2]); /* 4 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 keyswitch_wrap S414 (KBC[1], KBR[2]); /* 5 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 keyswitch_wrap S415 (KBC[2], KBR[2]); /* 6 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 keyswitch_wrap S416 (KBC[0], KBR[3]); /* 7 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 keyswitch_wrap S417 (KBC[1], KBR[3]); /* 8 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 keyswitch_wrap S418 (KBC[2], KBR[3]); /* 9 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 keyswitch_wrap S419 (KBC[0], KBR[4]); /* * */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 keyswitch_wrap S420 (KBC[1], KBR[4]); /* 0 */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 keyswitch_wrap S421 (KBC[2], KBR[4]); /* # */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 keyswitch_wrap S422 (KBC[2], KBR[0]); /* volume up */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 keyswitch_wrap S423 (KBC[1], KBR[0]); /* volume down */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 keyswitch_wrap S424 (KBC[3], KBR[1]); /* right side button */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 /* The button in the "red" position is special: it is PWON */
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 keyswitch_wrap S409 (PWON, GND);
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
9de8e7a43160 keypad initial implementation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 endmodule;