Fix I2C init/deinit

This commit is contained in:
iabdalkader 2014-08-31 14:13:29 +02:00
parent b621643763
commit 99657a2207
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -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();
}
}