From f7c6d68b3443e242cd658e2913d16db8b2318e03 Mon Sep 17 00:00:00 2001 From: kb-elmo Date: Mon, 17 May 2021 10:55:37 +0200 Subject: [PATCH] [Keyboard] Friedrich (#12569) * added Friedrich * Update readme.md * Update readme.md * Update keyboards/friedrich/keymaps/via/rules.mk * change USB name casing --- keyboards/friedrich/config.h | 45 ++++++++++++++ keyboards/friedrich/friedrich.c | 17 ++++++ keyboards/friedrich/friedrich.h | 43 +++++++++++++ keyboards/friedrich/info.json | 64 ++++++++++++++++++++ keyboards/friedrich/keymaps/default/keymap.c | 33 ++++++++++ keyboards/friedrich/keymaps/via/keymap.c | 47 ++++++++++++++ keyboards/friedrich/keymaps/via/rules.mk | 1 + keyboards/friedrich/readme.md | 21 +++++++ keyboards/friedrich/rules.mk | 22 +++++++ 9 files changed, 293 insertions(+) create mode 100644 keyboards/friedrich/config.h create mode 100644 keyboards/friedrich/friedrich.c create mode 100644 keyboards/friedrich/friedrich.h create mode 100644 keyboards/friedrich/info.json create mode 100644 keyboards/friedrich/keymaps/default/keymap.c create mode 100644 keyboards/friedrich/keymaps/via/keymap.c create mode 100644 keyboards/friedrich/keymaps/via/rules.mk create mode 100644 keyboards/friedrich/readme.md create mode 100644 keyboards/friedrich/rules.mk diff --git a/keyboards/friedrich/config.h b/keyboards/friedrich/config.h new file mode 100644 index 000000000..1e4e36f2e --- /dev/null +++ b/keyboards/friedrich/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2021 kb-elmo + +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 0x6481 +#define PRODUCT_ID 0xB4A2 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kb-elmo +#define PRODUCT Friedrich + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F4, F1, F0, F5, D5 } +#define MATRIX_COL_PINS { F6, F7, E6, B2, B3, D4, D6, D7, B4, C6, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* CAPS LED */ +#define LED_CAPS_LOCK_PIN B1 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/friedrich/friedrich.c b/keyboards/friedrich/friedrich.c new file mode 100644 index 000000000..5c6995202 --- /dev/null +++ b/keyboards/friedrich/friedrich.c @@ -0,0 +1,17 @@ +/* Copyright 2021 kb-elmo + * + * 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 "friedrich.h" diff --git a/keyboards/friedrich/friedrich.h b/keyboards/friedrich/friedrich.h new file mode 100644 index 000000000..d4f043b77 --- /dev/null +++ b/keyboards/friedrich/friedrich.h @@ -0,0 +1,43 @@ +/* Copyright 2021 kb-elmo + * + * 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" + +#define ____ KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k210, k011, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k211, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k311, \ + k400, k401, k405, k409, k410 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, ____, k311 }, \ + { k400, k401, ____, ____, ____, k405, ____, ____, ____, k409, k410, ____ } \ +} diff --git a/keyboards/friedrich/info.json b/keyboards/friedrich/info.json new file mode 100644 index 000000000..94b9f1a20 --- /dev/null +++ b/keyboards/friedrich/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "Friedrich", + "url": "https://github.com/MarvFPV/Friedrich", + "maintainer": "kb-elmo", + "width": 13, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1, "w":1.5}, + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":2.25}, + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3, "w":1.75}, + {"x":1.125, "y":4}, + {"x":2.125, "y":4, "w":1.25}, + {"x":3.375, "y":4, "w":6.25}, + {"x":9.625, "y":4, "w":1.25}, + {"x":10.875, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/friedrich/keymaps/default/keymap.c b/keyboards/friedrich/keymaps/default/keymap.c new file mode 100644 index 000000000..31474f4d0 --- /dev/null +++ b/keyboards/friedrich/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2021 kb-elmo + * + * 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_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) + ), + [1] = LAYOUT( + KC_GRV, 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_LBRC, KC_RBRC, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_MPLY, KC_SLSH, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/friedrich/keymaps/via/keymap.c b/keyboards/friedrich/keymaps/via/keymap.c new file mode 100644 index 000000000..cbbe87b16 --- /dev/null +++ b/keyboards/friedrich/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2021 kb-elmo + * + * 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_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) + ), + [1] = LAYOUT( + KC_GRV, 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_LBRC, KC_RBRC, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_MPLY, KC_SLSH, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + 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, 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 + ), + [3] = LAYOUT( + 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, 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 + ) +}; diff --git a/keyboards/friedrich/keymaps/via/rules.mk b/keyboards/friedrich/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/friedrich/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/friedrich/readme.md b/keyboards/friedrich/readme.md new file mode 100644 index 000000000..dbe890bd9 --- /dev/null +++ b/keyboards/friedrich/readme.md @@ -0,0 +1,21 @@ +# Friedrich + +![friedrich](https://i.imgur.com/LH15u37l.jpg) + +A small printer friendly 3D printed 50% keyboard. + +* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) +* Hardware Supported: Friedrich PCB by kb-elmo +* Hardware Availability: [Open source project](https://github.com/MarvFPV/Friedrich) + +Make example for this keyboard (after setting up your build environment): + + make friedrich:default + +Flashing example for this keyboard: + + make friedrich:default:flash + +**Bootloader:** Press the physical reset button on the top side of the PCB or hold down ESC while plugging in the board. + +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/friedrich/rules.mk b/keyboards/friedrich/rules.mk new file mode 100644 index 000000000..a90eef1fc --- /dev/null +++ b/keyboards/friedrich/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output