Add Q5/Q6/Q8/K5/K7/V5 Max

This commit is contained in:
lokher 2024-01-31 18:25:41 +08:00
parent f45cb07e26
commit 0b812c9dc0
160 changed files with 10423 additions and 187 deletions

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -19,9 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix driver configuration */
# define DRIVER_COUNT 2
# define DRIVER_1_LED_COUNT 46
# define DRIVER_2_LED_COUNT 38
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_COUNT + DRIVER_2_LED_COUNT)
# define RGB_MATRIX_LED_COUNT 84
# define SPI_SCK_PIN A5
# define SPI_MISO_PIN A6
@ -33,7 +31,7 @@
# define SPI_DRIVER SPID1
/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in snled27351.h) */
# define PHASE_CHANNEL MSKPHASE_9CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_9CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@ enum layers {
WIN_BASE,
WIN_FN,
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_84(

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@ enum layers {
WIN_BASE,
WIN_FN,
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_84(
@ -55,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, BAT_LVL, NK_TOGG, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
};
// clang-format on

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -121,12 +121,12 @@ const snled27351_led_t g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
led_config_t g_led_config = {
{
// Key Matrix to LED Index
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, __, 30 },
{ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, __, 45 },
{ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, __, 58, __, 59 },
{ 60, __, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, __, 71, 72, 73 },
{ 74, 75, 76, __, __, __, 77, __, __, __, 78, 79, 80, 81, 82, 83 }
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, __, 30 },
{ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, __, 45 },
{ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, __, 58, __, 59 },
{ 60, __, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, __, 71, 72, 73 },
{ 74, 75, 76, __, __, __, 77, __, __, __, 78, 79, 80, 81, 82, 83 }
},
{
// LED Index to Physical Position

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,7 +31,7 @@
# define SPI_DRIVER SPID1
/* Use first 6 channels of LED driver */
# define PHASE_CHANNEL MSKPHASE_6CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_6CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \
@ -44,7 +44,7 @@
/* Turn off backlight on low brightness to save power */
# define LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL 48
/* Caps lock indicating led */
/* Indications */
# define DIM_CAPS_LOCK
# define CAPS_LOCK_INDEX 46
# define LOW_BAT_IND_INDEX \

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@ enum layers {
WIN_BASE,
WIN_FN,
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_84(

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@ enum layers {
WIN_BASE,
WIN_FN,
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_84(

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -119,14 +119,14 @@ const snled27351_led_t g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
led_config_t g_led_config = {
{
// Key Matrix to LED Index
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, __, 30 },
{ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, __, 45 },
{ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, __, 58, __, 59 },
{ 60, __, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, __, 71, 72, 73 },
{ 74, 75, 76, __, __, __, 77, __, __, __, 78, 79, 80, 81, 82, 83 }
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, __, 30 },
{ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, __, 45 },
{ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, __, 58, __, 59 },
{ 60, __, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, __, 71, 72, 73 },
{ 74, 75, 76, __, __, __, 77, __, __, __, 78, 79, 80, 81, 82, 83 }
},
{
{
// LED Index to Physical Position
{0, 0}, {14, 0}, {29, 0}, {44, 0}, {59, 0}, {74, 0}, { 89, 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {209, 0}, {223, 0},
{0,12}, {14,12}, {29,12}, {44,12}, {59,12}, {74,12}, { 89, 12}, {104, 12}, {119, 12}, {134, 12}, {149, 12}, {164, 12}, {179, 12}, {201, 12}, {223, 12},
@ -145,4 +145,5 @@ led_config_t g_led_config = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4
}
};
#endif

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,9 +16,6 @@
#pragma once
/* DIP switch for Mac/win OS switch */
#define DIP_SWITCH_PINS \
{ B14 }
/* Caps lock LED */
#define LED_CAPS_LOCK_PIN A13
#define LED_PIN_ON_STATE 1

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software : you can redistribute it and /or modify
* it under the terms of the GNU General Public License as published by

View file

@ -22,6 +22,9 @@
"rows": ["C12", "D2", "B3", "B4", "B5", "B6"]
},
"diode_direction": "ROW2COL",
"dip_switch": {
"pins": ["B14"]
},
"eeprom": {
"wear_leveling": {
"driver": "embedded_flash",
@ -122,7 +125,7 @@
{"matrix":[5,14], "x":14, "y":5},
{"matrix":[5,15], "x":15, "y":5}
]
},
}
"LAYOUT_iso_85": {
"layout": [
{"matrix":[0, 0], "x":0, "y":0},
@ -216,7 +219,7 @@
{"matrix":[5,14], "x":14, "y":5},
{"matrix":[5,15], "x":15, "y":5}
]
},
}
"LAYOUT_jis_87": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
@ -314,4 +317,5 @@
]
}
}
}

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -19,9 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
/* RGB Matrix driver configuration */
# define DRIVER_COUNT 2
# define DRIVER_1_LED_COUNT 46
# define DRIVER_2_LED_COUNT 39
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_COUNT + DRIVER_2_LED_COUNT)
# define RGB_MATRIX_LED_COUNT 85
# define SPI_SCK_PIN A5
# define SPI_MISO_PIN A6
@ -33,7 +31,7 @@
# define SPI_DRIVER SPID1
/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in snled27351.h) */
# define PHASE_CHANNEL MSKPHASE_9CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_9CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \
@ -47,12 +45,11 @@
/* Turn off backlight on low brightness to save power */
# define RGB_MATRIX_BRIGHTNESS_TURN_OFF_VAL 48
/* Caps lock indicating led */
/* Indications */
# define DIM_CAPS_LOCK
# define CAPS_LOCK_INDEX 46
# define LOW_BAT_IND_INDEX { 78 }
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -118,20 +118,16 @@ const snled27351_led_t g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
};
#define __ NO_LED
led_config_t g_led_config = {
{
// Key Matrix to LED Index
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, __, 30 },
{ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, __, 45 },
{ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, __, 58, __, 59 },
{ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, __, 72, 73, 74 },
{ 75, 76, 77, __, __, __, 78, __, __, __, 79, 80, 81, 82, 83, 84 }
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, NO_LED, 30 },
{ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45 },
{ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED, 58, NO_LED, 59 },
{ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, NO_LED, 72, 73, 74 },
{ 75, 76, 77, NO_LED, NO_LED, NO_LED, 78, NO_LED, NO_LED, NO_LED, 79, 80, 81, 82, 83, 84 }
},
{
// LED Index to Physical Position
{0, 0}, {14, 0}, {29, 0}, {44, 0}, {59, 0}, {74, 0}, { 89, 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {209, 0}, {223, 0},
{0,12}, {14,12}, {29,12}, {44,12}, {59,12}, {74,12}, { 89, 12}, {104, 12}, {119, 12}, {134, 12}, {149, 12}, {164, 12}, {179, 12}, {201, 12}, {223, 12},
{3,25}, {22,25}, {37,25}, {52,25}, {67,25}, {82,25}, { 97, 25}, {112, 25}, {126, 25}, {141, 25}, {156, 25}, {171, 25}, {186, 25}, {205, 32}, {223, 25},
@ -140,13 +136,13 @@ led_config_t g_led_config = {
{1,64}, {20,64}, {39,64}, { 95, 64}, {149, 64}, {164, 64}, {179, 64}, {194, 64}, {209, 64}, {223, 64}
},
{
// RGB LED Index to Flag
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4
}
};
#endif

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,7 +31,7 @@
# define SPI_DRIVER SPID1
/* Use first 6 channels of LED driver */
# define PHASE_CHANNEL MSKPHASE_6CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_6CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \
@ -44,7 +44,7 @@
/* Turn off backlight on low brightness to save power */
# define LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL 48
/* Caps lock indicating led */
/* Indications */
# define DIM_CAPS_LOCK
# define CAPS_LOCK_INDEX 46
# define LOW_BAT_IND_INDEX \

View file

@ -24,7 +24,7 @@
"solid_reactive_multinexus": true,
"solid_splash": true,
"wave_left_right": true,
"wave_up_down": true,
"wave_up_down": true
}
}
}

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -21,18 +21,17 @@
# define DRIVER_COUNT 2
# define RGB_MATRIX_LED_COUNT 87
# define SPI_SCK_PIN A5
# define SPI_MISO_PIN A6
# define SPI_MOSI_PIN A7
# define DRIVER_CS_PINS \
{ B8, B9 }
# define SNLED23751_SPI_DIVISOR 16
# define SPI_DRIVER SPID1
# define SPI_SCK_PIN A5
# define SPI_MISO_PIN A6
# define SPI_MOSI_PIN A7
# define DRIVER_CS_PINS \
{ B8, B9 }
# define SNLED23751_SPI_DIVISOR 16
# define SPI_DRIVER SPID1
/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in snled27351.h) */
# define PHASE_CHANNEL MSKPHASE_9CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_9CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \
@ -46,12 +45,11 @@
/* Turn off backlight on low brightness to save power */
# define RGB_MATRIX_BRIGHTNESS_TURN_OFF_VAL 48
/* Caps lock indicating led */
/* Indications */
# define DIM_CAPS_LOCK
# define CAPS_LOCK_INDEX 47
# define LOW_BAT_IND_INDEX { 79 }
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,17 +1,17 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software : you can redistribute it and /or modify
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.If not, see < http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
@ -19,7 +19,7 @@
// clang-format off
#ifdef RGB_MATRIX_ENABLE
const snled27351_led_t g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
const snled27351_led_t g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to SNLED27351 manual for these locations
* driver
* | R location

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,7 +31,7 @@
# define SPI_DRIVER SPID1
/* Use first 6 channels of LED driver */
# define PHASE_CHANNEL MSKPHASE_6CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_6CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \
@ -44,7 +44,7 @@
/* Turn off backlight on low brightness to save power */
# define LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL 48
/* Caps lock indicating led */
/* Indications */
# define DIM_CAPS_LOCK
# define CAPS_LOCK_INDEX 47
# define LOW_BAT_IND_INDEX \

