Skip to content

Commit

Permalink
[Keyboard] Update Grandiceps to Rev2 (qmk#14618)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan <[email protected]>
Co-authored-by: Dasky <[email protected]>
Co-authored-by: Thys de Wet <[email protected]>
  • Loading branch information
4 people authored and 0xcharly committed Oct 25, 2021
1 parent dcecbe8 commit 06d7d2b
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 9 deletions.
5 changes: 1 addition & 4 deletions keyboards/tkw/grandiceps/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@

#include "config_common.h"


/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x7812
#define DEVICE_VER 0x0001
#define MANUFACTURER tkw
#define PRODUCT Grandiceps Split

/* key matrix size */
#define MATRIX_ROWS 10
#define MATRIX_COLS 6



#define MATRIX_COL_PINS { B0, A7, A3, A5, A4, A2 }
#define MATRIX_ROW_PINS { B12, A6, B13, B9, B8 }
#define MATRIX_COL_PINS_RIGHT { B0, A7, A3, A5, A4, A2 }
Expand Down Expand Up @@ -61,7 +59,6 @@
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5


/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
2 changes: 1 addition & 1 deletion keyboards/tkw/grandiceps/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"keyboard_name": "grandiceps",
"url": "https://github.com/vattern/grandiceps",
"maintainer": "vattern",
"manufacturer": "TKW",
"manufacturer": "tkw",
"layouts": {
"LAYOUT": {
"layout": [
Expand Down
22 changes: 18 additions & 4 deletions keyboards/tkw/grandiceps/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ enum custom_keycodes {
KC_NXTWD,
KC_LSTRT,
KC_LEND,
KC_DLINE
KC_DLINE,
KC_TEAMS
};


Expand All @@ -61,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
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,
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,
KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI
),
/*
Expand Down Expand Up @@ -103,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NUBS,
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
Expand Down Expand Up @@ -311,6 +312,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
unregister_code(KC_Z);
}
return false;

case KC_TEAMS:
if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL));
register_mods(mod_config(MOD_LSFT));
register_code(KC_M);
} else {
unregister_mods(mod_config(MOD_LCTL));
unregister_mods(mod_config(MOD_LSFT));
unregister_code(KC_M);
}
return false;
}
return true;
}
Expand Down Expand Up @@ -447,7 +460,7 @@ bool encoder_update_user(uint8_t index, bool clockwise){
switch (get_highest_layer(layer_state)) {
case _QWERTY:
// Scrolling with PageUp and PgDn.
if (clockwise) {
if (!clockwise) {
tap_code16(KC_PGDN);
} else {
tap_code16(KC_PGUP);
Expand All @@ -462,6 +475,7 @@ bool encoder_update_user(uint8_t index, bool clockwise){
break;
}
}

return true;
}
#endif
14 changes: 14 additions & 0 deletions keyboards/tkw/grandiceps/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,26 @@ ARM split keyboard with RGB underglow and encoders.
* Hardware Supported: f411 blackpill
* Hardware Availability: [grandiceps](https://github.com/vattern/grandiceps)

There are two versions of the Grandiceps. Please use the appropriate firmware for your board.

* Revision 2 has I2C eeprom and support for a Pimoroni trackball.

Make example for this keyboard (after setting up your build environment):

make tkw/grandiceps:default
make tkw/grandiceps/rev2:default

Flashing example for this keyboard:

make tkw/grandiceps:default:flash
make tkw/grandiceps/rev2:default:flash

See 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).

## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset buttons**: Hold down the BOOT0 button and then briefly press the NRST button on the BlackPill PCB.
* **Keycode in layout**: Press the key mapped to `RESET` if it is available
24 changes: 24 additions & 0 deletions keyboards/tkw/grandiceps/rev2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* Copyright 2021 Thys de Wet
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

#undef DEVICE_VER
#define DEVICE_VER 0x0002
#undef PRODUCT
#define PRODUCT Grandiceps Split rev2

#define SPLIT_HAND_PIN B3
#define EEPROM_I2C_24LC64
5 changes: 5 additions & 0 deletions keyboards/tkw/grandiceps/rev2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
EEPROM_DRIVER = i2c

POINTING_DEVICE_ENABLE = yes
SRC += drivers/sensors/pimoroni_trackball.c
QUANTUM_LIB_SRC += i2c_master.c

0 comments on commit 06d7d2b

Please sign in to comment.