From 7578daaf168023ad1dae28e0052d1a508c2c511b Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:37:35 +0700 Subject: [Keyboard] Add Olly Orion to QMK (#19134) Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Drashna Jaelre --- keyboards/mechlovin/olly/orion/config.h | 75 ++++++++++++++++++++++ keyboards/mechlovin/olly/orion/info.json | 23 +++++++ .../mechlovin/olly/orion/keymaps/default/keymap.c | 35 ++++++++++ .../mechlovin/olly/orion/keymaps/via/config.h | 22 +++++++ .../mechlovin/olly/orion/keymaps/via/keymap.c | 59 +++++++++++++++++ .../mechlovin/olly/orion/keymaps/via/rules.mk | 1 + keyboards/mechlovin/olly/orion/orion.c | 36 +++++++++++ keyboards/mechlovin/olly/orion/orion.h | 67 +++++++++++++++++++ keyboards/mechlovin/olly/orion/readme.md | 24 +++++++ keyboards/mechlovin/olly/orion/rules.mk | 20 ++++++ 10 files changed, 362 insertions(+) create mode 100644 keyboards/mechlovin/olly/orion/config.h create mode 100644 keyboards/mechlovin/olly/orion/info.json create mode 100644 keyboards/mechlovin/olly/orion/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/olly/orion/keymaps/via/config.h create mode 100644 keyboards/mechlovin/olly/orion/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/olly/orion/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/olly/orion/orion.c create mode 100644 keyboards/mechlovin/olly/orion/orion.h create mode 100644 keyboards/mechlovin/olly/orion/readme.md create mode 100644 keyboards/mechlovin/olly/orion/rules.mk diff --git a/keyboards/mechlovin/olly/orion/config.h b/keyboards/mechlovin/olly/orion/config.h new file mode 100644 index 0000000000..677c4e45ff --- /dev/null +++ b/keyboards/mechlovin/olly/orion/config.h @@ -0,0 +1,75 @@ +/* +Copyright 2022 Mechlovin' Studio + +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" + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { A8, A9, A10, B11, C13, C14 } +#define MATRIX_COL_PINS { B14, B13, B12, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, A15, B3, B4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define LED_CAPS_LOCK_PIN B10 +#define LED_NUM_LOCK_PIN A13 +#define LED_SCROLL_LOCK_PIN A14 +#define LED_PIN_ON_STATE 1 + +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN B15 +# define RGBLED_NUM 24 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +# define RGBLIGHT_EFFECT_TWINKLE +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mechlovin/olly/orion/info.json b/keyboards/mechlovin/olly/orion/info.json new file mode 100644 index 0000000000..07f2208b3f --- /dev/null +++ b/keyboards/mechlovin/olly/orion/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "Olly Orion", + "manufacturer": "Mechlovin.Studio", + "url": "", + "maintainer": "Mechlovin' Studio", + "usb": { + "vid": "0x4D4C", + "pid": "0xD870", + "device_version": "0.0.1" + }, + "layouts": { + "LAYOUT_tkl_ansi_split_bs_rshift": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"0,2", "x":3, "y":0}, {"label":"0,3", "x":4, "y":0}, {"label":"0,4", "x":5, "y":0}, {"label":"0,5", "x":6.5, "y":0}, {"label":"0,6", "x":7.5, "y":0}, {"label":"0,7", "x":8.5, "y":0}, {"label":"0,8", "x":9.5, "y":0}, {"label":"0,9", "x":11, "y":0}, {"label":"0,10", "x":12, "y":0}, {"label":"0,11", "x":13, "y":0}, {"label":"0,12", "x":14, "y":0}, {"label":"0,14", "x":15.25, "y":0}, {"label":"0,15", "x":16.25, "y":0}, {"label":"0,16", "x":17.25, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":7, "y":1.25}, {"label":"1,8", "x":8, "y":1.25}, {"label":"1,9", "x":9, "y":1.25}, {"label":"1,10", "x":10, "y":1.25}, {"label":"1,11", "x":11, "y":1.25}, {"label":"1,12", "x":12, "y":1.25}, {"label":"1,13", "x":13, "y":1.25}, {"label":"2,13", "x":14, "y":1.25}, {"label":"1,14", "x":15.25, "y":1.25}, {"label":"1,15", "x":16.25, "y":1.25}, {"label":"1,16", "x":17.25, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":6.5, "y":2.25}, {"label":"2,7", "x":7.5, "y":2.25}, {"label":"2,8", "x":8.5, "y":2.25}, {"label":"2,9", "x":9.5, "y":2.25}, {"label":"2,10", "x":10.5, "y":2.25}, {"label":"2,11", "x":11.5, "y":2.25}, {"label":"2,12", "x":12.5, "y":2.25}, {"label":"3,12", "x":13.5, "y":2.25, "w":1.5}, {"label":"2,14", "x":15.25, "y":2.25}, {"label":"2,15", "x":16.25, "y":2.25}, {"label":"2,16", "x":17.25, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":6.75, "y":3.25}, {"label":"3,7", "x":7.75, "y":3.25}, {"label":"3,8", "x":8.75, "y":3.25}, {"label":"3,9", "x":9.75, "y":3.25}, {"label":"3,10", "x":10.75, "y":3.25}, {"label":"3,11", "x":11.75, "y":3.25}, {"label":"3,13", "x":12.75, "y":3.25, "w":2.25}, {"label":"4,0", "x":0, "y":4.25, "w":2.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"4,7", "x":7.25, "y":4.25}, {"label":"4,8", "x":8.25, "y":4.25}, {"label":"4,9", "x":9.25, "y":4.25}, {"label":"4,10", "x":10.25, "y":4.25}, {"label":"4,11", "x":11.25, "y":4.25}, {"label":"4,12", "x":12.25, "y":4.25}, {"label":"4,13", "x":13.25, "y":4.25, "w":1.75}, {"label":"4,15", "x":16.25, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.25}, {"label":"5,6", "x":3.75, "y":5.25, "w":6.25}, {"label":"5,10", "x":10, "y":5.25, "w":1.25}, {"label":"5,11", "x":11.25, "y":5.25, "w":1.25}, {"label":"5,12", "x":12.5, "y":5.25, "w":1.25}, {"label":"5,13", "x":13.75, "y":5.25, "w":1.25}, {"label":"5,14", "x":15.25, "y":5.25}, {"label":"5,15", "x":16.25, "y":5.25}, {"label":"5,16", "x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_iso_split_bs_rshift": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"0,2", "x":3, "y":0}, {"label":"0,3", "x":4, "y":0}, {"label":"0,4", "x":5, "y":0}, {"label":"0,5", "x":6.5, "y":0}, {"label":"0,6", "x":7.5, "y":0}, {"label":"0,7", "x":8.5, "y":0}, {"label":"0,8", "x":9.5, "y":0}, {"label":"0,9", "x":11, "y":0}, {"label":"0,10", "x":12, "y":0}, {"label":"0,11", "x":13, "y":0}, {"label":"0,12", "x":14, "y":0}, {"label":"0,14", "x":15.25, "y":0}, {"label":"0,15", "x":16.25, "y":0}, {"label":"0,16", "x":17.25, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":7, "y":1.25}, {"label":"1,8", "x":8, "y":1.25}, {"label":"1,9", "x":9, "y":1.25}, {"label":"1,10", "x":10, "y":1.25}, {"label":"1,11", "x":11, "y":1.25}, {"label":"1,12", "x":12, "y":1.25}, {"label":"1,13", "x":13, "y":1.25}, {"label":"2,13", "x":14, "y":1.25}, {"label":"1,14", "x":15.25, "y":1.25}, {"label":"1,15", "x":16.25, "y":1.25}, {"label":"1,16", "x":17.25, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":6.5, "y":2.25}, {"label":"2,7", "x":7.5, "y":2.25}, {"label":"2,8", "x":8.5, "y":2.25}, {"label":"2,9", "x":9.5, "y":2.25}, {"label":"2,10", "x":10.5, "y":2.25}, {"label":"2,11", "x":11.5, "y":2.25}, {"label":"2,12", "x":12.5, "y":2.25}, {"label":"3,13", "x":13.75, "y":2.25, "w":1.25, "h":2}, {"label":"2,14", "x":15.25, "y":2.25}, {"label":"2,15", "x":16.25, "y":2.25}, {"label":"2,16", "x":17.25, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":6.75, "y":3.25}, {"label":"3,7", "x":7.75, "y":3.25}, {"label":"3,8", "x":8.75, "y":3.25}, {"label":"3,9", "x":9.75, "y":3.25}, {"label":"3,10", "x":10.75, "y":3.25}, {"label":"3,11", "x":11.75, "y":3.25}, {"label":"3,12", "x":12.75, "y":3.25}, {"label":"4,0", "x":0, "y":4.25, "w":1.25}, {"label":"4,1", "x":1.25, "y":4.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"4,7", "x":7.25, "y":4.25}, {"label":"4,8", "x":8.25, "y":4.25}, {"label":"4,9", "x":9.25, "y":4.25}, {"label":"4,10", "x":10.25, "y":4.25}, {"label":"4,11", "x":11.25, "y":4.25}, {"label":"4,12", "x":12.25, "y":4.25}, {"label":"4,13", "x":13.25, "y":4.25, "w":1.75}, {"label":"4,15", "x":16.25, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.25}, {"label":"5,6", "x":3.75, "y":5.25, "w":6.25}, {"label":"5,10", "x":10, "y":5.25, "w":1.25}, {"label":"5,11", "x":11.25, "y":5.25, "w":1.25}, {"label":"5,12", "x":12.5, "y":5.25, "w":1.25}, {"label":"5,13", "x":13.75, "y":5.25, "w":1.25}, {"label":"5,14", "x":15.25, "y":5.25}, {"label":"5,15", "x":16.25, "y":5.25}, {"label":"5,16", "x":17.25, "y":5.25}] + }, + "LAYOUT_all": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1.25, "y":0}, {"label":"0,2", "x":2.25, "y":0}, {"label":"0,3", "x":3.25, "y":0}, {"label":"0,4", "x":4.25, "y":0}, {"label":"0,5", "x":5.5, "y":0}, {"label":"0,6", "x":6.5, "y":0}, {"label":"0,7", "x":7.5, "y":0}, {"label":"0,8", "x":8.5, "y":0}, {"label":"0,9", "x":9.75, "y":0}, {"label":"0,10", "x":10.75, "y":0}, {"label":"0,11", "x":11.75, "y":0}, {"label":"0,12", "x":12.75, "y":0}, {"label":"0,14", "x":15.25, "y":0}, {"label":"0,15", "x":16.25, "y":0}, {"label":"0,16", "x":17.25, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":7, "y":1.25}, {"label":"1,8", "x":8, "y":1.25}, {"label":"1,9", "x":9, "y":1.25}, {"label":"1,10", "x":10, "y":1.25}, {"label":"1,11", "x":11, "y":1.25}, {"label":"1,12", "x":12, "y":1.25}, {"label":"1,13", "x":13, "y":1.25}, {"label":"2,13", "x":14, "y":1.25}, {"label":"1,14", "x":15.25, "y":1.25}, {"label":"1,15", "x":16.25, "y":1.25}, {"label":"1,16", "x":17.25, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":6.5, "y":2.25}, {"label":"2,7", "x":7.5, "y":2.25}, {"label":"2,8", "x":8.5, "y":2.25}, {"label":"2,9", "x":9.5, "y":2.25}, {"label":"2,10", "x":10.5, "y":2.25}, {"label":"2,11", "x":11.5, "y":2.25}, {"label":"2,12", "x":12.5, "y":2.25}, {"label":"3,12", "x":13.5, "y":2.25, "w":1.5}, {"label":"2,14", "x":15.25, "y":2.25}, {"label":"2,15", "x":16.25, "y":2.25}, {"label":"2,16", "x":17.25, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":6.75, "y":3.25}, {"label":"3,7", "x":7.75, "y":3.25}, {"label":"3,8", "x":8.75, "y":3.25}, {"label":"3,9", "x":9.75, "y":3.25}, {"label":"3,10", "x":10.75, "y":3.25}, {"label":"3,11", "x":11.75, "y":3.25}, {"label":"3,13", "x":12.75, "y":3.25, "w":2.25}, {"label":"4,0", "x":0, "y":4.25, "w":1.25}, {"label":"4,1", "x":1.25, "y":4.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"4,7", "x":7.25, "y":4.25}, {"label":"4,8", "x":8.25, "y":4.25}, {"label":"4,9", "x":9.25, "y":4.25}, {"label":"4,10", "x":10.25, "y":4.25}, {"label":"4,11", "x":11.25, "y":4.25}, {"label":"4,12", "x":12.25, "y":4.25}, {"label":"4,13", "x":13.25, "y":4.25, "w":1.75}, {"label":"4,15", "x":16.25, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.25}, {"label":"5,6", "x":3.75, "y":5.25, "w":6.25}, {"label":"5,10", "x":10, "y":5.25, "w":1.25}, {"label":"5,11", "x":11.25, "y":5.25, "w":1.25}, {"label":"5,12", "x":12.5, "y":5.25, "w":1.25}, {"label":"5,13", "x":13.75, "y":5.25, "w":1.25}, {"label":"5,14", "x":15.25, "y":5.25}, {"label":"5,15", "x":16.25, "y":5.25}, {"label":"5,16", "x":17.25, "y":5.25}] + } + }, + "meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/mechlovin/olly/orion/keymaps/default/keymap.c b/keyboards/mechlovin/olly/orion/keymaps/default/keymap.c new file mode 100644 index 0000000000..40028652f0 --- /dev/null +++ b/keyboards/mechlovin/olly/orion/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2022 Mechlovin' Studio + * + * 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_all( + KC_ESC, 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_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, 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_DEL, KC_INS, KC_HOME, KC_PGUP, + 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_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LSFT, KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI,MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + 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, RGB_SAI, RGB_HUI, + 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, RGB_SAD, RGB_HUD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, + 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, RGB_VAI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD + ) +}; diff --git a/keyboards/mechlovin/olly/orion/keymaps/via/config.h b/keyboards/mechlovin/olly/orion/keymaps/via/config.h new file mode 100644 index 0000000000..89c7c50ff2 --- /dev/null +++ b/keyboards/mechlovin/olly/orion/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2022 Mechlovin' Studio + +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 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 +#define WEAR_LEVELING_BACKING_SIZE 4096 +#define WEAR_LEVELING_LOGICAL_SIZE 2048 diff --git a/keyboards/mechlovin/olly/orion/keymaps/via/keymap.c b/keyboards/mechlovin/olly/orion/keymaps/via/keymap.c new file mode 100644 index 0000000000..e7c0e93f7f --- /dev/null +++ b/keyboards/mechlovin/olly/orion/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2022 Mechlovin' Studio + * + * 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_all( + KC_ESC, 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_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, 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_DEL, KC_INS, KC_HOME, KC_PGUP, + 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_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LSFT, KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI,MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + 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, RGB_SAI, RGB_HUI, + 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, RGB_SAD, RGB_HUD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, + 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, RGB_VAI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD + ), + [2] = LAYOUT_all( + 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, 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_all( + 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, 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 + ), + [4] = LAYOUT_all( + 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, 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/mechlovin/olly/orion/keymaps/via/rules.mk b/keyboards/mechlovin/olly/orion/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/mechlovin/olly/orion/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mechlovin/olly/orion/orion.c b/keyboards/mechlovin/olly/orion/orion.c new file mode 100644 index 0000000000..9f02f1a5fa --- /dev/null +++ b/keyboards/mechlovin/olly/orion/orion.c @@ -0,0 +1,36 @@ +/* Copyright 2022 Mechlovin' Studio + * + * 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 "orion.h" + +void led_init_ports(void) { + setPinOutput(B5); + setPinOutput(B6); + setPinOutput(B7); + setPinOutput(B8); + setPinOutput(B9); + +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + writePin(B7, layer_state_cmp(state, 0)); + writePin(B6, layer_state_cmp(state, 1)); + writePin(B5, layer_state_cmp(state, 2)); + writePin(B8, layer_state_cmp(state, 3)); + writePin(B9, layer_state_cmp(state, 4)); + return state; +} diff --git a/keyboards/mechlovin/olly/orion/orion.h b/keyboards/mechlovin/olly/orion/orion.h new file mode 100644 index 0000000000..fb62e0948e --- /dev/null +++ b/keyboards/mechlovin/olly/orion/orion.h @@ -0,0 +1,67 @@ +/* Copyright 2022 Mechlovin' Studio + * + * 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 LAYOUT_all( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3C, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} + +#define LAYOUT_tkl_ansi_split_bs_rshift( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3C, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} + +#define LAYOUT_tkl_iso_split_bs_rshift( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} diff --git a/keyboards/mechlovin/olly/orion/readme.md b/keyboards/mechlovin/olly/orion/readme.md new file mode 100644 index 0000000000..1f29edaf87 --- /dev/null +++ b/keyboards/mechlovin/olly/orion/readme.md @@ -0,0 +1,24 @@ +# Olly Orion + +![Olly Orion](https://i.imgur.com/midAJSplh.jpeg) + +The Olly Orion is designed as a drop-in replacement PCB for the Duck Orion V2; V2.5 and V3 TKL custom keyboards. + +* Keyboard Maintainer: [Mechlovin' Studio](https://github.com/mechlovin) +* Hardware Supported: Olly Orion, APM32F103. +* Hardware Availability: [Mechlovin' Studio](https://mechlovin.studio), [GB](https://www.reddit.com/r/mechmarket/comments/z1i5g3/gb_mechlovin_olly_orion_octagon_duck_orion/). + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/olly/orion:default + +Flashing example for this keyboard: + + make mechlovin/olly/orion/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). + +**Reset Key:** 3 ways to put the IF87.5 into bootloader: +- By keycode: Tap RESET keycode. +- By bootmagic: hold ESC key while plugging in. +- By hardware: Push reset button on bottom of the PCB while the PCB is plugged in. \ No newline at end of file diff --git a/keyboards/mechlovin/olly/orion/rules.mk b/keyboards/mechlovin/olly/orion/rules.mk new file mode 100644 index 0000000000..2e0fa8f743 --- /dev/null +++ b/keyboards/mechlovin/olly/orion/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F103 +BOARD = STM32_F103_STM32DUINO + +# Bootloader selection +BOOTLOADER = stm32duino + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + -- cgit v1.2.3 From 7cf3dd7b8dbbc7ab362f6b3151ac7fffd985a401 Mon Sep 17 00:00:00 2001 From: dztech Date: Tue, 13 Dec 2022 10:38:15 +0800 Subject: [Keyboard] add tofu_ii keyboard (#19118) Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/dztech/tofu/ii/info.json | 5 + keyboards/dztech/tofu/ii/keymaps/default/keymap.c | 32 +++++ keyboards/dztech/tofu/ii/keymaps/via/keymap.c | 44 ++++++ keyboards/dztech/tofu/ii/keymaps/via/rules.mk | 1 + keyboards/dztech/tofu/ii/readme.md | 22 +++ keyboards/dztech/tofu/ii/rules.mk | 1 + keyboards/dztech/tofu/ii/v1/config.h | 88 ++++++++++++ keyboards/dztech/tofu/ii/v1/halconf.h | 21 +++ keyboards/dztech/tofu/ii/v1/info.json | 167 ++++++++++++++++++++++ keyboards/dztech/tofu/ii/v1/mcuconf.h | 22 +++ keyboards/dztech/tofu/ii/v1/readme.md | 22 +++ keyboards/dztech/tofu/ii/v1/rules.mk | 0 keyboards/dztech/tofu/ii/v1/v1.c | 103 +++++++++++++ 13 files changed, 528 insertions(+) create mode 100644 keyboards/dztech/tofu/ii/info.json create mode 100644 keyboards/dztech/tofu/ii/keymaps/default/keymap.c create mode 100644 keyboards/dztech/tofu/ii/keymaps/via/keymap.c create mode 100644 keyboards/dztech/tofu/ii/keymaps/via/rules.mk create mode 100644 keyboards/dztech/tofu/ii/readme.md create mode 100644 keyboards/dztech/tofu/ii/rules.mk create mode 100644 keyboards/dztech/tofu/ii/v1/config.h create mode 100644 keyboards/dztech/tofu/ii/v1/halconf.h create mode 100644 keyboards/dztech/tofu/ii/v1/info.json create mode 100644 keyboards/dztech/tofu/ii/v1/mcuconf.h create mode 100644 keyboards/dztech/tofu/ii/v1/readme.md create mode 100644 keyboards/dztech/tofu/ii/v1/rules.mk create mode 100644 keyboards/dztech/tofu/ii/v1/v1.c diff --git a/keyboards/dztech/tofu/ii/info.json b/keyboards/dztech/tofu/ii/info.json new file mode 100644 index 0000000000..8dee5e0cbc --- /dev/null +++ b/keyboards/dztech/tofu/ii/info.json @@ -0,0 +1,5 @@ +{ + "keyboard_name": "TOFU_II", + "manufacturer": "DZTECH", + "maintainer": "DZTECH" +} diff --git a/keyboards/dztech/tofu/ii/keymaps/default/keymap.c b/keyboards/dztech/tofu/ii/keymaps/default/keymap.c new file mode 100644 index 0000000000..0acfb4df9e --- /dev/null +++ b/keyboards/dztech/tofu/ii/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2022 DZTECH + * + * 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( + QK_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_HOME, + 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_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT( + QK_GESC, 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_DEL, KC_HOME, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGUP, + KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_PGDN, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/keyboards/dztech/tofu/ii/keymaps/via/keymap.c b/keyboards/dztech/tofu/ii/keymaps/via/keymap.c new file mode 100644 index 0000000000..35b8e6fe93 --- /dev/null +++ b/keyboards/dztech/tofu/ii/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2022 DZTECH + * + * 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( + QK_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_HOME, + 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_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT( + QK_GESC, 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_DEL, KC_HOME, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGUP, + KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_PGDN, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [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, 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, 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/dztech/tofu/ii/keymaps/via/rules.mk b/keyboards/dztech/tofu/ii/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/dztech/tofu/ii/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/dztech/tofu/ii/readme.md b/keyboards/dztech/tofu/ii/readme.md new file mode 100644 index 0000000000..94950987ff --- /dev/null +++ b/keyboards/dztech/tofu/ii/readme.md @@ -0,0 +1,22 @@ +# TOFU_II +A customizable 66 key RGB keyboard. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: TOFU_II +* Hardware Availability: [KBDfans](https://kbdfans.com/) + +## Bootloader mode + +Enter the bootloader in 3 ways: + +* Bootmagic reset: Hold down the left top key then plug in the USB cable. +* Physical reset button: Double tap the reset button. +* Keycode in layout: Press the key mapped to QK_BOOT if it is available. + +## Making firmware + +Make example for this keyboard (after setting up your build environment): + + make dztech/tofu/ii/v1:default + +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/dztech/tofu/ii/rules.mk b/keyboards/dztech/tofu/ii/rules.mk new file mode 100644 index 0000000000..c08cfdaae9 --- /dev/null +++ b/keyboards/dztech/tofu/ii/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = dztech/tofu/ii/v1 diff --git a/keyboards/dztech/tofu/ii/v1/config.h b/keyboards/dztech/tofu/ii/v1/config.h new file mode 100644 index 0000000000..6343bb9e9d --- /dev/null +++ b/keyboards/dztech/tofu/ii/v1/config.h @@ -0,0 +1,88 @@ +/* Copyright 2022 DZTECH + * + * 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 +#define I2C1_SDA_PIN GP2 +#define I2C1_SCL_PIN GP3 +#define I2C_DRIVER I2CD2 + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U + +#ifdef RGB_MATRIX_ENABLE +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define USB_SUSPEND_WAKEUP_DELAY 5000 +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1011111 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 46 +# define DRIVER_2_LED_TOTAL 20 +# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#endif diff --git a/keyboards/dztech/tofu/ii/v1/halconf.h b/keyboards/dztech/tofu/ii/v1/halconf.h new file mode 100644 index 0000000000..2afac582dd --- /dev/null +++ b/keyboards/dztech/tofu/ii/v1/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2022 DZTECH + * + * 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 + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/dztech/tofu/ii/v1/info.json b/keyboards/dztech/tofu/ii/v1/info.json new file mode 100644 index 0000000000..633badfa15 --- /dev/null +++ b/keyboards/dztech/tofu/ii/v1/info.json @@ -0,0 +1,167 @@ +{ + "bootloader": "rp2040", + "debounce": 5, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["GP25", "GP24", "GP23", "GP1", "GP7", "GP21", "GP20", "GP19", "GP18", "GP17", "GP16", "GP15", "GP14", "GP13", "GP12"], + "rows": ["GP0", "GP28", "GP27", "GP26", "GP22"] + }, + "processor": "RP2040", + "rgb_matrix": { + "driver": "IS31FL3737", + "layout": [ + { "flags": 1, "matrix": [0, 0], "x": 0, "y": 0 }, + { "flags": 4, "matrix": [0, 1], "x": 15, "y": 0 }, + { "flags": 4, "matrix": [0, 2], "x": 30, "y": 0 }, + { "flags": 4, "matrix": [0, 3], "x": 45, "y": 0 }, + { "flags": 4, "matrix": [0, 4], "x": 60, "y": 0 }, + { "flags": 4, "matrix": [0, 5], "x": 75, "y": 0 }, + { "flags": 4, "matrix": [0, 6], "x": 90, "y": 0 }, + { "flags": 4, "matrix": [0, 7], "x": 105, "y": 0 }, + { "flags": 4, "matrix": [0, 8], "x": 120, "y": 0 }, + { "flags": 4, "matrix": [0, 9], "x": 135, "y": 0 }, + { "flags": 4, "matrix": [0, 10], "x": 150, "y": 0 }, + { "flags": 4, "matrix": [0, 11], "x": 165, "y": 0 }, + { "flags": 4, "matrix": [0, 12], "x": 180, "y": 0 }, + { "flags": 4, "matrix": [0, 13], "x": 203, "y": 0 }, + { "flags": 1, "matrix": [0, 14], "x": 224, "y": 0 }, + { "flags": 1, "matrix": [1, 0], "x": 4, "y": 16 }, + { "flags": 4, "matrix": [1, 1], "x": 23, "y": 16 }, + { "flags": 4, "matrix": [1, 2], "x": 38, "y": 16 }, + { "flags": 4, "matrix": [1, 3], "x": 53, "y": 16 }, + { "flags": 4, "matrix": [1, 4], "x": 68, "y": 16 }, + { "flags": 4, "matrix": [1, 5], "x": 83, "y": 16 }, + { "flags": 4, "matrix": [1, 6], "x": 98, "y": 16 }, + { "flags": 4, "matrix": [1, 7], "x": 113, "y": 16 }, + { "flags": 4, "matrix": [1, 8], "x": 128, "y": 16 }, + { "flags": 4, "matrix": [1, 9], "x": 143, "y": 16 }, + { "flags": 4, "matrix": [1, 10], "x": 158, "y": 16 }, + { "flags": 4, "matrix": [1, 11], "x": 173, "y": 16 }, + { "flags": 4, "matrix": [1, 12], "x": 188, "y": 16 }, + { "flags": 4, "matrix": [1, 13], "x": 206, "y": 16 }, + { "flags": 1, "matrix": [1, 14], "x": 224, "y": 16 }, + { "flags": 1, "matrix": [2, 0], "x": 6, "y": 32 }, + { "flags": 4, "matrix": [2, 1], "x": 26, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 41, "y": 32 }, + { "flags": 4, "matrix": [2, 3], "x": 56, "y": 32 }, + { "flags": 4, "matrix": [2, 4], "x": 71, "y": 32 }, + { "flags": 4, "matrix": [2, 5], "x": 86, "y": 32 }, + { "flags": 4, "matrix": [2, 6], "x": 101, "y": 32 }, + { "flags": 4, "matrix": [2, 7], "x": 116, "y": 32 }, + { "flags": 4, "matrix": [2, 8], "x": 131, "y": 32 }, + { "flags": 4, "matrix": [2, 9], "x": 146, "y": 32 }, + { "flags": 4, "matrix": [2, 10], "x": 161, "y": 32 }, + { "flags": 4, "matrix": [2, 11], "x": 176, "y": 32 }, + { "flags": 4, "matrix": [2, 12], "x": 201, "y": 32 }, + { "flags": 1, "matrix": [2, 14], "x": 224, "y": 32 }, + { "flags": 1, "matrix": [3, 0], "x": 9, "y": 48 }, + { "flags": 4, "matrix": [3, 1], "x": 34, "y": 48 }, + { "flags": 4, "matrix": [3, 2], "x": 49, "y": 48 }, + { "flags": 4, "matrix": [3, 3], "x": 64, "y": 48 }, + { "flags": 4, "matrix": [3, 4], "x": 79, "y": 48 }, + { "flags": 4, "matrix": [3, 5], "x": 94, "y": 48 }, + { "flags": 4, "matrix": [3, 6], "x": 109, "y": 48 }, + { "flags": 4, "matrix": [3, 7], "x": 124, "y": 48 }, + { "flags": 4, "matrix": [3, 8], "x": 139, "y": 48 }, + { "flags": 4, "matrix": [3, 9], "x": 154, "y": 48 }, + { "flags": 4, "matrix": [3, 10], "x": 169, "y": 48 }, + { "flags": 4, "matrix": [3, 11], "x": 189, "y": 48 }, + { "flags": 4, "matrix": [3, 13], "x": 210, "y": 48 }, + { "flags": 1, "matrix": [4, 0], "x": 2, "y": 64 }, + { "flags": 1, "matrix": [4, 1], "x": 21, "y": 64 }, + { "flags": 1, "matrix": [4, 2], "x": 39, "y": 64 }, + { "flags": 4, "matrix": [4, 6], "x": 96, "y": 64 }, + { "flags": 1, "matrix": [4, 8], "x": 151, "y": 64 }, + { "flags": 1, "matrix": [4, 10], "x": 170, "y": 64 }, + { "flags": 1, "matrix": [4, 12], "x": 195, "y": 64 }, + { "flags": 1, "matrix": [4, 13], "x": 210, "y": 64 }, + { "flags": 1, "matrix": [4, 14], "x": 224, "y": 64 } + ] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1427", + "vid": "0x445A" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, + { "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, + { "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, + { "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, + { "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, + { "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, + { "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, + { "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, + { "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, + { "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, + { "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, + { "matrix": [0, 11], "w": 1, "x": 11, "y": 0 }, + { "matrix": [0, 12], "w": 1, "x": 12, "y": 0 }, + { "matrix": [0, 13], "w": 2, "x": 13, "y": 0 }, + { "matrix": [0, 14], "w": 1, "x": 15, "y": 0 }, + { "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "matrix": [1, 1], "w": 1, "x": 1.5, "y": 1 }, + { "matrix": [1, 2], "w": 1, "x": 2.5, "y": 1 }, + { "matrix": [1, 3], "w": 1, "x": 3.5, "y": 1 }, + { "matrix": [1, 4], "w": 1, "x": 4.5, "y": 1 }, + { "matrix": [1, 5], "w": 1, "x": 5.5, "y": 1 }, + { "matrix": [1, 6], "w": 1, "x": 6.5, "y": 1 }, + { "matrix": [1, 7], "w": 1, "x": 7.5, "y": 1 }, + { "matrix": [1, 8], "w": 1, "x": 8.5, "y": 1 }, + { "matrix": [1, 9], "w": 1, "x": 9.5, "y": 1 }, + { "matrix": [1, 10], "w": 1, "x": 10.5, "y": 1 }, + { "matrix": [1, 11], "w": 1, "x": 11.5, "y": 1 }, + { "matrix": [1, 12], "w": 1, "x": 12.5, "y": 1 }, + { "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "matrix": [1, 14], "w": 1, "x": 15, "y": 1 }, + { "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, + { "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, + { "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, + { "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, + { "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, + { "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, + { "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, + { "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, + { "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, + { "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, + { "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, + { "matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2 }, + { "matrix": [2, 14], "w": 1, "x": 15, "y": 2 }, + { "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "matrix": [3, 1], "w": 1, "x": 2.25, "y": 3 }, + { "matrix": [3, 2], "w": 1, "x": 3.25, "y": 3 }, + { "matrix": [3, 3], "w": 1, "x": 4.25, "y": 3 }, + { "matrix": [3, 4], "w": 1, "x": 5.25, "y": 3 }, + { "matrix": [3, 5], "w": 1, "x": 6.25, "y": 3 }, + { "matrix": [3, 6], "w": 1, "x": 7.25, "y": 3 }, + { "matrix": [3, 7], "w": 1, "x": 8.25, "y": 3 }, + { "matrix": [3, 8], "w": 1, "x": 9.25, "y": 3 }, + { "matrix": [3, 9], "w": 1, "x": 10.25, "y": 3 }, + { "matrix": [3, 10], "w": 1, "x": 11.25, "y": 3 }, + { "matrix": [3, 11], "w": 1.75, "x": 12.25, "y": 3 }, + { "matrix": [3, 13], "w": 1, "x": 14, "y": 3 }, + { "matrix": [4, 0], "w": 1.25, "x": 0, "y": 4 }, + { "matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4 }, + { "matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4 }, + { "matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "matrix": [4, 8], "w": 1.25, "x":10, "y":4 }, + { "matrix": [4, 10], "w": 1.25, "x": 11.25, "y": 4 }, + { "matrix": [4, 12], "w": 1, "x": 13, "y": 4 }, + { "matrix": [4, 13], "w": 1, "x": 14, "y": 4 }, + { "matrix": [4, 14], "w": 1, "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/dztech/tofu/ii/v1/mcuconf.h b/keyboards/dztech/tofu/ii/v1/mcuconf.h new file mode 100644 index 0000000000..e19f696e19 --- /dev/null +++ b/keyboards/dztech/tofu/ii/v1/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2022 DZTECH + * + * 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_next + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE diff --git a/keyboards/dztech/tofu/ii/v1/readme.md b/keyboards/dztech/tofu/ii/v1/readme.md new file mode 100644 index 0000000000..25e2d9e687 --- /dev/null +++ b/keyboards/dztech/tofu/ii/v1/readme.md @@ -0,0 +1,22 @@ +# TOFU_II +A customizable 66 key RGB keyboard. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: TOFU_II +* Hardware Availability: [KBDfans](https://kbdfans.com/) + +## Bootloader mode + +Enter the bootloader in 3 ways: + +* Bootmagic reset: Hold down the left top key then plug in the USB cable. +* Physical reset button: Double tap the reset button. +* Keycode in layout: Press the key mapped to QK_BOOT if it is available. + +## Making firmware + +Make example for this keyboard (after setting up your build environment): + + make dztech/tofu/ii:default + +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/dztech/tofu/ii/v1/rules.mk b/keyboards/dztech/tofu/ii/v1/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/dztech/tofu/ii/v1/v1.c b/keyboards/dztech/tofu/ii/v1/v1.c new file mode 100644 index 0000000000..bb15f3d4a1 --- /dev/null +++ b/keyboards/dztech/tofu/ii/v1/v1.c @@ -0,0 +1,103 @@ +/* Copyright 2022 DZTECH + * + * 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 "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { + { 1, K_12, J_12, L_12 }, + { 1, K_11, J_11, L_11 }, + { 1, K_10, J_10, L_10 }, + { 1, K_9, J_9, L_9 }, + { 1, K_8, J_8, L_8 }, + { 1, K_7, J_7, L_7 }, + { 1, K_6, J_6, L_6 }, + { 1, K_5, J_5, L_5 }, + { 1, K_4, J_4, L_4 }, + { 1, K_3, J_3, L_3 }, + { 1, K_2, J_2, L_2 }, + { 1, K_1, J_1, L_1 }, + { 1, H_1, G_1, I_1 }, + { 1, H_2, G_2, I_2 }, + { 1, H_3, G_3, I_3 }, + + { 0, B_12, A_12, C_12 }, + { 0, B_11, A_11, C_11 }, + { 0, B_10, A_10, C_10 }, + { 0, B_9, A_9, C_9 }, + { 0, B_8, A_8, C_8 }, + { 0, B_7, A_7, C_7 }, + { 0, B_6, A_6, C_6 }, + { 0, B_5, A_5, C_5 }, + { 0, B_4, A_4, C_4 }, + { 0, B_3, A_3, C_3 }, + { 0, B_2, A_2, C_2 }, + { 0, B_1, A_1, C_1 }, + { 1, H_6, G_6, I_6 }, + { 1, H_5, G_5, I_5 }, + { 1, H_4, G_4, I_4 }, + + { 0, E_12, D_12, F_12 }, + { 0, E_11, D_11, F_11 }, + { 0, E_10, D_10, F_10 }, + { 0, E_9, D_9, F_9 }, + { 0, E_8, D_8, F_8 }, + { 0, E_7, D_7, F_7 }, + { 0, E_6, D_6, F_6 }, + { 0, E_5, D_5, F_5 }, + { 0, E_4, D_4, F_4 }, + { 0, E_3, D_3, F_3 }, + { 0, E_2, D_2, F_2 }, + { 0, E_1, D_1, F_1 }, + { 1, H_7, G_7, I_7 }, + { 1, H_8, G_8, I_8 }, + + { 0, H_12, G_12, I_12