summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/k14_pro/config.h
diff options
context:
space:
mode:
authorlalalademaxiya1 <2831039915@qq.com>2023-10-16 10:57:35 +0800
committerlalalademaxiya1 <2831039915@qq.com>2023-10-16 10:57:35 +0800
commit39503982d15af018f55b536f3d2671ae58e58df3 (patch)
treea5d9f8a9708a4c0fdc9f06dd9b2faf63f49b9cec /keyboards/keychron/k14_pro/config.h
parent156b2cf426f960cf4c6de0818dc5999f5d68903c (diff)
parent00af20f690b66b11c3c00826b5193a306b611ec4 (diff)
Merge branch 'temp' into keychron_k5_pro
Diffstat (limited to 'keyboards/keychron/k14_pro/config.h')
-rwxr-xr-xkeyboards/keychron/k14_pro/config.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/keyboards/keychron/k14_pro/config.h b/keyboards/keychron/k14_pro/config.h
new file mode 100755
index 0000000000..4e35ef4fb8
--- /dev/null
+++ b/keyboards/keychron/k14_pro/config.h
@@ -0,0 +1,89 @@
+/* Copyright 2023 @ 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
+
+/* Turn off effects when suspended */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+
+/* 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
+
+/* Increase I2C speed to 1000 KHz */
+#define I2C1_TIMINGR_PRESC 0U
+#define I2C1_TIMINGR_SCLDEL 3U
+#define I2C1_TIMINGR_SDADEL 0U
+#define I2C1_TIMINGR_SCLH 15U
+#define I2C1_TIMINGR_SCLL 51U
+
+#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 \
+ { 17, 18, 19 }
+
+# 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
+
+/* Factory test keys */
+#define FN_KEY1 MO(4)