Fix re-init
This commit is contained in:
committed by
Raphael Coeffic
parent
0b8d93ca88
commit
752b772bb7
@@ -129,6 +129,8 @@ int stm32_i2c_deinit(uint8_t bus)
|
|||||||
if (!h) return -1;
|
if (!h) return -1;
|
||||||
|
|
||||||
if (HAL_I2C_DeInit(h) != HAL_OK) return -1;
|
if (HAL_I2C_DeInit(h) != HAL_OK) return -1;
|
||||||
|
h->Init.ClockSpeed = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user