summaryrefslogtreecommitdiff
path: root/keyboards/keychron/q8
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron/q8')
-rw-r--r--keyboards/keychron/q8/ansi/ansi.h19
-rw-r--r--keyboards/keychron/q8/ansi/info.json8
-rw-r--r--keyboards/keychron/q8/ansi/rules.mk1
-rw-r--r--keyboards/keychron/q8/ansi_encoder/ansi_encoder.h19
-rw-r--r--keyboards/keychron/q8/ansi_encoder/info.json8
-rw-r--r--keyboards/keychron/q8/ansi_encoder/keymaps/default/keymap.c2
-rw-r--r--keyboards/keychron/q8/ansi_encoder/keymaps/keychron/keymap.c2
-rw-r--r--keyboards/keychron/q8/ansi_encoder/keymaps/via/keymap.c2
-rw-r--r--keyboards/keychron/q8/ansi_encoder/rules.mk1
-rw-r--r--keyboards/keychron/q8/config.h9
-rw-r--r--keyboards/keychron/q8/iso/info.json8
-rw-r--r--keyboards/keychron/q8/iso/iso.h19
-rw-r--r--keyboards/keychron/q8/iso/rules.mk1
-rw-r--r--keyboards/keychron/q8/iso_encoder/info.json8
-rw-r--r--keyboards/keychron/q8/iso_encoder/iso_encoder.h19
-rw-r--r--keyboards/keychron/q8/iso_encoder/keymaps/default/keymap.c2
-rw-r--r--keyboards/keychron/q8/iso_encoder/keymaps/keychron/keymap.c2
-rw-r--r--keyboards/keychron/q8/iso_encoder/keymaps/via/keymap.c2
-rw-r--r--keyboards/keychron/q8/iso_encoder/rules.mk1
-rw-r--r--keyboards/keychron/q8/q8.c2
-rw-r--r--keyboards/keychron/q8/q8.h29
21 files changed, 39 insertions, 125 deletions
diff --git a/keyboards/keychron/q8/ansi/ansi.h b/keyboards/keychron/q8/ansi/ansi.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/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/q8/ansi/info.json b/keyboards/keychron/q8/ansi/info.json
index b80cb42432..194b7ee983 100644
--- a/keyboards/keychron/q8/ansi/info.json
+++ b/keyboards/keychron/q8/ansi/info.json
@@ -8,6 +8,14 @@
"pid": "0x0180",
"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/q8/ansi/rules.mk b/keyboards/keychron/q8/ansi/rules.mk
index 345807d824..2b4a67b1ee 100644
--- a/keyboards/keychron/q8/ansi/rules.mk
+++ b/keyboards/keychron/q8/ansi/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/q8/ansi_encoder/ansi_encoder.h b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/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/q8/ansi_encoder/info.json b/keyboards/keychron/q8/ansi_encoder/info.json
index b75a878198..09d3c183e2 100644
--- a/keyboards/keychron/q8/ansi_encoder/info.json
+++ b/keyboards/keychron/q8/ansi_encoder/info.json
@@ -8,6 +8,14 @@
"pid": "0x0181",
"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": "B5", "pin_b": "A10"}
diff --git a/keyboards/keychron/q8/ansi_encoder/keymaps/default/keymap.c b/keyboards/keychron/q8/ansi_encoder/keymaps/default/keymap.c
index 248ea1fe4a..a86ae6d8cf 100644
--- a/keyboards/keychron/q8/ansi_encoder/keymaps/default/keymap.c
+++ b/keyboards/keychron/q8/ansi_encoder/keymaps/default/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
diff --git a/keyboards/keychron/q8/ansi_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q8/ansi_encoder/keymaps/keychron/keymap.c
index 1ece0b6de7..bb5c406046 100644
--- a/keyboards/keychron/q8/ansi_encoder/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q8/ansi_encoder/keymaps/keychron/keymap.c
@@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
diff --git a/keyboards/keychron/q8/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q8/ansi_encoder/keymaps/via/keymap.c
index 248ea1fe4a..a86ae6d8cf 100644
--- a/keyboards/keychron/q8/ansi_encoder/keymaps/via/keymap.c
+++ b/keyboards/keychron/q8/ansi_encoder/keymaps/via/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
diff --git a/keyboards/keychron/q8/ansi_encoder/rules.mk b/keyboards/keychron/q8/ansi_encoder/rules.mk
index d0d74a11b5..e94a89ab85 100644
--- a/keyboards/keychron/q8/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q8/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/q8/config.h b/keyboards/keychron/q8/config.h
index 017f463d84..e0f6c673a5 100644
--- a/keyboards/keychron/q8/config.h
+++ b/keyboards/keychron/q8/config.h
@@ -16,15 +16,6 @@
#pragma once
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* 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 }
-
/* If PH3 used with a stronger pull resistor then the following definition needs be included */
// #define MATRIX_UNSELECT_DRIVE_HIGH
diff --git a/keyboards/keychron/q8/iso/info.json b/keyboards/keychron/q8/iso/info.json
index c5a5b7653e..3502848441 100644
--- a/keyboards/keychron/q8/iso/info.json
+++ b/keyboards/keychron/q8/iso/info.json
@@ -8,6 +8,14 @@
"pid": "0x0182",
"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/q8/iso/iso.h b/keyboards/keychron/q8/iso/iso.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/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/q8/iso/rules.mk b/keyboards/keychron/q8/iso/rules.mk
index 345807d824..2b4a67b1ee 100644
--- a/keyboards/keychron/q8/iso/rules.mk
+++ b/keyboards/keychron/q8/iso/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/q8/iso_encoder/info.json b/keyboards/keychron/q8/iso_encoder/info.json
index 45181452be..721ab371f0 100644
--- a/keyboards/keychron/q8/iso_encoder/info.json
+++ b/keyboards/keychron/q8/iso_encoder/info.json
@@ -8,6 +8,14 @@
"pid": "0x0183",
"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": "B5", "pin_b": "A10"}
diff --git a/keyboards/keychron/q8/iso_encoder/iso_encoder.h b/keyboards/keychron/q8/iso_encoder/iso_encoder.h
deleted file mode 100644
index db52563dc4..0000000000
--- a/keyboards/keychron/q8/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/q8/iso_encoder/keymaps/default/keymap.c b/keyboards/keychron/q8/iso_encoder/keymaps/default/keymap.c
index a779fdc130..7db63d4118 100644
--- a/keyboards/keychron/q8/iso_encoder/keymaps/default/keymap.c
+++ b/keyboards/keychron/q8/iso_encoder/keymaps/default/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
diff --git a/keyboards/keychron/q8/iso_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q8/iso_encoder/keymaps/keychron/keymap.c
index 4884aeaeae..b3abda2975 100644
--- a/keyboards/keychron/q8/iso_encoder/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q8/iso_encoder/keymaps/keychron/keymap.c
@@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
diff --git a/keyboards/keychron/q8/iso_encoder/keymaps/via/keymap.c b/keyboards/keychron/q8/iso_encoder/keymaps/via/keymap.c
index da409a551d..8b66a40c6b 100644
--- a/keyboards/keychron/q8/iso_encoder/keymaps/via/keymap.c
+++ b/keyboards/keychron/q8/iso_encoder/keymaps/via/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
[_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
diff --git a/keyboards/keychron/q8/iso_encoder/rules.mk b/keyboards/keychron/q8/iso_encoder/rules.mk
index 5240004b8c..6a772965ff 100644
--- a/keyboards/keychron/q8/iso_encoder/rules.mk
+++ b/keyboards/keychron/q8/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/q8/q8.c b/keyboards/keychron/q8/q8.c
index d86ced3d1b..a653bdc8b9 100644
--- a/keyboards/keychron/q8/q8.c
+++ b/keyboards/keychron/q8/q8.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "q8.h"
+#include "quantum.h"
const matrix_row_t matrix_mask[] = {
0b111111111111111,
diff --git a/keyboards/keychron/q8/q8.h b/keyboards/keychron/q8/q8.h
deleted file mode 100644
index 02981db19c..0000000000
--- a/keyboards/keychron/q8/q8.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_q8_ansi)
-# include "ansi.h"
-#elif defined(KEYBOARD_keychron_q8_ansi_encoder)
-# include "ansi_encoder.h"
-#elif defined(KEYBOARD_keychron_q8_iso)
-# include "iso.h"
-#elif defined(KEYBOARD_keychron_q8_iso_encoder)
-# include "iso_encoder.h"
-#endif