FreeCalypso > hg > freecalypso-schem2
comparison venus/src/periph/keypad.v @ 51:9de8e7a43160
keypad initial implementation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 27 Nov 2021 07:03:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
50:3dbe73bbc0a4 | 51:9de8e7a43160 |
---|---|
1 /* | |
2 * This Verilog module encapsulates the keypad of FC Venus. | |
3 * | |
4 * As currently implemented, KBC/KBR crosspoint choices correspond | |
5 * to TI's D-Sample, but they can be freely changed by the PCB layout | |
6 * engineer by editing this Verilog module and regenerating the netlist. | |
7 */ | |
8 | |
9 module keypad (GND, KBC, KBR, PWON); | |
10 | |
11 input GND; | |
12 input [4:0] KBC; | |
13 output [4:0] KBR; | |
14 output PWON; | |
15 | |
16 keyswitch_wrap S401 (KBC[3], KBR[0]); /* left soft key */ | |
17 keyswitch_wrap S402 (KBC[4], KBR[2]); /* navigation up */ | |
18 keyswitch_wrap S403 (KBC[3], KBR[2]); /* right soft key */ | |
19 keyswitch_wrap S404 (KBC[4], KBR[0]); /* navigation left */ | |
20 keyswitch_wrap S405 (KBC[4], KBR[4]); /* navigation center */ | |
21 keyswitch_wrap S406 (KBC[4], KBR[1]); /* navigation right */ | |
22 keyswitch_wrap S407 (KBC[0], KBR[0]); /* green CALL or SEND button */ | |
23 keyswitch_wrap S408 (KBC[4], KBR[3]); /* navigation down */ | |
24 keyswitch_wrap S410 (KBC[0], KBR[1]); /* 1 */ | |
25 keyswitch_wrap S411 (KBC[1], KBR[1]); /* 2 */ | |
26 keyswitch_wrap S412 (KBC[2], KBR[1]); /* 3 */ | |
27 keyswitch_wrap S413 (KBC[0], KBR[2]); /* 4 */ | |
28 keyswitch_wrap S414 (KBC[1], KBR[2]); /* 5 */ | |
29 keyswitch_wrap S415 (KBC[2], KBR[2]); /* 6 */ | |
30 keyswitch_wrap S416 (KBC[0], KBR[3]); /* 7 */ | |
31 keyswitch_wrap S417 (KBC[1], KBR[3]); /* 8 */ | |
32 keyswitch_wrap S418 (KBC[2], KBR[3]); /* 9 */ | |
33 keyswitch_wrap S419 (KBC[0], KBR[4]); /* * */ | |
34 keyswitch_wrap S420 (KBC[1], KBR[4]); /* 0 */ | |
35 keyswitch_wrap S421 (KBC[2], KBR[4]); /* # */ | |
36 keyswitch_wrap S422 (KBC[2], KBR[0]); /* volume up */ | |
37 keyswitch_wrap S423 (KBC[1], KBR[0]); /* volume down */ | |
38 keyswitch_wrap S424 (KBC[3], KBR[1]); /* right side button */ | |
39 | |
40 /* The button in the "red" position is special: it is PWON */ | |
41 keyswitch_wrap S409 (PWON, GND); | |
42 | |
43 endmodule; |