From 4f374640d0594f4962a0a9e4c354d44e6aa9dc3e Mon Sep 17 00:00:00 2001 From: SHVD3x <103226441+SHVD3x@users.noreply.github.com> Date: Thu, 23 Mar 2023 09:52:31 +0300 Subject: [Keyboard] Ymd09 config updates (#20124) Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Joel Challis Co-authored-by: Drashna Jaelre --- keyboards/ymdk/ymd09/config.h | 77 ++++++++++++++++++--------- keyboards/ymdk/ymd09/info.json | 50 +++++++++++++---- keyboards/ymdk/ymd09/keymaps/default/keymap.c | 15 ++++++ keyboards/ymdk/ymd09/keymaps/via/keymap.c | 15 ++++++ keyboards/ymdk/ymd09/readme.md | 12 +++++ keyboards/ymdk/ymd09/rules.mk | 14 +---- keyboards/ymdk/ymd09/ymd09.c | 1 - keyboards/ymdk/ymd09/ymd09.h | 13 ----- 8 files changed, 136 insertions(+), 61 deletions(-) delete mode 100644 keyboards/ymdk/ymd09/ymd09.c delete mode 100644 keyboards/ymdk/ymd09/ymd09.h (limited to 'keyboards/ymdk/ymd09') diff --git a/keyboards/ymdk/ymd09/config.h b/keyboards/ymdk/ymd09/config.h index 4c4ca90583..768d93d624 100644 --- a/keyboards/ymdk/ymd09/config.h +++ b/keyboards/ymdk/ymd09/config.h @@ -1,5 +1,6 @@ /* Copyright 2020 Patrick Fruh +Copyright 2023 SHVD3x 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 @@ -17,33 +18,59 @@ along with this program. If not, see . #pragma once +#define RGB_MATRIX_LED_COUNT 9 +#define RGB_DI_PIN E2 -/* Keyboard Matrix Assignments */ -#define MATRIX_ROW_PINS { F5, F4, F1 } -#define MATRIX_COL_PINS { D6, D2, D1 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL +#define RGB_DISABLE_WHEN_USB_SUSPENDED -#define RGB_DI_PIN E2 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 9 - #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 -#endif +// 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 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ymdk/ymd09/info.json b/keyboards/ymdk/ymd09/info.json index 0e3aaba46b..d34cf858b4 100644 --- a/keyboards/ymdk/ymd09/info.json +++ b/keyboards/ymdk/ymd09/info.json @@ -10,19 +10,51 @@ }, "processor": "atmega32u4", "bootloader": "atmel-dfu", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + "rgb_matrix": true, + }, + "build": { + "lto": true + }, + "diode_direction": "ROW2COL", + "matrix_pins": { + "cols": ["D6", "D2", "D1"], + "rows": ["F5", "F4", "F1"] + }, "layouts": { "LAYOUT": { "layout": [ - {"label": "7", "x": 0, "y": 0}, - {"label": "8", "x": 1, "y": 0}, - {"label": "9", "x": 2, "y": 0}, - {"label": "4", "x": 0, "y": 1}, - {"label": "5", "x": 1, "y": 1}, - {"label": "6", "x": 2, "y": 1}, - {"label": "1", "x": 0, "y": 2}, - {"label": "2", "x": 1, "y": 2}, - {"label": "3", "x": 2, "y": 2} + {"label": "7", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "8", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "9", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "4", "matrix": [1, 0], "x": 0, "y": 1}, + {"label": "5", "matrix": [1, 1], "x": 1, "y": 1}, + {"label": "6", "matrix": [1, 2], "x": 2, "y": 1}, + {"label": "1", "matrix": [2, 0], "x": 0, "y": 2}, + {"label": "2", "matrix": [2, 1], "x": 1, "y": 2}, + {"label": "3", "matrix": [2, 2], "x": 2, "y": 2} ] } + }, + "rgb_matrix": { + "driver": "WS2812", + "layout": [ + { "flags": 4, "matrix": [0, 2], "x": 64, "y": 0 }, //7 + { "flags": 4, "matrix": [0, 1], "x": 32, "y": 0 }, //8 + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 }, //9 + { "flags": 4, "matrix": [1, 2], "x": 64, "y": 32 }, //4 + { "flags": 4, "matrix": [1, 1], "x": 32, "y": 32 }, //5 + { "flags": 4, "matrix": [1, 0], "x": 0, "y": 32 }, //6 + { "flags": 4, "matrix": [2, 2], "x": 64, "y": 64 }, //1 + { "flags": 4, "matrix": [2, 1], "x": 32, "y": 64 }, //2 + { "flags": 4, "matrix": [2, 0], "x": 0, "y": 64 } //3 + ], + "center_point": [ 32, 32 ], } } diff --git a/keyboards/ymdk/ymd09/keymaps/default/keymap.c b/keyboards/ymdk/ymd09/keymaps/default/keymap.c index 330e41db63..035bc079b8 100644 --- a/keyboards/ymdk/ymd09/keymaps/default/keymap.c +++ b/keyboards/ymdk/ymd09/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* +Copyright 2023 +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] = { diff --git a/keyboards/ymdk/ymd09/keymaps/via/keymap.c b/keyboards/ymdk/ymd09/keymaps/via/keymap.c index 15962e367a..60c7cc1eed 100644 --- a/keyboards/ymdk/ymd09/keymaps/via/keymap.c +++ b/keyboards/ymdk/ymd09/keymaps/via/keymap.c @@ -1,3 +1,18 @@ +/* +Copyright 2023 +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] = { diff --git a/keyboards/ymdk/ymd09/readme.md b/keyboards/ymdk/ymd09/readme.md index dce883c1f5..efdb16cf6d 100644 --- a/keyboards/ymdk/ymd09/readme.md +++ b/keyboards/ymdk/ymd09/readme.md @@ -12,4 +12,16 @@ Make example for this keyboard (after setting up your build environment): make ymdk/ymd09:default +Flashing example for this keyboard: + + make ymdk/ymd09: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). + +## 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 button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/ymdk/ymd09/rules.mk b/keyboards/ymdk/ymd09/rules.mk index 9bdb5fd924..6e7633bfe0 100644 --- a/keyboards/ymdk/ymd09/rules.mk +++ b/keyboards/ymdk/ymd09/rules.mk @@ -1,13 +1 @@ -# 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 = 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 = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -LTO_ENABLE = yes # reduce firmware size +# This file intentionally left blank diff --git a/keyboards/ymdk/ymd09/ymd09.c b/keyboards/ymdk/ymd09/ymd09.c deleted file mode 100644 index 179c0c6b3e..0000000000 --- a/keyboards/ymdk/ymd09/ymd09.c +++ /dev/null @@ -1 +0,0 @@ -#include "ymd09.h" diff --git a/keyboards/ymdk/ymd09/ymd09.h b/keyboards/ymdk/ymd09/ymd09.h deleted file mode 100644 index 76cb5d3f0c..0000000000 --- a/keyboards/ymdk/ymd09/ymd09.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - K00, K01, K02, \ - K10, K11, K12, \ - K20, K21, K22 \ -) { \ - { K00, K01, K02 }, \ - { K10, K11, K12 }, \ - { K20, K21, K22 } \ -} -- cgit v1.2.3