View file

@ -24,7 +24,7 @@
"solid_reactive_multinexus": true,
"solid_splash": true,
"wave_left_right": true,
"wave_up_down": true,
"wave_up_down": true
}
}
}

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,17 +1,17 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software : you can redistribute it and /or modify
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.If not, see < http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"

View file

@ -1,4 +1,4 @@
/* Copyright 2023 @ Keychron (https://www.keychron.com)
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@
#ifdef LK_WIRELESS_ENABLE
# include "lkbt51.h"
# include "wireless.h"
# include "transport.h"
# include "keychron_wireless_common.h"
# include "battery.h"
#endif
@ -30,9 +31,6 @@
#define POWER_ON_LED_DURATION 3000
static uint32_t power_on_indicator_timer;
#ifdef KEYCHRON_CALLBACK_ENABLE
bool keychron_task_kb(void);
#endif
bool dip_switch_update_kb(uint8_t index, bool active) {
if (index == 0) {
@ -56,11 +54,7 @@ void keyboard_post_init_kb(void) {
#ifdef ENCODER_ENABLE
encoder_cb_init();
#endif
#ifdef KEYCHRON_CALLBACK_ENABLE
factory_test_init();
register_record_process(process_record_keychron_kb, false);
register_keychron_task(keychron_task_kb, false);
#endif
keyboard_post_init_user();
}

View file

@ -1,51 +1,37 @@
/* Copyright 2022 QMK
/* Copyright 2024 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* This program is free software : you can redistribute it and /or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program.If not, see < http://www.gnu.org/licenses/>.
*/
#pragma once
#include_next <mcuconf.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000
#define STM32_HSECLK 16000000
#undef STM32_PLLM_VALUE
#define STM32_PLLM_VALUE 8
#define STM32_PLLM_VALUE 8
#undef STM32_PLLN_VALUE
#define STM32_PLLN_VALUE 96
#define STM32_PLLN_VALUE 96
#undef STM32_PLLP_VALUE
#define STM32_PLLP_VALUE 4 // HCLK 48MHz, MCU current = 14 mA
//#define STM32_PLLP_VALUE 6 // HCLK 32MHz, MCU current = 10 mA
#define STM32_PLLP_VALUE 4
#undef STM32_PLLQ_VALUE
#define STM32_PLLQ_VALUE 4
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
#ifdef LK_WIRELESS_ENABLE
# undef STM32_SPI_USE_SPI1
# define STM32_SPI_USE_SPI1 TRUE
# undef STM32_ADC_USE_ADC1
# define STM32_ADC_USE_ADC1 TRUE
#endif
# undef STM32_SPI_USE_SPI1
# define STM32_SPI_USE_SPI1 TRUE
#define STM32_PLLQ_VALUE 4
#undef STM32_SPI_USE_SPI1
#define STM32_SPI_USE_SPI1 TRUE

View file

@ -18,6 +18,6 @@ Flashing example for this keyboard:
make keychron/k3_max/ansi/rgb:default:flash
make keychron/k3_max/ansi/white:default:flash
**Reset Key**: Toggle mode switch to "Cable", hold down the *Esc* key or reset button underneath space bar while connecting the USB cable,
**Reset Key**: Disconnect the USB cable, toggle mode switch to "Cable", hold down the *Esc* key or reset button underneath space bar, then connect the USB cable.
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).