diff --git a/include/libopencm3/stm32/common/i2c_common_v1.h b/include/libopencm3/stm32/common/i2c_common_v1.h index 8e62324b..5d37a7c2 100644 --- a/include/libopencm3/stm32/common/i2c_common_v1.h +++ b/include/libopencm3/stm32/common/i2c_common_v1.h @@ -385,7 +385,6 @@ enum i2c_speeds { BEGIN_DECLS -void i2c_reset(uint32_t i2c); void i2c_peripheral_enable(uint32_t i2c); void i2c_peripheral_disable(uint32_t i2c); void i2c_send_start(uint32_t i2c); diff --git a/include/libopencm3/stm32/common/i2c_common_v2.h b/include/libopencm3/stm32/common/i2c_common_v2.h index 316d0f1e..725ccf64 100644 --- a/include/libopencm3/stm32/common/i2c_common_v2.h +++ b/include/libopencm3/stm32/common/i2c_common_v2.h @@ -402,7 +402,6 @@ enum i2c_speeds { BEGIN_DECLS -void i2c_reset(uint32_t i2c); void i2c_peripheral_enable(uint32_t i2c); void i2c_peripheral_disable(uint32_t i2c); void i2c_send_start(uint32_t i2c); diff --git a/lib/stm32/common/i2c_common_v1.c b/lib/stm32/common/i2c_common_v1.c index 59f75886..ea3db68e 100644 --- a/lib/stm32/common/i2c_common_v1.c +++ b/lib/stm32/common/i2c_common_v1.c @@ -41,40 +41,6 @@ register access, Error conditions /**@{*/ -/*---------------------------------------------------------------------------*/ -/** @brief I2C Reset. - -The I2C peripheral and all its associated configuration registers are placed in -the reset condition. The reset is effected via the RCC peripheral reset system. - -@param[in] i2c Unsigned int32. I2C peripheral identifier @ref i2c_reg_base. -*/ - -void i2c_reset(uint32_t i2c) -{ - switch (i2c) { - case I2C1: - rcc_periph_reset_pulse(RST_I2C1); - break; -#if defined(I2C2_BASE) - case I2C2: - rcc_periph_reset_pulse(RST_I2C2); - break; -#endif -#if defined(I2C3_BASE) - case I2C3: - rcc_periph_reset_pulse(RST_I2C3); - break; -#endif -#if defined(I2C4_BASE) - case I2C4: - rcc_periph_reset_pulse(RST_I2C4); - break; -#endif - default: - break; - } -} /*---------------------------------------------------------------------------*/ /** @brief I2C Peripheral Enable. diff --git a/lib/stm32/common/i2c_common_v2.c b/lib/stm32/common/i2c_common_v2.c index 426219c6..301c9d55 100644 --- a/lib/stm32/common/i2c_common_v2.c +++ b/lib/stm32/common/i2c_common_v2.c @@ -24,42 +24,6 @@ /**@{*/ -/*---------------------------------------------------------------------------*/ -/** @brief I2C Reset. - * - * The I2C peripheral and all its associated configuration registers are placed - * in the reset condition. The reset is effected via the RCC peripheral reset - * system. - * - * @param[in] i2c Unsigned int32. I2C peripheral identifier @ref i2c_reg_base. - */ - -void i2c_reset(uint32_t i2c) -{ - switch (i2c) { - case I2C1: - rcc_periph_reset_pulse(RST_I2C1); - break; -#if defined(I2C2_BASE) - case I2C2: - rcc_periph_reset_pulse(RST_I2C2); - break; -#endif -#if defined(I2C3_BASE) - case I2C3: - rcc_periph_reset_pulse(RST_I2C3); - break; -#endif -#if defined(I2C4_BASE) - case I2C4: - rcc_periph_reset_pulse(RST_I2C4); - break; -#endif - default: - break; - } -} - /*---------------------------------------------------------------------------*/ /** @brief I2C Peripheral Enable. *