From 14f6455b95aaa5692454832732c4035f0f878dfa Mon Sep 17 00:00:00 2001 From: timdechant Date: Wed, 9 Apr 2025 06:39:47 -0400 Subject: [PATCH] i2c: disable fastmode at compile --- src/omv/ports/stm32/omv_i2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/omv/ports/stm32/omv_i2c.c b/src/omv/ports/stm32/omv_i2c.c index 31494599e..1aa3584a8 100644 --- a/src/omv/ports/stm32/omv_i2c.c +++ b/src/omv/ports/stm32/omv_i2c.c @@ -184,6 +184,7 @@ int omv_i2c_init(omv_i2c_t *i2c, uint32_t bus_id, uint32_t speed) { return -1; } + #if !defined(OMV_I2C_DISABLE_FASTMODE) if (speed == OMV_I2C_SPEED_FAST) { // Enable FAST mode plus. switch (bus_id) { @@ -209,6 +210,7 @@ int omv_i2c_init(omv_i2c_t *i2c, uint32_t bus_id, uint32_t speed) { #endif } } + #endif i2c->initialized = true; return 0;