Migrate dip switch config to info.json - keychron (#23037)
This commit is contained in:
		
							parent
							
								
									e7b84e1cf6
								
							
						
					
					
						commit
						137938b67a
					
				
					 87 changed files with 117 additions and 466 deletions
				
			
		| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/q10/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/q10/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 5] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/q12/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/q12/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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] = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,6 +3,9 @@
 | 
			
		|||
    "maintainer": "lalalademaxiya1",
 | 
			
		||||
    "bootloader": "stm32-dfu",
 | 
			
		||||
    "diode_direction": "ROW2COL",
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    },
 | 
			
		||||
    "eeprom": {
 | 
			
		||||
        "wear_leveling": {
 | 
			
		||||
            "backing_size": 4096
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,9 @@
 | 
			
		|||
    "maintainer": "lalalademaxiya1",
 | 
			
		||||
    "bootloader": "stm32-dfu",
 | 
			
		||||
    "diode_direction": "ROW2COL",
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    },
 | 
			
		||||
    "dynamic_keymap": {
 | 
			
		||||
        "layer_count": 5
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,9 @@
 | 
			
		|||
    "maintainer": "lalalademaxiya1",
 | 
			
		||||
    "bootloader": "stm32-dfu",
 | 
			
		||||
    "diode_direction": "ROW2COL",
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    },
 | 
			
		||||
    "eeprom": {
 | 
			
		||||
        "wear_leveling": {
 | 
			
		||||
            "backing_size": 4096
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/q6/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/q6/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/q60/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/q60/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/q65/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/q65/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -4,6 +4,9 @@
 | 
			
		|||
    "maintainer": "lalalademaxiya1",
 | 
			
		||||
    "bootloader": "stm32-dfu",
 | 
			
		||||
    "diode_direction": "ROW2COL",
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    },
 | 
			
		||||
    "dynamic_keymap": {
 | 
			
		||||
        "layer_count": 5
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,9 @@
 | 
			
		|||
    "maintainer": "lalalademaxiya1",
 | 
			
		||||
    "bootloader": "stm32-dfu",
 | 
			
		||||
    "diode_direction": "ROW2COL",
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    },
 | 
			
		||||
    "dynamic_keymap": {
 | 
			
		||||
        "layer_count": 5
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/s1/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/s1/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v1/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v1/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v10/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v10/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 5] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v2/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v2/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v3/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v3/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v4/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v4/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v5/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v5/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v6/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v6/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [5, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v7/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v7/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
									
								
								keyboards/keychron/v8/info.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								keyboards/keychron/v8/info.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "dip_switch": {
 | 
			
		||||
        "matrix_grid": [ [4, 4] ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue