Browse Source

Migrate dip switch config to info.json - keychron (#23037)

pull/22998/head
Joel Challis 3 months ago
committed by GitHub
parent
commit
137938b67a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
87 changed files with 117 additions and 466 deletions
  1. +0
    -13
      keyboards/keychron/c1_pro/c1_pro.c
  2. +0
    -6
      keyboards/keychron/c1_pro/config.h
  3. +3
    -0
      keyboards/keychron/c1_pro/info.json
  4. +0
    -12
      keyboards/keychron/c2_pro/c2_pro.c
  5. +0
    -6
      keyboards/keychron/c2_pro/config.h
  6. +3
    -0
      keyboards/keychron/c2_pro/info.json
  7. +0
    -6
      keyboards/keychron/q10/config.h
  8. +5
    -0
      keyboards/keychron/q10/info.json
  9. +0
    -9
      keyboards/keychron/q10/q10.c
  10. +0
    -9
      keyboards/keychron/q11/config.h
  11. +6
    -0
      keyboards/keychron/q11/info.json
  12. +0
    -19
      keyboards/keychron/q11/q11.c
  13. +0
    -8
      keyboards/keychron/q12/config.h
  14. +5
    -0
      keyboards/keychron/q12/info.json
  15. +0
    -10
      keyboards/keychron/q12/q12.c
  16. +0
    -9
      keyboards/keychron/q1v1/ansi/ansi.c
  17. +0
    -9
      keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c
  18. +0
    -6
      keyboards/keychron/q1v1/config.h
  19. +3
    -0
      keyboards/keychron/q1v1/info.json
  20. +0
    -9
      keyboards/keychron/q1v1/iso/iso.c
  21. +0
    -9
      keyboards/keychron/q1v1/iso_encoder/iso_encoder.c
  22. +0
    -9
      keyboards/keychron/q1v2/config.h
  23. +3
    -0
      keyboards/keychron/q1v2/info.json
  24. +0
    -9
      keyboards/keychron/q1v2/q1v2.c
  25. +0
    -6
      keyboards/keychron/q2/config.h
  26. +3
    -0
      keyboards/keychron/q2/info.json
  27. +0
    -8
      keyboards/keychron/q2/q2.c
  28. +0
    -6
      keyboards/keychron/q3/config.h
  29. +3
    -0
      keyboards/keychron/q3/info.json
  30. +0
    -13
      keyboards/keychron/q3/q3.c
  31. +0
    -6
      keyboards/keychron/q4/config.h
  32. +3
    -0
      keyboards/keychron/q4/info.json
  33. +0
    -8
      keyboards/keychron/q4/q4.c
  34. +0
    -6
      keyboards/keychron/q5/config.h
  35. +3
    -0
      keyboards/keychron/q5/info.json
  36. +0
    -9
      keyboards/keychron/q5/q5.c
  37. +0
    -6
      keyboards/keychron/q6/config.h
  38. +5
    -0
      keyboards/keychron/q6/info.json
  39. +0
    -9
      keyboards/keychron/q6/q6.c
  40. +0
    -6
      keyboards/keychron/q60/config.h
  41. +5
    -0
      keyboards/keychron/q60/info.json
  42. +0
    -8
      keyboards/keychron/q60/q60.c
  43. +0
    -6
      keyboards/keychron/q65/config.h
  44. +5
    -0
      keyboards/keychron/q65/info.json
  45. +0
    -8
      keyboards/keychron/q65/q65.c
  46. +0
    -6
      keyboards/keychron/q7/config.h
  47. +3
    -0
      keyboards/keychron/q7/info.json
  48. +0
    -8
      keyboards/keychron/q7/q7.c
  49. +0
    -6
      keyboards/keychron/q8/config.h
  50. +3
    -0
      keyboards/keychron/q8/info.json
  51. +0
    -8
      keyboards/keychron/q8/q8.c
  52. +0
    -6
      keyboards/keychron/q9/config.h
  53. +3
    -0
      keyboards/keychron/q9/info.json
  54. +0
    -7
      keyboards/keychron/q9/q9.c
  55. +0
    -6
      keyboards/keychron/q9_plus/config.h
  56. +3
    -0
      keyboards/keychron/q9_plus/info.json
  57. +0
    -7
      keyboards/keychron/q9_plus/q9_plus.c
  58. +0
    -6
      keyboards/keychron/s1/config.h
  59. +5
    -0
      keyboards/keychron/s1/info.json
  60. +0
    -9
      keyboards/keychron/s1/s1.c
  61. +0
    -6
      keyboards/keychron/v1/config.h
  62. +5
    -0
      keyboards/keychron/v1/info.json
  63. +0
    -9
      keyboards/keychron/v1/v1.c
  64. +0
    -6
      keyboards/keychron/v10/config.h
  65. +5
    -0
      keyboards/keychron/v10/info.json
  66. +0
    -9
      keyboards/keychron/v10/v10.c
  67. +0
    -6
      keyboards/keychron/v2/config.h
  68. +5
    -0
      keyboards/keychron/v2/info.json
  69. +0
    -8
      keyboards/keychron/v2/v2.c
  70. +0
    -6
      keyboards/keychron/v3/config.h
  71. +5
    -0
      keyboards/keychron/v3/info.json
  72. +0
    -13
      keyboards/keychron/v3/v3.c
  73. +0
    -6
      keyboards/keychron/v4/config.h
  74. +5
    -0
      keyboards/keychron/v4/info.json
  75. +0
    -8
      keyboards/keychron/v4/v4.c
  76. +0
    -6
      keyboards/keychron/v5/config.h
  77. +5
    -0
      keyboards/keychron/v5/info.json
  78. +0
    -9
      keyboards/keychron/v5/v5.c
  79. +0
    -5
      keyboards/keychron/v6/config.h
  80. +5
    -0
      keyboards/keychron/v6/info.json
  81. +0
    -9
      keyboards/keychron/v6/v6.c
  82. +0
    -6
      keyboards/keychron/v7/config.h
  83. +5
    -0
      keyboards/keychron/v7/info.json
  84. +0
    -8
      keyboards/keychron/v7/v7.c
  85. +0
    -6
      keyboards/keychron/v8/config.h
  86. +5
    -0
      keyboards/keychron/v8/info.json
  87. +0
    -8
      keyboards/keychron/v8/v8.c

+ 0
- 13
keyboards/keychron/c1_pro/c1_pro.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/c1_pro/config.h View File

@ -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)


