Skip to content

Commit

Permalink
fix: kprepublic/cstc40
Browse files Browse the repository at this point in the history
  • Loading branch information
lesshonor committed Oct 14, 2023
1 parent 024ff3a commit 9c9e261
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 41 deletions.
51 changes: 22 additions & 29 deletions keyboards/kprepublic/cstc40/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@
#define I2C1_SCL_PIN B8
#define DRIVER_ADDR_1 0b1010000
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 47
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define RGB_MATRIX_LED_COUNT 47

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects

#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
Expand All @@ -30,37 +25,35 @@
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
//#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
//#define ENABLE_RGB_MATRIX_DUAL_BEACON
//#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
//#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
//#define ENABLE_RGB_MATRIX_RAINDROPS
//#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
//#define ENABLE_RGB_MATRIX_HUE_BREATHING
//#define ENABLE_RGB_MATRIX_HUE_PENDULUM
//#define ENABLE_RGB_MATRIX_HUE_WAVE
//#define ENABLE_RGB_MATRIX_PIXEL_RAIN
//#define ENABLE_RGB_MATRIX_PIXEL_FLOW
//#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL

// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define ENABLE_RGB_MATRIX_HUE_BREATHING
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
#define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN

// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
//#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_MULTISPLASH
//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH

#define RGB_DISABLE_WHEN_USB_SUSPENDED
2 changes: 1 addition & 1 deletion keyboards/kprepublic/cstc40/daughterboard/daughterboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, L_4, K_4, J_4 },
{ 0, L_5, K_5, J_5 },
{ 0, L_6, K_6, J_6 },
{ 0, L_7, K_7, J_7 },
{ 0, L_7, K_7, J_7 },
{ 0, L_8, K_8, J_8 },
{ 0, L_9, K_9, J_9 },
{ 0, L_10, K_10, J_10 },
Expand Down
4 changes: 1 addition & 3 deletions keyboards/kprepublic/cstc40/daughterboard/rules.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Build Options
LTO_ENABLE = no
TRI_LAYER_ENABLE = yes
# This file intentionally left blank
8 changes: 4 additions & 4 deletions keyboards/kprepublic/cstc40/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"maintainer": "itsvar8",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"debounce": 2,
"debounce": 2,
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
"rgb_matrix": true
},
"processor": "STM32F401",
"url": "",
Expand Down Expand Up @@ -74,8 +74,8 @@
]
}
},
"rgb_matrix": {
"driver": "IS31FL3733",
"rgb_matrix": {
"driver": "is31fl3733",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
{"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
Expand Down
1 change: 1 addition & 0 deletions keyboards/kprepublic/cstc40/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TRI_LAYER_ENABLE = yes
1 change: 1 addition & 0 deletions keyboards/kprepublic/cstc40/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
2 changes: 2 additions & 0 deletions keyboards/kprepublic/cstc40/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ 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 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.
4 changes: 1 addition & 3 deletions keyboards/kprepublic/cstc40/single_pcb/rules.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Build Options
LTO_ENABLE = no
TRI_LAYER_ENABLE = yes
# This file intentionally left blank
2 changes: 1 addition & 1 deletion keyboards/kprepublic/cstc40/single_pcb/single_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, L_4, K_4, J_4 },
{ 0, L_5, K_5, J_5 },
{ 0, L_6, K_6, J_6 },
{ 0, L_7, K_7, J_7 },
{ 0, L_7, K_7, J_7 },
{ 0, L_8, K_8, J_8 },
{ 0, L_9, K_9, J_9 },
{ 0, L_10, K_10, J_10 },
Expand Down

0 comments on commit 9c9e261

Please sign in to comment.