mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Fix I2C init/deinit
This commit is contained in:
parent
b621643763
commit
99657a2207
@ -22,6 +22,8 @@ void SCCB_Init()
|
||||
I2CHandle.Init.OwnAddress1 = 0xFE;
|
||||
I2CHandle.Init.OwnAddress2 = 0xFE;
|
||||
|
||||
HAL_I2C_DeInit(&I2CHandle);
|
||||
|
||||
if (HAL_I2C_Init(&I2CHandle) != HAL_OK) {
|
||||
/* Initialization Error */
|
||||
BREAK();
|
||||
|
||||
@ -143,7 +143,6 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c)
|
||||
void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c)
|
||||
{
|
||||
if (hi2c->Instance == SCCB_I2C) {
|
||||
HAL_I2C_DeInit(hi2c);
|
||||
SCCB_CLK_DISABLE();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user