summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/k7_pro/config.h
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2023-03-02 12:12:18 +0800
committerlokher <lokher@gmail.com>2023-03-02 12:12:18 +0800
commitdd3a745176b002806ac95082115e09e72a033d28 (patch)
tree974f60f160e2cdc65aaf585bafba863dab449d0c /keyboards/keychron/k7_pro/config.h
parent77f3d1738b6c9cba7aa7aae840200317a2bad73e (diff)
Add k7_pro and k10_pro; Update VIA json to match backlit effect list and fix k6_pro iso layout; Fix rtc issue
Diffstat (limited to 'keyboards/keychron/k7_pro/config.h')
-rw-r--r--keyboards/keychron/k7_pro/config.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/keyboards/keychron/k7_pro/config.h b/keyboards/keychron/k7_pro/config.h
new file mode 100644
index 0000000000..4fcdd90a9f
--- /dev/null
+++ b/keyboards/keychron/k7_pro/config.h
@@ -0,0 +1,100 @@
+/* Copyright 2022 @ 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
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 16
+
+/* Key matrix pins */
+#define MATRIX_ROW_PINS \
+ { B4, B3, A15, A14, A13 }
+#define MATRIX_COL_PINS \
+ { C15, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Use SPI to drive 74HC595 shift register */
+#define DRIVE_SHRIFT_REGISTER_WITH_SPI
+
+/* Turn off effects when suspended */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* DIP switch for Mac/win OS switch */
+#define DIP_SWITCH_PINS \
+ { A8 }
+
+/* Caps lock LED Pin */
+#define LED_CAPS_LOCK_PIN A0
+#define LED_PIN_ON_STATE 1
+
+#ifdef KC_BLUETOOTH_ENABLE
+/* Hardware configuration */
+# define USB_BT_MODE_SELECT_PIN A10
+
+# define CKBT51_RESET_PIN A9
+# define CKBT51_INT_INPUT_PIN A5
+# define BLUETOOTH_INT_INPUT_PIN A6
+
+# define USB_POWER_SENSE_PIN B1
+# define USB_POWER_CONNECTED_LEVEL 0
+
+# define BAT_LOW_LED_PIN A4
+# define BAT_LOW_LED_PIN_ON_STATE 1
+
+# define HOST_DEVICES_COUNT 3
+
+# if defined(RGB_MATRIX_ENABLE) || defined(LED_MATRIX_ENABLE)
+
+# define LED_DRIVER_SHUTDOWN_PIN C14
+
+# define HOST_LED_MATRIX_LIST \
+ { 16, 17, 18 }
+
+# define BAT_LEVEL_LED_LIST \
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
+
+/* Backlit disable timeout when keyboard is disconnected(unit: second) */
+# define DISCONNECTED_BACKLIGHT_DISABLE_TIMEOUT 40
+
+/* Backlit disable timeout when keyboard is connected(unit: second) */
+# define CONNECTED_BACKLIGHT_DISABLE_TIMEOUT 600
+# endif
+
+/* Keep USB connection in blueooth mode */
+# define KEEP_USB_CONNECTION_IN_BLUETOOTH_MODE
+
+/* Enable bluetooth NKRO */
+# define BLUETOOTH_NKRO_ENABLE
+
+/* Raw hid command for factory test and bluetooth DFU */
+# define RAW_HID_CMD 0xAA ... 0xAB
+#else
+/* Raw hid command for factory test */
+# define RAW_HID_CMD 0xAB
+#endif
+
+/* Emulated EEPROM configuration */
+#define FEE_DENSITY_BYTES FEE_PAGE_SIZE
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047
+
+//#define NO_PRINT