stm32: i2c: drop i2c_reset()
It's simply a wrapper around rcc_reset_pulse already.
Just drop it. See 034dbf20ff for the same deletion for timers.
Signed-off-by: Karl Palsson <karlp@tweak.au>
This commit is contained in:
@@ -385,7 +385,6 @@ enum i2c_speeds {
|
|||||||
|
|
||||||
BEGIN_DECLS
|
BEGIN_DECLS
|
||||||
|
|
||||||
void i2c_reset(uint32_t i2c);
|
|
||||||
void i2c_peripheral_enable(uint32_t i2c);
|
void i2c_peripheral_enable(uint32_t i2c);
|
||||||
void i2c_peripheral_disable(uint32_t i2c);
|
void i2c_peripheral_disable(uint32_t i2c);
|
||||||
void i2c_send_start(uint32_t i2c);
|
void i2c_send_start(uint32_t i2c);
|
||||||
|
|||||||
@@ -402,7 +402,6 @@ enum i2c_speeds {
|
|||||||
|
|
||||||
BEGIN_DECLS
|
BEGIN_DECLS
|
||||||
|
|
||||||
void i2c_reset(uint32_t i2c);
|
|
||||||
void i2c_peripheral_enable(uint32_t i2c);
|
void i2c_peripheral_enable(uint32_t i2c);
|
||||||
void i2c_peripheral_disable(uint32_t i2c);
|
void i2c_peripheral_disable(uint32_t i2c);
|
||||||
void i2c_send_start(uint32_t i2c);
|
void i2c_send_start(uint32_t i2c);
|
||||||
|
|||||||
@@ -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.
|
/** @brief I2C Peripheral Enable.
|
||||||
|
|||||||
@@ -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.
|
/** @brief I2C Peripheral Enable.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user