mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Change I2C output type to OD
I2C OType should be set to OpenDrain (lib/main/STM32F30x_StdPeriph_Driver/src/stm32f30x_i2c.c#L31)
This commit is contained in:
parent
efc31f9d57
commit
1979962029
1 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ void i2cInitPort(I2C_TypeDef *I2Cx)
|
||||||
|
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
|
||||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
|
|
||||||
GPIO_InitStructure.GPIO_Pin = I2C1_SCL_PIN;
|
GPIO_InitStructure.GPIO_Pin = I2C1_SCL_PIN;
|
||||||
|
@ -142,7 +142,7 @@ void i2cInitPort(I2C_TypeDef *I2Cx)
|
||||||
// Init pins
|
// Init pins
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
|
||||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
|
|
||||||
GPIO_InitStructure.GPIO_Pin = I2C2_SCL_PIN;
|
GPIO_InitStructure.GPIO_Pin = I2C2_SCL_PIN;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue