diff options
author | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2020-07-27 20:44:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 11:44:05 -0700 |
commit | 5cbac94d08257a6149c5717d7f25efab7af9c0fa (patch) | |
tree | 53248fcae9cb29da470a56d67b7c926657289d9a | |
parent | e937fc451379d773184068fd07b9f0a2aaaa6784 (diff) | |
download | qmk_firmware-5cbac94d08257a6149c5717d7f25efab7af9c0fa.tar.gz qmk_firmware-5cbac94d08257a6149c5717d7f25efab7af9c0fa.zip |
[Keyboard] add support for the kinT kinesis keyboard controller (kint2pp variant) (#9687)
* branch keyboards/kinesis/kint2pp from keyboards/kinesis/stapelberg
Changes will be made in the next commit
* [Keyboard] update wiring for kinT (kint2pp variant)
* add QMK plumbing
* Apply zvecr’s suggestions from code review
* Update keyboards/kinesis/kint2pp/config.h
* Update keyboards/kinesis/kint2pp/config.h
* remove superfluous config.h include
-rw-r--r-- | keyboards/kinesis/config.h | 3 | ||||
-rw-r--r-- | keyboards/kinesis/kinesis.h | 3 | ||||
-rw-r--r-- | keyboards/kinesis/kint2pp/config.h | 33 | ||||
-rw-r--r-- | keyboards/kinesis/kint2pp/kint2pp.c | 26 | ||||
-rw-r--r-- | keyboards/kinesis/kint2pp/kint2pp.h | 99 | ||||
-rw-r--r-- | keyboards/kinesis/kint2pp/readme.md | 3 | ||||
-rw-r--r-- | keyboards/kinesis/kint2pp/rules.mk | 0 |
7 files changed, 167 insertions, 0 deletions
diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index 368037d8b..db5c458bb 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h | |||
@@ -136,5 +136,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
136 | #ifdef SUBPROJECT_stapelberg | 136 | #ifdef SUBPROJECT_stapelberg |
137 | #include "stapelberg/config.h" | 137 | #include "stapelberg/config.h" |
138 | #endif | 138 | #endif |
139 | #ifdef SUBPROJECT_kint2pp | ||
140 | #include "kint2pp/config.h" | ||
141 | #endif | ||
139 | 142 | ||
140 | #endif | 143 | #endif |
diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 94e913ebd..42df64bf3 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h | |||
@@ -7,6 +7,9 @@ | |||
7 | #ifdef KEYBOARD_kinesis_stapelberg | 7 | #ifdef KEYBOARD_kinesis_stapelberg |
8 | #include "stapelberg.h" | 8 | #include "stapelberg.h" |
9 | #endif | 9 | #endif |
10 | #ifdef KEYBOARD_kinesis_kint2pp | ||
11 | #include "kint2pp.h" | ||
12 | #endif | ||
10 | 13 | ||
11 | #include "quantum.h" | 14 | #include "quantum.h" |
12 | 15 | ||
diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h new file mode 100644 index 000000000..2acaf9be6 --- /dev/null +++ b/keyboards/kinesis/kint2pp/config.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #pragma once | ||
2 | |||
3 | /* USB Device descriptor parameter */ | ||
4 | #define PRODUCT_ID 0x6060 | ||
5 | #define DEVICE_VER 0x0002 | ||
6 | |||
7 | /* key matrix size */ | ||
8 | #define MATRIX_ROWS 15 | ||
9 | #define MATRIX_COLS 7 | ||
10 | |||
11 | /* | ||
12 | * Keyboard Matrix Assignments | ||
13 | * | ||
14 | * Change this to how you wired your keyboard | ||
15 | * COLS: AVR pins used for columns, left to right | ||
16 | * ROWS: AVR pins used for rows, top to bottom | ||
17 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
18 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
19 | * | ||
20 | */ | ||
21 | #define MATRIX_ROW_PINS { D7, E0, E1, C0, C6, F6, D4, D2, D3, D0, B7, D1, E6, B4, B2 } | ||
22 | #define MATRIX_COL_PINS { E7, F0, F7, B1, B3, B0, D5 } | ||
23 | |||
24 | #define UNUSED_PINS | ||
25 | |||
26 | /* COL2ROW or ROW2COL */ | ||
27 | #define DIODE_DIRECTION COL2ROW | ||
28 | |||
29 | |||
30 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
31 | #define DEBOUNCE 5 | ||
32 | |||
33 | #define IGNORE_MOD_TAP_INTERRUPT | ||
diff --git a/keyboards/kinesis/kint2pp/kint2pp.c b/keyboards/kinesis/kint2pp/kint2pp.c new file mode 100644 index 000000000..7e2b4348c --- /dev/null +++ b/keyboards/kinesis/kint2pp/kint2pp.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include "kint2pp.h" | ||
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | led_init_ports(); | ||
5 | |||
6 | |||
7 | matrix_init_user(); | ||
8 | } | ||
9 | void led_init_ports() { | ||
10 | // * Set our LED pins as output | ||
11 | setPinOutput(C3); // Keypad LED | ||
12 | setPinOutput(C4); // ScrLock LED | ||
13 | setPinOutput(C5); // NumLock LED | ||
14 | setPinOutput(C1); // CapsLock LED | ||
15 | } | ||
16 | |||
17 | bool led_update_kb(led_t led_state) { | ||
18 | bool res = led_update_user(led_state); | ||
19 | if(res) { | ||
20 | writePin(C3, !led_state.compose); | ||
21 | writePin(C4, !led_state.scroll_lock); | ||
22 | writePin(C5, !led_state.num_lock); | ||
23 | writePin(C1, !led_state.caps_lock); | ||
24 | } | ||
25 | return res; | ||
26 | } | ||
diff --git a/keyboards/kinesis/kint2pp/kint2pp.h b/keyboards/kinesis/kint2pp/kint2pp.h new file mode 100644 index 000000000..57265d731 --- /dev/null +++ b/keyboards/kinesis/kint2pp/kint2pp.h | |||
@@ -0,0 +1,99 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | #define ___ KC_NO | ||
6 | |||
7 | // This a shortcut to help you visually see your layout. | ||
8 | // The first section contains all of the arguments as on the physical keyboard | ||
9 | // The second converts the arguments into the 2-D scanned array | ||
10 | |||
11 | #define LAYOUT( \ | ||
12 | kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \ | ||
13 | k00, k10, k20, k30, k40, k50, \ | ||
14 | k01, k11, k21, k31, k41, k51, \ | ||
15 | k02, k12, k22, k32, k42, k52, \ | ||
16 | k03, k13, k23, k33, k43, k53, \ | ||
17 | k14, k24, k34, k54, \ | ||
18 | k56, k55, \ | ||
19 | k35, \ | ||
20 | k36, k46, k25, \ | ||
21 | \ | ||
22 | kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ | ||
23 | k60, k70, k80, k90, kA0, kB0, \ | ||
24 | k61, k71, k81, k91, kA1, kB1, \ | ||
25 | k62, k72, k82, k92, kA2, kB2, \ | ||
26 | k63, k73, k83, k93, kA3, kB3, \ | ||
27 | k64, k84, k94, kA4, \ | ||
28 | k96, k85, \ | ||
29 | k86, \ | ||
30 | k66, k75, k65 \ | ||
31 | ) { \ | ||
32 | { k00, k01, k02, k03, ___, ___, ___ }, \ | ||
33 | { k10, k11, k12, k13, k14, ___, ___ }, \ | ||
34 | { k20, k21, k22, k23, k24, k25, ___ }, \ | ||
35 | { k30, k31, k32, k33, k34, k35, k36 }, \ | ||
36 | { k40, k41, k42, k43, ___, ___, k46 }, \ | ||
37 | { k50, k51, k52, k53, k54, k55, k56 }, \ | ||
38 | { k60, k61, k62, k63, k64, k65, k66 }, \ | ||
39 | { k70, k71, k72, k73, ___, k75, ___ }, \ | ||
40 | { k80, k81, k82, k83, k84, k85, k86 }, \ | ||
41 | { k90, k91, k92, k93, k94, ___, k96 }, \ | ||
42 | { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ | ||
43 | { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ | ||
44 | { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ | ||
45 | { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ | ||
46 | { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ | ||
47 | } | ||
48 | |||
49 | /* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ | ||
50 | #define LAYOUT_pretty( \ | ||
51 | kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ | ||
52 | k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \ | ||
53 | k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \ | ||
54 | k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \ | ||
55 | k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \ | ||
56 | k14, k24, k34, k54, k64, k84, k94, kA4, \ | ||
57 | k56, k55, k96, k85, \ | ||
58 | k35, k86, \ | ||
59 | k36, k46, k25, k66, k75, k65 \ | ||
60 | ) { \ | ||
61 | { k00, k01, k02, k03, ___, ___, ___ }, \ | ||
62 | { k10, k11, k12, k13, k14, ___, ___ }, \ | ||
63 | { k20, k21, k22, k23, k24, k25, ___ }, \ | ||
64 | { k30, k31, k32, k33, k34, k35, k36 }, \ | ||
65 | { k40, k41, k42, k43, ___, ___, k46 }, \ | ||
66 | { k50, k51, k52, k53, k54, k55, k56 }, \ | ||
67 | { k60, k61, k62, k63, k64, k65, k66 }, \ | ||
68 | { k70, k71, k72, k73, ___, k75, ___ }, \ | ||
69 | { k80, k81, k82, k83, k84, k85, k86 }, \ | ||
70 | { k90, k91, k92, k93, k94, ___, k96 }, \ | ||
71 | { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ | ||
72 | { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ | ||
73 | { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ | ||
74 | { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ | ||
75 | { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ | ||
76 | } | ||
77 | |||
78 | /* | ||
79 | This is the Stapelberg matrix as published at | ||
80 | https://github.com/stapelberg/kinesis-firmware/blob/master/kb_kinesis/config.kspec | ||
81 | Along with the pins for each row and column | ||
82 | PB0 PB1 PB2 PB3 PB4 PB5 PB6 | ||
83 | kx0 kx1 kx2 kx3 kx4 kx5 kx6 | ||
84 | PD0 k0x Row: EQL TAB CAP LSH X2 -- -- | ||
85 | PD1 k1x Row: 1 Q A Z BQ -- -- | ||
86 | PD2 k2x Row: 2 W S X INS END -- | ||
87 | PD3 k3x Row: 3 E D C LFT HOM BAK | ||
88 | PD4 k4x Row: 4 R F V -- -- DEL | ||
89 | PD5 k5x Row: 5 T G B RT LAL LCT | ||
90 | PD6 k6x Row: 6 Y H N UP SPC PGD | ||
91 | PD7 k7x Row: 7 U J M -- RET -- | ||
92 | PC0 k8x Row: 8 I K COM DWN RCT PGU | ||
93 | PC1 k9x Row: 9 O L PER LBR -- RAL | ||
94 | PC2 kAx Row: 0 P SEM SLA RBR -- -- | ||
95 | PC3 kBx Row: MIN BSL APO RSH X1 -- -- | ||
96 | PC4 kCx Row: ESC F3 F6 F9 F12 PAU -- | ||
97 | PC5 kDx Row: F1 F4 F7 F10 PRT PRG -- | ||
98 | PC6 kEx Row: F2 F5 F8 F11 SLK KEY -- | ||
99 | */ | ||
diff --git a/keyboards/kinesis/kint2pp/readme.md b/keyboards/kinesis/kint2pp/readme.md new file mode 100644 index 000000000..97f67abb5 --- /dev/null +++ b/keyboards/kinesis/kint2pp/readme.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # kinesis_kint2pp keyboard firmware | ||
2 | |||
3 | Please see https://github.com/kinx-project/kint for details. | ||
diff --git a/keyboards/kinesis/kint2pp/rules.mk b/keyboards/kinesis/kint2pp/rules.mk new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/kinesis/kint2pp/rules.mk | |||