M keyboards/keychron/c1_pro/c1_pro.c => keyboards/keychron/c1_pro/c1_pro.c +0 -13
@@ 16,19 16,6 @@
#include "quantum.h"
-// clang-format off
-
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/c1_pro/config.h => keyboards/keychron/c1_pro/config.h +0 -6
@@ 16,12 16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
M keyboards/keychron/c1_pro/info.json => keyboards/keychron/c1_pro/info.json +3 -0
@@ 17,6 17,9 @@
"mousekey": true,
"nkro": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
M keyboards/keychron/c2_pro/c2_pro.c => keyboards/keychron/c2_pro/c2_pro.c +0 -12
@@ 16,18 16,6 @@
#include "quantum.h"
-// clang-format off
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/c2_pro/config.h => keyboards/keychron/c2_pro/config.h +0 -6
@@ 16,12 16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 5, 4 } }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
M keyboards/keychron/c2_pro/info.json => keyboards/keychron/c2_pro/info.json +3 -0
@@ 17,6 17,9 @@
"mousekey": true,
"nkro": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "NO_PIN", "C14"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"],
M keyboards/keychron/q10/config.h => keyboards/keychron/q10/config.h +0 -6
@@ 44,12 44,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,5} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/q10/info.json => keyboards/keychron/q10/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 5] ]
+ }
+}
M keyboards/keychron/q10/q10.c => keyboards/keychron/q10/q10.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111011111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q11/config.h => keyboards/keychron/q11/config.h +0 -9
@@ 16,15 16,6 @@
#pragma once
-// Connects each switch in the dip switch to the GPIO pin of the MCU
-#define DIP_SWITCH_PINS \
- { A8 }
-
-/* handedness */
-#define SPLIT_HAND_MATRIX_GRID A2, A15
-
-#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c`
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
M keyboards/keychron/q11/info.json => keyboards/keychron/q11/info.json +6 -0
@@ 11,6 11,9 @@
"bootmagic": {
"matrix": [0, 1]
},
+ "dip_switch": {
+ "pins": ["A8"]
+ },
"features": {
"bootmagic": true,
"command": false,
@@ 36,6 39,9 @@
]
}
},
+ "handedness": {
+ "matrix_grid": ["A2", "A15"]
+ },
"matrix_pins": {
"right": {
"cols": ["A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0"],
M keyboards/keychron/q11/q11.c => keyboards/keychron/q11/q11.c +0 -19
@@ 16,25 16,6 @@
#include "quantum.h"
-// Mask out handedness diode to prevent it
-// from keeping the keyboard awake
-// - just mirroring `KC_NO` in the `LAYOUT`
-// macro to keep it simple
-const matrix_row_t matrix_mask[] = {
- 0b011111111,
- 0b011111111,
- 0b011011111,
- 0b001111111,
- 0b011111111,
- 0b001011111,
- 0b111111111,
- 0b101111111,
- 0b111111111,
- 0b110111111,
- 0b010111111,
- 0b111011110,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
M keyboards/keychron/q12/config.h => keyboards/keychron/q12/config.h +0 -8
@@ 39,16 39,8 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID \
- { \
- { 5, 4 } \
- }
#define SCAN_COUNT_MAX 100
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/q12/info.json => keyboards/keychron/q12/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/q12/q12.c => keyboards/keychron/q12/q12.c +0 -10
@@ 16,16 16,6 @@
#include "quantum.h"
-// clang-format off
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111101111,
-};
-// clang-format on
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
M keyboards/keychron/q1v1/ansi/ansi.c => keyboards/keychron/q1v1/ansi/ansi.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
M keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c => keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
M keyboards/keychron/q1v1/config.h => keyboards/keychron/q1v1/config.h +0 -6
@@ 20,12 20,6 @@
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {0,1} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Encoder Configuration*/
#define ENCODER_DEFAULT_POS 0x3
M keyboards/keychron/q1v1/info.json => keyboards/keychron/q1v1/info.json +3 -0
@@ 17,6 17,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [0, 1] ]
+ },
"matrix_pins": {
"cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
"rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
M keyboards/keychron/q1v1/iso/iso.c => keyboards/keychron/q1v1/iso/iso.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
/* Refer to IS31 manual for these locations
M keyboards/keychron/q1v1/iso_encoder/iso_encoder.c => keyboards/keychron/q1v1/iso_encoder/iso_encoder.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
#ifdef RGB_MATRIX_ENABLE
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
M keyboards/keychron/q1v2/config.h => keyboards/keychron/q1v2/config.h +0 -9
@@ 27,15 27,6 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID \
- { \
- { 5, 4 } \
- }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP
M keyboards/keychron/q1v2/info.json => keyboards/keychron/q1v2/info.json +3 -0
@@ 18,6 18,9 @@
"rgb_matrix": true,
"dip_switch": true
},
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", null, null, null, null, null, null, null, null],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"],
M keyboards/keychron/q1v2/q1v2.c => keyboards/keychron/q1v2/q1v2.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
M keyboards/keychron/q2/config.h => keyboards/keychron/q2/config.h +0 -6
@@ 18,18 18,12 @@
#define MATRIX_UNSELECT_DRIVE_HIGH
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
M keyboards/keychron/q2/info.json => keyboards/keychron/q2/info.json +3 -0
@@ 22,6 22,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
"rows": ["B4", "B3", "A15", "A14", "A13"]
M keyboards/keychron/q2/q2.c => keyboards/keychron/q2/q2.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q3/config.h => keyboards/keychron/q3/config.h +0 -6
@@ 29,12 29,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Encoder Configuration*/
#define ENCODER_DEFAULT_POS 0x3
M keyboards/keychron/q3/info.json => keyboards/keychron/q3/info.json +3 -0
@@ 3,6 3,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"eeprom": {
"wear_leveling": {
"backing_size": 4096
M keyboards/keychron/q3/q3.c => keyboards/keychron/q3/q3.c +0 -13
@@ 17,19 17,6 @@
#include "quantum.h"
#include "rgb_matrix.h"
-// clang-format off
-
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q4/config.h => keyboards/keychron/q4/config.h +0 -6
@@ 16,12 16,6 @@
#pragma once
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
M keyboards/keychron/q4/info.json => keyboards/keychron/q4/info.json +3 -0
@@ 4,6 4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"dynamic_keymap": {
"layer_count": 5
},
M keyboards/keychron/q4/q4.c => keyboards/keychron/q4/q4.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q5/config.h => keyboards/keychron/q5/config.h +0 -6
@@ 33,12 33,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
M keyboards/keychron/q5/info.json => keyboards/keychron/q5/info.json +3 -0
@@ 4,6 4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ },
"eeprom": {
"wear_leveling": {
"backing_size": 4096
M keyboards/keychron/q5/q5.c => keyboards/keychron/q5/q5.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q6/config.h => keyboards/keychron/q6/config.h +0 -6
@@ 30,12 30,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/q6/info.json => keyboards/keychron/q6/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/q6/q6.c => keyboards/keychron/q6/q6.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q60/config.h => keyboards/keychron/q60/config.h +0 -6
@@ 29,12 29,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/q60/info.json => keyboards/keychron/q60/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
M keyboards/keychron/q60/q60.c => keyboards/keychron/q60/q60.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q65/config.h => keyboards/keychron/q65/config.h +0 -6
@@ 40,12 40,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 }
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
/* Turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/q65/info.json => keyboards/keychron/q65/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
M keyboards/keychron/q65/q65.c => keyboards/keychron/q65/q65.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q7/config.h => keyboards/keychron/q7/config.h +0 -6
@@ 30,9 30,3 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE \
{ 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 }
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED>
\ No newline at end of file
M keyboards/keychron/q7/info.json => keyboards/keychron/q7/info.json +3 -0
@@ 4,6 4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"dynamic_keymap": {
"layer_count": 5
},
M keyboards/keychron/q7/q7.c => keyboards/keychron/q7/q7.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q8/config.h => keyboards/keychron/q8/config.h +0 -6
@@ 34,12 34,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Encoder Configuration */
#define ENCODER_DEFAULT_POS 0x3
M keyboards/keychron/q8/info.json => keyboards/keychron/q8/info.json +3 -0
@@ 4,6 4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ },
"dynamic_keymap": {
"layer_count": 5
},
M keyboards/keychron/q8/q8.c => keyboards/keychron/q8/q8.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q9/config.h => keyboards/keychron/q9/config.h +0 -6
@@ 16,12 16,6 @@
#pragma once
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { { 3, 4 } }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
M keyboards/keychron/q9/info.json => keyboards/keychron/q9/info.json +3 -0
@@ 22,6 22,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [3, 4] ]
+ },
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
"rows": ["B3", "A15", "A14", "A13"]
M keyboards/keychron/q9/q9.c => keyboards/keychron/q9/q9.c +0 -7
@@ 16,13 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/q9_plus/config.h => keyboards/keychron/q9_plus/config.h +0 -6
@@ 16,12 16,6 @@
#pragma once
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID {{ 3, 4 }}
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
M keyboards/keychron/q9_plus/info.json => keyboards/keychron/q9_plus/info.json +3 -0
@@ 19,6 19,9 @@
"nkro": true,
"rgb_matrix": true
},
+ "dip_switch": {
+ "matrix_grid": [ [3, 4] ]
+ },
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
"rows": ["B3", "A15", "A14", "A13"]
M keyboards/keychron/q9_plus/q9_plus.c => keyboards/keychron/q9_plus/q9_plus.c +0 -7
@@ 16,13 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
if (!dip_switch_update_user(index, active)) {
M keyboards/keychron/s1/config.h => keyboards/keychron/s1/config.h +0 -6
@@ 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)
A keyboards/keychron/s1/info.json => keyboards/keychron/s1/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/s1/s1.c => keyboards/keychron/s1/s1.c +0 -9
@@ 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) {
M keyboards/keychron/v1/config.h => keyboards/keychron/v1/config.h +0 -6
@@ 25,12 25,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,4} }
-
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND
A keyboards/keychron/v1/info.json => keyboards/keychron/v1/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/v1/v1.c => keyboards/keychron/v1/v1.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v10/config.h => keyboards/keychron/v10/config.h +0 -6
@@ 44,12 44,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5,5} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v10/info.json => keyboards/keychron/v10/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 5] ]
+ }
+}
M keyboards/keychron/v10/v10.c => keyboards/keychron/v10/v10.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111011111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v2/config.h => keyboards/keychron/v2/config.h +0 -6
@@ 32,12 32,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v2/info.json => keyboards/keychron/v2/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
M keyboards/keychron/v2/v2.c => keyboards/keychron/v2/v2.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v3/config.h => keyboards/keychron/v3/config.h +0 -6
@@ 32,12 32,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v3/info.json => keyboards/keychron/v3/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/v3/v3.c => keyboards/keychron/v3/v3.c +0 -13
@@ 16,19 16,6 @@
#include "quantum.h"
-// clang-format off
-
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
-// clang-format on
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v4/config.h => keyboards/keychron/v4/config.h +0 -6
@@ 29,12 29,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v4/info.json => keyboards/keychron/v4/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
M keyboards/keychron/v4/v4.c => keyboards/keychron/v4/v4.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111111111,
- 0b11111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v5/config.h => keyboards/keychron/v5/config.h +0 -6
@@ 39,12 39,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v5/info.json => keyboards/keychron/v5/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/v5/v5.c => keyboards/keychron/v5/v5.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111111111,
- 0b111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v6/config.h => keyboards/keychron/v6/config.h +0 -5
@@ 33,13 33,8 @@
/* Limit the maximum brigtness current of colour white to 500mA */
#define SNLED27351_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
#define SCAN_COUNT_MAX 100
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v6/info.json => keyboards/keychron/v6/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [5, 4] ]
+ }
+}
M keyboards/keychron/v6/v6.c => keyboards/keychron/v6/v6.c +0 -9
@@ 16,15 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111111111,
- 0b11111111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v7/config.h => keyboards/keychron/v7/config.h +0 -6
@@ 30,12 30,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4,4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v7/info.json => keyboards/keychron/v7/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
M keyboards/keychron/v7/v7.c => keyboards/keychron/v7/v7.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111111111,
- 0b1111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {
M keyboards/keychron/v8/config.h => keyboards/keychron/v8/config.h +0 -6
@@ 33,12 33,6 @@
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
#define SNLED27351_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
/* Turn off effects when suspended */
#define RGB_MATRIX_SLEEP
A keyboards/keychron/v8/info.json => keyboards/keychron/v8/info.json +5 -0
@@ 0,0 1,5 @@
+{
+ "dip_switch": {
+ "matrix_grid": [ [4, 4] ]
+ }
+}
M keyboards/keychron/v8/v8.c => keyboards/keychron/v8/v8.c +0 -8
@@ 16,14 16,6 @@
#include "quantum.h"
-const matrix_row_t matrix_mask[] = {
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111111111,
- 0b111111111101111,
-};
-
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {