aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvattern <thys@vektorfoto.co.za>2021-09-29 17:55:34 +0100
committerGitHub <noreply@github.com>2021-09-29 09:55:34 -0700
commit03df75455126ecd395957bcbad48d19ca91fdbd5 (patch)
treeb0d063294e477df8a655c1a0e702255ae09f5ad7
parentc89f74b929721d01bf8177aa10c3cd721247a857 (diff)
downloadqmk_firmware-03df75455126ecd395957bcbad48d19ca91fdbd5.tar.gz
qmk_firmware-03df75455126ecd395957bcbad48d19ca91fdbd5.zip
[Keyboard] Update Grandiceps to Rev2 (#14618)
Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Co-authored-by: Thys de Wet <thys@vectorphoto.co.uk>
-rw-r--r--keyboards/tkw/grandiceps/config.h5
-rw-r--r--keyboards/tkw/grandiceps/info.json2
-rw-r--r--keyboards/tkw/grandiceps/keymaps/default/keymap.c22
-rw-r--r--keyboards/tkw/grandiceps/readme.md14
-rw-r--r--keyboards/tkw/grandiceps/rev2/config.h24
-rw-r--r--keyboards/tkw/grandiceps/rev2/rules.mk5
6 files changed, 63 insertions, 9 deletions
diff --git a/keyboards/tkw/grandiceps/config.h b/keyboards/tkw/grandiceps/config.h
index 93b6fd02f..e51c9ab22 100644
--- a/keyboards/tkw/grandiceps/config.h
+++ b/keyboards/tkw/grandiceps/config.h
@@ -17,19 +17,17 @@
17 17
18#include "config_common.h" 18#include "config_common.h"
19 19
20
21/* USB Device descriptor parameter */ 20/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED 21#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0x7812 22#define PRODUCT_ID 0x7812
24#define DEVICE_VER 0x0001 23#define DEVICE_VER 0x0001
24#define MANUFACTURER tkw
25#define PRODUCT Grandiceps Split 25#define PRODUCT Grandiceps Split
26 26
27/* key matrix size */ 27/* key matrix size */
28#define MATRIX_ROWS 10 28#define MATRIX_ROWS 10
29#define MATRIX_COLS 6 29#define MATRIX_COLS 6
30 30
31
32
33#define MATRIX_COL_PINS { B0, A7, A3, A5, A4, A2 } 31#define MATRIX_COL_PINS { B0, A7, A3, A5, A4, A2 }
34#define MATRIX_ROW_PINS { B12, A6, B13, B9, B8 } 32#define MATRIX_ROW_PINS { B12, A6, B13, B9, B8 }
35#define MATRIX_COL_PINS_RIGHT { B0, A7, A3, A5, A4, A2 } 33#define MATRIX_COL_PINS_RIGHT { B0, A7, A3, A5, A4, A2 }
@@ -61,7 +59,6 @@
61/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 59/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
62#define DEBOUNCE 5 60#define DEBOUNCE 5
63 61
64
65/* disable these deprecated features by default */ 62/* disable these deprecated features by default */
66#define NO_ACTION_MACRO 63#define NO_ACTION_MACRO
67#define NO_ACTION_FUNCTION 64#define NO_ACTION_FUNCTION
diff --git a/keyboards/tkw/grandiceps/info.json b/keyboards/tkw/grandiceps/info.json
index 4ca41b73a..7a4324ffd 100644
--- a/keyboards/tkw/grandiceps/info.json
+++ b/keyboards/tkw/grandiceps/info.json
@@ -2,7 +2,7 @@
2 "keyboard_name": "grandiceps", 2 "keyboard_name": "grandiceps",
3 "url": "https://github.com/vattern/grandiceps", 3 "url": "https://github.com/vattern/grandiceps",
4 "maintainer": "vattern", 4 "maintainer": "vattern",
5 "manufacturer": "TKW", 5 "manufacturer": "tkw",
6 "layouts": { 6 "layouts": {
7 "LAYOUT": { 7 "LAYOUT": {
8 "layout": [ 8 "layout": [
diff --git a/keyboards/tkw/grandiceps/keymaps/default/keymap.c b/keyboards/tkw/grandiceps/keymaps/default/keymap.c
index 121ae1c41..14ae9619e 100644
--- a/keyboards/tkw/grandiceps/keymaps/default/keymap.c
+++ b/keyboards/tkw/grandiceps/keymaps/default/keymap.c
@@ -35,7 +35,8 @@ enum custom_keycodes {
35 KC_NXTWD, 35 KC_NXTWD,
36 KC_LSTRT, 36 KC_LSTRT,
37 KC_LEND, 37 KC_LEND,
38 KC_DLINE 38 KC_DLINE,
39 KC_TEAMS
39}; 40};
40 41
41 42
@@ -61,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
61 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 62 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
62 KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 63 KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
63 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 64 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
64 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, 65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_TEAMS,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
65 KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI 66 KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI
66), 67),
67/* 68/*
@@ -103,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
103 */ 104 */
104[_LOWER] = LAYOUT( 105[_LOWER] = LAYOUT(
105 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, 106 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
106 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, 107 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NUBS,
107 _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, 108 _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
108 _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, 109 _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
109 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 110 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
@@ -311,6 +312,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
311 unregister_code(KC_Z); 312 unregister_code(KC_Z);
312 } 313 }
313 return false; 314 return false;
315
316 case KC_TEAMS:
317 if (record->event.pressed) {
318 register_mods(mod_config(MOD_LCTL));
319 register_mods(mod_config(MOD_LSFT));
320 register_code(KC_M);
321 } else {
322 unregister_mods(mod_config(MOD_LCTL));
323 unregister_mods(mod_config(MOD_LSFT));
324 unregister_code(KC_M);
325 }
326 return false;
314 } 327 }
315 return true; 328 return true;
316} 329}
@@ -447,7 +460,7 @@ bool encoder_update_user(uint8_t index, bool clockwise){
447 switch (get_highest_layer(layer_state)) { 460 switch (get_highest_layer(layer_state)) {
448 case _QWERTY: 461 case _QWERTY:
449 // Scrolling with PageUp and PgDn. 462 // Scrolling with PageUp and PgDn.
450 if (clockwise) { 463 if (!clockwise) {
451 tap_code16(KC_PGDN); 464 tap_code16(KC_PGDN);
452 } else { 465 } else {
453 tap_code16(KC_PGUP); 466 tap_code16(KC_PGUP);
@@ -462,6 +475,7 @@ bool encoder_update_user(uint8_t index, bool clockwise){
462 break; 475 break;
463 } 476 }
464 } 477 }
478
465 return true; 479 return true;
466} 480}
467#endif 481#endif
diff --git a/keyboards/tkw/grandiceps/readme.md b/keyboards/tkw/grandiceps/readme.md
index 894f1c8d7..57a6dac28 100644
--- a/keyboards/tkw/grandiceps/readme.md
+++ b/keyboards/tkw/grandiceps/readme.md
@@ -8,12 +8,26 @@ ARM split keyboard with RGB underglow and encoders.
8* Hardware Supported: f411 blackpill 8* Hardware Supported: f411 blackpill
9* Hardware Availability: [grandiceps](https://github.com/vattern/grandiceps) 9* Hardware Availability: [grandiceps](https://github.com/vattern/grandiceps)
10 10
11There are two versions of the Grandiceps. Please use the appropriate firmware for your board.
12
13* Revision 2 has I2C eeprom and support for a Pimoroni trackball.
14
11Make example for this keyboard (after setting up your build environment): 15Make example for this keyboard (after setting up your build environment):
12 16
13 make tkw/grandiceps:default 17 make tkw/grandiceps:default
18 make tkw/grandiceps/rev2:default
14 19
15Flashing example for this keyboard: 20Flashing example for this keyboard:
16 21
17 make tkw/grandiceps:default:flash 22 make tkw/grandiceps:default:flash
23 make tkw/grandiceps/rev2:default:flash
18 24
19See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). 25See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
26
27## Bootloader
28
29Enter the bootloader in 3 ways:
30
31* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
32* **Physical reset buttons**: Hold down the BOOT0 button and then briefly press the NRST button on the BlackPill PCB.
33* **Keycode in layout**: Press the key mapped to `RESET` if it is available
diff --git a/keyboards/tkw/grandiceps/rev2/config.h b/keyboards/tkw/grandiceps/rev2/config.h
new file mode 100644
index 000000000..98b762087
--- /dev/null
+++ b/keyboards/tkw/grandiceps/rev2/config.h
@@ -0,0 +1,24 @@
1/* Copyright 2021 Thys de Wet
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#undef DEVICE_VER
19#define DEVICE_VER 0x0002
20#undef PRODUCT
21#define PRODUCT Grandiceps Split rev2
22
23#define SPLIT_HAND_PIN B3
24#define EEPROM_I2C_24LC64
diff --git a/keyboards/tkw/grandiceps/rev2/rules.mk b/keyboards/tkw/grandiceps/rev2/rules.mk
new file mode 100644
index 000000000..c8f3f05bd
--- /dev/null
+++ b/keyboards/tkw/grandiceps/rev2/rules.mk
@@ -0,0 +1,5 @@
1EEPROM_DRIVER = i2c
2
3POINTING_DEVICE_ENABLE = yes
4SRC += drivers/sensors/pimoroni_trackball.c
5QUANTUM_LIB_SRC += i2c_master.c