diff options
author | Joris Wachsmuth <52176899+PercyJW-2@users.noreply.github.com> | 2021-10-12 03:09:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 18:09:25 -0700 |
commit | 8385ab32d056dae61546279c9d778dd1a20eaada (patch) | |
tree | 7e8aa3b35dabc1ebb13dedb6b441fc0ab0b5f9eb /keyboards/handwired/split65 | |
parent | e33ccc556f594e1335e003ac2e8fe84154bfa16e (diff) | |
download | qmk_firmware-8385ab32d056dae61546279c9d778dd1a20eaada.tar.gz qmk_firmware-8385ab32d056dae61546279c9d778dd1a20eaada.zip |
[Keyboard] Add Split65 to keyboards/handwired (#13264)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joris Wachsmuth <jwachsmuth@techfak.uni-bielefeld.de>
Diffstat (limited to 'keyboards/handwired/split65')
-rw-r--r-- | keyboards/handwired/split65/info.json | 93 | ||||
-rw-r--r-- | keyboards/handwired/split65/keymaps/default/keymap.c | 65 | ||||
-rw-r--r-- | keyboards/handwired/split65/keymaps/via/keymap.c | 65 | ||||
-rw-r--r-- | keyboards/handwired/split65/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/handwired/split65/promicro/config.h | 53 | ||||
-rw-r--r-- | keyboards/handwired/split65/promicro/promicro.c | 16 | ||||
-rw-r--r-- | keyboards/handwired/split65/promicro/promicro.h | 38 | ||||
-rw-r--r-- | keyboards/handwired/split65/promicro/rules.mk | 23 | ||||
-rw-r--r-- | keyboards/handwired/split65/readme.md | 25 | ||||
-rw-r--r-- | keyboards/handwired/split65/split65.c | 130 | ||||
-rw-r--r-- | keyboards/handwired/split65/split65.h | 24 | ||||
-rw-r--r-- | keyboards/handwired/split65/stm32/config.h | 60 | ||||
-rw-r--r-- | keyboards/handwired/split65/stm32/halconf.h | 21 | ||||
-rw-r--r-- | keyboards/handwired/split65/stm32/rules.mk | 25 | ||||
-rw-r--r-- | keyboards/handwired/split65/stm32/stm32.c | 16 | ||||
-rw-r--r-- | keyboards/handwired/split65/stm32/stm32.h | 38 |
16 files changed, 693 insertions, 0 deletions
diff --git a/keyboards/handwired/split65/info.json b/keyboards/handwired/split65/info.json new file mode 100644 index 0000000000..543fc9c394 --- /dev/null +++ b/keyboards/handwired/split65/info.json @@ -0,0 +1,93 @@ +{ + "keyboard_name": "split65", + "url": "https://github.com/PercyJW-2/Split65", + "maintainer": "PercyJW-2", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"\u00ac", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"UP", "x":14, "y":3}, + {"x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":3}, + {"x":6.75, "y":4, "w":3.25}, + {"label":"AltGr", "x":10, "y":4}, + + {"label":"Win", "x":11, "y":4}, + {"label":"Menu", "x":12, "y":4}, + {"label":"LEFT", "x":13, "y":4}, + {"label":"DOWN", "x":14, "y":4}, + {"label":"RIGHT", "x":15, "y":4}] + } + } +} diff --git a/keyboards/handwired/split65/keymaps/default/keymap.c b/keyboards/handwired/split65/keymaps/default/keymap.c new file mode 100644 index 0000000000..acb9b679eb --- /dev/null +++ b/keyboards/handwired/split65/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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/>. + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_RALT, LOWER, RAISE, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_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_F12, _______, _______, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/handwired/split65/keymaps/via/keymap.c b/keyboards/handwired/split65/keymaps/via/keymap.c new file mode 100644 index 0000000000..acb9b679eb --- /dev/null +++ b/keyboards/handwired/split65/keymaps/via/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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/>. + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_RALT, LOWER, RAISE, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_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_F12, _______, _______, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/handwired/split65/keymaps/via/rules.mk b/keyboards/handwired/split65/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/handwired/split65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/handwired/split65/promicro/config.h b/keyboards/handwired/split65/promicro/config.h new file mode 100644 index 0000000000..824dc76402 --- /dev/null +++ b/keyboards/handwired/split65/promicro/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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 + + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x4A57 // JW +#define PRODUCT_ID 0x0000 // first keeb +#define DEVICE_VER 0x0000 // first revision +#define MANUFACTURER percyjw +#define PRODUCT split65 + +// Matrix Assignments +#define MATRIX_ROWS 10 //Rows are doubled-up +#define MATRIX_COLS 8 + +#define MATRIX_COL_PINS {F4, F5, F6, F7, B1, B3, B2, B6} +#define MATRIX_ROW_PINS {D4, C6, D7, E6, B4} + +// COL2ROW, ROW2COL +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_IO_DELAY 5 + +// Split Keyboard specifics +#define SOFT_SERIAL_PIN D3 +#define SELECT_SOFT_SERIAL_SPEED 1 + +// Debounce to reduce unintended double-presses use 0 if not needed +#define DEBOUNCE 5 + +// Feature diable options +//#define NO_DEBUG +//#define NO_PRINT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define OLED_DISPLAY_128X64 diff --git a/keyboards/handwired/split65/promicro/promicro.c b/keyboards/handwired/split65/promicro/promicro.c new file mode 100644 index 0000000000..2f7e1ebab4 --- /dev/null +++ b/keyboards/handwired/split65/promicro/promicro.c @@ -0,0 +1,16 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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/>. + */ +#include "promicro.h" diff --git a/keyboards/handwired/split65/promicro/promicro.h b/keyboards/handwired/split65/promicro/promicro.h new file mode 100644 index 0000000000..204f0b88de --- /dev/null +++ b/keyboards/handwired/split65/promicro/promicro.h @@ -0,0 +1,38 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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 + +#include "split65.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R07, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R17, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R47, R27, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R37, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, R46, R45, R44, R43, R42, R41, R40 \ + ) \ + { \ + {L00, L01, L02, L03, L04, L05, L06, KC_NO}, \ + {L10, L11, L12, L13, L14, L15, KC_NO, KC_NO}, \ + {L20, L21, L22, L23, L24, L25, KC_NO, KC_NO}, \ + {L30, L31, L32, L33, L34, L35, L36, KC_NO}, \ + {L40, L41, L42, KC_NO, L43, KC_NO, KC_NO, KC_NO}, \ + {R00, R01, R02, R03, R04, R05, R06, R07}, \ + {R10, R11, R12, R13, R14, R15, R16, R17}, \ + {R20, R21, R22, R23, R24, R25, R26, R27}, \ + {R30, R31, R32, R33, R34, R35, R36, R37}, \ + {R40, R41, R42, R43, R44, R45, R46, R47} \ + } diff --git a/keyboards/handwired/split65/promicro/rules.mk b/keyboards/handwired/split65/promicro/rules.mk new file mode 100644 index 0000000000..bb95fcf67c --- /dev/null +++ b/keyboards/handwired/split65/promicro/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +OLED_ENABLE = yes +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/split65/readme.md b/keyboards/handwired/split65/readme.md new file mode 100644 index 0000000000..39dda3c3a5 --- /dev/null +++ b/keyboards/handwired/split65/readme.md @@ -0,0 +1,25 @@ +# Split65 + +An split 65% keyboard with two OLEDs + +* Keyboard Maintainer: [Percy-JW2](https://github.com/PercyJW-2) +* Hardware Supported: ProMicro and compatibles, Proton C +* Hardware Availability: [Repository](https://github.com/PercyJW-2/Split65) + +Make example for this keyboard with an ProMicro: + + make handwired/split65/promicro:default + +Make example for this keyboard with an Proton C: + + make handwired/split65/stm32:default + +Example for flashing this keyboard with an ProMicro + + make handwired/split65/promicro:default:flash + +Example for flashing this keyboard with an Proton C + + make handwired/split65/stm32: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). diff --git a/keyboards/handwired/split65/split65.c b/keyboards/handwired/split65/split65.c new file mode 100644 index 0000000000..3b1dcaddae --- /dev/null +++ b/keyboards/handwired/split65/split65.c @@ -0,0 +1,130 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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/>. + */ +#include "split65.h" + +// OLED Code inspired by https://github.com/qmk/qmk_firmware/blob/master/keyboards/splitkb/kyria/rev1/rev1.c + +#ifdef OLED_ENABLE +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +__attribute__((weak)) void oled_task_user(void) { + if (is_keyboard_master()) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); + + oled_write_P(PSTR("Split65\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Default\n"), false); + break; + case 1: + oled_write_P(PSTR("Lower\n"), false); + break; + case 2: + oled_write_P(PSTR("Raise\n"), false); + break; + case 3: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + static const char PROGMEM split65_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xff, 0xff, 0xef, 0xc7, 0xc7, 0x87, + 0x87, 0x87, 0x87, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, + 0x07, 0x07, 0x07, 0x07, 0xdf, 0xff, 0xfe, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0xf0, 0xfc, 0xfe, 0xfe, 0x9f, 0xcf, 0xc7, 0xc7, 0xc3, 0xc3, + 0xc7, 0x87, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xc7, 0xc7, 0xc7, 0xc7, + 0xc7, 0xc7, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0xc1, 0x81, 0x81, + 0x81, 0x01, 0x05, 0x0d, 0x0d, 0x0c, 0x9c, 0xfc, 0xfc, 0xfc, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, + 0xf9, 0xf9, 0xf9, 0xf9, 0x19, 0x19, 0x19, 0x19, 0x1d, 0x0c, 0x0c, 0x0c, 0x01, 0x01, 0x01, 0x01, + 0x01, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x01, 0x01, + 0x01, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xf8, 0xfc, + 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7d, 0xfd, 0xfd, 0xf9, 0xfd, + 0x01, 0x01, 0x01, 0x00, 0x88, 0xfc, 0xfc, 0xfc, 0xf9, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x80, 0xfc, 0xfc, 0xfc, 0xfc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(split65_logo, sizeof(split65_logo)); + } +} +#endif diff --git a/keyboards/handwired/split65/split65.h b/keyboards/handwired/split65/split65.h new file mode 100644 index 0000000000..7f60ab0bde --- /dev/null +++ b/keyboards/handwired/split65/split65.h @@ -0,0 +1,24 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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 + +#include "quantum.h" + +#if defined(KEYBOARD_handwired_split65_stm32) + #include "stm32.h" +#elif defined(KEYBOARD_handwired_split65_promicro) + #include "promicro.h" +#endif diff --git a/keyboards/handwired/split65/stm32/config.h b/keyboards/handwired/split65/stm32/config.h new file mode 100644 index 0000000000..28df964423 --- /dev/null +++ b/keyboards/handwired/split65/stm32/config.h @@ -0,0 +1,60 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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 + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x4A57 // JW +#define PRODUCT_ID 0x0000 // first keeb +#define DEVICE_VER 0x0000 // first revision +#define MANUFACTURER percyjw +#define PRODUCT split65 + +// Audio +#define AUDIO_PIN A5 +#define AUDIO_PIN_ALT A4 +#define AUDIO_PIN_ALT_AS_NEGATIVE + +// Matrix Assignments +#define MATRIX_ROWS 10 //Rows are doubled-up +#define MATRIX_COLS 8 + +#define MATRIX_COL_PINS {A2, A1, A0, B8, B13, B14, B15, B9} +#define MATRIX_ROW_PINS {B5, B4, B3, B2, B1} + +// COL2ROW, ROW2COL +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_IO_DELAY 5 + +// Split Keyboard specifics +#define SOFT_SERIAL_PIN A9 +#define SELECT_SOFT_SERIAL_SPEED 1 +#define SERIAL_USART_DRIVER SD1 +#define SERIAL_USART_TX_PAL_MODE 7 +#define SERIAL_USART_TIMEOUT 100 + +// Debounce to reduce unintended double-presses use 0 if not needed +#define DEBOUNCE 5 + +// Feature diable options +//#define NO_DEBUG +//#define NO_PRINT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define OLED_DISPLAY_128X64 diff --git a/keyboards/handwired/split65/stm32/halconf.h b/keyboards/handwired/split65/stm32/halconf.h new file mode 100644 index 0000000000..f3bfd154d1 --- /dev/null +++ b/keyboards/handwired/split65/stm32/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * 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 + +#define HAL_USE_SERIAL TRUE + +#include_next <halconf.h> diff --git a/keyboards/handwired/split65/stm32/rules.mk b/keyboards/handwired/split65/stm32/rules.mk new file mode 100644 index 0000000000..cb54c352fa --- /dev/null +++ b/keyboards/handwired/split65/stm32/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = yes # Audio output +OLED_ENABLE = yes +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart diff --git a/keyboards/handwired/split65/stm32/stm32.c b/keyboards/handwired/split65/stm32/stm32.c new file mode 100644 index 0000000000..2fa511206e --- /dev/null +++ b/keyboards/handwired/split65/stm32/stm32.c @@ -0,0 +1,16 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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/>. + */ +#include "stm32.h" diff --git a/keyboards/handwired/split65/stm32/stm32.h b/keyboards/handwired/split65/stm32/stm32.h new file mode 100644 index 0000000000..27f03b3e26 --- /dev/null +++ b/keyboards/handwired/split65/stm32/stm32.h @@ -0,0 +1,38 @@ +/* Copyright 2020-2021 PercyJW-2 <joris.wachsmuth@gmail.com> + * + * 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 + +#include "split65.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R07, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R17, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R47, R27, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R37, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, R46, R45, R44, R43, R42, R41, R40 \ + ) \ + { \ + {L00, L01, L02, L03, L04, L05, L06, KC_NO}, \ + {L10, L11, L12, L13, L14, L15, KC_NO, KC_NO}, \ + {L20, L21, L22, L23, L24, L25, KC_NO, KC_NO}, \ + {L30, L31, L32, L33, L34, L35, L36, KC_NO}, \ + {L40, L41, L42, KC_NO, L43, KC_NO, KC_NO, KC_NO}, \ + {R00, R01, R02, R03, R04, R05, R06, R07}, \ + {R10, R11, R12, R13, R14, R15, R16, R17}, \ + {R20, R21, R22, R23, R24, R25, R26, R27}, \ + {R30, R31, R32, R33, R34, R35, R36, R37}, \ + {R40, R41, R42, R43, R44, R45, R46, R47} \ + } |