i2c: disable fastmode at compile

This commit is contained in:
timdechant 2025-04-09 06:39:47 -04:00
parent 22cbc5d6bb
commit 14f6455b95

View File

@ -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;