summaryrefslogtreecommitdiff
path: root/keyboards/cannonkeys/satisfaction75/config.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-04-19 13:08:01 +1000
committerGitHub <noreply@github.com>2021-04-19 13:08:01 +1000
commita0089aa34519ec4fcf7cee6a352424e4b7cba7da (patch)
treecf33fef21d6302e72da5c5cff3d9d42d106634da /keyboards/cannonkeys/satisfaction75/config.h
parenteb7e668eb908de9d41ab9d088effb8adedf520b5 (diff)
Fixup Satisfaction75 bootprocess. (#12621)
- Use normal ChibiOS I2C driver. - Move drawing code to housekeeping -- previously it was during matrix scan, which gets executed during bootmagic checks. However, bootmagic is invoked before QWIIC subsystem is enabled, which means I2C isn't configured yet. All I2C calls to the OLED fail with timeouts while bootmagic is being checked. Housekeeping ensures this is executed once the system has initialised and settled. - QWIIC OLED driver: properly clear out OLED buffer when clearing screen.
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75/config.h')
-rw-r--r--keyboards/cannonkeys/satisfaction75/config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h
index dfb624a0d7..e100cc99b1 100644
--- a/keyboards/cannonkeys/satisfaction75/config.h
+++ b/keyboards/cannonkeys/satisfaction75/config.h
@@ -51,6 +51,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
+// I2C config
+#define I2C_DRIVER I2CD1
+#define I2C1_SCL_BANK GPIOB
+#define I2C1_SCL 6
+#define I2C1_SDA 7
+#define I2C1_SCL_PAL_MODE 1
+#define I2C1_SDA_PAL_MODE 1
+#define I2C1_TIMINGR_PRESC 0x00U
+#define I2C1_TIMINGR_SCLDEL 0x03U
+#define I2C1_TIMINGR_SDADEL 0x01U
+#define I2C1_TIMINGR_SCLH 0x03U
+#define I2C1_TIMINGR_SCLL 0x09U
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5