mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Initialize all I2C handle unused fields.
This commit is contained in:
parent
69cb030c44
commit
315c8a1703
@ -33,6 +33,9 @@ int cambus_init(I2C_HandleTypeDef *i2c, I2C_TypeDef *instance, uint32_t timing)
|
||||
i2c->Init.NoStretchMode = I2C_NOSTRETCH_DISABLED;
|
||||
i2c->Init.OwnAddress1 = 0xFE;
|
||||
i2c->Init.OwnAddress2 = 0xFE;
|
||||
#if !defined(STM32F4)
|
||||
i2c->Init.OwnAddress2Masks = 0;
|
||||
#endif
|
||||
|
||||
HAL_I2C_DeInit(i2c);
|
||||
if (HAL_I2C_Init(i2c) != HAL_OK) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user