summaryrefslogtreecommitdiff
path: root/keyboards/keychron/s1/config.h
diff options
context:
space:
mode:
authorlalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com>2022-12-20 14:44:23 +0800
committerGitHub <noreply@github.com>2022-12-20 17:44:23 +1100
commit8560280afe1d559aba58ab1a2e6f1f8fda9e4e46 (patch)
tree2ac6be8b7d7aa936fd8e4a75a5c3ab8a21052616 /keyboards/keychron/s1/config.h
parent8d43f20624d12f16cc1f64ce36d6735caa944362 (diff)
Add Keychron S1 (#19378)
Diffstat (limited to 'keyboards/keychron/s1/config.h')
-rw-r--r--keyboards/keychron/s1/config.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/keyboards/keychron/s1/config.h b/keyboards/keychron/s1/config.h
new file mode 100644
index 0000000000..dc958daacb
--- /dev/null
+++ b/keyboards/keychron/s1/config.h
@@ -0,0 +1,46 @@
+/* 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 pins */
+#define MATRIX_ROW_PINS \
+ { B5, B4, B3, A15, A14, A13 }
+#define MATRIX_COL_PINS \
+ { A10, A9, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* Disable DIP switch in matrix data */
+#define MATRIX_MASKED
+
+/* DIP switch */
+#define DIP_SWITCH_MATRIX_GRID { {5,4} }
+
+/* EEPROM Driver Configuration */
+#define WEAR_LEVELING_LOGICAL_SIZE 2048
+#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
+
+/* 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