From 52d8793142b3ad606032d6eb06f7dd4d25d55a05 Mon Sep 17 00:00:00 2001 From: leviport Date: Mon, 30 Dec 2019 13:11:16 -0700 Subject: [PATCH] WIP: Add split ortho 2U board --- keyboards/system76/ortho_split_2u/.#config.h | 1 + keyboards/system76/ortho_split_2u/config.h | 41 +++++++++++++ .../ortho_split_2u/keymaps/default/keymap.c | 58 +++++++++++++++++++ .../system76/ortho_split_2u/ortho_split_2u.c | 9 +++ .../system76/ortho_split_2u/ortho_split_2u.h | 24 ++++++++ keyboards/system76/ortho_split_2u/rules.mk | 24 ++++++++ 6 files changed, 157 insertions(+) create mode 120000 keyboards/system76/ortho_split_2u/.#config.h create mode 100644 keyboards/system76/ortho_split_2u/config.h create mode 100644 keyboards/system76/ortho_split_2u/keymaps/default/keymap.c create mode 100644 keyboards/system76/ortho_split_2u/ortho_split_2u.c create mode 100644 keyboards/system76/ortho_split_2u/ortho_split_2u.h create mode 100644 keyboards/system76/ortho_split_2u/rules.mk diff --git a/keyboards/system76/ortho_split_2u/.#config.h b/keyboards/system76/ortho_split_2u/.#config.h new file mode 120000 index 00000000000..658c1e6a134 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/.#config.h @@ -0,0 +1 @@ +levi@pop-os.17218:1577715666 \ No newline at end of file diff --git a/keyboards/system76/ortho_split_2u/config.h b/keyboards/system76/ortho_split_2u/config.h new file mode 100644 index 00000000000..6a8d720c33d --- /dev/null +++ b/keyboards/system76/ortho_split_2u/config.h @@ -0,0 +1,41 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1776 +#define PRODUCT_ID 0x1776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER System76 +#define PRODUCT ortho_split_2u +#define DESCRIPTION 2U Split Ortho + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS_LEFT { F4, F5, F6, F7, B1, B3 } +#define MATRIX_COL_PINS_LEFT { D1, D0, D4, C6, D7, E6, B4 } +#define MATRIX_ROW_PINS_RIGHT { F4, F5, F6, F7, B1, B3 } +#define MATRIX_COL_PINS_RIGHT { D3, D2, D1, D0, D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Settings for split keyboard */ +#define MASTER_RIGHT // Right half is the master, left obeys +#define SOFT_SERIAL_PIN D0 // The halves communicate via serial on pin D0 + +#endif // CONFIG_H diff --git a/keyboards/system76/ortho_split_2u/keymaps/default/keymap.c b/keyboards/system76/ortho_split_2u/keymaps/default/keymap.c new file mode 100644 index 00000000000..fb220198411 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ ` ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ + * ├─────┴─────┼─────┼─────┼─────┼─────┼─────┤ + * │ Tab │ Q │ W │ E │ R │ T │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤ + * │ Caps Lock │ A │ S │ D │ F │ G │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤ + * │ Shift │ Z │ X │ C │ V │ B │ + * ├───────────┼─────┼─────┼─────┼─────┴─────┤ + * │ Ctrl │ Fn │ Alt │Super│ Space │ + * └───────────┴─────┴─────┴─────┴───────────┘ + */ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC + ), + + /* Layer 1, function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │RESET│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ + * ├─────┴─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ + * ├───────────┼─────┼─────┼─────┼─────┴─────┤ + * │ │ │ │ │ │ + * └───────────┴─────┴─────┴─────┴───────────┘ + */ + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/system76/ortho_split_2u/ortho_split_2u.c b/keyboards/system76/ortho_split_2u/ortho_split_2u.c new file mode 100644 index 00000000000..662fe36720b --- /dev/null +++ b/keyboards/system76/ortho_split_2u/ortho_split_2u.c @@ -0,0 +1,9 @@ +#include "virgortholeft.h" + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/system76/ortho_split_2u/ortho_split_2u.h b/keyboards/system76/ortho_split_2u/ortho_split_2u.h new file mode 100644 index 00000000000..6289b124143 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/ortho_split_2u.h @@ -0,0 +1,24 @@ +#ifndef VIRGORTHOLEFT_H +#define VIRGORTHOLEFT_H + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, \ + K10, K11, K12, K13, K14, K15, K16, \ + K21, K22, K23, K24, K25, K26, \ + K31, K32, K33, K34, K35, K36, \ + K41, K42, K43, K44, K45, K46, \ + K51, K52, K53, K54, K56 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { ___, K21, K22, K23, K24, K25, K26 }, \ + { ___, K31, K32, K33, K34, K35, K36 }, \ + { ___, K41, K42, K43, K44, K45, K46 }, \ + { ___, K51, K52, K53, K54, ___, K56 }, \ +} + +#endif // VIRGORTHOLEFT_H diff --git a/keyboards/system76/ortho_split_2u/rules.mk b/keyboards/system76/ortho_split_2u/rules.mk new file mode 100644 index 00000000000..e59dfc3de73 --- /dev/null +++ b/keyboards/system76/ortho_split_2u/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +SPLIT_KEYBOARD = yes # Enables split keyboard +