From 5d767f8361a39a7902b81d3902360ca1d22242f4 Mon Sep 17 00:00:00 2001 From: Tommy Alatalo Date: Tue, 7 Jun 2022 20:14:44 +0200 Subject: [PATCH] [Keyboard] Add alt34 keyboard (#17223) * Add files for alt34 keyboard * Add link to hardware bill of materials for alt34 * Change keyboard image link to imgur * Remove platform specific defines from rev1.h * Remove bluetooth and sleep led rules etc * Add GPL license header to all source code files * Shorten comment for NKRO_ENABLE Co-authored-by: Drashna Jaelre * Simplify option usage comment in rules.mk Co-authored-by: Drashna Jaelre * Set imgur link to largest size option Co-authored-by: Drashna Jaelre * Move rules.mk into rev1 folder entirely * Remove .noci file * Update keyboards/alt34/rev1/rules.mk Co-authored-by: Ryan Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/alt34/alt34.c | 18 +++++++ keyboards/alt34/alt34.h | 24 +++++++++ keyboards/alt34/config.h | 20 +++++++ keyboards/alt34/info.json | 52 +++++++++++++++++++ keyboards/alt34/keymaps/default/config.h | 27 ++++++++++ keyboards/alt34/keymaps/default/keymap.c | 32 ++++++++++++ keyboards/alt34/readme.md | 66 ++++++++++++++++++++++++ keyboards/alt34/rev1/config.h | 46 +++++++++++++++++ keyboards/alt34/rev1/rev1.c | 18 +++++++ keyboards/alt34/rev1/rev1.h | 42 +++++++++++++++ keyboards/alt34/rev1/rules.mk | 22 ++++++++ 11 files changed, 367 insertions(+) create mode 100644 keyboards/alt34/alt34.c create mode 100644 keyboards/alt34/alt34.h create mode 100644 keyboards/alt34/config.h create mode 100644 keyboards/alt34/info.json create mode 100644 keyboards/alt34/keymaps/default/config.h create mode 100644 keyboards/alt34/keymaps/default/keymap.c create mode 100644 keyboards/alt34/readme.md create mode 100644 keyboards/alt34/rev1/config.h create mode 100644 keyboards/alt34/rev1/rev1.c create mode 100644 keyboards/alt34/rev1/rev1.h create mode 100644 keyboards/alt34/rev1/rules.mk diff --git a/keyboards/alt34/alt34.c b/keyboards/alt34/alt34.c new file mode 100644 index 0000000000..f71f8092c9 --- /dev/null +++ b/keyboards/alt34/alt34.c @@ -0,0 +1,18 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 "alt34.h" diff --git a/keyboards/alt34/alt34.h b/keyboards/alt34/alt34.h new file mode 100644 index 0000000000..0d0bdd3fd4 --- /dev/null +++ b/keyboards/alt34/alt34.h @@ -0,0 +1,24 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 "quantum.h" + +#ifdef KEYBOARD_alt34_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/alt34/config.h b/keyboards/alt34/config.h new file mode 100644 index 0000000000..44ee245fe4 --- /dev/null +++ b/keyboards/alt34/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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" diff --git a/keyboards/alt34/info.json b/keyboards/alt34/info.json new file mode 100644 index 0000000000..647c853136 --- /dev/null +++ b/keyboards/alt34/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "alt34", + "url": "https://gitlab.com/altosys/alt34", + "maintainer": "@altosys", + "layouts": { + "LAYOUT_split_3x5_2": { + "layout": [ + {"x": 0, "y": 0.93}, + {"x": 1, "y": 0.31}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.28}, + {"x": 4, "y": 0.42}, + + {"x": 7, "y": 0.42}, + {"x": 8, "y": 0.28}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0.31}, + {"x": 11, "y": 0.93}, + + {"x": 0, "y": 1.93}, + {"x": 1, "y": 1.31}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.28}, + {"x": 4, "y": 1.42}, + + {"x": 7, "y": 1.42}, + {"x": 8, "y": 1.28}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1.31}, + {"x": 11, "y": 1.93}, + + {"x": 0, "y": 2.93}, + {"x": 1, "y": 2.31}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.28}, + {"x": 4, "y": 2.42}, + + {"x": 7, "y": 2.42}, + {"x": 8, "y": 2.28}, + {"x": 9, "y": 2}, + {"x": 10, "y": 2.31}, + {"x": 11, "y": 2.93}, + + {"x": 3.5, "y": 3.45}, + {"x": 4.5, "y": 3.7}, + + {"x": 6.5, "y": 3.7}, + {"x": 7.5, "y": 3.45} + ] + } + } +} diff --git a/keyboards/alt34/keymaps/default/config.h b/keyboards/alt34/keymaps/default/config.h new file mode 100644 index 0000000000..da63234575 --- /dev/null +++ b/keyboards/alt34/keymaps/default/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 + +/* Use I2C or Serial, not both */ +#define USE_I2C +/* #define USE_SERIAL */ + +/* Select hand configuration */ +#define EE_HANDS +/* #define MASTER_LEFT */ +/* #define MASTER_RIGHT */ diff --git a/keyboards/alt34/keymaps/default/keymap.c b/keyboards/alt34/keymaps/default/keymap.c new file mode 100644 index 0000000000..dda7921665 --- /dev/null +++ b/keyboards/alt34/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 + +// Define aliases for layers +enum layers { + BASE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = LAYOUT_split_3x5_2( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_SPC, KC_TAB, KC_BSPC, KC_ENT + ) +}; diff --git a/keyboards/alt34/readme.md b/keyboards/alt34/readme.md new file mode 100644 index 0000000000..14c1e28c7a --- /dev/null +++ b/keyboards/alt34/readme.md @@ -0,0 +1,66 @@ +# alt34 + +![alt34](https://i.imgur.com/GDv0dL0h.png) + +alt34 was designed as a minimalistic, 'no frills' workhorse keyboard with focus on efficiency and ergonomics. +This breaks down into the following priorities in the design: + +* Keyboard Maintainer: [Tommy Alatalo](https://github.com/altosys) +* Hardware Supported: + * Compact 34 key split layout with two thumb keys per hand + * Orthogonal layout with a somewhat aggressive column stagger + * Compatibility with standard controllers (Elite-C, Pro Micro etc.) + * Cherry MX switch support + * Kailh hotswap socket support + * Tenting puck support + +## Hardware + +A bill of materials for building alt34 is found in [the alt34 git repo](https://gitlab.com/altosys/alt34) + +## 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 jumper**: Briefly short the pads just below the TRRS connector on the PCB +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +Latest updates and information for alt34 is found at https://gitlab.com/altosys/alt34 + +## Build Guide + +There is no dedicated build guide for alt34. If you are a novice builder and need guidance then suggested reading would be build guides for the Corne keyboard (aka. crkbd), they will cover the usual installation of the controller, diodes and hotswap sockets, which is essentially all there is to assembling the alt34. + +## Flashing QMK Firmware + +Set up your build environment according to the QMK documentation, then after cloning the `qmk_firmware` repository you can run the below commands in the repo root to build and flash the firmware onto your controller. + +Note that this method enables `EE_HANDS` mode which allows you to connect the USB cable to either half of alt34 when using the keyboard. + + +Flash `EE_HANDS` to the left hand half, this updates the persistent EEPROM storage along with the firmware. +Run the below command and then set the board into bootloader mode by bridging the reset pads below the TRRS connector with a paper clip or similar. +``` +make alt34/rev1:default:dfu-split-left +``` + +Do the same for the right hand side: +``` +make alt34/rev1:default:dfu-split-right +``` + +Now you should be able to connect the USB cable to either side of the split and it should work the same. + +For any further changes it is enough to flash only the firmware and not the EEPROM: +``` +make alt34/rev1:default:flash +``` + +It is still recommended to do this for both sides of the split when updating keymaps etc. + +**Note I:** the above examples are using an Elite-C controller with an `atmel-dfu` bootloader, adjust this according to your own hardware. + +**Note II:** the included keymap is rudimentary, the recommended layout to use with alt34 is `miryoku`, see the [miryoku docs](https://github.com/manna-harbour/miryoku) for instructions. + +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/alt34/rev1/config.h b/keyboards/alt34/rev1/config.h new file mode 100644 index 0000000000..f599d62935 --- /dev/null +++ b/keyboards/alt34/rev1/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1ABC +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER altosys +#define PRODUCT alt34 + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7 } +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +/* #define SOFT_SERIAL_PIN D0 */ + +/* 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 diff --git a/keyboards/alt34/rev1/rev1.c b/keyboards/alt34/rev1/rev1.c new file mode 100644 index 0000000000..f71f8092c9 --- /dev/null +++ b/keyboards/alt34/rev1/rev1.c @@ -0,0 +1,18 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 "alt34.h" diff --git a/keyboards/alt34/rev1/rev1.h b/keyboards/alt34/rev1/rev1.h new file mode 100644 index 0000000000..5600b0d5ad --- /dev/null +++ b/keyboards/alt34/rev1/rev1.h @@ -0,0 +1,42 @@ +/* +Copyright 2022 Tommy Alatalo <@altosys> + +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 "alt34.h" +#include "quantum.h" + +#define ____ KC_NO + +/* left hand right hand */ +#define LAYOUT_split_3x5_2(\ + K0_0, K0_1, K0_2, K0_3, K0_4, K0_5, K0_6, K0_7, K0_8, K0_9,\ + K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9,\ + K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9,\ + K3_2, K3_3, K3_4, K3_5 )\ +/* matrix positions */\ +{\ + {K0_0, K0_1, K0_2, K0_3, K0_4},\ + {K1_0, K1_1, K1_2, K1_3, K1_4},\ + {K2_0, K2_1, K2_2, K2_3, K2_4},\ + {____, ____, ____, K3_2, K3_3},\ + \ + {K0_9, K0_8, K0_7, K0_6, K0_5},\ + {K1_9, K1_8, K1_7, K1_6, K1_5},\ + {K2_9, K2_8, K2_7, K2_6, K2_5},\ + {____, ____, ____, K3_5, K3_4} \ +} diff --git a/keyboards/alt34/rev1/rules.mk b/keyboards/alt34/rev1/rules.mk new file mode 100644 index 0000000000..a57c3ad606 --- /dev/null +++ b/keyboards/alt34/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change to "no" to disable the options +# +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 +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_2 +DEFAULT_FOLDER = alt34/rev1