From ca59bfd63c020dee2267a54f4a52ac2f983895d2 Mon Sep 17 00:00:00 2001 From: bytesapart Date: Sun, 27 Jun 2021 14:46:52 +0530 Subject: [PATCH 01/16] Add support for bm65rgb --- keyboards/bm65rgb/bm65rgb.c | 44 +++++++ keyboards/bm65rgb/bm65rgb.h | 41 +++++++ keyboards/bm65rgb/config.h | 122 ++++++++++++++++++++ keyboards/bm65rgb/info.json | 80 +++++++++++++ keyboards/bm65rgb/keymaps/default/keymap.c | 52 +++++++++ keyboards/bm65rgb/keymaps/default/readme.md | 1 + keyboards/bm65rgb/readme.md | 24 ++++ keyboards/bm65rgb/rules.mk | 27 +++++ 8 files changed, 391 insertions(+) create mode 100644 keyboards/bm65rgb/bm65rgb.c create mode 100644 keyboards/bm65rgb/bm65rgb.h create mode 100644 keyboards/bm65rgb/config.h create mode 100644 keyboards/bm65rgb/info.json create mode 100644 keyboards/bm65rgb/keymaps/default/keymap.c create mode 100644 keyboards/bm65rgb/keymaps/default/readme.md create mode 100644 keyboards/bm65rgb/readme.md create mode 100644 keyboards/bm65rgb/rules.mk diff --git a/keyboards/bm65rgb/bm65rgb.c b/keyboards/bm65rgb/bm65rgb.c new file mode 100644 index 000000000000..c4659ef1b98f --- /dev/null +++ b/keyboards/bm65rgb/bm65rgb.c @@ -0,0 +1,44 @@ +/* Copyright 2021 bytesapart + * + * 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 "bm65rgb.h" + +#ifdef RGB_MATRIX_ENABLE +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, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 }, + { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 } +}, { + // LED Index to Physical Position + { 0, 0}, { 15, 0}, { 30, 0}, { 45, 0}, { 60, 0}, { 75, 0}, { 90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {202, 0}, {225, 0}, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete + { 4, 16}, { 22, 16}, { 37, 16}, { 52, 16}, { 67, 16}, { 82, 16}, { 97, 16}, {112, 16}, {127, 16}, {142, 16}, {157, 16}, {172, 16}, {187, 16}, {206, 16}, {225, 16}, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home + { 6, 32}, { 26, 32}, { 41, 32}, { 56, 32}, { 71, 32}, { 86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {225, 32}, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up + { 9, 48}, { 34, 48}, { 49, 48}, { 64, 48}, { 79, 48}, { 94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {208, 48}, {225, 48}, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down + { 2, 64}, { 21, 64}, { 39, 64}, { 94, 64}, {148, 64}, {163, 64}, {193, 64}, {208, 64}, {225, 64}, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + {185, 45}, {160, 45}, {125, 45}, { 95, 45}, { 60, 45}, { 25, 45} // UNDERGLOW +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down + 1, 1, 1, 4, 1, 1, 1, 1, 1, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 2, 2, 2, 2, 2, 2 // UNDERGLOW +} }; +#endif diff --git a/keyboards/bm65rgb/bm65rgb.h b/keyboards/bm65rgb/bm65rgb.h new file mode 100644 index 000000000000..31735fbaeafc --- /dev/null +++ b/keyboards/bm65rgb/bm65rgb.h @@ -0,0 +1,41 @@ +/* Copyright 2021 bytesapart + * + * 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" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_65_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E,\ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E,\ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E,\ + k40, k41, k42, k46, k49, k4A, k4C, k4D, k4E\ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ +} diff --git a/keyboards/bm65rgb/config.h b/keyboards/bm65rgb/config.h new file mode 100644 index 000000000000..21624b9f1664 --- /dev/null +++ b/keyboards/bm65rgb/config.h @@ -0,0 +1,122 @@ +/* +Copyright 2021 bytesapart + +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 0xEF6E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM65 RGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, \ + B1, \ + B2, \ + B3, \ + E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN E2 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 73 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 73 + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bm65rgb/info.json b/keyboards/bm65rgb/info.json new file mode 100644 index 000000000000..3d7c571f6a00 --- /dev/null +++ b/keyboards/bm65rgb/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "bm65rgb", + "url": "", + "maintainer": "bytesapart", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K3E (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K4E (E6,F6)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/bm65rgb/keymaps/default/keymap.c b/keyboards/bm65rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..4c42f109bcf8 --- /dev/null +++ b/keyboards/bm65rgb/keymaps/default/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2021 bytesapart + * + * 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 + +// // Defines names for use in layer keycodes and the keymap +// enum layer_names { +// _BASE, +// _FN +// }; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi( + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +/* +Template + [ ] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ diff --git a/keyboards/bm65rgb/keymaps/default/readme.md b/keyboards/bm65rgb/keymaps/default/readme.md new file mode 100644 index 000000000000..72171ee89a68 --- /dev/null +++ b/keyboards/bm65rgb/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm65rgb diff --git a/keyboards/bm65rgb/readme.md b/keyboards/bm65rgb/readme.md new file mode 100644 index 000000000000..0096ea512a43 --- /dev/null +++ b/keyboards/bm65rgb/readme.md @@ -0,0 +1,24 @@ +# bm65rgb + +![bm65rgb](https://i.imgur.com/DskSCve.jpeg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [bytesapart](https://github.com/bytesapart) +* Hardware Supported: BM65 RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=1&_sid=5b9a6a5d0&_ss=r) + +Make example for this keyboard (after setting up your build environment): + + make bm65rgb:default + +Flashing example for this keyboard: + + make bm65rgb:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +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/bm65rgb/rules.mk b/keyboards/bm65rgb/rules.mk new file mode 100644 index 000000000000..ce5ad8447774 --- /dev/null +++ b/keyboards/bm65rgb/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 = full # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_ansi From 2a391dc1fe305569fdd808b6d2736d588912205f Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 12 Oct 2021 18:16:29 +0800 Subject: [PATCH 02/16] move bm65rgb to /kprepublic --- keyboards/{ => kprepublic}/bm65rgb/bm65rgb.c | 0 keyboards/{ => kprepublic}/bm65rgb/bm65rgb.h | 0 keyboards/{ => kprepublic}/bm65rgb/config.h | 0 keyboards/{ => kprepublic}/bm65rgb/info.json | 0 keyboards/{ => kprepublic}/bm65rgb/keymaps/default/keymap.c | 0 keyboards/{ => kprepublic}/bm65rgb/keymaps/default/readme.md | 0 keyboards/{ => kprepublic}/bm65rgb/readme.md | 0 keyboards/{ => kprepublic}/bm65rgb/rules.mk | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/{ => kprepublic}/bm65rgb/bm65rgb.c (100%) rename keyboards/{ => kprepublic}/bm65rgb/bm65rgb.h (100%) rename keyboards/{ => kprepublic}/bm65rgb/config.h (100%) rename keyboards/{ => kprepublic}/bm65rgb/info.json (100%) rename keyboards/{ => kprepublic}/bm65rgb/keymaps/default/keymap.c (100%) rename keyboards/{ => kprepublic}/bm65rgb/keymaps/default/readme.md (100%) rename keyboards/{ => kprepublic}/bm65rgb/readme.md (100%) rename keyboards/{ => kprepublic}/bm65rgb/rules.mk (100%) diff --git a/keyboards/bm65rgb/bm65rgb.c b/keyboards/kprepublic/bm65rgb/bm65rgb.c similarity index 100% rename from keyboards/bm65rgb/bm65rgb.c rename to keyboards/kprepublic/bm65rgb/bm65rgb.c diff --git a/keyboards/bm65rgb/bm65rgb.h b/keyboards/kprepublic/bm65rgb/bm65rgb.h similarity index 100% rename from keyboards/bm65rgb/bm65rgb.h rename to keyboards/kprepublic/bm65rgb/bm65rgb.h diff --git a/keyboards/bm65rgb/config.h b/keyboards/kprepublic/bm65rgb/config.h similarity index 100% rename from keyboards/bm65rgb/config.h rename to keyboards/kprepublic/bm65rgb/config.h diff --git a/keyboards/bm65rgb/info.json b/keyboards/kprepublic/bm65rgb/info.json similarity index 100% rename from keyboards/bm65rgb/info.json rename to keyboards/kprepublic/bm65rgb/info.json diff --git a/keyboards/bm65rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm65rgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c diff --git a/keyboards/bm65rgb/keymaps/default/readme.md b/keyboards/kprepublic/bm65rgb/keymaps/default/readme.md similarity index 100% rename from keyboards/bm65rgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm65rgb/keymaps/default/readme.md diff --git a/keyboards/bm65rgb/readme.md b/keyboards/kprepublic/bm65rgb/readme.md similarity index 100% rename from keyboards/bm65rgb/readme.md rename to keyboards/kprepublic/bm65rgb/readme.md diff --git a/keyboards/bm65rgb/rules.mk b/keyboards/kprepublic/bm65rgb/rules.mk similarity index 100% rename from keyboards/bm65rgb/rules.mk rename to keyboards/kprepublic/bm65rgb/rules.mk From 6eaa23b8111a504c682fe4468a7653e23d71ac21 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Wed, 13 Oct 2021 16:00:10 +0800 Subject: [PATCH 03/16] add 2 revisions of bm65rgb, temporary --- keyboards/kprepublic/bm65rgb/rev1/config.h | 122 ++++++++++++++++++++ keyboards/kprepublic/bm65rgb/rev1/info.json | 80 +++++++++++++ keyboards/kprepublic/bm65rgb/rev1/readme.md | 24 ++++ keyboards/kprepublic/bm65rgb/rev1/rev1.h | 0 keyboards/kprepublic/bm65rgb/rev1/rules.mk | 27 +++++ keyboards/kprepublic/bm65rgb/rev2/config.h | 122 ++++++++++++++++++++ keyboards/kprepublic/bm65rgb/rev2/info.json | 80 +++++++++++++ keyboards/kprepublic/bm65rgb/rev2/readme.md | 24 ++++ keyboards/kprepublic/bm65rgb/rev2/rev2.h | 0 keyboards/kprepublic/bm65rgb/rev2/rules.mk | 27 +++++ 10 files changed, 506 insertions(+) create mode 100644 keyboards/kprepublic/bm65rgb/rev1/config.h create mode 100644 keyboards/kprepublic/bm65rgb/rev1/info.json create mode 100644 keyboards/kprepublic/bm65rgb/rev1/readme.md create mode 100644 keyboards/kprepublic/bm65rgb/rev1/rev1.h create mode 100644 keyboards/kprepublic/bm65rgb/rev1/rules.mk create mode 100644 keyboards/kprepublic/bm65rgb/rev2/config.h create mode 100644 keyboards/kprepublic/bm65rgb/rev2/info.json create mode 100644 keyboards/kprepublic/bm65rgb/rev2/readme.md create mode 100644 keyboards/kprepublic/bm65rgb/rev2/rev2.h create mode 100644 keyboards/kprepublic/bm65rgb/rev2/rules.mk diff --git a/keyboards/kprepublic/bm65rgb/rev1/config.h b/keyboards/kprepublic/bm65rgb/rev1/config.h new file mode 100644 index 000000000000..21624b9f1664 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev1/config.h @@ -0,0 +1,122 @@ +/* +Copyright 2021 bytesapart + +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 0xEF6E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM65 RGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, \ + B1, \ + B2, \ + B3, \ + E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN E2 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 73 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 73 + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm65rgb/rev1/info.json b/keyboards/kprepublic/bm65rgb/rev1/info.json new file mode 100644 index 000000000000..3d7c571f6a00 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev1/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "bm65rgb", + "url": "", + "maintainer": "bytesapart", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K3E (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K4E (E6,F6)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm65rgb/rev1/readme.md b/keyboards/kprepublic/bm65rgb/rev1/readme.md new file mode 100644 index 000000000000..0096ea512a43 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev1/readme.md @@ -0,0 +1,24 @@ +# bm65rgb + +![bm65rgb](https://i.imgur.com/DskSCve.jpeg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [bytesapart](https://github.com/bytesapart) +* Hardware Supported: BM65 RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=1&_sid=5b9a6a5d0&_ss=r) + +Make example for this keyboard (after setting up your build environment): + + make bm65rgb:default + +Flashing example for this keyboard: + + make bm65rgb:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +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/bm65rgb/rev1/rev1.h b/keyboards/kprepublic/bm65rgb/rev1/rev1.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kprepublic/bm65rgb/rev1/rules.mk b/keyboards/kprepublic/bm65rgb/rev1/rules.mk new file mode 100644 index 000000000000..ce5ad8447774 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev1/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 = full # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_ansi diff --git a/keyboards/kprepublic/bm65rgb/rev2/config.h b/keyboards/kprepublic/bm65rgb/rev2/config.h new file mode 100644 index 000000000000..21624b9f1664 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev2/config.h @@ -0,0 +1,122 @@ +/* +Copyright 2021 bytesapart + +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 0xEF6E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM65 RGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, \ + B1, \ + B2, \ + B3, \ + E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN E2 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 73 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 73 + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm65rgb/rev2/info.json b/keyboards/kprepublic/bm65rgb/rev2/info.json new file mode 100644 index 000000000000..3d7c571f6a00 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev2/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "bm65rgb", + "url": "", + "maintainer": "bytesapart", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K3E (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K4E (E6,F6)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm65rgb/rev2/readme.md b/keyboards/kprepublic/bm65rgb/rev2/readme.md new file mode 100644 index 000000000000..0096ea512a43 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev2/readme.md @@ -0,0 +1,24 @@ +# bm65rgb + +![bm65rgb](https://i.imgur.com/DskSCve.jpeg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [bytesapart](https://github.com/bytesapart) +* Hardware Supported: BM65 RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=1&_sid=5b9a6a5d0&_ss=r) + +Make example for this keyboard (after setting up your build environment): + + make bm65rgb:default + +Flashing example for this keyboard: + + make bm65rgb:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +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/bm65rgb/rev2/rev2.h b/keyboards/kprepublic/bm65rgb/rev2/rev2.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/kprepublic/bm65rgb/rev2/rules.mk b/keyboards/kprepublic/bm65rgb/rev2/rules.mk new file mode 100644 index 000000000000..ce5ad8447774 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/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 = full # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_ansi From ba1f0d5f9c6010d514bbd74bd147d2bd43502fd7 Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Fri, 22 Oct 2021 09:11:27 +0800 Subject: [PATCH 04/16] Apply suggestions from code review Co-authored-by: Drashna Jaelre --- keyboards/kprepublic/bm65rgb/info.json | 2 -- keyboards/kprepublic/bm65rgb/rev1/info.json | 2 -- keyboards/kprepublic/bm65rgb/rev1/rules.mk | 3 +-- keyboards/kprepublic/bm65rgb/rev2/info.json | 2 -- keyboards/kprepublic/bm65rgb/rev2/rules.mk | 2 +- keyboards/kprepublic/bm65rgb/rules.mk | 3 +-- 6 files changed, 3 insertions(+), 11 deletions(-) diff --git a/keyboards/kprepublic/bm65rgb/info.json b/keyboards/kprepublic/bm65rgb/info.json index 3d7c571f6a00..a916d8d2cbf8 100644 --- a/keyboards/kprepublic/bm65rgb/info.json +++ b/keyboards/kprepublic/bm65rgb/info.json @@ -2,8 +2,6 @@ "keyboard_name": "bm65rgb", "url": "", "maintainer": "bytesapart", - "width": 15, - "height": 5, "layouts": { "LAYOUT_65_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm65rgb/rev1/info.json b/keyboards/kprepublic/bm65rgb/rev1/info.json index 3d7c571f6a00..a916d8d2cbf8 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/info.json +++ b/keyboards/kprepublic/bm65rgb/rev1/info.json @@ -2,8 +2,6 @@ "keyboard_name": "bm65rgb", "url": "", "maintainer": "bytesapart", - "width": 15, - "height": 5, "layouts": { "LAYOUT_65_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm65rgb/rev1/rules.mk b/keyboards/kprepublic/bm65rgb/rev1/rules.mk index ce5ad8447774..910923efd1dc 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/rules.mk +++ b/keyboards/kprepublic/bm65rgb/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +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 @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/kprepublic/bm65rgb/rev2/info.json b/keyboards/kprepublic/bm65rgb/rev2/info.json index 3d7c571f6a00..a916d8d2cbf8 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/info.json +++ b/keyboards/kprepublic/bm65rgb/rev2/info.json @@ -2,8 +2,6 @@ "keyboard_name": "bm65rgb", "url": "", "maintainer": "bytesapart", - "width": 15, - "height": 5, "layouts": { "LAYOUT_65_ansi": { "layout": [ diff --git a/keyboards/kprepublic/bm65rgb/rev2/rules.mk b/keyboards/kprepublic/bm65rgb/rev2/rules.mk index ce5ad8447774..976b338309cf 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm65rgb/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +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 diff --git a/keyboards/kprepublic/bm65rgb/rules.mk b/keyboards/kprepublic/bm65rgb/rules.mk index ce5ad8447774..910923efd1dc 100644 --- a/keyboards/kprepublic/bm65rgb/rules.mk +++ b/keyboards/kprepublic/bm65rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +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 @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 From de45aaf706cd1c108d28ca59baf9ce89d0a38b38 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 07:42:41 +0800 Subject: [PATCH 05/16] moved rgb config to rev1, change version number for rev2 --- keyboards/kprepublic/bm65rgb/{bm65rgb.c => rev1/rev1.c} | 0 keyboards/kprepublic/bm65rgb/rev2/config.h | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename keyboards/kprepublic/bm65rgb/{bm65rgb.c => rev1/rev1.c} (100%) diff --git a/keyboards/kprepublic/bm65rgb/bm65rgb.c b/keyboards/kprepublic/bm65rgb/rev1/rev1.c similarity index 100% rename from keyboards/kprepublic/bm65rgb/bm65rgb.c rename to keyboards/kprepublic/bm65rgb/rev1/rev1.c diff --git a/keyboards/kprepublic/bm65rgb/rev2/config.h b/keyboards/kprepublic/bm65rgb/rev2/config.h index 21624b9f1664..1f13e32d325c 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/config.h +++ b/keyboards/kprepublic/bm65rgb/rev2/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x4B50 //KP #define PRODUCT_ID 0xEF6E -#define DEVICE_VER 0x0001 +#define DEVICE_VER 0x0002 #define MANUFACTURER KPRepublic #define PRODUCT BM65 RGB From 6844b2f6592f72a288d8b4c73d288d0c2ecb83f9 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 08:07:54 +0800 Subject: [PATCH 06/16] apply code review from #13361 --- keyboards/kprepublic/bm65rgb/info.json | 4 ++-- keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c | 6 +++--- keyboards/kprepublic/bm65rgb/rev1/info.json | 4 ++-- keyboards/kprepublic/bm65rgb/rev1/rules.mk | 2 +- keyboards/kprepublic/bm65rgb/rev2/info.json | 4 ++-- keyboards/kprepublic/bm65rgb/rev2/rules.mk | 3 +-- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/keyboards/kprepublic/bm65rgb/info.json b/keyboards/kprepublic/bm65rgb/info.json index a916d8d2cbf8..444d8cee8516 100644 --- a/keyboards/kprepublic/bm65rgb/info.json +++ b/keyboards/kprepublic/bm65rgb/info.json @@ -69,8 +69,8 @@ {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, {"label":"K49 (E6,B5)", "x":10, "y":4}, {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, {"label":"K4E (E6,F6)", "x":15, "y":4} ] } diff --git a/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c index 4c42f109bcf8..3548369d4520 100644 --- a/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c @@ -23,14 +23,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_65_ansi( + [0] = LAYOUT_65_ansi_blocker( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT_65_ansi( + [1] = LAYOUT_65_ansi_blocker( KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Template - [ ] = LAYOUT_65_ansi( + [ ] = LAYOUT_65_ansi_blocker( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/kprepublic/bm65rgb/rev1/info.json b/keyboards/kprepublic/bm65rgb/rev1/info.json index a916d8d2cbf8..444d8cee8516 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/info.json +++ b/keyboards/kprepublic/bm65rgb/rev1/info.json @@ -69,8 +69,8 @@ {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, {"label":"K49 (E6,B5)", "x":10, "y":4}, {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, {"label":"K4E (E6,F6)", "x":15, "y":4} ] } diff --git a/keyboards/kprepublic/bm65rgb/rev1/rules.mk b/keyboards/kprepublic/bm65rgb/rev1/rules.mk index 910923efd1dc..a0e70197150d 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/rules.mk +++ b/keyboards/kprepublic/bm65rgb/rev1/rules.mk @@ -23,4 +23,4 @@ RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes -LAYOUTS = 65_ansi +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/kprepublic/bm65rgb/rev2/info.json b/keyboards/kprepublic/bm65rgb/rev2/info.json index a916d8d2cbf8..444d8cee8516 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/info.json +++ b/keyboards/kprepublic/bm65rgb/rev2/info.json @@ -69,8 +69,8 @@ {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, {"label":"K49 (E6,B5)", "x":10, "y":4}, {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, {"label":"K4E (E6,F6)", "x":15, "y":4} ] } diff --git a/keyboards/kprepublic/bm65rgb/rev2/rules.mk b/keyboards/kprepublic/bm65rgb/rev2/rules.mk index 976b338309cf..a0e70197150d 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/rules.mk +++ b/keyboards/kprepublic/bm65rgb/rev2/rules.mk @@ -18,10 +18,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes -LAYOUTS = 65_ansi +LAYOUTS = 65_ansi_blocker From 602769537eb9436aa3369fd3602b83b94676656f Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 08:22:53 +0800 Subject: [PATCH 07/16] delete extraneous rev1.h file --- keyboards/kprepublic/bm65rgb/rev1/rev1.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 keyboards/kprepublic/bm65rgb/rev1/rev1.h diff --git a/keyboards/kprepublic/bm65rgb/rev1/rev1.h b/keyboards/kprepublic/bm65rgb/rev1/rev1.h deleted file mode 100644 index e69de29bb2d1..000000000000 From 00fb0e5ae0c64d4c7a10da9856cb856005cf4dd3 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 08:23:40 +0800 Subject: [PATCH 08/16] rename bm65rgb.h to rev1/rev1.h --- keyboards/kprepublic/bm65rgb/{bm65rgb.h => rev1/rev1.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/kprepublic/bm65rgb/{bm65rgb.h => rev1/rev1.h} (100%) diff --git a/keyboards/kprepublic/bm65rgb/bm65rgb.h b/keyboards/kprepublic/bm65rgb/rev1/rev1.h similarity index 100% rename from keyboards/kprepublic/bm65rgb/bm65rgb.h rename to keyboards/kprepublic/bm65rgb/rev1/rev1.h From 326442f9c88cff95143d25488eb9bf98e5376c75 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 08:25:48 +0800 Subject: [PATCH 09/16] complete rerefrencing from bm65rgb to rev1 --- keyboards/kprepublic/bm65rgb/rev1/rev1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm65rgb/rev1/rev1.c b/keyboards/kprepublic/bm65rgb/rev1/rev1.c index c4659ef1b98f..6f85f256e1f4 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/rev1.c +++ b/keyboards/kprepublic/bm65rgb/rev1/rev1.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "bm65rgb.h" +#include "rev1.h" #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { From 2b12e32e0657731da75638d12f301dc5496e770b Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 09:47:30 +0800 Subject: [PATCH 10/16] change layout macro for rev1 --- keyboards/kprepublic/bm65rgb/rev1/rev1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kprepublic/bm65rgb/rev1/rev1.h b/keyboards/kprepublic/bm65rgb/rev1/rev1.h index 31735fbaeafc..4bafcf1943dd 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/rev1.h +++ b/keyboards/kprepublic/bm65rgb/rev1/rev1.h @@ -26,7 +26,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_65_ansi( \ +#define LAYOUT_65_ansi_blocker( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E,\ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E,\ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E,\ From 4ad4216e2fa0cb0e16452e6b95af7831f0511d7d Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 10:00:13 +0800 Subject: [PATCH 11/16] delete extraneous files --- keyboards/kprepublic/bm65rgb/config.h | 122 ------------------------- keyboards/kprepublic/bm65rgb/info.json | 78 ---------------- 2 files changed, 200 deletions(-) delete mode 100644 keyboards/kprepublic/bm65rgb/config.h delete mode 100644 keyboards/kprepublic/bm65rgb/info.json diff --git a/keyboards/kprepublic/bm65rgb/config.h b/keyboards/kprepublic/bm65rgb/config.h deleted file mode 100644 index 21624b9f1664..000000000000 --- a/keyboards/kprepublic/bm65rgb/config.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2021 bytesapart - -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 0xEF6E -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM65 RGB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B0, \ - B1, \ - B2, \ - B3, \ - E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -// The pin connected to the data pin of the LEDs -#define RGB_DI_PIN E2 -// The number of LEDs connected -#define DRIVER_LED_TOTAL 73 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 73 - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm65rgb/info.json b/keyboards/kprepublic/bm65rgb/info.json deleted file mode 100644 index 444d8cee8516..000000000000 --- a/keyboards/kprepublic/bm65rgb/info.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "keyboard_name": "bm65rgb", - "url": "", - "maintainer": "bytesapart", - "layouts": { - "LAYOUT_65_ansi": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K0E (B0,F6)", "x":15, "y":0}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K1E (B1,F6)", "x":15, "y":1}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K2E (B2,F6)", "x":15, "y":2}, - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3}, - {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K3E (B3,F6)", "x":15, "y":3}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4}, - {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, - {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4E (E6,F6)", "x":15, "y":4} - ] - } - } -} From 3bb62e1f5ef90a14ac9df213899bb6ff0e80eb04 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sat, 23 Oct 2021 10:01:25 +0800 Subject: [PATCH 12/16] delete extraneous files --- keyboards/kprepublic/bm65rgb/rules.mk | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 keyboards/kprepublic/bm65rgb/rules.mk diff --git a/keyboards/kprepublic/bm65rgb/rules.mk b/keyboards/kprepublic/bm65rgb/rules.mk deleted file mode 100644 index 910923efd1dc..000000000000 --- a/keyboards/kprepublic/bm65rgb/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 65_ansi From cee4188311dbc1fbef0c56617d7b7039d73f96f0 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Sun, 24 Oct 2021 13:48:10 +0800 Subject: [PATCH 13/16] add rev2.c --- keyboards/kprepublic/bm65rgb/rev2/rev2.c | 165 +++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 keyboards/kprepublic/bm65rgb/rev2/rev2.c diff --git a/keyboards/kprepublic/bm65rgb/rev2/rev2.c b/keyboards/kprepublic/bm65rgb/rev2/rev2.c new file mode 100644 index 000000000000..b3b9a24ed418 --- /dev/null +++ b/keyboards/kprepublic/bm65rgb/rev2/rev2.c @@ -0,0 +1,165 @@ +/* Copyright 2021 sigprof 2021 peepeetee + * + * 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 "rev1.h" + +#ifdef RGB_MATRIX_ENABLE +# include +# include +# include + +// clang-format off + +// Dummy IS31FL3733 config for testing - enables all possible LED locations +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + { 0, A_1, B_1, C_1 }, + { 0, A_2, B_2, C_2 }, + { 0, A_3, B_3, C_3 }, + { 0, A_4, B_4, C_4 }, + { 0, A_5, B_5, C_5 }, + { 0, A_6, B_6, C_6 }, + { 0, A_7, B_7, C_7 }, + { 0, A_8, B_8, C_8 }, + { 0, A_9, B_9, C_9 }, + { 0, A_10, B_10, C_10 }, + { 0, A_11, B_11, C_11 }, + { 0, A_12, B_12, C_12 }, + { 0, A_13, B_13, C_13 }, + { 0, A_14, B_14, C_14 }, + { 0, A_15, B_15, C_15 }, + { 0, A_16, B_16, C_16 }, + { 0, D_1, E_1, F_1 }, + { 0, D_2, E_2, F_2 }, + { 0, D_3, E_3, F_3 }, + { 0, D_4, E_4, F_4 }, + { 0, D_5, E_5, F_5 }, + { 0, D_6, E_6, F_6 }, + { 0, D_7, E_7, F_7 }, + { 0, D_8, E_8, F_8 }, + { 0, D_9, E_9, F_9 }, + { 0, D_10, E_10, F_10 }, + { 0, D_11, E_11, F_11 }, + { 0, D_12, E_12, F_12 }, + { 0, D_13, E_13, F_13 }, + { 0, D_14, E_14, F_14 }, + { 0, D_15, E_15, F_15 }, + { 0, D_16, E_16, F_16 }, + { 0, G_1, H_1, I_1 }, + { 0, G_2, H_2, I_2 }, + { 0, G_3, H_3, I_3 }, + { 0, G_4, H_4, I_4 }, + { 0, G_5, H_5, I_5 }, + { 0, G_6, H_6, I_6 }, + { 0, G_7, H_7, I_7 }, + { 0, G_8, H_8, I_8 }, + { 0, G_9, H_9, I_9 }, + { 0, G_10, H_10, I_10 }, + { 0, G_11, H_11, I_11 }, + { 0, G_12, H_12, I_12 }, + { 0, G_13, H_13, I_13 }, + { 0, G_14, H_14, I_14 }, + { 0, G_15, H_15, I_15 }, + { 0, G_16, H_16, I_16 }, + { 0, J_1, K_1, L_1 }, + { 0, J_2, K_2, L_2 }, + { 0, J_3, K_3, L_3 }, + { 0, J_4, K_4, L_4 }, + { 0, J_5, K_5, L_5 }, + { 0, J_6, K_6, L_6 }, + { 0, J_7, K_7, L_7 }, + { 0, J_8, K_8, L_8 }, + { 0, J_9, K_9, L_9 }, + { 0, J_10, K_10, L_10 }, + { 0, J_11, K_11, L_11 }, + { 0, J_12, K_12, L_12 }, + { 0, J_13, K_13, L_13 }, + { 0, J_14, K_14, L_14 }, + { 0, J_15, K_15, L_15 }, + { 0, J_16, K_16, L_16 }, +}; + +// Dummy RGB Matrix config for testing +led_config_t g_led_config = { + // Matrix location to LED index + { + [0 ... MATRIX_ROWS-1] = { + [0 ... MATRIX_COLS-1] = NO_LED + } + }, + + // LED index to physical location + { + [0 ... DRIVER_LED_TOTAL-1] = {0, 0} + }, + + // LED index to flags + { + [0 ... DRIVER_LED_TOTAL-1] = 4 + } +}; +// 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 */ From 2a2ecd979702a8d95b235318886c2373ab0d3a65 Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 26 Oct 2021 22:03:22 +0800 Subject: [PATCH 14/16] interim commit --- keyboards/kprepublic/bm65rgb/rev2/config.h | 11 +- keyboards/kprepublic/bm65rgb/rev2/info.json | 143 ++++++++++---------- keyboards/kprepublic/bm65rgb/rev2/rev2.c | 2 +- keyboards/kprepublic/bm65rgb/rev2/rev2.h | 3 + 4 files changed, 81 insertions(+), 78 deletions(-) diff --git a/keyboards/kprepublic/bm65rgb/rev2/config.h b/keyboards/kprepublic/bm65rgb/rev2/config.h index 1f13e32d325c..d2b0ce286ef4 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/config.h +++ b/keyboards/kprepublic/bm65rgb/rev2/config.h @@ -27,8 +27,8 @@ along with this program. If not, see . #define PRODUCT BM65 RGB /* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +// #define MATRIX_ROWS 5 +// #define MATRIX_COLS 15 /* * Keyboard Matrix Assignments @@ -40,12 +40,7 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { B0, \ - B1, \ - B2, \ - B3, \ - E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } + #define UNUSED_PINS /* COL2ROW, ROW2COL */ diff --git a/keyboards/kprepublic/bm65rgb/rev2/info.json b/keyboards/kprepublic/bm65rgb/rev2/info.json index 444d8cee8516..9276d22ed7ad 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/info.json +++ b/keyboards/kprepublic/bm65rgb/rev2/info.json @@ -1,77 +1,82 @@ { "keyboard_name": "bm65rgb", + "maintainer": "peepeetee", + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["D6", "D4", "D5", "D3", "F6"], + "rows": ["F0", "F1", "B0", "B1", "B2", "B3", "E6", "B7", "D2", "D7", "B4", "B5", "B6", "C6", "C7"] + }, "url": "", - "maintainer": "bytesapart", "layouts": { - "LAYOUT_65_ansi": { + "LAYOUT_65_ansi_blocker": { "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K0E (B0,F6)", "x":15, "y":0}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K1E (B1,F6)", "x":15, "y":1}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K2E (B2,F6)", "x":15, "y":2}, - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3}, - {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K3E (B3,F6)", "x":15, "y":3}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4}, - {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, - {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4E (E6,F6)", "x":15, "y":4} + { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "!", "matrix": [1, 0], "x": 1, "y": 0 }, + { "label": "@", "matrix": [2, 0], "x": 2, "y": 0 }, + { "label": "#", "matrix": [3, 0], "x": 3, "y": 0 }, + { "label": "$", "matrix": [4, 0], "x": 4, "y": 0 }, + { "label": "%", "matrix": [5, 0], "x": 5, "y": 0 }, + { "label": "^", "matrix": [6, 0], "x": 6, "y": 0 }, + { "label": "&", "matrix": [7, 0], "x": 7, "y": 0 }, + { "label": "*", "matrix": [8, 0], "x": 8, "y": 0 }, + { "label": "(", "matrix": [9, 0], "x": 9, "y": 0 }, + { "label": ")", "matrix": [10, 0], "x": 10, "y": 0 }, + { "label": "_", "matrix": [11, 0], "x": 11, "y": 0 }, + { "label": "+", "matrix": [12, 0], "x": 12, "y": 0 }, + { "label": "Backspace", "matrix": [13, 0], "w": 2, "x": 13, "y": 0 }, + { "label": "Home", "matrix": [14, 0], "x": 15, "y": 0 }, + { "label": "Tab", "matrix": [0, 1], "w": 1.5, "x": 0, "y": 1 }, + { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 }, + { "label": "W", "matrix": [2, 1], "x": 2.5, "y": 1 }, + { "label": "E", "matrix": [3, 1], "x": 3.5, "y": 1 }, + { "label": "R", "matrix": [4, 1], "x": 4.5, "y": 1 }, + { "label": "T", "matrix": [5, 1], "x": 5.5, "y": 1 }, + { "label": "Y", "matrix": [6, 1], "x": 6.5, "y": 1 }, + { "label": "U", "matrix": [7, 1], "x": 7.5, "y": 1 }, + { "label": "I", "matrix": [8, 1], "x": 8.5, "y": 1 }, + { "label": "O", "matrix": [9, 1], "x": 9.5, "y": 1 }, + { "label": "P", "matrix": [10, 1], "x": 10.5, "y": 1 }, + { "label": "{", "matrix": [11, 1], "x": 11.5, "y": 1 }, + { "label": "}", "matrix": [12, 1], "x": 12.5, "y": 1 }, + { "label": "|", "matrix": [13, 1], "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "Page Up", "matrix": [14, 1], "x": 15, "y": 1 }, + { "label": "Caps Lock", "matrix": [0, 2], "w": 1.75, "x": 0, "y": 2 }, + { "label": "A", "matrix": [1, 2], "x": 1.75, "y": 2 }, + { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 }, + { "label": "D", "matrix": [3, 2], "x": 3.75, "y": 2 }, + { "label": "F", "matrix": [4, 2], "x": 4.75, "y": 2 }, + { "label": "G", "matrix": [5, 2], "x": 5.75, "y": 2 }, + { "label": "H", "matrix": [6, 2], "x": 6.75, "y": 2 }, + { "label": "J", "matrix": [7, 2], "x": 7.75, "y": 2 }, + { "label": "K", "matrix": [8, 2], "x": 8.75, "y": 2 }, + { "label": "L", "matrix": [9, 2], "x": 9.75, "y": 2 }, + { "label": ":", "matrix": [10, 2], "x": 10.75, "y": 2 }, + { "label": "\"", "matrix": [11, 2], "x": 11.75, "y": 2 }, + { "label": "Enter", "matrix": [13, 2], "w": 2.25, "x": 12.75, "y": 2 }, + { "label": "Page Down", "matrix": [14, 2], "x": 15, "y": 2 }, + { "label": "Shift", "matrix": [0, 3], "w": 2.25, "x": 0, "y": 3 }, + { "label": "Z", "matrix": [2, 3], "x": 2.25, "y": 3 }, + { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 }, + { "label": "C", "matrix": [4, 3], "x": 4.25, "y": 3 }, + { "label": "V", "matrix": [5, 3], "x": 5.25, "y": 3 }, + { "label": "B", "matrix": [6, 3], "x": 6.25, "y": 3 }, + { "label": "N", "matrix": [7, 3], "x": 7.25, "y": 3 }, + { "label": "M", "matrix": [8, 3], "x": 8.25, "y": 3 }, + { "label": "<", "matrix": [9, 3], "x": 9.25, "y": 3 }, + { "label": ">", "matrix": [10, 3], "x": 10.25, "y": 3 }, + { "label": "?", "matrix": [11, 3], "x": 11.25, "y": 3 }, + { "label": "Shift", "matrix": [12, 3], "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "\u2191", "matrix": [13, 3], "x": 14, "y": 3 }, + { "label": "End", "matrix": [14, 3], "x": 15, "y": 3 }, + { "label": "Ctrl", "matrix": [0, 4], "w": 1.25, "x": 0, "y": 4 }, + { "label": "Win", "matrix": [1, 4], "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "matrix": [2, 4], "w": 1.25, "x": 2.5, "y": 4 }, + { "label": "", "matrix": [6, 4], "w": 6.25, "x": 3.75, "y": 4 }, + { "label": "Alt", "matrix": [10, 4], "w": 1.25, "x": 10, "y": 4 }, + { "label": "Fn", "matrix": [11, 4], "w": 1.25, "x": 11.25, "y": 4 }, + { "label": "\u2190", "matrix": [12, 4], "x": 13, "y": 4 }, + { "label": "\u2193", "matrix": [13, 4], "x": 14, "y": 4 }, + { "label": "\u2192", "matrix": [14, 4], "x": 15, "y": 4 } ] } } diff --git a/keyboards/kprepublic/bm65rgb/rev2/rev2.c b/keyboards/kprepublic/bm65rgb/rev2/rev2.c index b3b9a24ed418..616aea51acd7 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/rev2.c +++ b/keyboards/kprepublic/bm65rgb/rev2/rev2.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "rev1.h" +#include "rev2.h" #ifdef RGB_MATRIX_ENABLE # include diff --git a/keyboards/kprepublic/bm65rgb/rev2/rev2.h b/keyboards/kprepublic/bm65rgb/rev2/rev2.h index e69de29bb2d1..ef5b3f3e04d7 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/rev2.h +++ b/keyboards/kprepublic/bm65rgb/rev2/rev2.h @@ -0,0 +1,3 @@ +#pragma once + +#include "quantum.h" From 3d0e57e9e52efffe02b562f96295a99f1203250c Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Tue, 26 Oct 2021 22:11:32 +0800 Subject: [PATCH 15/16] Apply suggestions from code review Co-authored-by: Ryan --- .../bm65rgb/keymaps/default/keymap.c | 18 ------------------ keyboards/kprepublic/bm65rgb/readme.md | 4 ++-- keyboards/kprepublic/bm65rgb/rev1/readme.md | 4 ++-- keyboards/kprepublic/bm65rgb/rev2/readme.md | 4 ++-- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c index 3548369d4520..dadeb9c149aa 100644 --- a/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c +++ b/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c @@ -15,13 +15,6 @@ */ #include QMK_KEYBOARD_H -// // Defines names for use in layer keycodes and the keymap -// enum layer_names { -// _BASE, -// _FN -// }; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_65_ansi_blocker( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, @@ -39,14 +32,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -/* -Template - [ ] = LAYOUT_65_ansi_blocker( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -*/ diff --git a/keyboards/kprepublic/bm65rgb/readme.md b/keyboards/kprepublic/bm65rgb/readme.md index 0096ea512a43..3a87afabf142 100644 --- a/keyboards/kprepublic/bm65rgb/readme.md +++ b/keyboards/kprepublic/bm65rgb/readme.md @@ -10,11 +10,11 @@ A 65% hotswap in switch RGB keyboard from KPRepublic. Make example for this keyboard (after setting up your build environment): - make bm65rgb:default + make kprepublic/bm65rgb:default Flashing example for this keyboard: - make bm65rgb:default:flash + make kprepublic/bm65rgb:default:flash To reset the board into bootloader mode, do one of the following: diff --git a/keyboards/kprepublic/bm65rgb/rev1/readme.md b/keyboards/kprepublic/bm65rgb/rev1/readme.md index 0096ea512a43..119d05d20e6c 100644 --- a/keyboards/kprepublic/bm65rgb/rev1/readme.md +++ b/keyboards/kprepublic/bm65rgb/rev1/readme.md @@ -10,11 +10,11 @@ A 65% hotswap in switch RGB keyboard from KPRepublic. Make example for this keyboard (after setting up your build environment): - make bm65rgb:default + make kprepublic/bm65rgb/rev1:default Flashing example for this keyboard: - make bm65rgb:default:flash + make kprepublic/bm65rgb/rev1:default:flash To reset the board into bootloader mode, do one of the following: diff --git a/keyboards/kprepublic/bm65rgb/rev2/readme.md b/keyboards/kprepublic/bm65rgb/rev2/readme.md index 0096ea512a43..8b34f49273a3 100644 --- a/keyboards/kprepublic/bm65rgb/rev2/readme.md +++ b/keyboards/kprepublic/bm65rgb/rev2/readme.md @@ -10,11 +10,11 @@ A 65% hotswap in switch RGB keyboard from KPRepublic. Make example for this keyboard (after setting up your build environment): - make bm65rgb:default + make kprepublic/bm65rgb/rev2:default Flashing example for this keyboard: - make bm65rgb:default:flash + make kprepublic/bm65rgb/rev2:default:flash To reset the board into bootloader mode, do one of the following: From fcc79bf0e9ace145cbf1eaa30c8360e1771e2d6b Mon Sep 17 00:00:00 2001 From: peepeetee Date: Tue, 26 Oct 2021 22:24:57 +0800 Subject: [PATCH 16/16] remove rev2 --- keyboards/kprepublic/bm65rgb/rev2/config.h | 117 -------------- keyboards/kprepublic/bm65rgb/rev2/info.json | 83 ---------- keyboards/kprepublic/bm65rgb/rev2/readme.md | 24 --- keyboards/kprepublic/bm65rgb/rev2/rev2.c | 165 -------------------- keyboards/kprepublic/bm65rgb/rev2/rev2.h | 3 - keyboards/kprepublic/bm65rgb/rev2/rules.mk | 26 --- 6 files changed, 418 deletions(-) delete mode 100644 keyboards/kprepublic/bm65rgb/rev2/config.h delete mode 100644 keyboards/kprepublic/bm65rgb/rev2/info.json delete mode 100644 keyboards/kprepublic/bm65rgb/rev2/readme.md delete mode 100644 keyboards/kprepublic/bm65rgb/rev2/rev2.c delete mode 100644 keyboards/kprepublic/bm65rgb/rev2/rev2.h delete mode 100644 keyboards/kprepublic/bm65rgb/rev2/rules.mk diff --git a/keyboards/kprepublic/bm65rgb/rev2/config.h b/keyboards/kprepublic/bm65rgb/rev2/config.h deleted file mode 100644 index d2b0ce286ef4..000000000000 --- a/keyboards/kprepublic/bm65rgb/rev2/config.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2021 bytesapart - -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 0xEF6E -#define DEVICE_VER 0x0002 -#define MANUFACTURER KPRepublic -#define PRODUCT BM65 RGB - -/* key matrix size */ -// #define MATRIX_ROWS 5 -// #define MATRIX_COLS 15 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ - -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -// The pin connected to the data pin of the LEDs -#define RGB_DI_PIN E2 -// The number of LEDs connected -#define DRIVER_LED_TOTAL 73 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 73 - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm65rgb/rev2/info.json b/keyboards/kprepublic/bm65rgb/rev2/info.json deleted file mode 100644 index 9276d22ed7ad..000000000000 --- a/keyboards/kprepublic/bm65rgb/rev2/info.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "keyboard_name": "bm65rgb", - "maintainer": "peepeetee", - "diode_direction": "COL2ROW", - "matrix_pins": { - "cols": ["D6", "D4", "D5", "D3", "F6"], - "rows": ["F0", "F1", "B0", "B1", "B2", "B3", "E6", "B7", "D2", "D7", "B4", "B5", "B6", "C6", "C7"] - }, - "url": "", - "layouts": { - "LAYOUT_65_ansi_blocker": { - "layout": [ - { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, - { "label": "!", "matrix": [1, 0], "x": 1, "y": 0 }, - { "label": "@", "matrix": [2, 0], "x": 2, "y": 0 }, - { "label": "#", "matrix": [3, 0], "x": 3, "y": 0 }, - { "label": "$", "matrix": [4, 0], "x": 4, "y": 0 }, - { "label": "%", "matrix": [5, 0], "x": 5, "y": 0 }, - { "label": "^", "matrix": [6, 0], "x": 6, "y": 0 }, - { "label": "&", "matrix": [7, 0], "x": 7, "y": 0 }, - { "label": "*", "matrix": [8, 0], "x": 8, "y": 0 }, - { "label": "(", "matrix": [9, 0], "x": 9, "y": 0 }, - { "label": ")", "matrix": [10, 0], "x": 10, "y": 0 }, - { "label": "_", "matrix": [11, 0], "x": 11, "y": 0 }, - { "label": "+", "matrix": [12, 0], "x": 12, "y": 0 }, - { "label": "Backspace", "matrix": [13, 0], "w": 2, "x": 13, "y": 0 }, - { "label": "Home", "matrix": [14, 0], "x": 15, "y": 0 }, - { "label": "Tab", "matrix": [0, 1], "w": 1.5, "x": 0, "y": 1 }, - { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 }, - { "label": "W", "matrix": [2, 1], "x": 2.5, "y": 1 }, - { "label": "E", "matrix": [3, 1], "x": 3.5, "y": 1 }, - { "label": "R", "matrix": [4, 1], "x": 4.5, "y": 1 }, - { "label": "T", "matrix": [5, 1], "x": 5.5, "y": 1 }, - { "label": "Y", "matrix": [6, 1], "x": 6.5, "y": 1 }, - { "label": "U", "matrix": [7, 1], "x": 7.5, "y": 1 }, - { "label": "I", "matrix": [8, 1], "x": 8.5, "y": 1 }, - { "label": "O", "matrix": [9, 1], "x": 9.5, "y": 1 }, - { "label": "P", "matrix": [10, 1], "x": 10.5, "y": 1 }, - { "label": "{", "matrix": [11, 1], "x": 11.5, "y": 1 }, - { "label": "}", "matrix": [12, 1], "x": 12.5, "y": 1 }, - { "label": "|", "matrix": [13, 1], "w": 1.5, "x": 13.5, "y": 1 }, - { "label": "Page Up", "matrix": [14, 1], "x": 15, "y": 1 }, - { "label": "Caps Lock", "matrix": [0, 2], "w": 1.75, "x": 0, "y": 2 }, - { "label": "A", "matrix": [1, 2], "x": 1.75, "y": 2 }, - { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 }, - { "label": "D", "matrix": [3, 2], "x": 3.75, "y": 2 }, - { "label": "F", "matrix": [4, 2], "x": 4.75, "y": 2 }, - { "label": "G", "matrix": [5, 2], "x": 5.75, "y": 2 }, - { "label": "H", "matrix": [6, 2], "x": 6.75, "y": 2 }, - { "label": "J", "matrix": [7, 2], "x": 7.75, "y": 2 }, - { "label": "K", "matrix": [8, 2], "x": 8.75, "y": 2 }, - { "label": "L", "matrix": [9, 2], "x": 9.75, "y": 2 }, - { "label": ":", "matrix": [10, 2], "x": 10.75, "y": 2 }, - { "label": "\"", "matrix": [11, 2], "x": 11.75, "y": 2 }, - { "label": "Enter", "matrix": [13, 2], "w": 2.25, "x": 12.75, "y": 2 }, - { "label": "Page Down", "matrix": [14, 2], "x": 15, "y": 2 }, - { "label": "Shift", "matrix": [0, 3], "w": 2.25, "x": 0, "y": 3 }, - { "label": "Z", "matrix": [2, 3], "x": 2.25, "y": 3 }, - { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 }, - { "label": "C", "matrix": [4, 3], "x": 4.25, "y": 3 }, - { "label": "V", "matrix": [5, 3], "x": 5.25, "y": 3 }, - { "label": "B", "matrix": [6, 3], "x": 6.25, "y": 3 }, - { "label": "N", "matrix": [7, 3], "x": 7.25, "y": 3 }, - { "label": "M", "matrix": [8, 3], "x": 8.25, "y": 3 }, - { "label": "<", "matrix": [9, 3], "x": 9.25, "y": 3 }, - { "label": ">", "matrix": [10, 3], "x": 10.25, "y": 3 }, - { "label": "?", "matrix": [11, 3], "x": 11.25, "y": 3 }, - { "label": "Shift", "matrix": [12, 3], "w": 1.75, "x": 12.25, "y": 3 }, - { "label": "\u2191", "matrix": [13, 3], "x": 14, "y": 3 }, - { "label": "End", "matrix": [14, 3], "x": 15, "y": 3 }, - { "label": "Ctrl", "matrix": [0, 4], "w": 1.25, "x": 0, "y": 4 }, - { "label": "Win", "matrix": [1, 4], "w": 1.25, "x": 1.25, "y": 4 }, - { "label": "Alt", "matrix": [2, 4], "w": 1.25, "x": 2.5, "y": 4 }, - { "label": "", "matrix": [6, 4], "w": 6.25, "x": 3.75, "y": 4 }, - { "label": "Alt", "matrix": [10, 4], "w": 1.25, "x": 10, "y": 4 }, - { "label": "Fn", "matrix": [11, 4], "w": 1.25, "x": 11.25, "y": 4 }, - { "label": "\u2190", "matrix": [12, 4], "x": 13, "y": 4 }, - { "label": "\u2193", "matrix": [13, 4], "x": 14, "y": 4 }, - { "label": "\u2192", "matrix": [14, 4], "x": 15, "y": 4 } - ] - } - } -} diff --git a/keyboards/kprepublic/bm65rgb/rev2/readme.md b/keyboards/kprepublic/bm65rgb/rev2/readme.md deleted file mode 100644 index 8b34f49273a3..000000000000 --- a/keyboards/kprepublic/bm65rgb/rev2/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# bm65rgb - -![bm65rgb](https://i.imgur.com/DskSCve.jpeg) - -A 65% hotswap in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [bytesapart](https://github.com/bytesapart) -* Hardware Supported: BM65 RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=1&_sid=5b9a6a5d0&_ss=r) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm65rgb/rev2:default - -Flashing example for this keyboard: - - make kprepublic/bm65rgb/rev2:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -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/bm65rgb/rev2/rev2.c b/keyboards/kprepublic/bm65rgb/rev2/rev2.c deleted file mode 100644 index 616aea51acd7..000000000000 --- a/keyboards/kprepublic/bm65rgb/rev2/rev2.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright 2021 sigprof 2021 peepeetee - * - * 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" - -#ifdef RGB_MATRIX_ENABLE -# include -# include -# include - -// clang-format off - -// Dummy IS31FL3733 config for testing - enables all possible LED locations -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { - { 0, A_1, B_1, C_1 }, - { 0, A_2, B_2, C_2 }, - { 0, A_3, B_3, C_3 }, - { 0, A_4, B_4, C_4 }, - { 0, A_5, B_5, C_5 }, - { 0, A_6, B_6, C_6 }, - { 0, A_7, B_7, C_7 }, - { 0, A_8, B_8, C_8 }, - { 0, A_9, B_9, C_9 }, - { 0, A_10, B_10, C_10 }, - { 0, A_11, B_11, C_11 }, - { 0, A_12, B_12, C_12 }, - { 0, A_13, B_13, C_13 }, - { 0, A_14, B_14, C_14 }, - { 0, A_15, B_15, C_15 }, - { 0, A_16, B_16, C_16 }, - { 0, D_1, E_1, F_1 }, - { 0, D_2, E_2, F_2 }, - { 0, D_3, E_3, F_3 }, - { 0, D_4, E_4, F_4 }, - { 0, D_5, E_5, F_5 }, - { 0, D_6, E_6, F_6 }, - { 0, D_7, E_7, F_7 }, - { 0, D_8, E_8, F_8 }, - { 0, D_9, E_9, F_9 }, - { 0, D_10, E_10, F_10 }, - { 0, D_11, E_11, F_11 }, - { 0, D_12, E_12, F_12 }, - { 0, D_13, E_13, F_13 }, - { 0, D_14, E_14, F_14 }, - { 0, D_15, E_15, F_15 }, - { 0, D_16, E_16, F_16 }, - { 0, G_1, H_1, I_1 }, - { 0, G_2, H_2, I_2 }, - { 0, G_3, H_3, I_3 }, - { 0, G_4, H_4, I_4 }, - { 0, G_5, H_5, I_5 }, - { 0, G_6, H_6, I_6 }, - { 0, G_7, H_7, I_7 }, - { 0, G_8, H_8, I_8 }, - { 0, G_9, H_9, I_9 }, - { 0, G_10, H_10, I_10 }, - { 0, G_11, H_11, I_11 }, - { 0, G_12, H_12, I_12 }, - { 0, G_13, H_13, I_13 }, - { 0, G_14, H_14, I_14 }, - { 0, G_15, H_15, I_15 }, - { 0, G_16, H_16, I_16 }, - { 0, J_1, K_1, L_1 }, - { 0, J_2, K_2, L_2 }, - { 0, J_3, K_3, L_3 }, - { 0, J_4, K_4, L_4 }, - { 0, J_5, K_5, L_5 }, - { 0, J_6, K_6, L_6 }, - { 0, J_7, K_7, L_7 }, - { 0, J_8, K_8, L_8 }, - { 0, J_9, K_9, L_9 }, - { 0, J_10, K_10, L_10 }, - { 0, J_11, K_11, L_11 }, - { 0, J_12, K_12, L_12 }, - { 0, J_13, K_13, L_13 }, - { 0, J_14, K_14, L_14 }, - { 0, J_15, K_15, L_15 }, - { 0, J_16, K_16, L_16 }, -}; - -// Dummy RGB Matrix config for testing -led_config_t g_led_config = { - // Matrix location to LED index - { - [0 ... MATRIX_ROWS-1] = { - [0 ... MATRIX_COLS-1] = NO_LED - } - }, - - // LED index to physical location - { - [0 ... DRIVER_LED_TOTAL-1] = {0, 0} - }, - - // LED index to flags - { - [0 ... DRIVER_LED_TOTAL-1] = 4 - } -}; -// 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/bm65rgb/rev2/rev2.h b/keyboards/kprepublic/bm65rgb/rev2/rev2.h deleted file mode 100644 index ef5b3f3e04d7..000000000000 --- a/keyboards/kprepublic/bm65rgb/rev2/rev2.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "quantum.h" diff --git a/keyboards/kprepublic/bm65rgb/rev2/rules.mk b/keyboards/kprepublic/bm65rgb/rev2/rules.mk deleted file mode 100644 index a0e70197150d..000000000000 --- a/keyboards/kprepublic/bm65rgb/rev2/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 65_ansi_blocker