From 01ede494b87c0cdd94582e587b3a0634393319d7 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sat, 19 Mar 2022 19:28:02 +0700 Subject: [PATCH 01/37] [Keyboard] bm40hsrgb: move rev1 files to rev1 directory --- .../bm40hsrgb/keymaps/wolff_abnt2/config.h | 74 ------------------- .../bm40hsrgb/keymaps/wolff_abnt2/rules.mk | 19 ----- keyboards/kprepublic/bm40hsrgb/readme.md | 4 +- .../kprepublic/bm40hsrgb/{ => rev1}/config.h | 0 .../kprepublic/bm40hsrgb/{ => rev1}/info.json | 0 .../{ => rev1}/keymaps/default/keymap.c | 0 .../{ => rev1}/keymaps/default/readme.md | 0 .../{ => rev1}/keymaps/gabustoledo/config.h | 0 .../{ => rev1}/keymaps/gabustoledo/keymap.c | 0 .../{ => rev1}/keymaps/gabustoledo/readme.md | 0 .../{ => rev1}/keymaps/gabustoledo/rules.mk | 0 .../{ => rev1}/keymaps/signynt/config.h | 0 .../{ => rev1}/keymaps/signynt/keymap.c | 0 .../{ => rev1}/keymaps/signynt/readme.md | 0 .../{ => rev1}/keymaps/signynt/rules.mk | 0 .../keymaps/signynt_2_loud/config.h | 0 .../keymaps/signynt_2_loud/keymap.c | 0 .../keymaps/signynt_2_loud/readme.md | 0 .../keymaps/signynt_2_loud/rules.mk | 0 .../keymaps/signynt_2_quiet/config.h | 0 .../keymaps/signynt_2_quiet/keymap.c | 0 .../keymaps/signynt_2_quiet/readme.md | 0 .../keymaps/signynt_2_quiet/rules.mk | 0 .../bm40hsrgb/{ => rev1}/keymaps/via/keymap.c | 0 .../{ => rev1}/keymaps/via/readme.md | 0 .../bm40hsrgb/{ => rev1}/keymaps/via/rules.mk | 0 .../{ => rev1}/keymaps/wolff_abnt2/keymap.c | 0 .../{ => rev1}/keymaps/wolff_abnt2/readme.md | 0 keyboards/kprepublic/bm40hsrgb/rev1/readme.md | 21 ++++++ .../bm40hsrgb/{bm40hsrgb.c => rev1/rev1.c} | 0 .../kprepublic/bm40hsrgb/{ => rev1}/rules.mk | 0 31 files changed, 23 insertions(+), 95 deletions(-) delete mode 100755 keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h delete mode 100755 keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/config.h (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/info.json (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/default/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/default/readme.md (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/gabustoledo/config.h (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/gabustoledo/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/gabustoledo/readme.md (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/gabustoledo/rules.mk (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt/config.h (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt/readme.md (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt/rules.mk (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_loud/config.h (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_loud/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_loud/readme.md (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_loud/rules.mk (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_quiet/config.h (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_quiet/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_quiet/readme.md (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/signynt_2_quiet/rules.mk (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/via/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/via/readme.md (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/via/rules.mk (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/wolff_abnt2/keymap.c (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/keymaps/wolff_abnt2/readme.md (100%) create mode 100644 keyboards/kprepublic/bm40hsrgb/rev1/readme.md rename keyboards/kprepublic/bm40hsrgb/{bm40hsrgb.c => rev1/rev1.c} (100%) rename keyboards/kprepublic/bm40hsrgb/{ => rev1}/rules.mk (100%) diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h deleted file mode 100755 index 418b182c3b7d..000000000000 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright 2020 lmlask - * - * 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 MOUSEKEY_DELAY 50 -#define MIDI_ADVANCED -#define TAPPING_TERM 175 //For fast typing -#define QUICK_TAP_TERM 0 //No autorepeat in tap-hold keys -#define HOLD_ON_OTHER_KEY_PRESS //For fast typing - -// Min 0, max 32 -#define JOYSTICK_BUTTON_COUNT 32 -// Min 0, max 6: X, Y, Z, Rx, Ry, Rz -#define JOYSTICK_AXIS_COUNT 0 -// Min 8, max 16 -#define JOYSTICK_AXIS_RESOLUTION 8 - -#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended - -//#undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Enables RGB_MATRIX_ALPHAS_MODS -#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Enables RGB_MATRIX_GRADIENT_UP_DOWN -#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Enables RGB_MATRIX_GRADIENT_LEFT_RIGHT -//#undef ENABLE_RGB_MATRIX_BREATHING // Enables RGB_MATRIX_BREATHING -//#undef ENABLE_RGB_MATRIX_BAND_SAT // Enables RGB_MATRIX_BAND_SAT -//#undef ENABLE_RGB_MATRIX_BAND_VAL //Enables RGB_MATRIX_BAND_VAL -#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Enables RGB_MATRIX_BAND_PINWHEEL_SAT -#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Enables RGB_MATRIX_BAND_PINWHEEL_VAL -#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Enables RGB_MATRIX_BAND_SPIRAL_SAT -#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Enables RGB_MATRIX_BAND_SPIRAL_VAL -#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Enables RGB_MATRIX_CYCLE_ALL -#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Enables RGB_MATRIX_CYCLE_LEFT_RIGHT -#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Enables RGB_MATRIX_CYCLE_UP_DOWN -#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Enables RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN //Enables RGB_MATRIX_CYCLE_OUT_IN -#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Enables RGB_MATRIX_CYCLE_OUT_IN_DUAL -#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Enables RGB_MATRIX_CYCLE_PINWHEEL -#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Enables RGB_MATRIX_CYCLE_SPIRAL -#undef ENABLE_RGB_MATRIX_DUAL_BEACON //Enables RGB_MATRIX_DUAL_BEACON -#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON// Enables RGB_MATRIX_RAINBOW_BEACON -#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enables RGB_MATRIX_RAINBOW_PINWHEELS -#undef ENABLE_RGB_MATRIX_RAINDROPS //Enables RGB_MATRIX_RAINDROPS -#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS// Enables RGB_MATRIX_JELLYBEAN_RAINDROPS -//#undef ENABLE_RGB_MATRIX_HUE_BREATHING // Enables RGB_MATRIX_HUE_BREATHING -#undef ENABLE_RGB_MATRIX_HUE_PENDULUM //Enables RGB_MATRIX_HUE_PENDULUM -#undef ENABLE_RGB_MATRIX_HUE_WAVE //Enables RGB_MATRIX_HUE_WAVE -#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL //Enables RGB_MATRIX_PIXEL_FRACTAL -#undef ENABLE_RGB_MATRIX_PIXEL_FLOW //Enables RGB_MATRIX_PIXEL_FLOW -#undef ENABLE_RGB_MATRIX_PIXEL_RAIN //Enables RGB_MATRIX_PIXEL_RAIN -//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Enables RGB_MATRIX_SOLID_REACTIVE_SIMPLE -//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Enables RGB_MATRIX_SOLID_REACTIVE -//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE //Enables RGB_MATRIX_SOLID_REACTIVE_WIDE -//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Enables RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Enables RGB_MATRIX_SOLID_REACTIVE_CROSS -#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Enables RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS //Enables RGB_MATRIX_SOLID_REACTIVE_NEXUS -#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS //Enables RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -//#undef ENABLE_RGB_MATRIX_SPLASH //Enables RGB_MATRIX_SPLASH -#undef ENABLE_RGB_MATRIX_MULTISPLASH // Enables RGB_MATRIX_MULTISPLASH -//#undef ENABLE_RGB_MATRIX_SOLID_SPLASH //Enables RGB_MATRIX_SOLID_SPLASH -#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Enables RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk deleted file mode 100755 index c69721fa475f..000000000000 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk +++ /dev/null @@ -1,19 +0,0 @@ -LTO_ENABLE = yes -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -TERMINAL_ENABLE = no - -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -SPLIT_KEYBOARD = no -KEY_LOCK_ENABLE = no -RGB_MATRIX_ENABLE = yes -LAYOUTS = planck_mit - -MIDI_ENABLE = yes -JOYSTICK_ENABLE = yes -JOYSTICK_DRIVER = digital -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -SWAP_HANDS_ENABLE = yes - -STENO_ENABLE = no # Enabling steno requires disabling all options in the previous block. diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md index 609b3c418494..7a44e39cf89e 100644 --- a/keyboards/kprepublic/bm40hsrgb/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/readme.md @@ -12,10 +12,10 @@ This firmware was originally taken from a kbfirmware.json and manually converted Make example for this keyboard (after setting up your build environment): - make kprepublic/bm40hsrgb:default + for rev1: make kprepublic/bm40hsrgb/rev1:default Flashing example for this keyboard: - make kprepublic/bm40hsrgb:default:flash + for rev1: make kprepublic/bm40hsrgb/rev1: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). diff --git a/keyboards/kprepublic/bm40hsrgb/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/config.h similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/config.h rename to keyboards/kprepublic/bm40hsrgb/rev1/config.h diff --git a/keyboards/kprepublic/bm40hsrgb/info.json b/keyboards/kprepublic/bm40hsrgb/rev1/info.json similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/info.json rename to keyboards/kprepublic/bm40hsrgb/rev1/info.json diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/config.h similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/config.h diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/rules.mk similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/config.h similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/config.h diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/rules.mk similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/config.h similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/config.h diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/rules.mk similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/config.h similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/config.h diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/rules.mk similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/rules.mk similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/keymap.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/keymap.c diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/readme.md similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/readme.md rename to keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md new file mode 100644 index 000000000000..6de8ee6488e7 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md @@ -0,0 +1,21 @@ +# bm40hsrgb + +![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) + +An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. + +This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). + +* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter) +* Hardware Supported: bm40hsrgb PCB +* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm40hsrgb/rev1:default + +Flashing example for this keyboard: + + make kprepublic/bm40hsrgb/rev1: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). diff --git a/keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c rename to keyboards/kprepublic/bm40hsrgb/rev1/rev1.c diff --git a/keyboards/kprepublic/bm40hsrgb/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/rules.mk similarity index 100% rename from keyboards/kprepublic/bm40hsrgb/rules.mk rename to keyboards/kprepublic/bm40hsrgb/rev1/rules.mk From 79f4e5b5e1f978bfb63824e4f3701ff89270ae74 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sat, 19 Mar 2022 21:04:41 +0700 Subject: [PATCH 02/37] [Keyboard] bm40hsrgb: add rev2 --- keyboards/kprepublic/bm40hsrgb/readme.md | 2 + keyboards/kprepublic/bm40hsrgb/rev2/config.h | 119 ++++++++++++ keyboards/kprepublic/bm40hsrgb/rev2/info.json | 58 ++++++ .../bm40hsrgb/rev2/keymaps/default/keymap.c | 108 +++++++++++ .../bm40hsrgb/rev2/keymaps/default/readme.md | 1 + .../bm40hsrgb/rev2/keymaps/via/keymap.c | 108 +++++++++++ .../bm40hsrgb/rev2/keymaps/via/readme.md | 1 + .../bm40hsrgb/rev2/keymaps/via/rules.mk | 2 + keyboards/kprepublic/bm40hsrgb/rev2/readme.md | 21 +++ keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 172 ++++++++++++++++++ keyboards/kprepublic/bm40hsrgb/rev2/rev2.h | 30 +++ keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 27 +++ 12 files changed, 649 insertions(+) create mode 100755 keyboards/kprepublic/bm40hsrgb/rev2/config.h create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/info.json create mode 100755 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/readme.md create mode 100755 keyboards/kprepublic/bm40hsrgb/rev2/rev2.c create mode 100755 keyboards/kprepublic/bm40hsrgb/rev2/rev2.h create mode 100755 keyboards/kprepublic/bm40hsrgb/rev2/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md index 7a44e39cf89e..4cea26389c17 100644 --- a/keyboards/kprepublic/bm40hsrgb/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/readme.md @@ -13,9 +13,11 @@ This firmware was originally taken from a kbfirmware.json and manually converted Make example for this keyboard (after setting up your build environment): for rev1: make kprepublic/bm40hsrgb/rev1:default + for rev2: make kprepublic/bm40hsrgb/rev2:default Flashing example for this keyboard: for rev1: make kprepublic/bm40hsrgb/rev1:default:flash + for rev2: make kprepublic/bm40hsrgb/rev2: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). diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h new file mode 100755 index 000000000000..2dc373c4ba8b --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -0,0 +1,119 @@ +/* Copyright 2020 tominabox1 + * + * 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 0x4B50 // "KP" +#define PRODUCT_ID 0x3430 // "40" +#define DEVICE_VER 0x0002 +#define MANUFACTURER KPRepublic +#define PRODUCT BM40 Hotswap RGB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D7, F7, F6, F5 } +#define MATRIX_COL_PINS { B2, B3, D5, D3, D2, B7, F0, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +#define RGB_DI_PIN B0 +#define RGBLED_NUM 6 +#ifdef RGB_DI_PIN +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGBLIGHT_LIMIT_VAL 150 // Limit to vendor-recommended value +#endif +#ifdef RGB_MATRIX_ENABLE +// IS31FL3733 configuration +# define DRIVER_COUNT 1 +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_1_LED_TOTAL 47 +# define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL +// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; +// don't use those LEDs in RGB Matrix in that case. +# ifdef RGBLIGHT_ENABLE +# define WS2812_LED_TOTAL 0 +# else +# define WS2812_LED_TOTAL 6 +# endif +# define DRIVER_LED_TOTAL (ISSI_LED_TOTAL + WS2812_LED_TOTAL) + +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +// 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 +#endif diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json new file mode 100644 index 000000000000..ddd99d3e357c --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "BM40HSRGB", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_planck_mit": { + "layout": [ + {"label":"K00 (B3,B6)", "x":0, "y":0}, + {"label":"K01 (B3,C6)", "x":1, "y":0}, + {"label":"K02 (B3,B4)", "x":2, "y":0}, + {"label":"K03 (B3,D7)", "x":3, "y":0}, + {"label":"K04 (B3,D4)", "x":4, "y":0}, + {"label":"K05 (B3,D6)", "x":5, "y":0}, + {"label":"K06 (B3,C7)", "x":6, "y":0}, + {"label":"K07 (B3,F6)", "x":7, "y":0}, + {"label":"K08 (B3,F5)", "x":8, "y":0}, + {"label":"K09 (B3,F4)", "x":9, "y":0}, + {"label":"K0A (B3,F1)", "x":10, "y":0}, + {"label":"K0B (B3,F0)", "x":11, "y":0}, + {"label":"K10 (B2,B6)", "x":0, "y":1}, + {"label":"K11 (B2,C6)", "x":1, "y":1}, + {"label":"K12 (B2,B4)", "x":2, "y":1}, + {"label":"K13 (B2,D7)", "x":3, "y":1}, + {"label":"K14 (B2,D4)", "x":4, "y":1}, + {"label":"K15 (B2,D6)", "x":5, "y":1}, + {"label":"K16 (B2,C7)", "x":6, "y":1}, + {"label":"K17 (B2,F6)", "x":7, "y":1}, + {"label":"K18 (B2,F5)", "x":8, "y":1}, + {"label":"K19 (B2,F4)", "x":9, "y":1}, + {"label":"K1A (B2,F1)", "x":10, "y":1}, + {"label":"K1B (B2,F0)", "x":11, "y":1}, + {"label":"K20 (E6,B6)", "x":0, "y":2}, + {"label":"K21 (E6,C6)", "x":1, "y":2}, + {"label":"K22 (E6,B4)", "x":2, "y":2}, + {"label":"K23 (E6,D7)", "x":3, "y":2}, + {"label":"K24 (E6,D4)", "x":4, "y":2}, + {"label":"K25 (E6,D6)", "x":5, "y":2}, + {"label":"K26 (E6,C7)", "x":6, "y":2}, + {"label":"K27 (E6,F6)", "x":7, "y":2}, + {"label":"K28 (E6,F5)", "x":8, "y":2}, + {"label":"K29 (E6,F4)", "x":9, "y":2}, + {"label":"K2A (E6,F1)", "x":10, "y":2}, + {"label":"K2B (E6,F0)", "x":11, "y":2}, + {"label":"K30 (B5,B6)", "x":0, "y":3}, + {"label":"K31 (B5,C6)", "x":1, "y":3}, + {"label":"K32 (B5,B4)", "x":2, "y":3}, + {"label":"K33 (B5,D7)", "x":3, "y":3}, + {"label":"K34 (B5,D4)", "x":4, "y":3}, + {"label":"K35 (B5,D6)", "x":5, "y":3, "w":2}, + {"label":"K37 (B5,F6)", "x":7, "y":3}, + {"label":"K38 (B5,F5)", "x":8, "y":3}, + {"label":"K39 (B5,F4)", "x":9, "y":3}, + {"label":"K3A (B5,F1)", "x":10, "y":3}, + {"label":"K3B (B5,F0)", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c new file mode 100755 index 000000000000..60faf17e1cef --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..7fc64a7a0575 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm40hsrgb diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000000..60faf17e1cef --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md new file mode 100644 index 000000000000..bff946f327b4 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for bm40hsrgb diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md new file mode 100644 index 000000000000..59d51e3cbb83 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md @@ -0,0 +1,21 @@ +# bm40hsrgb + +![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) + +An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. + +This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). + +* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter) +* Hardware Supported: bm40hsrgb PCB +* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm40hsrgb/rev2:default + +Flashing example for this keyboard: + + make kprepublic/bm40hsrgb/rev2: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). diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c new file mode 100755 index 000000000000..e4f9d4f9bdbb --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -0,0 +1,172 @@ +/* Copyright 2020 tominabox1, Richard Goulter + * + * 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 "rev2.h" + +#if defined(RGB_MATRIX_ENABLE) + +# include "i2c_master.h" +# include "is31fl3733.h" +# include "ws2812.h" + +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { + { 0, B_1, A_1, C_1 }, + { 0, B_2, A_2, C_2 }, + { 0, B_3, A_3, C_3 }, + { 0, B_4, A_4, C_4 }, + { 0, B_5, A_5, C_5 }, + { 0, B_6, A_6, C_6 }, + { 0, B_7, A_7, C_7 }, + { 0, B_8, A_8, C_8 }, + { 0, B_9, A_9, C_9 }, + { 0, B_10, A_10, C_10 }, + { 0, B_11, A_11, C_11 }, + { 0, B_12, A_12, C_12 }, + + { 0, E_1, D_1, F_1 }, + { 0, E_2, D_2, F_2 }, + { 0, E_3, D_3, F_3 }, + { 0, E_4, D_4, F_4 }, + { 0, E_5, D_5, F_5 }, + { 0, E_6, D_6, F_6 }, + { 0, E_7, D_7, F_7 }, + { 0, E_8, D_8, F_8 }, + { 0, E_9, D_9, F_9 }, + { 0, E_10, D_10, F_10 }, + { 0, E_11, D_11, F_11 }, + { 0, E_12, D_12, F_12 }, + + { 0, H_1, G_1, I_1 }, + { 0, H_2, G_2, I_2 }, + { 0, H_3, G_3, I_3 }, + { 0, H_4, G_4, I_4 }, + { 0, H_5, G_5, I_5 }, + { 0, H_6, G_6, I_6 }, + { 0, H_7, G_7, I_7 }, + { 0, H_8, G_8, I_8 }, + { 0, H_9, G_9, I_9 }, + { 0, H_10, G_10, I_10 }, + { 0, H_11, G_11, I_11 }, + { 0, H_12, G_12, I_12 }, + + { 0, K_1, J_1, L_1 }, + { 0, K_2, J_2, L_2 }, + { 0, K_3, J_3, L_3 }, + { 0, K_4, J_4, L_4 }, + { 0, K_5, J_5, L_5 }, + { 0, K_6, J_6, L_6 }, + { 0, K_8, J_8, L_8 }, + { 0, K_9, J_9, L_9 }, + { 0, K_10, J_10, L_10 }, + { 0, K_11, J_11, L_11 }, + { 0, K_12, J_12, L_12 } +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, + {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, + {24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}, + {36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46} + }, { + // LED Index to Physical Position + { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, + { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, + { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, + { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {111, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64} +# if WS2812_LED_TOTAL > 0 + ,{0, 32}, {44, 32}, {88, 32}, {132, 32}, {176, 32}, {220, 32} +# endif + }, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2 + } +}; + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +// clang-format on + +// ========================================================================== +// Custom RGB Matrix driver that combines IS31FL3733 and WS2812 +// ========================================================================== + +# if WS2812_LED_TOTAL > 0 +LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL]; +# endif + +static void rgb_matrix_driver_init(void) { + i2c_init(); + IS31FL3733_init(DRIVER_ADDR_1, 0); + for (uint8_t index = 0; index < ISSI_LED_TOTAL; index++) { + bool enabled = true; + IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); + } + IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); +} + +static void rgb_matrix_driver_flush(void) { + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0); +# if WS2812_LED_TOTAL > 0 + ws2812_setleds(rgb_matrix_ws2812_array, WS2812_LED_TOTAL); +# endif +} + +static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index < ISSI_LED_TOTAL) { + IS31FL3733_set_color(index, red, green, blue); + } else { +# if WS2812_LED_TOTAL > 0 + rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].r = red; + rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].g = green; + rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].b = blue; +# endif + } +} + +static void rgb_matrix_driver_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + IS31FL3733_set_color_all(red, green, blue); +# if WS2812_LED_TOTAL > 0 + for (uint8_t i = 0; i < WS2812_LED_TOTAL; i++) { + rgb_matrix_ws2812_array[i].r = red; + rgb_matrix_ws2812_array[i].g = green; + rgb_matrix_ws2812_array[i].b = blue; + } +# endif +} + +// clang-format off +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = rgb_matrix_driver_init, + .flush = rgb_matrix_driver_flush, + .set_color = rgb_matrix_driver_set_color, + .set_color_all = rgb_matrix_driver_set_color_all, +}; +// clang-format on + +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h new file mode 100755 index 000000000000..5bde6ec9c51b --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h @@ -0,0 +1,30 @@ +/* Copyright 2020 tominabox1 + * + * 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_planck_mit( \ + 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, K307, K308, K309, K310, K311 \ +) { \ + { 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, KC_NO, K307, K308, K309, K310, K311 } \ +} + diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk new file mode 100755 index 000000000000..bbf48598b211 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# 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 +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = custom +WS2812_DRIVER_REQUIRED = yes + +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3733.c +QUANTUM_LIB_SRC += i2c_master.c + +LAYOUTS = planck_mit +LAYOUTS_HAS_RGB = yes From 6ab25c02268dac07d96254c425840c740f956e96 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Fri, 8 Apr 2022 15:40:27 +0700 Subject: [PATCH 03/37] [keyboard] use imgur for bm40hsrgb images --- keyboards/kprepublic/bm40hsrgb/readme.md | 2 +- keyboards/kprepublic/bm40hsrgb/rev1/readme.md | 2 +- keyboards/kprepublic/bm40hsrgb/rev2/readme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md index 4cea26389c17..0a1d529c9bbf 100644 --- a/keyboards/kprepublic/bm40hsrgb/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) +![BM40 RGB](https://imgur.com/eOqXMlN.jpeg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md index 6de8ee6488e7..cfb10f1ff985 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev1/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) +![BM40 RGB](https://imgur.com/eOqXMlN.jpeg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md index 59d51e3cbb83..9d21c090d902 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) +![BM40 RGB](https://imgur.com/eOqXMlN.jpeg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. From 04c84e4ac0745aa56403121978695cc3327f7ae1 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Thu, 14 Apr 2022 14:05:05 +0800 Subject: [PATCH 04/37] [keyboard] Update keyboards/kprepublic/bm40hsrgb/rev2/readme.md Co-authored-by: Drashna Jaelre --- keyboards/kprepublic/bm40hsrgb/rev2/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md index 9d21c090d902..7c9522d173a9 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://imgur.com/eOqXMlN.jpeg) +![BM40 RGB](https://imgur.com/eOqXMlNl.jpeg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. From 25d4947f42742fc525c3599995494a7dd2b88afd Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Thu, 14 Apr 2022 14:05:20 +0800 Subject: [PATCH 05/37] [keyboard] Update keyboards/kprepublic/bm40hsrgb/rev2/rev2.c Co-authored-by: Drashna Jaelre --- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index e4f9d4f9bdbb..3d4d63c1d648 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -100,16 +100,6 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - // clang-format on // ========================================================================== From f69eb822f904e3ede94cecf162c8bb81348e0bb4 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Mon, 18 Apr 2022 09:31:20 +0700 Subject: [PATCH 06/37] Update keyboards/kprepublic/bm40hsrgb/rev1/readme.md Co-authored-by: Ryan --- keyboards/kprepublic/bm40hsrgb/rev1/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md index cfb10f1ff985..00df7b02ad39 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev1/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://imgur.com/eOqXMlN.jpeg) +![BM40 RGB](https://imgur.com/eOqXMlNh.jpeg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. From 79d58bb2194da944e5e1c5a83aa14bd2f83850d9 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Mon, 18 Apr 2022 09:31:26 +0700 Subject: [PATCH 07/37] Update keyboards/kprepublic/bm40hsrgb/readme.md Co-authored-by: Ryan --- keyboards/kprepublic/bm40hsrgb/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md index 0a1d529c9bbf..a69a529fab45 100644 --- a/keyboards/kprepublic/bm40hsrgb/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://imgur.com/eOqXMlN.jpeg) +![BM40 RGB](https://imgur.com/eOqXMlNh.jpeg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. From 3428b533bf813d401072f8c8c94bb9da999d076b Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sun, 8 May 2022 13:14:15 +0700 Subject: [PATCH 08/37] [keyboard] replace use of tri_layer_state --- .../kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c index 60faf17e1cef..38c6bc8d9105 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c @@ -22,8 +22,9 @@ enum layers { _ADJUST }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) +#define LOWER FN_MO13 +#define RAISE FN_MO23 + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -101,8 +102,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - From e4d34198c311ef2777ea45f97fed0cb8d21e1949 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sun, 8 May 2022 13:23:58 +0700 Subject: [PATCH 09/37] [keyboard] update readme for bm40hsrgb/rev2 --- keyboards/kprepublic/bm40hsrgb/rev2/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md index 7c9522d173a9..55bf7b1c4b6f 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md @@ -19,3 +19,11 @@ Flashing example for this keyboard: make kprepublic/bm40hsrgb/rev2: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 + +There are multiple ways to enter the bootloader so that firmware can be flashed onto the keyboard: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the top left key) and plug in the keyboard. +* **Physical reset button**: Briefly press the button labeled 'RST' on the back of the PCB. +* **Keycode in layout**: Press the key mapped to `RESET` if it is available. From 6c02a44c1ac4a0824f03fbfa08d43e2e9535fc0d Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 11 May 2022 20:48:18 +0700 Subject: [PATCH 10/37] [keyboard] use ortho_4x12_1x2uC instead of planck_mit --- .../kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c | 8 ++++---- keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c | 8 ++++---- keyboards/kprepublic/bm40hsrgb/rev2/rev2.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c index 60faf17e1cef..d719cb85ba47 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_planck_mit( +[_QWERTY] = LAYOUT_ortho_4x12_1x2uC( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_planck_mit( +[_LOWER] = LAYOUT_ortho_4x12_1x2uC( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_planck_mit( +[_RAISE] = LAYOUT_ortho_4x12_1x2uC( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_planck_mit( +[_ADJUST] = LAYOUT_ortho_4x12_1x2uC( _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c index 38c6bc8d9105..ddda218bd544 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_planck_mit( +[_QWERTY] = LAYOUT_ortho_4x12_1x2uC( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_planck_mit( +[_LOWER] = LAYOUT_ortho_4x12_1x2uC( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_planck_mit( +[_RAISE] = LAYOUT_ortho_4x12_1x2uC( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_planck_mit( +[_ADJUST] = LAYOUT_ortho_4x12_1x2uC( _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h index 5bde6ec9c51b..78ab1d3ef1de 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h @@ -16,7 +16,7 @@ #pragma once #include "quantum.h" -#define LAYOUT_planck_mit( \ +#define LAYOUT_ortho_4x12_1x2uC( \ 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, \ From 55238773bc37187e3c9bcfc986daa12f1c6c2e76 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 11 May 2022 20:50:34 +0700 Subject: [PATCH 11/37] [keyboard] use ortho_4x12_1x2uC in info.json --- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index ddd99d3e357c..8425fc383d82 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -3,7 +3,7 @@ "url": "", "maintainer": "qmk", "layouts": { - "LAYOUT_planck_mit": { + "LAYOUT_ortho_4x12_1x2uC": { "layout": [ {"label":"K00 (B3,B6)", "x":0, "y":0}, {"label":"K01 (B3,C6)", "x":1, "y":0}, From fb36c597de1b702582f3cb15e6ce530a0dc0235d Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 11 May 2022 20:51:19 +0700 Subject: [PATCH 12/37] [keyboard] use ortho_4x12_1x2uC in rev2 rules.mk --- keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk index bbf48598b211..2b19b67941f4 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -23,5 +23,5 @@ COMMON_VPATH += $(DRIVER_PATH)/led/issi SRC += is31fl3733.c QUANTUM_LIB_SRC += i2c_master.c -LAYOUTS = planck_mit +LAYOUTS = ortho_4x12_1x2uC LAYOUTS_HAS_RGB = yes From 09baecdea638d64f9f3609a1ab8df661f03839e0 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sun, 15 May 2022 07:54:01 +0700 Subject: [PATCH 13/37] Update keyboards/kprepublic/bm40hsrgb/rev2/rules.mk Co-authored-by: Joel Challis --- keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk index 2b19b67941f4..7220d5b25784 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -23,5 +23,4 @@ COMMON_VPATH += $(DRIVER_PATH)/led/issi SRC += is31fl3733.c QUANTUM_LIB_SRC += i2c_master.c -LAYOUTS = ortho_4x12_1x2uC LAYOUTS_HAS_RGB = yes From fb0be8e87aca35fba69f9c941f2a3fcf0d48ab9f Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Mon, 16 May 2022 14:40:41 +0700 Subject: [PATCH 14/37] [keyboard] fix bm40hsrgb g_led_config --- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index 3d4d63c1d648..3d10014ed9a6 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -95,8 +95,10 @@ led_config_t g_led_config = { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +# if WS2812_LED_TOTAL > 0 + ,2, 2, 2, 2, 2, 2 +# endif } }; From 695d9c407c5952c12de5c61c0a8aad65b9763f9c Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Tue, 20 Sep 2022 20:17:39 +0700 Subject: [PATCH 15/37] [keyboard] fix USB vid/pid for kprepublic/bm40hsrgb/rev2 --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 7 ------- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index 2dc373c4ba8b..b4c58601e9ae 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -17,13 +17,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x3430 // "40" -#define DEVICE_VER 0x0002 -#define MANUFACTURER KPRepublic -#define PRODUCT BM40 Hotswap RGB - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index 8425fc383d82..370dd6fa47c9 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "BM40HSRGB", + "keyboard_name": "BM40 Hotswap RGB", + "manufacturer": "KPRepublic", "url": "", "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x3430", + "device_version": "0.0.2" + }, "layouts": { "LAYOUT_ortho_4x12_1x2uC": { "layout": [ From 8915c09de75a1b8e0a4e18de4e9795ef95204b17 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 2 Nov 2022 22:16:48 +0700 Subject: [PATCH 16/37] fix compiler errors --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 1 + keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index b4c58601e9ae..26f19ceb50a6 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -58,6 +58,7 @@ # define WS2812_LED_TOTAL 6 # endif # define DRIVER_LED_TOTAL (ISSI_LED_TOTAL + WS2812_LED_TOTAL) +# define RGB_MATRIX_LED_COUNT (DRIVER_LED_TOTAL) # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c index d719cb85ba47..abb148ce8560 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12_1x2uC( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, QK_BOOT, DB_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ From e6a70873a7ba7f54971f6c5940998ce601820150 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Fri, 17 Mar 2023 20:11:36 +0700 Subject: [PATCH 17/37] remove config_common.h from bm40hsrgb/rev2/config.h --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index 26f19ceb50a6..baed864de569 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -15,8 +15,6 @@ */ #pragma once -#include "config_common.h" - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 From 102a3e43c94d01a858b2d0df93111bee9131b25d Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Tue, 18 Apr 2023 23:43:33 +0700 Subject: [PATCH 18/37] refactor to info.json --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 73 ---------------- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 84 +++++++++++++++++++ keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 16 ---- 3 files changed, 84 insertions(+), 89 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index baed864de569..16e8e4b380c5 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -15,32 +15,8 @@ */ #pragma once -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { D7, F7, F6, F5 } -#define MATRIX_COL_PINS { B2, B3, D5, D3, D2, B7, F0, B4, B5, B6, C6, C7 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* 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 - -#define RGB_DI_PIN B0 -#define RGBLED_NUM 6 #ifdef RGB_DI_PIN # define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGBLIGHT_LIMIT_VAL 150 // Limit to vendor-recommended value #endif #ifdef RGB_MATRIX_ENABLE // IS31FL3733 configuration @@ -59,53 +35,4 @@ # define RGB_MATRIX_LED_COUNT (DRIVER_LED_TOTAL) # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -// 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 #endif diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index 370dd6fa47c9..3f5b973d8d19 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -3,11 +3,95 @@ "manufacturer": "KPRepublic", "url": "", "maintainer": "qmk", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "rgb_matrix": true, + "console": false, + "command": false, + "nkro": false, + "backlight": false, + "audio": false + }, "usb": { "vid": "0x4B50", "pid": "0x3430", "device_version": "0.0.2" }, + "ws2812": { + "pin": "E0" + }, + "rgblight": { + "led_count": 6, + "pin": "E0", + "max_brightness": 150, + "animations": { + "knight": true, + "rainbow_swirl": true + } + }, + "rgb_matrix": { + "driver": "custom", + "max_brightness": 150, + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_rain": true, + "pixel_flow": true, + "pixel_fractal": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + } + }, + "matrix_pins": { + "cols": ["B2", "B3", "D5", "D3", "D2", "B7", "F0", "B4", "B5", "B6", "C6", "C7"], + "rows": ["D7", "F7", "F6", "F5"] + }, + "diode_direction": "ROW2COL", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "community_layouts": ["planck_mit"], + "layout_aliases": { + "LAYOUT_planck_mit": "LAYOUT_ortho_4x12_1x2uC" + }, + "debounce": 5, "layouts": { "LAYOUT_ortho_4x12_1x2uC": { "layout": [ diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk index 7220d5b25784..169ac91ba599 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -1,22 +1,6 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # 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 -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = custom WS2812_DRIVER_REQUIRED = yes COMMON_VPATH += $(DRIVER_PATH)/led/issi From c0ad11ea6c5ed4feb4e1d9820907a7c9925b96b6 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 21:37:22 +0700 Subject: [PATCH 19/37] Update keyboards/kprepublic/bm40hsrgb/readme.md Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/kprepublic/bm40hsrgb/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md index a69a529fab45..fd84dfb81bc2 100644 --- a/keyboards/kprepublic/bm40hsrgb/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://imgur.com/eOqXMlNh.jpeg) +![BM40 RGB](https://i.imgur.com/eOqXMlNh.jpg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. From 98bad201796b8267e57730ea552aec18bb47aea4 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 21:37:45 +0700 Subject: [PATCH 20/37] Update keyboards/kprepublic/bm40hsrgb/rev2/readme.md Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/kprepublic/bm40hsrgb/rev2/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md index 55bf7b1c4b6f..2c2264e4e88c 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md @@ -1,6 +1,6 @@ # bm40hsrgb -![BM40 RGB](https://imgur.com/eOqXMlNl.jpeg) +![BM40 RGB](https://i.imgur.com/eOqXMlNh.jpg) An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. From a691dbbb31608e3de71aeb4df4b12c13e4c10b0f Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 21:38:04 +0700 Subject: [PATCH 21/37] Update keyboards/kprepublic/bm40hsrgb/rev2/rules.mk Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk index 169ac91ba599..d333ddbd1132 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -6,5 +6,3 @@ WS2812_DRIVER_REQUIRED = yes COMMON_VPATH += $(DRIVER_PATH)/led/issi SRC += is31fl3733.c QUANTUM_LIB_SRC += i2c_master.c - -LAYOUTS_HAS_RGB = yes From ca0a03190462e83f95b19d869fa5601c7b2f4ab8 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 21:38:51 +0700 Subject: [PATCH 22/37] Update keyboards/kprepublic/bm40hsrgb/rev2/info.json Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index 3f5b973d8d19..90a2372b05a3 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -91,7 +91,6 @@ "layout_aliases": { "LAYOUT_planck_mit": "LAYOUT_ortho_4x12_1x2uC" }, - "debounce": 5, "layouts": { "LAYOUT_ortho_4x12_1x2uC": { "layout": [ From 0fe2a9ea8c1fc5bafcdfedd4d37f2c32c901a18b Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 21:53:24 +0700 Subject: [PATCH 23/37] keyboard: bm40hsrgb: remove readme from keymaps --- keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md | 1 - keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md | 1 - 2 files changed, 2 deletions(-) delete mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md delete mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md deleted file mode 100644 index 7fc64a7a0575..000000000000 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for bm40hsrgb diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md deleted file mode 100644 index bff946f327b4..000000000000 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The via keymap for bm40hsrgb From bf904db12d71083ff9cfbe9d6c4e5ed2e63f7752 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 21:59:07 +0700 Subject: [PATCH 24/37] keyboard: bm40hsrgb: use tri_layer feature --- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 1 + .../kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index 90a2372b05a3..f89ba9422b8c 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -8,6 +8,7 @@ "mousekey": true, "extrakey": true, "rgb_matrix": true, + "tri_layer": true, "console": false, "command": false, "nkro": false, diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c index abb148ce8560..5f389e4caf74 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c @@ -22,9 +22,6 @@ enum layers { _ADJUST }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -42,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -102,7 +99,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - From 432c385cad64ffc2295b101d893a8982d94cf967 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 22:01:43 +0700 Subject: [PATCH 25/37] Update keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c index ddda218bd544..6333244a3455 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12_1x2uC( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, QK_BOOT, DB_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ From 6e37e6316477344d7c46aae05992242e30fa7edf Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 22:03:15 +0700 Subject: [PATCH 26/37] keyboard: bm40hsrgb: use tri_layer feature in via keymap --- keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c index 6333244a3455..216d7cb88867 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c @@ -22,10 +22,6 @@ enum layers { _ADJUST }; -#define LOWER FN_MO13 -#define RAISE FN_MO23 - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -43,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower From 6bf9d86baf1feb4cdd596e4a0aad9bd9a0a2f27c Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 22:17:02 +0700 Subject: [PATCH 27/37] keyboard: bm40hsrgb: describe matrix in layout --- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 94 +++++++++---------- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 2 +- keyboards/kprepublic/bm40hsrgb/rev2/rev2.h | 30 ------ 3 files changed, 48 insertions(+), 78 deletions(-) delete mode 100755 keyboards/kprepublic/bm40hsrgb/rev2/rev2.h diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index f89ba9422b8c..cd612856c470 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -95,53 +95,53 @@ "layouts": { "LAYOUT_ortho_4x12_1x2uC": { "layout": [ - {"label":"K00 (B3,B6)", "x":0, "y":0}, - {"label":"K01 (B3,C6)", "x":1, "y":0}, - {"label":"K02 (B3,B4)", "x":2, "y":0}, - {"label":"K03 (B3,D7)", "x":3, "y":0}, - {"label":"K04 (B3,D4)", "x":4, "y":0}, - {"label":"K05 (B3,D6)", "x":5, "y":0}, - {"label":"K06 (B3,C7)", "x":6, "y":0}, - {"label":"K07 (B3,F6)", "x":7, "y":0}, - {"label":"K08 (B3,F5)", "x":8, "y":0}, - {"label":"K09 (B3,F4)", "x":9, "y":0}, - {"label":"K0A (B3,F1)", "x":10, "y":0}, - {"label":"K0B (B3,F0)", "x":11, "y":0}, - {"label":"K10 (B2,B6)", "x":0, "y":1}, - {"label":"K11 (B2,C6)", "x":1, "y":1}, - {"label":"K12 (B2,B4)", "x":2, "y":1}, - {"label":"K13 (B2,D7)", "x":3, "y":1}, - {"label":"K14 (B2,D4)", "x":4, "y":1}, - {"label":"K15 (B2,D6)", "x":5, "y":1}, - {"label":"K16 (B2,C7)", "x":6, "y":1}, - {"label":"K17 (B2,F6)", "x":7, "y":1}, - {"label":"K18 (B2,F5)", "x":8, "y":1}, - {"label":"K19 (B2,F4)", "x":9, "y":1}, - {"label":"K1A (B2,F1)", "x":10, "y":1}, - {"label":"K1B (B2,F0)", "x":11, "y":1}, - {"label":"K20 (E6,B6)", "x":0, "y":2}, - {"label":"K21 (E6,C6)", "x":1, "y":2}, - {"label":"K22 (E6,B4)", "x":2, "y":2}, - {"label":"K23 (E6,D7)", "x":3, "y":2}, - {"label":"K24 (E6,D4)", "x":4, "y":2}, - {"label":"K25 (E6,D6)", "x":5, "y":2}, - {"label":"K26 (E6,C7)", "x":6, "y":2}, - {"label":"K27 (E6,F6)", "x":7, "y":2}, - {"label":"K28 (E6,F5)", "x":8, "y":2}, - {"label":"K29 (E6,F4)", "x":9, "y":2}, - {"label":"K2A (E6,F1)", "x":10, "y":2}, - {"label":"K2B (E6,F0)", "x":11, "y":2}, - {"label":"K30 (B5,B6)", "x":0, "y":3}, - {"label":"K31 (B5,C6)", "x":1, "y":3}, - {"label":"K32 (B5,B4)", "x":2, "y":3}, - {"label":"K33 (B5,D7)", "x":3, "y":3}, - {"label":"K34 (B5,D4)", "x":4, "y":3}, - {"label":"K35 (B5,D6)", "x":5, "y":3, "w":2}, - {"label":"K37 (B5,F6)", "x":7, "y":3}, - {"label":"K38 (B5,F5)", "x":8, "y":3}, - {"label":"K39 (B5,F4)", "x":9, "y":3}, - {"label":"K3A (B5,F1)", "x":10, "y":3}, - {"label":"K3B (B5,F0)", "x":11, "y":3} + {"label":"K00", "matrix": [0, 0], "x":0, "y":0}, + {"label":"K01", "matrix": [0, 1], "x":1, "y":0}, + {"label":"K02", "matrix": [0, 2], "x":2, "y":0}, + {"label":"K03", "matrix": [0, 3], "x":3, "y":0}, + {"label":"K04", "matrix": [0, 4], "x":4, "y":0}, + {"label":"K05", "matrix": [0, 5], "x":5, "y":0}, + {"label":"K06", "matrix": [0, 6], "x":6, "y":0}, + {"label":"K07", "matrix": [0, 7], "x":7, "y":0}, + {"label":"K08", "matrix": [0, 8], "x":8, "y":0}, + {"label":"K09", "matrix": [0, 9], "x":9, "y":0}, + {"label":"K0A", "matrix": [0, 10], "x":10, "y":0}, + {"label":"K0B", "matrix": [0, 11], "x":11, "y":0}, + {"label":"K10", "matrix": [1, 0], "x":0, "y":1}, + {"label":"K11", "matrix": [1, 1], "x":1, "y":1}, + {"label":"K12", "matrix": [1, 2], "x":2, "y":1}, + {"label":"K13", "matrix": [1, 3], "x":3, "y":1}, + {"label":"K14", "matrix": [1, 4], "x":4, "y":1}, + {"label":"K15", "matrix": [1, 5], "x":5, "y":1}, + {"label":"K16", "matrix": [1, 6], "x":6, "y":1}, + {"label":"K17", "matrix": [1, 7], "x":7, "y":1}, + {"label":"K18", "matrix": [1, 8], "x":8, "y":1}, + {"label":"K19", "matrix": [1, 9], "x":9, "y":1}, + {"label":"K1A", "matrix": [1, 10], "x":10, "y":1}, + {"label":"K1B", "matrix": [1, 11], "x":11, "y":1}, + {"label":"K20", "matrix": [2, 0], "x":0, "y":2}, + {"label":"K21", "matrix": [2, 1], "x":1, "y":2}, + {"label":"K22", "matrix": [2, 2], "x":2, "y":2}, + {"label":"K23", "matrix": [2, 3], "x":3, "y":2}, + {"label":"K24", "matrix": [2, 4], "x":4, "y":2}, + {"label":"K25", "matrix": [2, 5], "x":5, "y":2}, + {"label":"K26", "matrix": [2, 6], "x":6, "y":2}, + {"label":"K27", "matrix": [2, 7], "x":7, "y":2}, + {"label":"K28", "matrix": [2, 8], "x":8, "y":2}, + {"label":"K29", "matrix": [2, 9], "x":9, "y":2}, + {"label":"K2A", "matrix": [2, 10], "x":10, "y":2}, + {"label":"K2B", "matrix": [2, 11], "x":11, "y":2}, + {"label":"K30", "matrix": [3, 0], "x":0, "y":3}, + {"label":"K31", "matrix": [3, 1], "x":1, "y":3}, + {"label":"K32", "matrix": [3, 2], "x":2, "y":3}, + {"label":"K33", "matrix": [3, 3], "x":3, "y":3}, + {"label":"K34", "matrix": [3, 4], "x":4, "y":3}, + {"label":"K35", "matrix": [3, 5], "x":5, "y":3, "w":2}, + {"label":"K37", "matrix": [3, 7], "x":7, "y":3}, + {"label":"K38", "matrix": [3, 8], "x":8, "y":3}, + {"label":"K39", "matrix": [3, 9], "x":9, "y":3}, + {"label":"K3A", "matrix": [3, 10], "x":10, "y":3}, + {"label":"K3B", "matrix": [3, 11], "x":11, "y":3} ] } } diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index 3d10014ed9a6..9e61a7f69f13 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "rev2.h" +#include "quantum.h" #if defined(RGB_MATRIX_ENABLE) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h deleted file mode 100755 index 78ab1d3ef1de..000000000000 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2020 tominabox1 - * - * 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_ortho_4x12_1x2uC( \ - 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, K307, K308, K309, K310, K311 \ -) { \ - { 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, KC_NO, K307, K308, K309, K310, K311 } \ -} - From 92d2ca2c335d2358b9c392a0f1b4840ea5ff84f4 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 19 Apr 2023 22:35:39 +0700 Subject: [PATCH 28/37] keyboard: add alias/mapping for kprepublic/bm40hsrgb/rev1 --- data/mappings/keyboard_aliases.hjson | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 60c5deaad5e0..8815d089f905 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -884,6 +884,9 @@ "kelowna/rgb64": { "target": "weirdo/kelowna/rgb64" }, + "kprepublic/bm40hsrgb": { + "target": "kprepublic/bm40hsrgb/rev1" + }, "kprepublic/bm65hsrgb_iso": { "target": "kprepublic/bm65hsrgb_iso/rev1" }, From ae06115c8f709de9079ac1708a1df456adcf7adf Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Mon, 22 May 2023 00:10:26 +0700 Subject: [PATCH 29/37] keyboard: bm40hsrgb rev2 PR feedback --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 11 +++-------- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index 16e8e4b380c5..6a9506ec6e14 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -15,15 +15,11 @@ */ #pragma once -#ifdef RGB_DI_PIN -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#endif #ifdef RGB_MATRIX_ENABLE // IS31FL3733 configuration # define DRIVER_COUNT 1 # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_1_LED_TOTAL 47 -# define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL +# define ISSI_LED_TOTAL 47 // Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; // don't use those LEDs in RGB Matrix in that case. # ifdef RGBLIGHT_ENABLE @@ -31,8 +27,7 @@ # else # define WS2812_LED_TOTAL 6 # endif -# define DRIVER_LED_TOTAL (ISSI_LED_TOTAL + WS2812_LED_TOTAL) -# define RGB_MATRIX_LED_COUNT (DRIVER_LED_TOTAL) - +# define RGB_MATRIX_LED_COUNT ISSI_LED_TOTAL + WS2812_LED_TOTAL +# define RGB_MATRIX_KEYPRESSES # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #endif diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index 9e61a7f69f13..f6da690b1063 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -21,7 +21,7 @@ # include "is31fl3733.h" # include "ws2812.h" -const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, B_1, A_1, C_1 }, { 0, B_2, A_2, C_2 }, { 0, B_3, A_3, C_3 }, From 78bfd7e3344fe7a43e60a5e22ddab0bee13f2d8c Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Fri, 14 Jul 2023 20:29:51 +0700 Subject: [PATCH 30/37] keyboard: bm40hsrgb rev2 use ws2812 only for rgblight --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 10 +- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 57 +++++++++- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 105 ++++-------------- keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 6 +- 4 files changed, 76 insertions(+), 102 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index 6a9506ec6e14..82a7178e7389 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -19,15 +19,7 @@ // IS31FL3733 configuration # define DRIVER_COUNT 1 # define DRIVER_ADDR_1 0b1010000 -# define ISSI_LED_TOTAL 47 -// Underglow LEDs are WS2812, but someone might want to use RGBLIGHT for them; -// don't use those LEDs in RGB Matrix in that case. -# ifdef RGBLIGHT_ENABLE -# define WS2812_LED_TOTAL 0 -# else -# define WS2812_LED_TOTAL 6 -# endif -# define RGB_MATRIX_LED_COUNT ISSI_LED_TOTAL + WS2812_LED_TOTAL +# define RGB_MATRIX_LED_COUNT 47 # define RGB_MATRIX_KEYPRESSES # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #endif diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index cd612856c470..73a69894b410 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -7,6 +7,7 @@ "bootmagic": true, "mousekey": true, "extrakey": true, + "rgblight": true, "rgb_matrix": true, "tri_layer": true, "console": false, @@ -21,11 +22,10 @@ "device_version": "0.0.2" }, "ws2812": { - "pin": "E0" + "pin": "B0" }, "rgblight": { "led_count": 6, - "pin": "E0", "max_brightness": 150, "animations": { "knight": true, @@ -33,7 +33,7 @@ } }, "rgb_matrix": { - "driver": "custom", + "driver": "IS31FL3733", "max_brightness": 150, "animations": { "alphas_mods": true, @@ -79,7 +79,56 @@ "multisplash": true, "solid_splash": true, "solid_multisplash": true - } + }, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 42, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 111, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1} + ] }, "matrix_pins": { "cols": ["B2", "B3", "D5", "D3", "D2", "B7", "F0", "B4", "B5", "B6", "C6", "C7"], diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index f6da690b1063..beb5f21cf60e 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -74,91 +74,28 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, K_12, J_12, L_12 } }; -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, - {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, - {24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}, - {36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46} - }, { - // LED Index to Physical Position - { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, - { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, - { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, - { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {111, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64} -# if WS2812_LED_TOTAL > 0 - ,{0, 32}, {44, 32}, {88, 32}, {132, 32}, {176, 32}, {220, 32} -# endif - }, { - // LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -# if WS2812_LED_TOTAL > 0 - ,2, 2, 2, 2, 2, 2 -# endif - } -}; - -// clang-format on - -// ========================================================================== -// Custom RGB Matrix driver that combines IS31FL3733 and WS2812 -// ========================================================================== - -# if WS2812_LED_TOTAL > 0 -LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL]; -# endif +/* led_config_t g_led_config = { */ +/* { */ +/* // Key Matrix to LED Index */ +/* { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, */ +/* {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, */ +/* {24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}, */ +/* {36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46} */ +/* }, { */ +/* // LED Index to Physical Position */ +/* { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, */ +/* { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, */ +/* { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, */ +/* { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {111, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64} */ +/* }, { */ +/* // LED Index to Flag */ +/* 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, */ +/* 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, */ +/* 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, */ +/* 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 */ +/* } */ +/* }; */ -static void rgb_matrix_driver_init(void) { - i2c_init(); - IS31FL3733_init(DRIVER_ADDR_1, 0); - for (uint8_t index = 0; index < ISSI_LED_TOTAL; index++) { - bool enabled = true; - IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); - } - IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); -} - -static void rgb_matrix_driver_flush(void) { - IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0); -# if WS2812_LED_TOTAL > 0 - ws2812_setleds(rgb_matrix_ws2812_array, WS2812_LED_TOTAL); -# endif -} - -static void rgb_matrix_driver_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { - if (index < ISSI_LED_TOTAL) { - IS31FL3733_set_color(index, red, green, blue); - } else { -# if WS2812_LED_TOTAL > 0 - rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].r = red; - rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].g = green; - rgb_matrix_ws2812_array[index - ISSI_LED_TOTAL].b = blue; -# endif - } -} - -static void rgb_matrix_driver_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - IS31FL3733_set_color_all(red, green, blue); -# if WS2812_LED_TOTAL > 0 - for (uint8_t i = 0; i < WS2812_LED_TOTAL; i++) { - rgb_matrix_ws2812_array[i].r = red; - rgb_matrix_ws2812_array[i].g = green; - rgb_matrix_ws2812_array[i].b = blue; - } -# endif -} - -// clang-format off -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = rgb_matrix_driver_init, - .flush = rgb_matrix_driver_flush, - .set_color = rgb_matrix_driver_set_color, - .set_color_all = rgb_matrix_driver_set_color_all, -}; // clang-format on #endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk index d333ddbd1132..2d700862eab7 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -1,8 +1,4 @@ # Build Options # change yes to no to disable # -WS2812_DRIVER_REQUIRED = yes - -COMMON_VPATH += $(DRIVER_PATH)/led/issi -SRC += is31fl3733.c -QUANTUM_LIB_SRC += i2c_master.c +RGBLIGHT_DRIVER = WS2812 From ea0f59e8627f2b3d75d9d31c8e6ef3fd5e145f60 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Fri, 14 Jul 2023 20:31:22 +0700 Subject: [PATCH 31/37] keyboard: bm40hsrgb rev2 remove commented out code --- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index beb5f21cf60e..26bfa6353e01 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -74,28 +74,6 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, K_12, J_12, L_12 } }; -/* led_config_t g_led_config = { */ -/* { */ -/* // Key Matrix to LED Index */ -/* { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, */ -/* {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}, */ -/* {24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}, */ -/* {36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46} */ -/* }, { */ -/* // LED Index to Physical Position */ -/* { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, */ -/* { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, */ -/* { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, */ -/* { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {111, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64} */ -/* }, { */ -/* // LED Index to Flag */ -/* 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, */ -/* 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, */ -/* 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, */ -/* 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 */ -/* } */ -/* }; */ - // clang-format on #endif /* RGB_MATRIX_ENABLE */ From 367243a95e7e48b76cea9bb24f0f77e671acb9a2 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Fri, 14 Jul 2023 20:32:32 +0700 Subject: [PATCH 32/37] keyboard: bm40hsrgb rev2 remove unnecessary code --- keyboards/kprepublic/bm40hsrgb/rev2/rev2.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c index 26bfa6353e01..b4a7e4399f8e 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c @@ -17,10 +17,6 @@ #if defined(RGB_MATRIX_ENABLE) -# include "i2c_master.h" -# include "is31fl3733.h" -# include "ws2812.h" - const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, B_1, A_1, C_1 }, { 0, B_2, A_2, C_2 }, @@ -74,6 +70,4 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, K_12, J_12, L_12 } }; -// clang-format on - #endif /* RGB_MATRIX_ENABLE */ From 6c0f0a61720ab823b4880841bdf9322693cd168f Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Fri, 14 Jul 2023 20:35:44 +0700 Subject: [PATCH 33/37] keyboard: bm40hsrgb rev2: LTO_ENABLE for the default keymap --- keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk | 1 + 1 file changed, 1 insertion(+) create mode 100644 keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk new file mode 100644 index 000000000000..4da205a168c7 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk @@ -0,0 +1 @@ +LTO_ENABLE = yes From e419161acfce5c998ba8333840ea31e188dfd058 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Tue, 29 Aug 2023 16:51:44 +0700 Subject: [PATCH 34/37] Update keyboards/kprepublic/bm40hsrgb/rev2/rules.mk --- keyboards/kprepublic/bm40hsrgb/rev2/rules.mk | 4 ---- 1 file changed, 4 deletions(-) mode change 100755 => 100644 keyboards/kprepublic/bm40hsrgb/rev2/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk old mode 100755 new mode 100644 index 2d700862eab7..e69de29bb2d1 --- a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk @@ -1,4 +0,0 @@ -# Build Options -# change yes to no to disable -# -RGBLIGHT_DRIVER = WS2812 From 84295164a2b29ea9179f24ce34e74549c1d3e9dc Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Tue, 29 Aug 2023 09:51:02 +0000 Subject: [PATCH 35/37] Update keyboards/kprepublic/bm40hsrgb/rev2/info.json Co-authored-by: Ryan --- keyboards/kprepublic/bm40hsrgb/rev2/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json index 73a69894b410..dac848ed52a1 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/info.json +++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json @@ -33,7 +33,7 @@ } }, "rgb_matrix": { - "driver": "IS31FL3733", + "driver": "is31fl3733", "max_brightness": 150, "animations": { "alphas_mods": true, From ed6f7a741b58a5f1b137afbb2a5bcba8e1511f39 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Wed, 30 Aug 2023 03:23:01 +0000 Subject: [PATCH 36/37] Update keyboards/kprepublic/bm40hsrgb/rev2/config.h Co-authored-by: Drashna Jaelre --- keyboards/kprepublic/bm40hsrgb/rev2/config.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h index 82a7178e7389..84df5017b6c7 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h @@ -15,11 +15,8 @@ */ #pragma once -#ifdef RGB_MATRIX_ENABLE -// IS31FL3733 configuration -# define DRIVER_COUNT 1 -# define DRIVER_ADDR_1 0b1010000 -# define RGB_MATRIX_LED_COUNT 47 -# define RGB_MATRIX_KEYPRESSES -# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -#endif +#define DRIVER_COUNT 1 +#define DRIVER_ADDR_1 0b1010000 +#define RGB_MATRIX_LED_COUNT 47 +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended From 30eafdcf6cb784bc91df4d49b2eb7337166e60b7 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sat, 2 Sep 2023 13:12:35 +0700 Subject: [PATCH 37/37] reduce firmware size on via keymap --- keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk index 36b7ba9cbc98..0cea9288cc15 100644 --- a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes +RGBLIGHT_ENABLE = no