Merge pull request #642 from AndersHoglund/i2c_stretch_fix

Added I2C clock stretching.
This commit is contained in:
Anders Höglund 2016-07-04 10:40:14 +02:00 committed by GitHub
commit f2482ed768
2 changed files with 5 additions and 0 deletions

View File

@ -422,6 +422,9 @@ void i2cInit(I2CDevice device)
I2C_Cmd(i2c->dev, ENABLE);
I2C_Init(i2c->dev, &i2cInit);
I2C_StretchClockCmd(i2c->dev, ENABLE);
// I2C ER Interrupt
nvic.NVIC_IRQChannel = i2c->er_irq;

View File

@ -107,6 +107,8 @@ void i2cInit(I2CDevice device)
I2C_Init(I2Cx, &i2cInit);
I2C_StretchClockCmd(I2Cx, ENABLE);
I2C_Cmd(I2Cx, ENABLE);
}