From e19991ec461406da102a83f99bd518122e5cba3c Mon Sep 17 00:00:00 2001 From: ClownFish Date: Mon, 7 Jul 2025 15:14:12 -0400 Subject: [Keyboard] Add CSTC40 rev3 (#25285) * refactor cstc40, add rev3 fxtwink variant * cleanup readmes * readme nitpick * add cstc40 aliases * format-json * add communty_layouts per code review * touch copied legacy files for newline * fix LED flags * update readme files per code review--- keyboards/kprepublic/cstc40/config.h | 9 -- .../cstc40/daughterboard/daughterboard.c | 71 --------- .../kprepublic/cstc40/daughterboard/keyboard.json | 6 - keyboards/kprepublic/cstc40/halconf.h | 20 --- keyboards/kprepublic/cstc40/info.json | 170 ++++++++------------- keyboards/kprepublic/cstc40/mcuconf.h | 21 --- keyboards/kprepublic/cstc40/readme.md | 31 ++-- keyboards/kprepublic/cstc40/rev1/config.h | 9 ++ keyboards/kprepublic/cstc40/rev1/halconf.h | 20 +++ keyboards/kprepublic/cstc40/rev1/keyboard.json | 63 ++++++++ keyboards/kprepublic/cstc40/rev1/mcuconf.h | 21 +++ keyboards/kprepublic/cstc40/rev1/readme.md | 27 ++++ keyboards/kprepublic/cstc40/rev1/rev1.c | 71 +++++++++ keyboards/kprepublic/cstc40/rev2/config.h | 9 ++ keyboards/kprepublic/cstc40/rev2/halconf.h | 20 +++ keyboards/kprepublic/cstc40/rev2/keyboard.json | 63 ++++++++ keyboards/kprepublic/cstc40/rev2/mcuconf.h | 21 +++ keyboards/kprepublic/cstc40/rev2/readme.md | 29 ++++ keyboards/kprepublic/cstc40/rev2/rev2.c | 71 +++++++++ keyboards/kprepublic/cstc40/rev3/keyboard.json | 67 ++++++++ keyboards/kprepublic/cstc40/rev3/readme.md | 27 ++++ .../kprepublic/cstc40/single_pcb/keyboard.json | 6 - .../kprepublic/cstc40/single_pcb/single_pcb.c | 71 --------- 23 files changed, 594 insertions(+), 329 deletions(-) delete mode 100644 keyboards/kprepublic/cstc40/config.h delete mode 100644 keyboards/kprepublic/cstc40/daughterboard/daughterboard.c delete mode 100644 keyboards/kprepublic/cstc40/daughterboard/keyboard.json delete mode 100644 keyboards/kprepublic/cstc40/halconf.h delete mode 100644 keyboards/kprepublic/cstc40/mcuconf.h create mode 100644 keyboards/kprepublic/cstc40/rev1/config.h create mode 100644 keyboards/kprepublic/cstc40/rev1/halconf.h create mode 100644 keyboards/kprepublic/cstc40/rev1/keyboard.json create mode 100644 keyboards/kprepublic/cstc40/rev1/mcuconf.h create mode 100644 keyboards/kprepublic/cstc40/rev1/readme.md create mode 100644 keyboards/kprepublic/cstc40/rev1/rev1.c create mode 100644 keyboards/kprepublic/cstc40/rev2/config.h create mode 100644 keyboards/kprepublic/cstc40/rev2/halconf.h create mode 100644 keyboards/kprepublic/cstc40/rev2/keyboard.json create mode 100644 keyboards/kprepublic/cstc40/rev2/mcuconf.h create mode 100644 keyboards/kprepublic/cstc40/rev2/readme.md create mode 100644 keyboards/kprepublic/cstc40/rev2/rev2.c create mode 100644 keyboards/kprepublic/cstc40/rev3/keyboard.json create mode 100644 keyboards/kprepublic/cstc40/rev3/readme.md delete mode 100644 keyboards/kprepublic/cstc40/single_pcb/keyboard.json delete mode 100644 keyboards/kprepublic/cstc40/single_pcb/single_pcb.c (limited to 'keyboards') diff --git a/keyboards/kprepublic/cstc40/config.h b/keyboards/kprepublic/cstc40/config.h deleted file mode 100644 index 4f845a84af..0000000000 --- a/keyboards/kprepublic/cstc40/config.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2022 Var (@itsvar8) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#define I2C1_SDA_PIN B9 -#define I2C1_SCL_PIN B8 - -#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND diff --git a/keyboards/kprepublic/cstc40/daughterboard/daughterboard.c b/keyboards/kprepublic/cstc40/daughterboard/daughterboard.c deleted file mode 100644 index 38fac99155..0000000000 --- a/keyboards/kprepublic/cstc40/daughterboard/daughterboard.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright 2022 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 . - */ -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { - { 0, SW12_CS1, SW11_CS1, SW10_CS1 }, - { 0, SW12_CS2, SW11_CS2, SW10_CS2 }, - { 0, SW12_CS3, SW11_CS3, SW10_CS3 }, - { 0, SW12_CS4, SW11_CS4, SW10_CS4 }, - { 0, SW12_CS5, SW11_CS5, SW10_CS5 }, - { 0, SW12_CS6, SW11_CS6, SW10_CS6 }, - { 0, SW12_CS7, SW11_CS7, SW10_CS7 }, - { 0, SW12_CS8, SW11_CS8, SW10_CS8 }, - { 0, SW12_CS9, SW11_CS9, SW10_CS9 }, - { 0, SW12_CS10, SW11_CS10, SW10_CS10 }, - { 0, SW12_CS11, SW11_CS11, SW10_CS11 }, - { 0, SW12_CS12, SW11_CS12, SW10_CS12 }, - - { 0, SW9_CS1, SW8_CS1, SW7_CS1 }, - { 0, SW9_CS2, SW8_CS2, SW7_CS2 }, - { 0, SW9_CS3, SW8_CS3, SW7_CS3 }, - { 0, SW9_CS4, SW8_CS4, SW7_CS4 }, - { 0, SW9_CS5, SW8_CS5, SW7_CS5 }, - { 0, SW9_CS6, SW8_CS6, SW7_CS6 }, - { 0, SW9_CS7, SW8_CS7, SW7_CS7 }, - { 0, SW9_CS8, SW8_CS8, SW7_CS8 }, - { 0, SW9_CS9, SW8_CS9, SW7_CS9 }, - { 0, SW9_CS10, SW8_CS10, SW7_CS10 }, - { 0, SW9_CS11, SW8_CS11, SW7_CS11 }, - { 0, SW9_CS12, SW8_CS12, SW7_CS12 }, - - { 0, SW6_CS1, SW5_CS1, SW4_CS1 }, - { 0, SW6_CS2, SW5_CS2, SW4_CS2 }, - { 0, SW6_CS3, SW5_CS3, SW4_CS3 }, - { 0, SW6_CS4, SW5_CS4, SW4_CS4 }, - { 0, SW6_CS5, SW5_CS5, SW4_CS5 }, - { 0, SW6_CS6, SW5_CS6, SW4_CS6 }, - { 0, SW6_CS7, SW5_CS7, SW4_CS7 }, - { 0, SW6_CS8, SW5_CS8, SW4_CS8 }, - { 0, SW6_CS9, SW5_CS9, SW4_CS9 }, - { 0, SW6_CS10, SW5_CS10, SW4_CS10 }, - { 0, SW6_CS11, SW5_CS11, SW4_CS11 }, - { 0, SW6_CS12, SW5_CS12, SW4_CS12 }, - - { 0, SW3_CS1, SW2_CS1, SW1_CS1 }, - { 0, SW3_CS2, SW2_CS2, SW1_CS2 }, - { 0, SW3_CS3, SW2_CS3, SW1_CS3 }, - { 0, SW3_CS4, SW2_CS4, SW1_CS4 }, - { 0, SW3_CS5, SW2_CS5, SW1_CS5 }, - { 0, SW3_CS6, SW2_CS6, SW1_CS6 }, - { 0, SW3_CS8, SW2_CS8, SW1_CS8 }, - { 0, SW3_CS9, SW2_CS9, SW1_CS9 }, - { 0, SW3_CS10, SW2_CS10, SW1_CS10 }, - { 0, SW3_CS11, SW2_CS11, SW1_CS11 }, - { 0, SW3_CS12, SW2_CS12, SW1_CS12 } -}; -#endif \ No newline at end of file diff --git a/keyboards/kprepublic/cstc40/daughterboard/keyboard.json b/keyboards/kprepublic/cstc40/daughterboard/keyboard.json deleted file mode 100644 index cdba7942df..0000000000 --- a/keyboards/kprepublic/cstc40/daughterboard/keyboard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "matrix_pins": { - "cols": ["B15", "B14", "B13", "B10", "B12", "A5", "C4", "A7", "A15", "C10", "C11", "C0"], - "rows": ["B1", "B0", "C5", "A6"] - } -} \ No newline at end of file diff --git a/keyboards/kprepublic/cstc40/halconf.h b/keyboards/kprepublic/cstc40/halconf.h deleted file mode 100644 index 0f279040aa..0000000000 --- a/keyboards/kprepublic/cstc40/halconf.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2020 Nick Brassel (tzarc) - * - * 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 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#define HAL_USE_I2C TRUE - -#include_next \ No newline at end of file diff --git a/keyboards/kprepublic/cstc40/info.json b/keyboards/kprepublic/cstc40/info.json index 8e4e640b7e..83a653cc1c 100644 --- a/keyboards/kprepublic/cstc40/info.json +++ b/keyboards/kprepublic/cstc40/info.json @@ -2,9 +2,7 @@ "manufacturer": "kprepublic", "keyboard_name": "cstc40", "maintainer": "itsvar8", - "bootloader": "stm32-dfu", "diode_direction": "ROW2COL", - "debounce": 2, "features": { "bootmagic": true, "extrakey": true, @@ -14,63 +12,9 @@ }, "processor": "STM32F401", "usb": { - "device_version": "1.0.0", "pid": "0x0040", "vid": "0x586A" }, - "layouts": { - "LAYOUT_planck_mit": { - "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": [1, 0], "x": 0, "y": 1 }, - { "matrix": [1, 1], "x": 1, "y": 1 }, - { "matrix": [1, 2], "x": 2, "y": 1 }, - { "matrix": [1, 3], "x": 3, "y": 1 }, - { "matrix": [1, 4], "x": 4, "y": 1 }, - { "matrix": [1, 5], "x": 5, "y": 1 }, - { "matrix": [1, 6], "x": 6, "y": 1 }, - { "matrix": [1, 7], "x": 7, "y": 1 }, - { "matrix": [1, 8], "x": 8, "y": 1 }, - { "matrix": [1, 9], "x": 9, "y": 1 }, - { "matrix": [1, 10], "x": 10, "y": 1 }, - { "matrix": [1, 11], "x": 11, "y": 1 }, - { "matrix": [2, 0], "x": 0, "y": 2 }, - { "matrix": [2, 1], "x": 1, "y": 2 }, - { "matrix": [2, 2], "x": 2, "y": 2 }, - { "matrix": [2, 3], "x": 3, "y": 2 }, - { "matrix": [2, 4], "x": 4, "y": 2 }, - { "matrix": [2, 5], "x": 5, "y": 2 }, - { "matrix": [2, 6], "x": 6, "y": 2 }, - { "matrix": [2, 7], "x": 7, "y": 2 }, - { "matrix": [2, 8], "x": 8, "y": 2 }, - { "matrix": [2, 9], "x": 9, "y": 2 }, - { "matrix": [2, 10], "x": 10, "y": 2 }, - { "matrix": [2, 11], "x": 11, "y": 2 }, - { "matrix": [3, 0], "x": 0, "y": 3 }, - { "matrix": [3, 1], "x": 1, "y": 3 }, - { "matrix": [3, 2], "x": 2, "y": 3 }, - { "matrix": [3, 3], "x": 3, "y": 3 }, - { "matrix": [3, 4], "x": 4, "y": 3 }, - { "matrix": [3, 5], "w": 2, "x": 5, "y": 3 }, - { "matrix": [3, 7], "x": 7, "y": 3 }, - { "matrix": [3, 8], "x": 8, "y": 3 }, - { "matrix": [3, 9], "x": 9, "y": 3 }, - { "matrix": [3, 10], "x": 10, "y": 3 }, - { "matrix": [3, 11], "x": 11, "y": 3 } - ] - } - }, "rgb_matrix": { "animations": { "alphas_mods": true, @@ -94,6 +38,7 @@ "dual_beacon": true, "rainbow_beacon": true, "rainbow_pinwheels": true, + "flower_blooming": true, "raindrops": true, "jellybean_raindrops": true, "hue_breathing": true, @@ -115,59 +60,66 @@ "splash": true, "multisplash": true, "solid_splash": true, - "solid_multisplash": true + "solid_multisplash": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true, + "riverflow": true }, - "driver": "is31fl3733", - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, - {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, - {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, - {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, - {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, - {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, - {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, - {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, - {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4}, - {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, - {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, - {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1}, - {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, - {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, - {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, - {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, - {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, - {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, - {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, - {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, - {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, - {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, - {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, - {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1}, - {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, - {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, - {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, - {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, - {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, - {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, - {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4}, - {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4}, - {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4}, - {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4}, - {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4}, - {"matrix": [2, 11], "x": 224, "y": 42, "flags": 1}, - {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, - {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, - {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, - {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, - {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1}, - {"matrix": [3, 5], "x": 111, "y": 64, "flags": 1}, - {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1}, - {"matrix": [3, 8], "x": 162, "y": 64, "flags": 1}, - {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, - {"matrix": [3, 10], "x": 203, "y": 64, "flags": 1}, - {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1} - ], - "max_brightness": 200, "sleep": true + }, + "community_layouts": ["planck_mit"], + "layouts": { + "LAYOUT_planck_mit": { + "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": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3, "w": 2}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3}, + {"matrix": [3, 11], "x": 11, "y": 3} + ] + } } -} \ No newline at end of file +} diff --git a/keyboards/kprepublic/cstc40/mcuconf.h b/keyboards/kprepublic/cstc40/mcuconf.h deleted file mode 100644 index a56e52fb8d..0000000000 --- a/keyboards/kprepublic/cstc40/mcuconf.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2020 Nick Brassel (tzarc) - * - * 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 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include_next - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE \ No newline at end of file diff --git a/keyboards/kprepublic/cstc40/readme.md b/keyboards/kprepublic/cstc40/readme.md index 211c078cc2..e6493b28a0 100644 --- a/keyboards/kprepublic/cstc40/readme.md +++ b/keyboards/kprepublic/cstc40/readme.md @@ -1,26 +1,25 @@ -# cstc40 +# CSTC40 -A 40% hotswap ortholinear RGB keyboard from KP Republic. +## This keyboard has 3 known hardware revisions, please be sure to flash the correct firmware for your PCB -* Keyboard Maintainer: [Var](https://github.com/itsvar8) -* Hardware Supported: CSTC40 -* Hardware Availability: kprepublic.com +A 40% hotswap ortholinear RGB keyboard from KP Republic -The differences between the two versions are just the rows and columns pins and the additional small pcb for the daughterboard version. +### Revision 1: "daughterboard" -Make example for this keyboard (after setting up your build environment): +* STM32F402RCT6 MCU with IS31FL3733 LED driver, using `stm32-dfu` bootloader. Uses a separate daughterboard for USB connection. - for daughterboard version: make kprepublic/cstc40/daughterboard:default - for single pcb version: make kprepublic/cstc40/single_pcb:default +* Upon entering bootloader mode QMK Toolbox will display this message: +`STM32 DFU device connected (WinUSB): STMicroelectronics STM32 BOOTLOADER (0483:DF11:2200)` -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). +### Revision 2: "single pcb" -## Bootloader +* STM32F402RCT6 MCU with IS31FL3733 LED driver, using `stm32-dfu` bootloader. Integrated USB connection. -Enter the bootloader in 3 ways: +* Upon entering bootloader mode QMK Toolbox will display this message: +`STM32 DFU device connected (WinUSB): STMicroelectronics STM32 BOOTLOADER (0483:DF11:2200)` -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available +### Revision 3: "FXTwink single pcb" -The single_pcb uses pin A10, which apparently is a design flaw that prevent the bootloader to start every time - https://docs.qmk.fm/#/platformdev_blackpill_f4x1?id=pins-to-be-avoided. There is a simple workaround that works most of the time - press the pin key (generally the letter R) during the boot. +* STM32F402RCT6 MCU without separate LED driver, using `tinyuf2` bootloader. Integrated USB connection. + +* Upon entering bootloader mode the board will appear in your computer's file system as a new USB mass storage device. diff --git a/keyboards/kprepublic/cstc40/rev1/config.h b/keyboards/kprepublic/cstc40/rev1/config.h new file mode 100644 index 0000000000..4f845a84af --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev1/config.h @@ -0,0 +1,9 @@ +// Copyright 2022 Var (@itsvar8) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define I2C1_SDA_PIN B9 +#define I2C1_SCL_PIN B8 + +#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND diff --git a/keyboards/kprepublic/cstc40/rev1/halconf.h b/keyboards/kprepublic/cstc40/rev1/halconf.h new file mode 100644 index 0000000000..049b29a046 --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev1/halconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/kprepublic/cstc40/rev1/keyboard.json b/keyboards/kprepublic/cstc40/rev1/keyboard.json new file mode 100644 index 0000000000..9574e0bd22 --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev1/keyboard.json @@ -0,0 +1,63 @@ +{ + "bootloader": "stm32-dfu", + "matrix_pins": { + "cols": ["B15", "B14", "B13", "B10", "B12", "A5", "C4", "A7", "A15", "C10", "C11", "C0"], + "rows": ["B1", "B0", "C5", "A6"] + }, + "rgb_matrix": { + "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 42, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 111, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1} + ], + "max_brightness": 200 + }, + "usb": { + "device_version": "1.0.0" + } +} diff --git a/keyboards/kprepublic/cstc40/rev1/mcuconf.h b/keyboards/kprepublic/cstc40/rev1/mcuconf.h new file mode 100644 index 0000000000..563b86d26d --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev1/mcuconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/kprepublic/cstc40/rev1/readme.md b/keyboards/kprepublic/cstc40/rev1/readme.md new file mode 100644 index 0000000000..1d688bc977 --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev1/readme.md @@ -0,0 +1,27 @@ +# Rev 1 + +A 40% hotswap ortholinear RGB keyboard from KP Republic. + +* **Revision 1: "daughterboard"** +* Keyboard Maintainer: [Var](https://github.com/itsvar8) +* Hardware Supported: CSTC40 rev1 +* STM32F402RCT6 MCU with IS31FL3733 LED driver and using `stm32-dfu` bootloader. Uses a separate daughterboard for USB connection. +* Hardware Availability: kprepublic.com + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/cstc40/rev1:default + +Flashing example for this keyboard: + + make kprepublic/cstc40/rev1:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/kprepublic/cstc40/rev1/rev1.c b/keyboards/kprepublic/cstc40/rev1/rev1.c new file mode 100644 index 0000000000..db063d3eba --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev1/rev1.c @@ -0,0 +1,71 @@ +/* Copyright 2022 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 . + */ +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { + { 0, SW12_CS1, SW11_CS1, SW10_CS1 }, + { 0, SW12_CS2, SW11_CS2, SW10_CS2 }, + { 0, SW12_CS3, SW11_CS3, SW10_CS3 }, + { 0, SW12_CS4, SW11_CS4, SW10_CS4 }, + { 0, SW12_CS5, SW11_CS5, SW10_CS5 }, + { 0, SW12_CS6, SW11_CS6, SW10_CS6 }, + { 0, SW12_CS7, SW11_CS7, SW10_CS7 }, + { 0, SW12_CS8, SW11_CS8, SW10_CS8 }, + { 0, SW12_CS9, SW11_CS9, SW10_CS9 }, + { 0, SW12_CS10, SW11_CS10, SW10_CS10 }, + { 0, SW12_CS11, SW11_CS11, SW10_CS11 }, + { 0, SW12_CS12, SW11_CS12, SW10_CS12 }, + + { 0, SW9_CS1, SW8_CS1, SW7_CS1 }, + { 0, SW9_CS2, SW8_CS2, SW7_CS2 }, + { 0, SW9_CS3, SW8_CS3, SW7_CS3 }, + { 0, SW9_CS4, SW8_CS4, SW7_CS4 }, + { 0, SW9_CS5, SW8_CS5, SW7_CS5 }, + { 0, SW9_CS6, SW8_CS6, SW7_CS6 }, + { 0, SW9_CS7, SW8_CS7, SW7_CS7 }, + { 0, SW9_CS8, SW8_CS8, SW7_CS8 }, + { 0, SW9_CS9, SW8_CS9, SW7_CS9 }, + { 0, SW9_CS10, SW8_CS10, SW7_CS10 }, + { 0, SW9_CS11, SW8_CS11, SW7_CS11 }, + { 0, SW9_CS12, SW8_CS12, SW7_CS12 }, + + { 0, SW6_CS1, SW5_CS1, SW4_CS1 }, + { 0, SW6_CS2, SW5_CS2, SW4_CS2 }, + { 0, SW6_CS3, SW5_CS3, SW4_CS3 }, + { 0, SW6_CS4, SW5_CS4, SW4_CS4 }, + { 0, SW6_CS5, SW5_CS5, SW4_CS5 }, + { 0, SW6_CS6, SW5_CS6, SW4_CS6 }, + { 0, SW6_CS7, SW5_CS7, SW4_CS7 }, + { 0, SW6_CS8, SW5_CS8, SW4_CS8 }, + { 0, SW6_CS9, SW5_CS9, SW4_CS9 }, + { 0, SW6_CS10, SW5_CS10, SW4_CS10 }, + { 0, SW6_CS11, SW5_CS11, SW4_CS11 }, + { 0, SW6_CS12, SW5_CS12, SW4_CS12 }, + + { 0, SW3_CS1, SW2_CS1, SW1_CS1 }, + { 0, SW3_CS2, SW2_CS2, SW1_CS2 }, + { 0, SW3_CS3, SW2_CS3, SW1_CS3 }, + { 0, SW3_CS4, SW2_CS4, SW1_CS4 }, + { 0, SW3_CS5, SW2_CS5, SW1_CS5 }, + { 0, SW3_CS6, SW2_CS6, SW1_CS6 }, + { 0, SW3_CS8, SW2_CS8, SW1_CS8 }, + { 0, SW3_CS9, SW2_CS9, SW1_CS9 }, + { 0, SW3_CS10, SW2_CS10, SW1_CS10 }, + { 0, SW3_CS11, SW2_CS11, SW1_CS11 }, + { 0, SW3_CS12, SW2_CS12, SW1_CS12 } +}; +#endif diff --git a/keyboards/kprepublic/cstc40/rev2/config.h b/keyboards/kprepublic/cstc40/rev2/config.h new file mode 100644 index 0000000000..4f845a84af --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev2/config.h @@ -0,0 +1,9 @@ +// Copyright 2022 Var (@itsvar8) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define I2C1_SDA_PIN B9 +#define I2C1_SCL_PIN B8 + +#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND diff --git a/keyboards/kprepublic/cstc40/rev2/halconf.h b/keyboards/kprepublic/cstc40/rev2/halconf.h new file mode 100644 index 0000000000..049b29a046 --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev2/halconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/kprepublic/cstc40/rev2/keyboard.json b/keyboards/kprepublic/cstc40/rev2/keyboard.json new file mode 100644 index 0000000000..7516bfc205 --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev2/keyboard.json @@ -0,0 +1,63 @@ +{ + "bootloader": "stm32-dfu", + "matrix_pins": { + "cols": ["C7", "C8", "C9", "A8", "A10", "B10", "A15", "C13", "B6", "B5", "B4", "B3"], + "rows": ["C12", "C10", "C11", "B0"] + }, + "rgb_matrix": { + "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 224, "y": 42, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 111, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1} + ], + "max_brightness": 200 + }, + "usb": { + "device_version": "2.0.0" + } +} diff --git a/keyboards/kprepublic/cstc40/rev2/mcuconf.h b/keyboards/kprepublic/cstc40/rev2/mcuconf.h new file mode 100644 index 0000000000..563b86d26d --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev2/mcuconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/kprepublic/cstc40/rev2/readme.md b/keyboards/kprepublic/cstc40/rev2/readme.md new file mode 100644 index 0000000000..8f6b27ed8e --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev2/readme.md @@ -0,0 +1,29 @@ +# Rev 2 + +A 40% hotswap ortholinear RGB keyboard from KP Republic. + +* **Revision 2: "single pcb"** +* Keyboard Maintainer: [Var](https://github.com/itsvar8) +* Hardware Supported: CSTC40 rev2 +* STM32F402RCT6 MCU with IS31FL3733 LED driver and using `stm32-dfu` bootloader. Integrated USB connection. +* Hardware Availability: kprepublic.com + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/cstc40/rev2:default + +Flashing example for this keyboard: + + make kprepublic/cstc40/rev2:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +The rev 2 uses pin `A10` in the key matrix, which apparently is a design flaw that may prevent the bootloader from entering the proper mode for DFU flashing - . There is a simple workaround that works most of the time - press the pin key (generally the letter R) during the boot. diff --git a/keyboards/kprepublic/cstc40/rev2/rev2.c b/keyboards/kprepublic/cstc40/rev2/rev2.c new file mode 100644 index 0000000000..db063d3eba --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev2/rev2.c @@ -0,0 +1,71 @@ +/* Copyright 2022 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 . + */ +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { + { 0, SW12_CS1, SW11_CS1, SW10_CS1 }, + { 0, SW12_CS2, SW11_CS2, SW10_CS2 }, + { 0, SW12_CS3, SW11_CS3, SW10_CS3 }, + { 0, SW12_CS4, SW11_CS4, SW10_CS4 }, + { 0, SW12_CS5, SW11_CS5, SW10_CS5 }, + { 0, SW12_CS6, SW11_CS6, SW10_CS6 }, + { 0, SW12_CS7, SW11_CS7, SW10_CS7 }, + { 0, SW12_CS8, SW11_CS8, SW10_CS8 }, + { 0, SW12_CS9, SW11_CS9, SW10_CS9 }, + { 0, SW12_CS10, SW11_CS10, SW10_CS10 }, + { 0, SW12_CS11, SW11_CS11, SW10_CS11 }, + { 0, SW12_CS12, SW11_CS12, SW10_CS12 }, + + { 0, SW9_CS1, SW8_CS1, SW7_CS1 }, + { 0, SW9_CS2, SW8_CS2, SW7_CS2 }, + { 0, SW9_CS3, SW8_CS3, SW7_CS3 }, + { 0, SW9_CS4, SW8_CS4, SW7_CS4 }, + { 0, SW9_CS5, SW8_CS5, SW7_CS5 }, + { 0, SW9_CS6, SW8_CS6, SW7_CS6 }, + { 0, SW9_CS7, SW8_CS7, SW7_CS7 }, + { 0, SW9_CS8, SW8_CS8, SW7_CS8 }, + { 0, SW9_CS9, SW8_CS9, SW7_CS9 }, + { 0, SW9_CS10, SW8_CS10, SW7_CS10 }, + { 0, SW9_CS11, SW8_CS11, SW7_CS11 }, + { 0, SW9_CS12, SW8_CS12, SW7_CS12 }, + + { 0, SW6_CS1, SW5_CS1, SW4_CS1 }, + { 0, SW6_CS2, SW5_CS2, SW4_CS2 }, + { 0, SW6_CS3, SW5_CS3, SW4_CS3 }, + { 0, SW6_CS4, SW5_CS4, SW4_CS4 }, + { 0, SW6_CS5, SW5_CS5, SW4_CS5 }, + { 0, SW6_CS6, SW5_CS6, SW4_CS6 }, + { 0, SW6_CS7, SW5_CS7, SW4_CS7 }, + { 0, SW6_CS8, SW5_CS8, SW4_CS8 }, + { 0, SW6_CS9, SW5_CS9, SW4_CS9 }, + { 0, SW6_CS10, SW5_CS10, SW4_CS10 }, + { 0, SW6_CS11, SW5_CS11, SW4_CS11 }, + { 0, SW6_CS12, SW5_CS12, SW4_CS12 }, + + { 0, SW3_CS1, SW2_CS1, SW1_CS1 }, + { 0, SW3_CS2, SW2_CS2, SW1_CS2 }, + { 0, SW3_CS3, SW2_CS3, SW1_CS3 }, + { 0, SW3_CS4, SW2_CS4, SW1_CS4 }, + { 0, SW3_CS5, SW2_CS5, SW1_CS5 }, + { 0, SW3_CS6, SW2_CS6, SW1_CS6 }, + { 0, SW3_CS8, SW2_CS8, SW1_CS8 }, + { 0, SW3_CS9, SW2_CS9, SW1_CS9 }, + { 0, SW3_CS10, SW2_CS10, SW1_CS10 }, + { 0, SW3_CS11, SW2_CS11, SW1_CS11 }, + { 0, SW3_CS12, SW2_CS12, SW1_CS12 } +}; +#endif diff --git a/keyboards/kprepublic/cstc40/rev3/keyboard.json b/keyboards/kprepublic/cstc40/rev3/keyboard.json new file mode 100644 index 0000000000..2748a6f1fc --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev3/keyboard.json @@ -0,0 +1,67 @@ +{ + "maintainer": "ClownFish", + "bootloader": "tinyuf2", + "matrix_pins": { + "cols": ["A4", "A5", "A6", "A7", "C4", "C5", "A8", "A15", "C10", "C11", "C12", "D2"], + "rows": ["B12", "B1", "B0", "C13"] + }, + "rgb_matrix": { + "driver": "ws2812", + "layout": [ + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1}, + {"matrix": [3, 2], "x": 41, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 82, "y": 64, "flags": 1}, + {"matrix": [3, 5], "x": 112, "y": 64, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1}, + {"matrix": [3, 8], "x": 163, "y": 64, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1}, + {"matrix": [3, 10], "x": 204, "y": 64, "flags": 1}, + {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1}, + {"matrix": [2, 11], "x": 224, "y": 43, "flags": 1}, + {"matrix": [2, 10], "x": 204, "y": 43, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 43, "flags": 4}, + {"matrix": [2, 8], "x": 163, "y": 43, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 43, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 43, "flags": 4}, + {"matrix": [2, 5], "x": 102, "y": 43, "flags": 4}, + {"matrix": [2, 4], "x": 82, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 43, "flags": 4}, + {"matrix": [2, 1], "x": 20, "y": 43, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 41, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 82, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 102, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 163, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 10], "x": 204, "y": 21, "flags": 4}, + {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1}, + {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 204, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 163, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 102, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 82, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 41, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ], + "max_brightness": 180 + }, + "usb": { + "device_version": "3.0.0" + }, + "ws2812": { + "pin": "B13" + } +} diff --git a/keyboards/kprepublic/cstc40/rev3/readme.md b/keyboards/kprepublic/cstc40/rev3/readme.md new file mode 100644 index 0000000000..b372c63579 --- /dev/null +++ b/keyboards/kprepublic/cstc40/rev3/readme.md @@ -0,0 +1,27 @@ +# Rev 3 + +A 40% hotswap ortholinear RGB keyboard from KP Republic. + +* **Revision 3: "FXTwink single pcb"** +* Keyboard Maintainer: [ClownFish](https://github.com/clownfish-og) +* Hardware Supported: CSTC40 rev3 +* STM32F402RCT6 MCU without separate LED driver and using `tinyuf2` bootloader. Integrated USB connection. +* Hardware Availability: kprepublic.com + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/cstc40/rev3:default + +Flashing example for this keyboard: + + make kprepublic/cstc40/rev3:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/kprepublic/cstc40/single_pcb/keyboard.json b/keyboards/kprepublic/cstc40/single_pcb/keyboard.json deleted file mode 100644 index 330ada7bac..0000000000 --- a/keyboards/kprepublic/cstc40/single_pcb/keyboard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "matrix_pins": { - "cols": ["C7", "C8", "C9", "A8", "A10", "B10", "A15", "C13", "B6", "B5", "B4", "B3"], - "rows": ["C12", "C10", "C11", "B0"] - } -} \ No newline at end of file diff --git a/keyboards/kprepublic/cstc40/single_pcb/single_pcb.c b/keyboards/kprepublic/cstc40/single_pcb/single_pcb.c deleted file mode 100644 index 38fac99155..0000000000 --- a/keyboards/kprepublic/cstc40/single_pcb/single_pcb.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright 2022 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 . - */ -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { - { 0, SW12_CS1, SW11_CS1, SW10_CS1 }, - { 0, SW12_CS2, SW11_CS2, SW10_CS2 }, - { 0, SW12_CS3, SW11_CS3, SW10_CS3 }, - { 0, SW12_CS4, SW11_CS4, SW10_CS4 }, - { 0, SW12_CS5, SW11_CS5, SW10_CS5 }, - { 0, SW12_CS6, SW11_CS6, SW10_CS6 }, - { 0, SW12_CS7, SW11_CS7, SW10_CS7 }, - { 0, SW12_CS8, SW11_CS8, SW10_CS8 }, - { 0, SW12_CS9, SW11_CS9, SW10_CS9 }, - { 0, SW12_CS10, SW11_CS10, SW10_CS10 }, - { 0, SW12_CS11, SW11_CS11, SW10_CS11 }, - { 0, SW12_CS12, SW11_CS12, SW10_CS12 }, - - { 0, SW9_CS1, SW8_CS1, SW7_CS1 }, - { 0, SW9_CS2, SW8_CS2, SW7_CS2 }, - { 0, SW9_CS3, SW8_CS3, SW7_CS3 }, - { 0, SW9_CS4, SW8_CS4, SW7_CS4 }, - { 0, SW9_CS5, SW8_CS5, SW7_CS5 }, - { 0, SW9_CS6, SW8_CS6, SW7_CS6 }, - { 0, SW9_CS7, SW8_CS7, SW7_CS7 }, - { 0, SW9_CS8, SW8_CS8, SW7_CS8 }, - { 0, SW9_CS9, SW8_CS9, SW7_CS9 }, - { 0, SW9_CS10, SW8_CS10, SW7_CS10 }, - { 0, SW9_CS11, SW8_CS11, SW7_CS11 }, - { 0, SW9_CS12, SW8_CS12, SW7_CS12 }, - - { 0, SW6_CS1, SW5_CS1, SW4_CS1 }, - { 0, SW6_CS2, SW5_CS2, SW4_CS2 }, - { 0, SW6_CS3, SW5_CS3, SW4_CS3 }, - { 0, SW6_CS4, SW5_CS4, SW4_CS4 }, - { 0, SW6_CS5, SW5_CS5, SW4_CS5 }, - { 0, SW6_CS6, SW5_CS6, SW4_CS6 }, - { 0, SW6_CS7, SW5_CS7, SW4_CS7 }, - { 0, SW6_CS8, SW5_CS8, SW4_CS8 }, - { 0, SW6_CS9, SW5_CS9, SW4_CS9 }, - { 0, SW6_CS10, SW5_CS10, SW4_CS10 }, - { 0, SW6_CS11, SW5_CS11, SW4_CS11 }, - { 0, SW6_CS12, SW5_CS12, SW4_CS12 }, - - { 0, SW3_CS1, SW2_CS1, SW1_CS1 }, - { 0, SW3_CS2, SW2_CS2, SW1_CS2 }, - { 0, SW3_CS3, SW2_CS3, SW1_CS3 }, - { 0, SW3_CS4, SW2_CS4, SW1_CS4 }, - { 0, SW3_CS5, SW2_CS5, SW1_CS5 }, - { 0, SW3_CS6, SW2_CS6, SW1_CS6 }, - { 0, SW3_CS8, SW2_CS8, SW1_CS8 }, - { 0, SW3_CS9, SW2_CS9, SW1_CS9 }, - { 0, SW3_CS10, SW2_CS10, SW1_CS10 }, - { 0, SW3_CS11, SW2_CS11, SW1_CS11 }, - { 0, SW3_CS12, SW2_CS12, SW1_CS12 } -}; -#endif \ No newline at end of file -- cgit v1.2.3