diff options
Diffstat (limited to 'keyboards/amjpad/amjpad.h')
-rw-r--r-- | keyboards/amjpad/amjpad.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/keyboards/amjpad/amjpad.h b/keyboards/amjpad/amjpad.h new file mode 100644 index 000000000..976a7ab04 --- /dev/null +++ b/keyboards/amjpad/amjpad.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | // readability | ||
6 | #define XXX KC_NO | ||
7 | |||
8 | /* AMJPAD matrix layout | ||
9 | * ,-------------------. | ||
10 | * | 00 | 01 | 02 | 03 | | ||
11 | * |----|----|----|----| | ||
12 | * | 10 | 11 | 12 | 13 | | ||
13 | * |----|----|----|----| | ||
14 | * | 20 | 21 | 22 | | | ||
15 | * |----|----|----| 23 | | ||
16 | * | 30 | 31 | 32 | | | ||
17 | * |----|----|----|----| | ||
18 | * | 40 | 41 | 42 | | | ||
19 | * |----|----|----| 43 | | ||
20 | * | 50 | 52 | | | ||
21 | * `-------------------' | ||
22 | */ | ||
23 | // The first section contains all of the arguments | ||
24 | // The second converts the arguments into a two-dimensional array | ||
25 | #define LAYOUT_numpad_6x4( \ | ||
26 | k00, k01, k02, k03, \ | ||
27 | k10, k11, k12, k13, \ | ||
28 | k20, k21, k22, \ | ||
29 | k30, k31, k32, k23, \ | ||
30 | k40, k41, k42, \ | ||
31 | k50, k52, k43 \ | ||
32 | ) { \ | ||
33 | { k00, k01, k02, k03 }, \ | ||
34 | { k10, k11, k12, k13 }, \ | ||
35 | { k20, k21, k22, k23 }, \ | ||
36 | { k30, k31, k32, XXX }, \ | ||
37 | { k40, k41, k42, k43 }, \ | ||
38 | { k50, XXX, k52, XXX } \ | ||
39 | } | ||
40 | |||
41 | #define LAYOUT_ortho_6x4( \ | ||
42 | k00, k01, k02, k03, \ | ||
43 | k10, k11, k12, k13, \ | ||
44 | k20, k21, k22, k23, \ | ||
45 | k30, k31, k32, k33, \ | ||
46 | k40, k41, k42, k43, \ | ||
47 | k50, k51, k52, k53 \ | ||
48 | ) { \ | ||
49 | { k00, k01, k02, k03 }, \ | ||
50 | { k10, k11, k12, k13 }, \ | ||
51 | { k20, k21, k22, k23 }, \ | ||
52 | { k30, k31, k32, k33 }, \ | ||
53 | { k40, k41, k42, k43 }, \ | ||
54 | { k50, k51, k52, k53 } \ | ||
55 | } | ||
56 | |||
57 | void matrix_init_user(void); | ||
58 | void matrix_scan_user(void); | ||