summaryrefslogtreecommitdiff
path: root/keyboards/handwired/onekey
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-07-25 22:50:56 +0100
committerGitHub <noreply@github.com>2020-07-26 07:50:56 +1000
commitd91987ab9adbf7bba9f47deb6b30a02d28e7195d (patch)
tree6356f4f6c167dd2b50dec84a5124418cb9d649fc /keyboards/handwired/onekey
parentdb540e2832b0d3bed6ae2ca3a2c893d9c79a7f5d (diff)
downloadqmk_firmware-d91987ab9adbf7bba9f47deb6b30a02d28e7195d.tar.gz
qmk_firmware-d91987ab9adbf7bba9f47deb6b30a02d28e7195d.zip
Enable OLED support for Teensy 3.2/LC (#7591)
* I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode
Diffstat (limited to 'keyboards/handwired/onekey')
-rw-r--r--keyboards/handwired/onekey/teensy_32/config.h6
-rw-r--r--keyboards/handwired/onekey/teensy_32/halconf.h2
-rw-r--r--keyboards/handwired/onekey/teensy_32/mcuconf.h6
-rw-r--r--keyboards/handwired/onekey/teensy_lc/config.h6
-rw-r--r--keyboards/handwired/onekey/teensy_lc/halconf.h2
-rw-r--r--keyboards/handwired/onekey/teensy_lc/mcuconf.h6
6 files changed, 26 insertions, 2 deletions
diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h
index 0d82a05786..a4839135a0 100644
--- a/keyboards/handwired/onekey/teensy_32/config.h
+++ b/keyboards/handwired/onekey/teensy_32/config.h
@@ -22,3 +22,9 @@
#define MATRIX_COL_PINS { D5 }
#define MATRIX_ROW_PINS { B2 }
#define UNUSED_PINS
+
+// i2c_master defines
+#define I2C1_SCL 0 // A2 on pinout = B0
+#define I2C1_SDA 1 // A3 on pinout = B1
+#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
diff --git a/keyboards/handwired/onekey/teensy_32/halconf.h b/keyboards/handwired/onekey/teensy_32/halconf.h
index 16f32117d5..de0f29ce6e 100644
--- a/keyboards/handwired/onekey/teensy_32/halconf.h
+++ b/keyboards/handwired/onekey/teensy_32/halconf.h
@@ -79,7 +79,7 @@
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C TRUE
#endif
/**
diff --git a/keyboards/handwired/onekey/teensy_32/mcuconf.h b/keyboards/handwired/onekey/teensy_32/mcuconf.h
index 13a9e3333f..327f5c9aa3 100644
--- a/keyboards/handwired/onekey/teensy_32/mcuconf.h
+++ b/keyboards/handwired/onekey/teensy_32/mcuconf.h
@@ -42,4 +42,10 @@
* 5 for Teensy 3.x */
#define KINETIS_USB_USB0_IRQ_PRIORITY 5
+/*
+ * I2C driver settings
+ */
+#define KINETIS_I2C_USE_I2C0 TRUE
+#define KINETIS_I2C_I2C0_PRIORITY 4
+
#endif /* _MCUCONF_H_ */
diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h
index 0d82a05786..a4839135a0 100644
--- a/keyboards/handwired/onekey/teensy_lc/config.h
+++ b/keyboards/handwired/onekey/teensy_lc/config.h
@@ -22,3 +22,9 @@
#define MATRIX_COL_PINS { D5 }
#define MATRIX_ROW_PINS { B2 }
#define UNUSED_PINS
+
+// i2c_master defines
+#define I2C1_SCL 0 // A2 on pinout = B0
+#define I2C1_SDA 1 // A3 on pinout = B1
+#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
diff --git a/keyboards/handwired/onekey/teensy_lc/halconf.h b/keyboards/handwired/onekey/teensy_lc/halconf.h
index 16f32117d5..de0f29ce6e 100644
--- a/keyboards/handwired/onekey/teensy_lc/halconf.h
+++ b/keyboards/handwired/onekey/teensy_lc/halconf.h
@@ -79,7 +79,7 @@
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C TRUE
#endif
/**
diff --git a/keyboards/handwired/onekey/teensy_lc/mcuconf.h b/keyboards/handwired/onekey/teensy_lc/mcuconf.h
index ea576df5bc..f73bec3dc3 100644
--- a/keyboards/handwired/onekey/teensy_lc/mcuconf.h
+++ b/keyboards/handwired/onekey/teensy_lc/mcuconf.h
@@ -42,4 +42,10 @@
* 5 for Teensy 3.x */
#define KINETIS_USB_USB0_IRQ_PRIORITY 2
+/*
+ * I2C driver settings
+ */
+#define KINETIS_I2C_USE_I2C0 TRUE
+#define KINETIS_I2C_I2C0_PRIORITY 4
+
#endif /* _MCUCONF_H_ */