summaryrefslogtreecommitdiff
path: root/keyboards/keychron/s1
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron/s1')
-rw-r--r--keyboards/keychron/s1/ansi/rgb/config.h2
-rw-r--r--keyboards/keychron/s1/ansi/rgb/rgb.c2
-rw-r--r--keyboards/keychron/s1/ansi/white/config.h38
-rw-r--r--keyboards/keychron/s1/ansi/white/info.json26
-rw-r--r--keyboards/keychron/s1/ansi/white/white.c2
-rw-r--r--keyboards/keychron/s1/config.h6
-rw-r--r--keyboards/keychron/s1/info.json5
-rw-r--r--keyboards/keychron/s1/s1.c9
8 files changed, 33 insertions, 57 deletions
diff --git a/keyboards/keychron/s1/ansi/rgb/config.h b/keyboards/keychron/s1/ansi/rgb/config.h
index 647a877a4c..b4c9370bd0 100644
--- a/keyboards/keychron/s1/ansi/rgb/config.h
+++ b/keyboards/keychron/s1/ansi/rgb/config.h
@@ -28,7 +28,7 @@
{ 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48 }
/* Disable RGB lighting when PC is in suspend */
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_MATRIX_SLEEP
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 46
diff --git a/keyboards/keychron/s1/ansi/rgb/rgb.c b/keyboards/keychron/s1/ansi/rgb/rgb.c
index ca39b0c796..e81e7db402 100644
--- a/keyboards/keychron/s1/ansi/rgb/rgb.c
+++ b/keyboards/keychron/s1/ansi/rgb/rgb.c
@@ -20,7 +20,7 @@
// clang-format off
-const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/s1/ansi/white/config.h b/keyboards/keychron/s1/ansi/white/config.h
index fbe02caeb1..9aedc6b47f 100644
--- a/keyboards/keychron/s1/ansi/white/config.h
+++ b/keyboards/keychron/s1/ansi/white/config.h
@@ -18,48 +18,10 @@
/* LED Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
-#define DRIVER_1_LED_TOTAL 84
-#define LED_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
-
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_6_CHANNEL
#define SNLED27351_CURRENT_TUNE \
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 } // 250mA
// { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
-/* Disable LED lighting when PC is in suspend */
-#define LED_DISABLE_WHEN_USB_SUSPENDED
-
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 46
-
-// LED Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects
-#define ENABLE_LED_MATRIX_NONE
-#define ENABLE_LED_MATRIX_SOLID // Static single val, no speed support
-// #define ENABLE_LED_MATRIX_ALPHAS_MODS // Static dual val, speed is val for LEDs marked as modifiers
-#define ENABLE_LED_MATRIX_BREATHING // Cycling brightness animation
-// #define ENABLE_LED_MATRIX_BAND // Band fading brightness scrolling left to right
-#define ENABLE_LED_MATRIX_BAND_PINWHEEL // 3 blade spinning pinwheel fades brightness
-#define ENABLE_LED_MATRIX_BAND_SPIRAL // Spinning spiral fades brightness
-#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right
-#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
-#define ENABLE_LED_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in
-#define ENABLE_LED_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
-// #if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
-#define LED_MATRIX_KEYPRESSES
-#define LED_MATRIX_KEYRELEASES
-
-#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit then fades out
-// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
-#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
-#define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS // Value pulses the same column and row of a single key hit then fades out
-// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS // Value pulses the same column and row of multiple key hits then fades out
-// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS // Value pulses away on the same column and row of a single key hit then fades out
-// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
-#define ENABLE_LED_MATRIX_SOLID_SPLASH // Value pulses away from a single key hit then fades out
-#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH // Value pulses away from multiple key hits then fades out
-// #endif
-#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
-#define ENBALE_LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
-// #define ENABLE_LED_MATRIX_EFFECT_MAX
diff --git a/keyboards/keychron/s1/ansi/white/info.json b/keyboards/keychron/s1/ansi/white/info.json
index bcd64eea59..0e20c9ebe6 100644
--- a/keyboards/keychron/s1/ansi/white/info.json
+++ b/keyboards/keychron/s1/ansi/white/info.json
@@ -9,7 +9,31 @@
"device_version": "1.0.0"
},
"led_matrix": {
- "driver": "snled27351"
+ "animations":{
+ "alphas_mods": true,
+ "breathing": true,
+ "band": true,
+ "band_pinwheel": true,
+ "band_spiral": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "dual_beacon": true,
+ "solid_reactive_simple": 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,
+ "wave_left_right": true,
+ "wave_up_down": true
+ },
+ "driver": "snled27351",
+ "sleep": true,
+ "react_on_keyup": true
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/s1/ansi/white/white.c b/keyboards/keychron/s1/ansi/white/white.c
index b3a49ae9eb..d6a5eaf232 100644
--- a/keyboards/keychron/s1/ansi/white/white.c
+++ b/keyboards/keychron/s1/ansi/white/white.c
@@ -20,7 +20,7 @@
// clang-format off
-const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
+const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | LED address
diff --git a/keyboards/keychron/s1/config.h b/keyboards/keychron/s1/config.h
index 8c98389522..adea1822e5 100644
--- a/keyboards/keychron/s1/config.h
+++ b/keyboards/keychron/s1/config.h
@@ -16,12 +16,6 @@
#pragma once
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,4} }
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/keychron/s1/info.json b/keyboards/keychron/s1/info.json
new file mode 100644
index 0000000000..7019c8755b
--- /dev/null
+++ b/keyboards/keychron/s1/info.json
@@ -0,0 +1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
diff --git a/keyboards/keychron/s1/s1.c b/keyboards/keychron/s1/s1.c
index d8488dd6ea..2f1b905505 100644
--- a/keyboards/keychron/s1/s1.c
+++ b/keyboards/keychron/s1/s1.c
@@ -16,15 +16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {