4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 /* This a shortcut to help you visually see your layout.
24 * The first section contains all of the arguments representing the physical
25 * layout of the board and position of the keys.
27 * The second converts the arguments into a two-dimensional array which
28 * represents the switch matrix.
31 /* COSPAD ortho matrix layout
32 * ,-------------------.
33 * | 00 | 01 | 02 | 03 |
34 * |----|----|----|----|
35 * | 10 | 11 | 12 | 13 |
36 * |----|----|----|----|
37 * | 20 | 21 | 22 | 23 |
38 * |----|----|----|----|
39 * | 30 | 31 | 32 | 33 |
40 * |----|----|----|----|
41 * | 40 | 41 | 42 | 43 |
42 * |----|----|----|----|
43 * | 50 | 51 | 52 | 53 |
44 * `-------------------'
46 #define LAYOUT_ortho_6x4( \
55 {k00, k01, k02, k03}, \
56 {k10, k11, k12, k13}, \
57 {k20, k21, k22, k23}, \
58 {k30, k31, k32, k33}, \
59 {k40, k41, k42, k43}, \
60 {k50, k51, k52, k53} \
63 /* COSPAD gamepad matrix layout
64 * ,-------------------.
65 * | 00 | 01 | 02 | 03 |
66 * |----|----|----|----|
67 * | 10 | 11 | 12 | 13 |
68 * |----|----|----|----|
70 * |----|----|----| 23 |
72 * |----|----|----|----|
73 * | 40 | 41 | 42 | 43 |
74 * |----|----|----|----|
75 * | 50 | 51 | 52 | 53 |
76 * `-------------------'
78 #define LAYOUT_gamepad_6x4( \
87 {k00, k01, k02, k03}, \
88 {k10, k11, k12, k13}, \
89 {k20, k21, k22, k23}, \
90 {k30, k31, k32, ___}, \
91 {k40, k41, k42, k43}, \
92 {k50, k51, k52, k53} \
95 /* COSPAD numpad matrix layout
96 * ,-------------------.
97 * | 00 | 01 | 02 | 03 |
98 * |----|----|----|----|
99 * | 10 | 11 | 12 | 13 |
100 * |----|----|----|----|
102 * |----|----|----| 23 |
104 * |----|----|----|----|
106 * |----|----|----| 43 |
108 * `-------------------'
110 #define LAYOUT_numpad_6x4( \
111 k00, k01, k02, k03, \
112 k10, k11, k12, k13, \
114 k30, k31, k32, k23, \
119 {k00, k01, k02, k03}, \
120 {k10, k11, k12, k13}, \
121 {k20, k21, k22, k23}, \
122 {k30, k31, k32, ___}, \
123 {k40, k41, k42, k43}, \
124 {k50, ___, k52, ___} \
127 // Add backwards compatibility for existing keymaps
128 #define cospad_bl_led_on backlight_enable
129 #define cospad_bl_led_off backlight_disable
130 #define cospad_bl_led_togg backlight_toggle