Merge pull request #642 from AndersHoglund/i2c_stretch_fix
Added I2C clock stretching.
This commit is contained in:
commit
f2482ed768
|
@ -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;
|
||||
|
|
|
@ -107,6 +107,8 @@ void i2cInit(I2CDevice device)
|
|||
|
||||
I2C_Init(I2Cx, &i2cInit);
|
||||
|
||||
I2C_StretchClockCmd(I2Cx, ENABLE);
|
||||
|
||||
I2C_Cmd(I2Cx, ENABLE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue