mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
i2c: disable fastmode at compile
This commit is contained in:
parent
22cbc5d6bb
commit
14f6455b95
@ -184,6 +184,7 @@ int omv_i2c_init(omv_i2c_t *i2c, uint32_t bus_id, uint32_t speed) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(OMV_I2C_DISABLE_FASTMODE)
|
||||||
if (speed == OMV_I2C_SPEED_FAST) {
|
if (speed == OMV_I2C_SPEED_FAST) {
|
||||||
// Enable FAST mode plus.
|
// Enable FAST mode plus.
|
||||||
switch (bus_id) {
|
switch (bus_id) {
|
||||||
@ -209,6 +210,7 @@ int omv_i2c_init(omv_i2c_t *i2c, uint32_t bus_id, uint32_t speed) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
i2c->initialized = true;
|
i2c->initialized = true;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user