+ 3
- 0
keyboards/keychron/c1_pro/info.json View File

@ -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"]


+ 0
- 12
keyboards/keychron/c2_pro/c2_pro.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/c2_pro/config.h View File

@ -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)


+ 3
- 0
keyboards/keychron/c2_pro/info.json View File

@ -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"],


+ 0
- 6
keyboards/keychron/q10/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/q10/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 5] ]
}
}

+ 0
- 9
keyboards/keychron/q10/q10.c View File

@ -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) {


+ 0
- 9
keyboards/keychron/q11/config.h View File

@ -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


+ 6
- 0
keyboards/keychron/q11/info.json View File

@ -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"],


+ 0
- 19
keyboards/keychron/q11/q11.c View File

@ -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)) {


+ 0
- 8
keyboards/keychron/q12/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/q12/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 10
keyboards/keychron/q12/q12.c View File

@ -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)) {


+ 0
- 9
keyboards/keychron/q1v1/ansi/ansi.c View File

@ -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


+ 0
- 9
keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c View File

@ -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


+ 0
- 6
keyboards/keychron/q1v1/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q1v1/info.json View File

@ -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"]


+ 0
- 9
keyboards/keychron/q1v1/iso/iso.c View File

@ -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


+ 0
- 9
keyboards/keychron/q1v1/iso_encoder/iso_encoder.c View File

@ -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] = {


+ 0
- 9
keyboards/keychron/q1v2/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q1v2/info.json View File

@ -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"],


+ 0
- 9
keyboards/keychron/q1v2/q1v2.c View File

@ -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)) {


+ 0
- 6
keyboards/keychron/q2/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q2/info.json View File

@ -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"]


+ 0
- 8
keyboards/keychron/q2/q2.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q3/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q3/info.json View File

@ -3,6 +3,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"dip_switch": {
"matrix_grid": [ [5, 4] ]
},
"eeprom": {
"wear_leveling": {
"backing_size": 4096


+ 0
- 13
keyboards/keychron/q3/q3.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q4/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q4/info.json View File

@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"dip_switch": {
"matrix_grid": [ [4, 4] ]
},
"dynamic_keymap": {
"layer_count": 5
},


+ 0
- 8
keyboards/keychron/q4/q4.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q5/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q5/info.json View File

@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"dip_switch": {
"matrix_grid": [ [5, 4] ]
},
"eeprom": {
"wear_leveling": {
"backing_size": 4096


+ 0
- 9
keyboards/keychron/q5/q5.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q6/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/q6/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 9
keyboards/keychron/q6/q6.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q60/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/q60/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [4, 4] ]
}
}

+ 0
- 8
keyboards/keychron/q60/q60.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q65/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/q65/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [4, 4] ]
}
}

