summaryrefslogtreecommitdiff
path: root/keyboards/keychron/q2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron/q2')
-rw-r--r--keyboards/keychron/q2/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q2/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q2/ansi/info.json8
-rw-r--r--keyboards/keychron/q2/ansi/rules.mk1
-rw-r--r--keyboards/keychron/q2/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q2/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q2/ansi_encoder/info.json8
-rw-r--r--keyboards/keychron/q2/ansi_encoder/rules.mk1
-rw-r--r--keyboards/keychron/q2/config.h7
-rw-r--r--keyboards/keychron/q2/iso/info.json8
-rw-r--r--keyboards/keychron/q2/iso/iso.c2
-rw-r--r--keyboards/keychron/q2/iso/iso.h19
-rw-r--r--keyboards/keychron/q2/iso/rules.mk1
-rw-r--r--keyboards/keychron/q2/iso_encoder/info.json8
-rw-r--r--keyboards/keychron/q2/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q2/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q2/iso_encoder/rules.mk1
-rw-r--r--keyboards/keychron/q2/jis/info.json8
-rw-r--r--keyboards/keychron/q2/jis/rules.mk1
-rw-r--r--keyboards/keychron/q2/jis_encoder/info.json8
-rw-r--r--keyboards/keychron/q2/jis_encoder/rules.mk1
-rw-r--r--keyboards/keychron/q2/q2.c2
-rw-r--r--keyboards/keychron/q2/q2.h29
23 files changed, 53 insertions, 123 deletions
diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c
index 5c5acb3fd8..28f91269c4 100644
--- a/keyboards/keychron/q2/ansi/ansi.c
+++ b/keyboards/keychron/q2/ansi/ansi.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/ansi/ansi.h b/keyboards/keychron/q2/ansi/ansi.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/ansi/ansi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ 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
- * 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
- * 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/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/ansi/info.json b/keyboards/keychron/q2/ansi/info.json
index 054786185a..10d665e02f 100644
--- a/keyboards/keychron/q2/ansi/info.json
+++ b/keyboards/keychron/q2/ansi/info.json
@@ -8,6 +8,14 @@
"pid": "0x0110",
"device_version": "1.0.0"
},
+ "rgb_matrix": {
+ "driver": "CKLED2001"
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/ansi/rules.mk b/keyboards/keychron/q2/ansi/rules.mk
index 6c675518ee..bc7a0e0ff3 100644
--- a/keyboards/keychron/q2/ansi/rules.mk
+++ b/keyboards/keychron/q2/ansi/rules.mk
@@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = no # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
index c926a5bf75..28f91269c4 100644
--- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ansi_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ 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
- * 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
- * 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/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json
index a2a12dc39c..abb5031073 100644
--- a/keyboards/keychron/q2/ansi_encoder/info.json
+++ b/keyboards/keychron/q2/ansi_encoder/info.json
@@ -8,6 +8,14 @@
"pid": "0x0111",
"device_version": "1.0.0"
},
+ "rgb_matrix": {
+ "driver": "CKLED2001"
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/q2/ansi_encoder/rules.mk b/keyboards/keychron/q2/ansi_encoder/rules.mk
index 0e909ff6f8..3de172c6e3 100644
--- a/keyboards/keychron/q2/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q2/ansi_encoder/rules.mk
@@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h
index e421906a68..63e31cd01d 100644
--- a/keyboards/keychron/q2/config.h
+++ b/keyboards/keychron/q2/config.h
@@ -16,18 +16,11 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 }
-
#define MATRIX_UNSELECT_DRIVE_HIGH
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110111
diff --git a/keyboards/keychron/q2/iso/info.json b/keyboards/keychron/q2/iso/info.json
index e295fcef18..a29db71cca 100644
--- a/keyboards/keychron/q2/iso/info.json
+++ b/keyboards/keychron/q2/iso/info.json
@@ -8,6 +8,14 @@
"pid": "0x0112",
"device_version": "1.0.0"
},
+ "rgb_matrix": {
+ "driver": "CKLED2001"
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/iso/iso.c b/keyboards/keychron/q2/iso/iso.c
index 7f8d388b0e..1f2c76468e 100644
--- a/keyboards/keychron/q2/iso/iso.c
+++ b/keyboards/keychron/q2/iso/iso.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/iso/iso.h b/keyboards/keychron/q2/iso/iso.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/iso/iso.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ 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
- * 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
- * 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/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/iso/rules.mk b/keyboards/keychron/q2/iso/rules.mk
index 57b7516f4c..f4aca09af8 100644
--- a/keyboards/keychron/q2/iso/rules.mk
+++ b/keyboards/keychron/q2/iso/rules.mk
@@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = no # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json
index 028522c259..6c77c3ad5a 100644
--- a/keyboards/keychron/q2/iso_encoder/info.json
+++ b/keyboards/keychron/q2/iso_encoder/info.json
@@ -8,6 +8,14 @@
"pid": "0x0113",
"device_version": "1.0.0"
},
+ "rgb_matrix": {
+ "driver": "CKLED2001"
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
index af7b818149..1f2c76468e 100644
--- a/keyboards/keychron/q2/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "iso_encoder.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.h b/keyboards/keychron/q2/iso_encoder/iso_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q2/iso_encoder/iso_encoder.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright 2021 @ 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
- * 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
- * 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/>.
- */
-
-#pragma once
-
-#include "quantum.h"
diff --git a/keyboards/keychron/q2/iso_encoder/rules.mk b/keyboards/keychron/q2/iso_encoder/rules.mk
index 987db28ad5..33a50c67f7 100644
--- a/keyboards/keychron/q2/iso_encoder/rules.mk
+++ b/keyboards/keychron/q2/iso_encoder/rules.mk
@@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/keychron/q2/jis/info.json b/keyboards/keychron/q2/jis/info.json
index d41bf49cb2..b43e1bd979 100644
--- a/keyboards/keychron/q2/jis/info.json
+++ b/keyboards/keychron/q2/jis/info.json
@@ -8,6 +8,14 @@
"pid": "0x0114",
"device_version": "1.0.0"
},
+ "rgb_matrix": {
+ "driver": "CKLED2001"
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
diff --git a/keyboards/keychron/q2/jis/rules.mk b/keyboards/keychron/q2/jis/rules.mk
index 345807d824..2b4a67b1ee 100644
--- a/keyboards/keychron/q2/jis/rules.mk
+++ b/keyboards/keychron/q2/jis/rules.mk
@@ -12,7 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/keychron/q2/jis_encoder/info.json b/keyboards/keychron/q2/jis_encoder/info.json
index 18e800703b..09b4ec66a3 100644
--- a/keyboards/keychron/q2/jis_encoder/info.json
+++ b/keyboards/keychron/q2/jis_encoder/info.json
@@ -8,6 +8,14 @@
"pid": "0x0115",
"device_version": "1.0.0"
},
+ "rgb_matrix": {
+ "driver": "CKLED2001"
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
diff --git a/keyboards/keychron/q2/jis_encoder/rules.mk b/keyboards/keychron/q2/jis_encoder/rules.mk
index 5240004b8c..6a772965ff 100644
--- a/keyboards/keychron/q2/jis_encoder/rules.mk
+++ b/keyboards/keychron/q2/jis_encoder/rules.mk
@@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/keychron/q2/q2.c b/keyboards/keychron/q2/q2.c
index 13b2238d17..7ff85556de 100644
--- a/keyboards/keychron/q2/q2.c
+++ b/keyboards/keychron/q2/q2.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q2.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b1111111111111111,
diff --git a/keyboards/keychron/q2/q2.h b/keyboards/keychron/q2/q2.h
deleted file mode 100644
index a256ceae6a..0000000000
--- a/keyboards/keychron/q2/q2.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2021 @ 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
- * 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
- * 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/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#if defined(KEYBOARD_keychron_q2_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q2_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q2_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q2_iso_encoder)
-# include "iso_encoder.h"
-#endif