From 6054f2879ac84201f186c6f6c74c0d9d5c4b99e4 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Tue, 17 Mar 2026 21:45:10 -0400 Subject: [PATCH] Add current atreus firmware --- README.md | 4 + handwired/atreus/.noci | 0 handwired/atreus/atreus.c | 1 + handwired/atreus/atreus.h | 10 + handwired/atreus/config.h | 46 +++++ handwired/atreus/keymaps/aselimov/config.h | 2 + handwired/atreus/keymaps/aselimov/keymap.bak | 88 +++++++++ .../atreus/keymaps/aselimov/keymap.broke | 56 ++++++ handwired/atreus/keymaps/aselimov/keymap.c | 48 +++++ handwired/atreus/keymaps/aselimov/readme.md | 1 + handwired/atreus/keymaps/default/keymap.c | 26 +++ handwired/atreus/readme.md | 187 ++++++++++++++++++ handwired/atreus/rules.mk | 37 ++++ 13 files changed, 506 insertions(+) create mode 100644 README.md create mode 100644 handwired/atreus/.noci create mode 100644 handwired/atreus/atreus.c create mode 100644 handwired/atreus/atreus.h create mode 100644 handwired/atreus/config.h create mode 100644 handwired/atreus/keymaps/aselimov/config.h create mode 100644 handwired/atreus/keymaps/aselimov/keymap.bak create mode 100644 handwired/atreus/keymaps/aselimov/keymap.broke create mode 100644 handwired/atreus/keymaps/aselimov/keymap.c create mode 100644 handwired/atreus/keymaps/aselimov/readme.md create mode 100644 handwired/atreus/keymaps/default/keymap.c create mode 100644 handwired/atreus/readme.md create mode 100644 handwired/atreus/rules.mk diff --git a/README.md b/README.md new file mode 100644 index 0000000..7eb7f77 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# QMK Firmwares + +These are my personal qmk firmware files for some keyboards that I use. +You can copy these into the qmk_firmware repo at the keyboards path to set it up. diff --git a/handwired/atreus/.noci b/handwired/atreus/.noci new file mode 100644 index 0000000..e69de29 diff --git a/handwired/atreus/atreus.c b/handwired/atreus/atreus.c new file mode 100644 index 0000000..3a0a1fe --- /dev/null +++ b/handwired/atreus/atreus.c @@ -0,0 +1 @@ +#include "atreus.h" diff --git a/handwired/atreus/atreus.h b/handwired/atreus/atreus.h new file mode 100644 index 0000000..403dc1e --- /dev/null +++ b/handwired/atreus/atreus.h @@ -0,0 +1,10 @@ +#pragma once + +#include "quantum.h" + +// readability +#define ___ KC_NO +#define LAYOUT_atreus_4x12(k01, k02, k03, k04, k05, k08, k09, k010, k011, k012, k11, k12, k13, k14, k15, k18, k19, k110, k111, k112, k21, k22, k23, k24, k25, k28, k29, k210, k211, k212, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312) \ + { {k01, k02, k03, k04, k05, ___, ___, k08, k09, k010, k011, k012}, {k11, k12, k13, k14, k15, ___, ___, k18, k19, k110, k111, k112}, {k21, k22, k23, k24, k25, ___, ___, k28, k29, k210, k211, k212}, {k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312}, } + +#define LAYOUT LAYOUT_atreus_4x12 diff --git a/handwired/atreus/config.h b/handwired/atreus/config.h new file mode 100644 index 0000000..9fb1b64 --- /dev/null +++ b/handwired/atreus/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlexSelimov +#define PRODUCT Atreus +#define DESCRIPTION A custom keyboard + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_COL_PINS \ + { F4, F5, F6, F7, D4, D0, D1, B5, B4, E6, D7, C6 } +// #define MATRIX_ROW_PINS {B5, B4, E6, D7, C6} +#define MATRIX_ROW_PINS \ + { B1, B3, B2, B6 } + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 +#define COMBO_TERM 25 +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 150 +#define PERMISSIVE_HOLD +#define TAPPING_FORCE_HOLD_PER_KEY diff --git a/handwired/atreus/keymaps/aselimov/config.h b/handwired/atreus/keymaps/aselimov/config.h new file mode 100644 index 0000000..1f0909b --- /dev/null +++ b/handwired/atreus/keymaps/aselimov/config.h @@ -0,0 +1,2 @@ +#include "../../config.h" +#define COMBO_COUNT 8 diff --git a/handwired/atreus/keymaps/aselimov/keymap.bak b/handwired/atreus/keymaps/aselimov/keymap.bak new file mode 100644 index 0000000..31d695f --- /dev/null +++ b/handwired/atreus/keymaps/aselimov/keymap.bak @@ -0,0 +1,88 @@ +/* Copyright 2021 James Young (@noroadsleft) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + + +enum combos{ + _IO_BCK, + _RPRNLBRC_BCK, + _KL_ENT, + _COMMDOT_QUOT, + _WE_TAB, + _SD_ESC, + _AS_SFT, + _LCOL_SFT +}; + +const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END}; +const uint16_t PROGMEM kl_combo[] = {KC_K, KC_L, COMBO_END}; +const uint16_t PROGMEM commdot_combo[] = {KC_COMM, KC_DOT, COMBO_END}; +const uint16_t PROGMEM wetab_combo[] = {KC_W, KC_E, COMBO_END}; +const uint16_t PROGMEM sdesc_combo[] = {KC_S, KC_D, COMBO_END}; +const uint16_t PROGMEM assft_combo[] = {KC_A, KC_S, COMBO_END}; +const uint16_t PROGMEM lcolsft_combo[] = {KC_L, KC_SCLN, COMBO_END}; +const uint16_t PROGMEM rprnlbrc_combo[] = {KC_RPRN, KC_LBRC, COMBO_END}; + + +combo_t key_combos[COMBO_COUNT] = { + [_IO_BCK] = COMBO(io_combo, KC_BSPC), + [_KL_ENT] = COMBO(kl_combo, KC_ENT), + [_RPRNLBRC_BCK] = COMBO(rprnlbrc_combo, KC_BSPC), + [_COMMDOT_QUOT] = COMBO(commdot_combo, KC_QUOT), + [_WE_TAB] = COMBO(wetab_combo, KC_TAB), + [_SD_ESC] = COMBO(sdesc_combo, KC_ESC), + [_AS_SFT] = COMBO(assft_combo, KC_LSFT), + [_LCOL_SFT] = COMBO(lcolsft_combo, KC_RSFT) +}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x12( + KC_Q , KC_W , KC_E , KC_R , KC_T , XXXXXXX , XXXXXXX , KC_Y , KC_U , KC_I , KC_O , KC_P , + LSFT_T(KC_A) , KC_S , KC_D , LALT_T(KC_F) , LCTL_T(KC_G) , XXXXXXX , XXXXXXX , RCTL_T(KC_H) , RALT_T(KC_J) , KC_K , KC_L , RSFT_T(KC_SCLN) , + KC_Z , KC_X , KC_C , KC_V , KC_B , XXXXXXX , XXXXXXX , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , + KC_LGUI , KC_LGUI , KC_LGUI , KC_LGUI , LT(1, KC_SPC) , XXXXXXX , XXXXXXX , LT(2, KC_SPC), KC_RSFT , XXXXXXX , KC_VOLD , KC_VOLU + + ), + [1] = LAYOUT_ortho_4x12( + KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , XXXXXXX , XXXXXXX , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , + KC_TILD , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_PIPE , KC_UNDS , KC_PLUS , KC_LCBR , KC_RCBR , + XXXXXXX , KC_DEL , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_BSLS , S(KC_NUHS) , S(KC_NUBS) , KC_LBRC , KC_RBRC , + _______ , _______ , _______ , _______ , _______ , XXXXXXX , XXXXXXX , LT(3, KC_SPC), _______ , KC_MNXT , KC_PGDN , KC_PGUP + ), + [2] = LAYOUT_ortho_4x12( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_PPLS , XXXXXXX , XXXXXXX , KC_PAST , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , + KC_LSFT , KC_4 , KC_5 , KC_6 , KC_PMNS , XXXXXXX , XXXXXXX , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_LCBR , + KC_LCTL , KC_7 , KC_8 , KC_9 , KC_EQL , XXXXXXX , XXXXXXX , KC_K , KC_M , KC_COMM , KC_DOT , KC_SLSH , + KC_LGUI , KC_0 , KC_0 , KC_LGUI , LT(3, KC_0) , XXXXXXX , XXXXXXX , _______ , _______ , KC_RALT , KC_MPLY , KC_BSLS + ), + [3] = LAYOUT_ortho_4x12( + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , + XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , + RESET , RGB_TOG , XXXXXXX , XXXXXXX , AG_NORM , AG_SWAP , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , + XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX + ) +}; + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_SPC): + return true; + case LT(2, KC_SPC): + return true; + default: + return false; + } +} diff --git a/handwired/atreus/keymaps/aselimov/keymap.broke b/handwired/atreus/keymaps/aselimov/keymap.broke new file mode 100644 index 0000000..7b64a10 --- /dev/null +++ b/handwired/atreus/keymaps/aselimov/keymap.broke @@ -0,0 +1,56 @@ +/* Copyright 2021 James Young (@noroadsleft) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT,KC_ENT), + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_VOLD, KC_VOLU, KC_MUTE + ), + [_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_LSFT, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_LBRC, KC_RBRC, _______, + KC_LCTL, _______, KC_LALT, KC_LALT, _______, _______, _______, _______, KC_MNXT, KC_PGDN, KC_PGUP, KC_MPLY + ), + [_RAISE] = LAYOUT_ortho_4x12( + + KC_GRV, KC_4, KC_1, KC_2, KC_3, KC_PPLS, KC_PAST, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_BSPC, + KC_TILD, KC_7, KC_4, KC_5, KC_6, KC_PMNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LCBR, KC_RCBR, + KC_LSFT, KC_0, KC_7, KC_8, KC_9, KC_EQL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + KC_LCTL, KC_LGUI, KC_0, KC_0, LOWER, KC_0, KC_SPC, RAISE, KC_RALT, KC_MPLY, KC_MPRV, KC_MNXT + ), + [_ADJUST] = LAYOUT_ortho_4x12( + RESET, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, DEBUG, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/handwired/atreus/keymaps/aselimov/keymap.c b/handwired/atreus/keymaps/aselimov/keymap.c new file mode 100644 index 0000000..39822c8 --- /dev/null +++ b/handwired/atreus/keymaps/aselimov/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2021 James Young (@noroadsleft) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum combos { _IO_BCK, _RPRNLBRC_BCK, _KL_ENT, _COMMDOT_QUOT, _WE_TAB, _SD_ESC, _AS_SFT, _LCOL_SFT }; + +const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END}; +const uint16_t PROGMEM kl_combo[] = {KC_K, KC_L, COMBO_END}; +const uint16_t PROGMEM commdot_combo[] = {KC_COMM, KC_DOT, COMBO_END}; +const uint16_t PROGMEM wetab_combo[] = {KC_W, KC_E, COMBO_END}; +const uint16_t PROGMEM sdesc_combo[] = {KC_S, KC_D, COMBO_END}; +const uint16_t PROGMEM assft_combo[] = {KC_A, KC_S, COMBO_END}; +const uint16_t PROGMEM lcolsft_combo[] = {KC_L, KC_SCLN, COMBO_END}; +const uint16_t PROGMEM rprnlbrc_combo[] = {KC_RPRN, KC_LBRC, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = {[_IO_BCK] = COMBO(io_combo, KC_BSPC), [_KL_ENT] = COMBO(kl_combo, KC_ENT), [_RPRNLBRC_BCK] = COMBO(rprnlbrc_combo, KC_BSPC), [_COMMDOT_QUOT] = COMBO(commdot_combo, KC_QUOT), [_WE_TAB] = COMBO(wetab_combo, KC_TAB), [_SD_ESC] = COMBO(sdesc_combo, KC_ESC), [_AS_SFT] = COMBO(assft_combo, KC_LSFT), [_LCOL_SFT] = COMBO(lcolsft_combo, KC_RSFT)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LSFT_T(KC_A), KC_S, KC_D, LGUI_T(KC_F), LCTL_T(KC_G), RCTL_T(KC_H), RGUI_T(KC_J), KC_K, KC_L, RSFT_T(KC_SCLN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, LT(1, KC_SPC), KC_PGDN, KC_PGUP, LT(2, KC_SPC), KC_RALT, XXXXXXX, KC_VOLD, KC_VOLU + + ), + [1] = LAYOUT(KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, S(KC_NUHS), S(KC_NUBS), KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, LT(3, KC_SPC), _______, KC_MNXT, XXXXXXX, XXXXXXX), + [2] = LAYOUT(KC_GRV, KC_1, KC_2, KC_3, KC_PPLS, KC_PAST, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_LSFT, KC_4, KC_5, KC_6, KC_PMNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LCBR, KC_LCTL, KC_7, KC_8, KC_9, KC_EQL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LALT, KC_0, KC_0, KC_LALT, LT(3, KC_0), XXXXXXX, XXXXXXX, _______, _______, KC_RALT, KC_MPLY, KC_BSLS), + [3] = LAYOUT(KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RESET, EEPROM_RESET, XXXXXXX, XXXXXXX, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX)}; + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_SPC): + return true; + case LT(2, KC_SPC): + return true; + default: + return false; + } +} diff --git a/handwired/atreus/keymaps/aselimov/readme.md b/handwired/atreus/keymaps/aselimov/readme.md new file mode 100644 index 0000000..9528663 --- /dev/null +++ b/handwired/atreus/keymaps/aselimov/readme.md @@ -0,0 +1 @@ +# The default keymap for YMD40 v2 diff --git a/handwired/atreus/keymaps/default/keymap.c b/handwired/atreus/keymaps/default/keymap.c new file mode 100644 index 0000000..723b624 --- /dev/null +++ b/handwired/atreus/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2021 James Young (@noroadsleft) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_kc_ortho_4x6( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y + ), +}; diff --git a/handwired/atreus/readme.md b/handwired/atreus/readme.md new file mode 100644 index 0000000..2a2b95c --- /dev/null +++ b/handwired/atreus/readme.md @@ -0,0 +1,187 @@ +Let's Split +====== + +This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ + +Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 +based boards. + +**Hardware files for the Let's Split are now stored at http://qmk.fm/lets_split/** +**Hardware files for the sockets version can be found at https://github.com/dumle29/let-s-Split-v2/tree/socket-reverseable** + +## Build Guide + +A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) + +There is additional information there about flashing and adding RGB underglow. + +A build guide for putting together the sockets version can be found here: *Guide will be made and linked here when the PCBs have been received and tested* + +## First Time Setup + +Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: + +``` +$ make lets_split/rev2:default +``` + +You will see a lot of output and if everything worked correctly you will see the built hex file: + +``` +lets_split_rev2_default.hex +``` + +If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: + + +``` +$ make lets_split/rev2:YOUR_KEYMAP_NAME +``` + +If everything worked correctly you will see a file: + +``` +lets_split_rev2_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. + +### Let's split 1.0 +If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead. + +Features +-------- + +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + +Some features supported by the firmware: + +* Either half can connect to the computer via USB, or both halves can be used + independently. +* You only need 3 wires to connect the two halves. Two for VCC and GND and one + for serial communication. +* Optional support for I2C connection between the two halves if for some + reason you require a faster connection between the two halves. Note this + requires an extra wire between halves and pull-up resistors on the data lines. + +Required Hardware +----------------- + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +Optional Hardware +----------------- + +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +Wiring +------ + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +Notes on Software Configuration +------------------------------- + +Configuring the firmware is similar to any other QMK project. One thing +to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between +the two halves, i.e. if your split keyboard has 4 rows in each half, then use +`MATRIX_ROWS=8`. + +Also, the current implementation assumes a maximum of 8 columns, but it would +not be very difficult to adapt it to support more if required. + +Flashing +------- +From the top level `qmk_firmware` directory run `make KEYBOARD:KEYMAP:avrdude` for automatic serial port resolution and flashing. +Example: `make lets_split/rev2:default:avrdude` + + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep" +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-righthand.eep" +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` diff --git a/handwired/atreus/rules.mk b/handwired/atreus/rules.mk new file mode 100644 index 0000000..770c371 --- /dev/null +++ b/handwired/atreus/rules.mk @@ -0,0 +1,37 @@ +# 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 +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +COMBO_ENABLE = yes +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + +LAYOUTS = atreus_4x12 +