+ 0
- 8
keyboards/keychron/q65/q65.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q7/config.h View File

@ -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

+ 3
- 0
keyboards/keychron/q7/info.json View File

@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"dip_switch": {
"matrix_grid": [ [4, 4] ]
},
"dynamic_keymap": {
"layer_count": 5
},


+ 0
- 8
keyboards/keychron/q7/q7.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q8/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q8/info.json View File

@ -4,6 +4,9 @@
"maintainer": "lalalademaxiya1",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
"dip_switch": {
"matrix_grid": [ [4, 4] ]
},
"dynamic_keymap": {
"layer_count": 5
},


+ 0
- 8
keyboards/keychron/q8/q8.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q9/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q9/info.json View File

@ -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"]


+ 0
- 7
keyboards/keychron/q9/q9.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/q9_plus/config.h View File

@ -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


+ 3
- 0
keyboards/keychron/q9_plus/info.json View File

@ -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"]


+ 0
- 7
keyboards/keychron/q9_plus/q9_plus.c View File

@ -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)) {


+ 0
- 6
keyboards/keychron/s1/config.h View File

@ -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)


+ 5
- 0
keyboards/keychron/s1/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 9
keyboards/keychron/s1/s1.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v1/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v1/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 9
keyboards/keychron/v1/v1.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v10/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v10/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 5] ]
}
}

+ 0
- 9
keyboards/keychron/v10/v10.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v2/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v2/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [4, 4] ]
}
}

+ 0
- 8
keyboards/keychron/v2/v2.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v3/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v3/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 13
keyboards/keychron/v3/v3.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v4/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v4/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [4, 4] ]
}
}

+ 0
- 8
keyboards/keychron/v4/v4.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v5/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v5/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 9
keyboards/keychron/v5/v5.c View File

@ -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) {


+ 0
- 5
keyboards/keychron/v6/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v6/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [5, 4] ]
}
}

+ 0
- 9
keyboards/keychron/v6/v6.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v7/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v7/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [4, 4] ]
}
}

+ 0
- 8
keyboards/keychron/v7/v7.c View File

@ -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) {


+ 0
- 6
keyboards/keychron/v8/config.h View File

@ -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


+ 5
- 0
keyboards/keychron/v8/info.json View File

@ -0,0 +1,5 @@
{
"dip_switch": {
"matrix_grid": [ [4, 4] ]
}
}

+ 0
- 8
keyboards/keychron/v8/v8.c View File

@ -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) {


Loading…
Cancel
Save