From 7d734b52bde6f554ad34e4864a78b2a7a17bb582 Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Mon, 27 Aug 2018 07:39:29 -0600 Subject: [PATCH] arch/arm/src/stm32/stm32f30xxx_i2c.c: Fix compile error with I2C reset --- arch/arm/src/stm32/stm32f30xxx_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/stm32/stm32f30xxx_i2c.c b/arch/arm/src/stm32/stm32f30xxx_i2c.c index 31210bfc6e..12ee98998a 100644 --- a/arch/arm/src/stm32/stm32f30xxx_i2c.c +++ b/arch/arm/src/stm32/stm32f30xxx_i2c.c @@ -135,7 +135,7 @@ #endif #define I2C_OUTPUT \ - (GPIO_OUTPUT | GPIO_OUTPUT_SET | GPIO_CNF_OUTOD | GPIO_MODE_50MHz) + (GPIO_OUTPUT | GPIO_OUTPUT_SET | GPIO_OPENDRAIN | GPIO_SPEED_50MHz) #define MKI2C_OUTPUT(p) \ (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) @@ -602,7 +602,6 @@ static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv) { struct timespec abstime; irqstate_t flags; - uint32_t regval; int ret; flags = enter_critical_section(); @@ -1797,6 +1796,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s #ifdef CONFIG_I2C_RESET static int stm32_i2c_reset(FAR struct i2c_master_s * dev) { + FAR struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev; unsigned int clock_count; unsigned int stretch_count; uint32_t scl_gpio;