From 5764cfb116b2f23aab7efe655f19cf247d1b8e35 Mon Sep 17 00:00:00 2001 From: plodah Date: Wed, 27 Nov 2024 22:23:49 +0000 Subject: [PATCH 1/2] apply diff 'bm65ansi' --- keyboards/kprepublic/bm65hsrgb/readme.md | 8 +- keyboards/kprepublic/bm65hsrgb/rev2/config.h | 20 ++ .../kprepublic/bm65hsrgb/rev2/keyboard.json | 254 ++++++++++++++++++ keyboards/kprepublic/bm65hsrgb/rev2/rev2.c | 106 ++++++++ 4 files changed, 384 insertions(+), 4 deletions(-) create mode 100644 keyboards/kprepublic/bm65hsrgb/rev2/config.h create mode 100644 keyboards/kprepublic/bm65hsrgb/rev2/keyboard.json create mode 100644 keyboards/kprepublic/bm65hsrgb/rev2/rev2.c diff --git a/keyboards/kprepublic/bm65hsrgb/readme.md b/keyboards/kprepublic/bm65hsrgb/readme.md index d660861296af..324638de9e78 100644 --- a/keyboards/kprepublic/bm65hsrgb/readme.md +++ b/keyboards/kprepublic/bm65hsrgb/readme.md @@ -9,12 +9,12 @@ A 65% hotswap in switch RGB keyboard from KPRepublic. * 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/bm65hsrgb/rev1:default + for rev1: make kprepublic/bm65hsrgb/rev1:default + for rev2: make kprepublic/bm65hsrgb/rev2:default Flashing example for this keyboard: - - make kprepublic/bm65hsrgb/rev1:default:flash + for rev1: make kprepublic/bm65hsrgb/rev1:default:flash + for rev2: make kprepublic/bm65hsrgb/rev2:default:flash To reset the board into bootloader mode, do one of the following: diff --git a/keyboards/kprepublic/bm65hsrgb/rev2/config.h b/keyboards/kprepublic/bm65hsrgb/rev2/config.h new file mode 100644 index 000000000000..07200d3a37ad --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb/rev2/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 bytesapart +Copyright 2021 peepeetee +Copyright 2021 sigprof +Copyright 2021 bdtc123 +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND diff --git a/keyboards/kprepublic/bm65hsrgb/rev2/keyboard.json b/keyboards/kprepublic/bm65hsrgb/rev2/keyboard.json new file mode 100644 index 000000000000..a737aebc644d --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb/rev2/keyboard.json @@ -0,0 +1,254 @@ +{ + "manufacturer": "KP Republic", + "keyboard_name": "bm65rgb", + "maintainer": "peepeetee", + "debounce": 5, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "usb": { + "device_version": "0.0.2", + "pid": "0x1133", + "vid": "0x4B50" + }, + "ws2812": { + "pin": "E2" + }, + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true, + "rgb_matrix": true + }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "matrix_pins": { + "cols": ["F0", "F1", "B0", "B1", "B2", "B3", "E6", "B7", "D2", "D7", "B4", "B5", "B6", "C6", "C7"], + "rows": ["D6", "D4", "D5", "D3", "F6"] + }, + "url": "", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "driver": "is31fl3741", + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0, "flags": 4 }, + { "matrix": [0, 1], "x": 15, "y": 0, "flags": 4 }, + { "matrix": [0, 2], "x": 30, "y": 0, "flags": 4 }, + { "matrix": [0, 3], "x": 45, "y": 0, "flags": 4 }, + { "matrix": [0, 4], "x": 60, "y": 0, "flags": 4 }, + { "matrix": [0, 5], "x": 75, "y": 0, "flags": 4 }, + { "matrix": [0, 6], "x": 90, "y": 0, "flags": 4 }, + { "matrix": [0, 7], "x": 105, "y": 0, "flags": 4 }, + { "matrix": [0, 8], "x": 120, "y": 0, "flags": 4 }, + { "matrix": [0, 9], "x": 135, "y": 0, "flags": 4 }, + { "matrix": [0, 10], "x": 150, "y": 0, "flags": 4 }, + { "matrix": [0, 11], "x": 165, "y": 0, "flags": 4 }, + { "matrix": [0, 12], "x": 180, "y": 0, "flags": 4 }, + { "matrix": [0, 13], "x": 203, "y": 0, "flags": 1 }, + { "matrix": [0, 14], "x": 224, "y": 0, "flags": 1 }, + + { "matrix": [1, 0], "x": 4, "y": 15, "flags": 1 }, + { "matrix": [1, 1], "x": 23, "y": 15, "flags": 4 }, + { "matrix": [1, 2], "x": 38, "y": 15, "flags": 4 }, + { "matrix": [1, 3], "x": 53, "y": 15, "flags": 4 }, + { "matrix": [1, 4], "x": 68, "y": 15, "flags": 4 }, + { "matrix": [1, 5], "x": 83, "y": 15, "flags": 4 }, + { "matrix": [1, 6], "x": 98, "y": 15, "flags": 4 }, + { "matrix": [1, 7], "x": 113, "y": 15, "flags": 4 }, + { "matrix": [1, 8], "x": 128, "y": 15, "flags": 4 }, + { "matrix": [1, 9], "x": 143, "y": 15, "flags": 4 }, + { "matrix": [1, 10], "x": 158, "y": 15, "flags": 4 }, + { "matrix": [1, 11], "x": 173, "y": 15, "flags": 4 }, + { "matrix": [1, 12], "x": 188, "y": 15, "flags": 4 }, + { "matrix": [1, 13], "x": 206, "y": 15, "flags": 4 }, + { "matrix": [1, 14], "x": 224, "y": 15, "flags": 1 }, + + { "matrix": [2, 0], "x": 6, "y": 30, "flags": 9 }, + { "matrix": [2, 1], "x": 26, "y": 30, "flags": 4 }, + { "matrix": [2, 2], "x": 41, "y": 30, "flags": 4 }, + { "matrix": [2, 3], "x": 56, "y": 30, "flags": 4 }, + { "matrix": [2, 4], "x": 71, "y": 30, "flags": 4 }, + { "matrix": [2, 5], "x": 86, "y": 30, "flags": 4 }, + { "matrix": [2, 6], "x": 101, "y": 30, "flags": 4 }, + { "matrix": [2, 7], "x": 116, "y": 30, "flags": 4 }, + { "matrix": [2, 8], "x": 131, "y": 30, "flags": 4 }, + { "matrix": [2, 9], "x": 146, "y": 30, "flags": 4 }, + { "matrix": [2, 10], "x": 161, "y": 30, "flags": 4 }, + { "matrix": [2, 11], "x": 176, "y": 30, "flags": 4 }, + { "matrix": [2, 13], "x": 201, "y": 30, "flags": 1 }, + { "matrix": [2, 14], "x": 224, "y": 30, "flags": 1 }, + + { "matrix": [3, 0], "x": 9, "y": 45, "flags": 1 }, + { "matrix": [3, 2], "x": 34, "y": 45, "flags": 4 }, + { "matrix": [3, 3], "x": 49, "y": 45, "flags": 4 }, + { "matrix": [3, 4], "x": 64, "y": 45, "flags": 4 }, + { "matrix": [3, 5], "x": 79, "y": 45, "flags": 4 }, + { "matrix": [3, 6], "x": 94, "y": 45, "flags": 4 }, + { "matrix": [3, 7], "x": 109, "y": 45, "flags": 4 }, + { "matrix": [3, 8], "x": 124, "y": 45, "flags": 4 }, + { "matrix": [3, 9], "x": 139, "y": 45, "flags": 4 }, + { "matrix": [3, 10], "x": 154, "y": 45, "flags": 4 }, + { "matrix": [3, 11], "x": 169, "y": 45, "flags": 4 }, + { "matrix": [3, 12], "x": 189, "y": 45, "flags": 1 }, + { "matrix": [3, 13], "x": 210, "y": 45, "flags": 1 }, + { "matrix": [3, 14], "x": 224, "y": 45, "flags": 1 }, + + { "matrix": [4, 0], "x": 2, "y": 60, "flags": 1 }, + { "matrix": [4, 1], "x": 21, "y": 60, "flags": 1 }, + { "matrix": [4, 2], "x": 39, "y": 60, "flags": 1 }, + { "matrix": [4, 6], "x": 96, "y": 60, "flags": 4 }, + { "matrix": [4, 10], "x": 153, "y": 60, "flags": 1 }, + { "matrix": [4, 11], "x": 170, "y": 60, "flags": 1 }, + { "matrix": [4, 12], "x": 195, "y": 60, "flags": 1 }, + { "matrix": [4, 13], "x": 210, "y": 60, "flags": 1 }, + { "matrix": [4, 14], "x": 224, "y": 60, "flags": 1 } + ], + "max_brightness": 180, + "sleep": true + }, + "rgblight": { + "animations": { + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "rgb_test": true, + "alternating": true, + "twinkle": true + }, + "brightness_steps": 8, + "led_count": 6, + "max_brightness": 150, + "saturation_steps": 8 + }, + "build": { + "lto": true + }, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + { "label": "Esc", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 }, + { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 }, + { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 }, + { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 }, + { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 }, + { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 }, + { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 }, + { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 }, + { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 }, + { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 }, + { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 }, + { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 }, + { "label": "Backspace", "matrix": [0, 13], "w": 2, "x": 13, "y": 0 }, + { "label": "Home", "matrix": [0, 14], "x": 15, "y": 0 }, + { "label": "Tab", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, + { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 }, + { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 }, + { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 }, + { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 }, + { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 }, + { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 }, + { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 }, + { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 }, + { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 }, + { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 }, + { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 }, + { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 }, + { "label": "|", "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "Page Up", "matrix": [1, 14], "x": 15, "y": 1 }, + { "label": "Caps Lock", "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, + { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 }, + { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 }, + { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 }, + { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 }, + { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 }, + { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 }, + { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 }, + { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 }, + { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 }, + { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 }, + { "label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2 }, + { "label": "Enter", "matrix": [2, 13], "w": 2.25, "x": 12.75, "y": 2 }, + { "label": "Page Down", "matrix": [2, 14], "x": 15, "y": 2 }, + { "label": "Shift", "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, + { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 }, + { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 }, + { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 }, + { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 }, + { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 }, + { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 }, + { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 }, + { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 }, + { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 }, + { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 }, + { "label": "Shift", "matrix": [3, 12], "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "\u2191", "matrix": [3, 13], "x": 14, "y": 3 }, + { "label": "End", "matrix": [3, 14], "x": 15, "y": 3 }, + { "label": "Ctrl", "matrix": [4, 0], "w": 1.25, "x": 0, "y": 4 }, + { "label": "Win", "matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4 }, + { "label": "", "matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4 }, + { "label": "Alt", "matrix": [4, 10], "w": 1.25, "x": 10, "y": 4 }, + { "label": "Fn", "matrix": [4, 11], "w": 1.25, "x": 11.25, "y": 4 }, + { "label": "\u2190", "matrix": [4, 12], "x": 13, "y": 4 }, + { "label": "\u2193", "matrix": [4, 13], "x": 14, "y": 4 }, + { "label": "\u2192", "matrix": [4, 14], "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/kprepublic/bm65hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm65hsrgb/rev2/rev2.c new file mode 100644 index 000000000000..68a39f456c5f --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb/rev2/rev2.c @@ -0,0 +1,106 @@ +/* Copyright 2021 bdtc123 + * Copyright 2021 sigprof + * Copyright 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 "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { + {0, CS6_SW1, CS5_SW1, CS4_SW1}, + {0, CS6_SW2, CS5_SW2, CS4_SW2}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW5, CS5_SW5, CS4_SW5}, + {0, CS6_SW6, CS5_SW6, CS4_SW6}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS6_SW8, CS5_SW8, CS4_SW8}, + {0, CS18_SW1, CS17_SW1, CS16_SW1}, + {0, CS18_SW2, CS17_SW2, CS16_SW2}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW4, CS17_SW4, CS16_SW4}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW6, CS17_SW6, CS16_SW6}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS21_SW1, CS20_SW1, CS19_SW1}, + {0, CS21_SW2, CS20_SW2, CS19_SW2}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW5, CS20_SW5, CS19_SW5}, + {0, CS21_SW6, CS20_SW6, CS19_SW6}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS24_SW3, CS23_SW3, CS22_SW3}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW6, CS23_SW6, CS22_SW6}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS27_SW1, CS26_SW1, CS25_SW1}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW3, CS26_SW3, CS25_SW3}, + {0, CS27_SW4, CS26_SW4, CS25_SW4}, + {0, CS27_SW5, CS26_SW5, CS25_SW5}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW7, CS26_SW7, CS25_SW7}, + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, + {0, CS3_SW2, CS2_SW2, CS1_SW2}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW7, CS2_SW7, CS1_SW7}, + {0, CS30_SW3, CS29_SW3, CS28_SW3}, + {0, CS30_SW4, CS29_SW4, CS28_SW4}, + {0, CS30_SW5, CS29_SW5, CS28_SW5}, + {0, CS30_SW6, CS29_SW6, CS28_SW6}, + {0, CS30_SW7, CS29_SW7, CS28_SW7} + +}; + +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + } + return true; +} +#endif From f91ab68313c39b2fb3204916088abd19faf6d1a0 Mon Sep 17 00:00:00 2001 From: plodah Date: Wed, 27 Nov 2024 22:23:49 +0000 Subject: [PATCH 2/2] apply diff 'bm65iso' --- .../{rev1 => }/keymaps/default/keymap.c | 0 .../kprepublic/bm65hsrgb_iso/rev2/config.h | 23 ++ .../bm65hsrgb_iso/rev2/keyboard.json | 260 ++++++++++++++++++ .../kprepublic/bm65hsrgb_iso/rev2/rev2.c | 108 ++++++++ 4 files changed, 391 insertions(+) rename keyboards/kprepublic/bm65hsrgb_iso/{rev1 => }/keymaps/default/keymap.c (100%) create mode 100644 keyboards/kprepublic/bm65hsrgb_iso/rev2/config.h create mode 100644 keyboards/kprepublic/bm65hsrgb_iso/rev2/keyboard.json create mode 100644 keyboards/kprepublic/bm65hsrgb_iso/rev2/rev2.c diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/default/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm65hsrgb_iso/rev1/keymaps/default/keymap.c rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm65hsrgb_iso/rev2/config.h new file mode 100644 index 000000000000..ed4459986e45 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev2/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2021 bytesapart +Copyright 2021 peepeetee +Copyright 2021 sigprof +Copyright 2021 bdtc123 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev2/keyboard.json b/keyboards/kprepublic/bm65hsrgb_iso/rev2/keyboard.json new file mode 100644 index 000000000000..b84160d5a66d --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev2/keyboard.json @@ -0,0 +1,260 @@ +{ + "manufacturer": "KP Republic", + "keyboard_name": "bm65rgb", + "maintainer": "peepeetee", + "debounce": 5, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "usb": { + "device_version": "0.0.2", + "pid": "0x1134", + "vid": "0x4B50" + }, + "ws2812": { + "pin": "E2" + }, + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true, + "rgb_matrix": true + }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + }, + "matrix_pins": { + "cols": ["F0", "F1", "B0", "B1", "B2", "B3", "E6", "B7", "D2", "D7", "B4", "B5", "C7", "C6", "B6"], + "rows": ["D6", "D4", "D5", "D3", "F6"] + }, + "url": "", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "driver": "is31fl3741", + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0, "flags": 4 }, + { "matrix": [0, 1], "x": 15, "y": 0, "flags": 4 }, + { "matrix": [0, 2], "x": 30, "y": 0, "flags": 4 }, + { "matrix": [0, 3], "x": 45, "y": 0, "flags": 4 }, + { "matrix": [0, 4], "x": 60, "y": 0, "flags": 4 }, + { "matrix": [0, 5], "x": 75, "y": 0, "flags": 4 }, + { "matrix": [0, 6], "x": 90, "y": 0, "flags": 4 }, + { "matrix": [0, 7], "x": 105, "y": 0, "flags": 4 }, + { "matrix": [0, 8], "x": 120, "y": 0, "flags": 4 }, + { "matrix": [0, 9], "x": 135, "y": 0, "flags": 4 }, + { "matrix": [0, 10], "x": 150, "y": 0, "flags": 4 }, + { "matrix": [0, 11], "x": 165, "y": 0, "flags": 4 }, + { "matrix": [0, 12], "x": 180, "y": 0, "flags": 4 }, + { "matrix": [0, 13], "x": 203, "y": 0, "flags": 1 }, + { "matrix": [0, 14], "x": 224, "y": 0, "flags": 1 }, + + { "matrix": [1, 0], "x": 4, "y": 15, "flags": 1 }, + { "matrix": [1, 1], "x": 23, "y": 15, "flags": 4 }, + { "matrix": [1, 2], "x": 38, "y": 15, "flags": 4 }, + { "matrix": [1, 3], "x": 53, "y": 15, "flags": 4 }, + { "matrix": [1, 4], "x": 68, "y": 15, "flags": 4 }, + { "matrix": [1, 5], "x": 83, "y": 15, "flags": 4 }, + { "matrix": [1, 6], "x": 98, "y": 15, "flags": 4 }, + { "matrix": [1, 7], "x": 113, "y": 15, "flags": 4 }, + { "matrix": [1, 8], "x": 128, "y": 15, "flags": 4 }, + { "matrix": [1, 9], "x": 143, "y": 15, "flags": 4 }, + { "matrix": [1, 10], "x": 158, "y": 15, "flags": 4 }, + { "matrix": [1, 11], "x": 173, "y": 15, "flags": 4 }, + { "matrix": [1, 12], "x": 188, "y": 15, "flags": 4 }, + { "matrix": [1, 14], "x": 224, "y": 15, "flags": 1 }, + + { "matrix": [2, 0], "x": 6, "y": 30, "flags": 9 }, + { "matrix": [2, 1], "x": 26, "y": 30, "flags": 4 }, + { "matrix": [2, 2], "x": 41, "y": 30, "flags": 4 }, + { "matrix": [2, 3], "x": 56, "y": 30, "flags": 4 }, + { "matrix": [2, 4], "x": 71, "y": 30, "flags": 4 }, + { "matrix": [2, 5], "x": 86, "y": 30, "flags": 4 }, + { "matrix": [2, 6], "x": 101, "y": 30, "flags": 4 }, + { "matrix": [2, 7], "x": 116, "y": 30, "flags": 4 }, + { "matrix": [2, 8], "x": 131, "y": 30, "flags": 4 }, + { "matrix": [2, 9], "x": 146, "y": 30, "flags": 4 }, + { "matrix": [2, 10], "x": 161, "y": 30, "flags": 4 }, + { "matrix": [2, 11], "x": 176, "y": 30, "flags": 4 }, + { "matrix": [2, 12], "x": 201, "y": 30, "flags": 1 }, + { "matrix": [1, 13], "x": 206, "y": 23, "flags": 1 }, + { "matrix": [2, 14], "x": 224, "y": 30, "flags": 1 }, + + { "matrix": [3, 0], "x": 2, "y": 45, "flags": 1 }, + { "matrix": [3, 2], "x": 19, "y": 45, "flags": 4 }, + { "matrix": [3, 2], "x": 34, "y": 45, "flags": 4 }, + { "matrix": [3, 3], "x": 49, "y": 45, "flags": 4 }, + { "matrix": [3, 4], "x": 64, "y": 45, "flags": 4 }, + { "matrix": [3, 5], "x": 79, "y": 45, "flags": 4 }, + { "matrix": [3, 6], "x": 94, "y": 45, "flags": 4 }, + { "matrix": [3, 7], "x": 109, "y": 45, "flags": 4 }, + { "matrix": [3, 8], "x": 124, "y": 45, "flags": 4 }, + { "matrix": [3, 9], "x": 139, "y": 45, "flags": 4 }, + { "matrix": [3, 10], "x": 154, "y": 45, "flags": 4 }, + { "matrix": [3, 11], "x": 169, "y": 45, "flags": 4 }, + { "matrix": [3, 12], "x": 189, "y": 45, "flags": 1 }, + { "matrix": [3, 13], "x": 210, "y": 45, "flags": 1 }, + { "matrix": [3, 14], "x": 224, "y": 45, "flags": 1 }, + + { "matrix": [4, 0], "x": 2, "y": 60, "flags": 1 }, + { "matrix": [4, 1], "x": 23, "y": 60, "flags": 1 }, + { "matrix": [4, 2], "x": 41, "y": 60, "flags": 1 }, + { "matrix": [4, 6], "x": 98, "y": 60, "flags": 4 }, + { "matrix": [4, 10], "x": 150, "y": 60, "flags": 1 }, + { "matrix": [4, 11], "x": 170, "y": 60, "flags": 1 }, + { "matrix": [4, 12], "x": 195, "y": 60, "flags": 1 }, + { "matrix": [4, 13], "x": 210, "y": 60, "flags": 1 }, + { "matrix": [4, 14], "x": 224, "y": 60, "flags": 1 } + ], + "max_brightness": 180, + "sleep": true + }, + "rgblight": { + "animations": { + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "rgb_test": true, + "alternating": true, + "twinkle": true + }, + "brightness_steps": 8, + "led_count": 6, + "max_brightness": 150, + "saturation_steps": 8 + }, + "build": { + "lto": true + }, + "layouts": { + "LAYOUT_65_iso_blocker": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"matrix": [0, 14], "x": 15, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [1, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [3, 1], "x": 1.25, "y": 3}, + {"matrix": [3, 2], "x": 2.25, "y": 3}, + {"matrix": [3, 3], "x": 3.25, "y": 3}, + {"matrix": [3, 4], "x": 4.25, "y": 3}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, + {"matrix": [3, 6], "x": 6.25, "y": 3}, + {"matrix": [3, 7], "x": 7.25, "y": 3}, + {"matrix": [3, 8], "x": 8.25, "y": 3}, + {"matrix": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"matrix": [3, 13], "x": 14, "y": 3}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 13, "y": 4}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rev2/rev2.c b/keyboards/kprepublic/bm65hsrgb_iso/rev2/rev2.c new file mode 100644 index 000000000000..9fa3b89f1f28 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/rev2/rev2.c @@ -0,0 +1,108 @@ +/* Copyright 2021 bdtc123 + * Copyright 2021 sigprof + * Copyright 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 "quantum.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { + {0, CS6_SW1, CS5_SW1, CS4_SW1}, + {0, CS6_SW2, CS5_SW2, CS4_SW2}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW5, CS5_SW5, CS4_SW5}, + {0, CS6_SW6, CS5_SW6, CS4_SW6}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS6_SW8, CS5_SW8, CS4_SW8}, + {0, CS18_SW1, CS17_SW1, CS16_SW1}, + {0, CS18_SW2, CS17_SW2, CS16_SW2}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW4, CS17_SW4, CS16_SW4}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW6, CS17_SW6, CS16_SW6}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS21_SW1, CS20_SW1, CS19_SW1}, + {0, CS21_SW2, CS20_SW2, CS19_SW2}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW5, CS20_SW5, CS19_SW5}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS24_SW3, CS23_SW3, CS22_SW3}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW6, CS23_SW6, CS22_SW6}, + {0, CS21_SW6, CS20_SW6, CS19_SW6}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS15_SW2, CS14_SW2, CS13_SW2}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS27_SW1, CS26_SW1, CS25_SW1}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW3, CS26_SW3, CS25_SW3}, + {0, CS27_SW4, CS26_SW4, CS25_SW4}, + {0, CS27_SW5, CS26_SW5, CS25_SW5}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW7, CS26_SW7, CS25_SW7}, + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, + {0, CS3_SW2, CS2_SW2, CS1_SW2}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW7, CS2_SW7, CS1_SW7}, + {0, CS30_SW3, CS29_SW3, CS28_SW3}, + {0, CS30_SW4, CS29_SW4, CS28_SW4}, + {0, CS30_SW5, CS29_SW5, CS28_SW5}, + {0, CS30_SW6, CS29_SW6, CS28_SW6}, + {0, CS30_SW7, CS29_SW7, CS28_SW7} + +}; + +bool rgb_matrix_indicators_kb(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(29, 0xFF, 0xFF, 0xFF); + } else { + if (!rgb_matrix_get_flags()) { + rgb_matrix_set_color(29, 0, 0, 0); + } + } + return true; +} +#endif