sam3 port: add serial module.
[bertos.git] / bertos / cpu / cortex-m3 / drv / i2c_stm32.c
index 97c491abd0234a006f27a51474230f276d4bf598..9fd53f0128e1ea249ad28101842a9ff4517267aa 100644 (file)
@@ -303,7 +303,7 @@ static const I2cVT i2c_stm32_vt =
        .read = i2c_genericRead,
 };
 
-struct I2cHardware i2c_stm32_hw[] =
+static struct I2cHardware i2c_stm32_hw[] =
 {
        { /* I2C1 */
                .base = (struct stm32_i2c *)I2C1_BASE,
@@ -317,8 +317,6 @@ struct I2cHardware i2c_stm32_hw[] =
        },
 };
 
-MOD_DEFINE(i2c);
-
 /**
  * Initialize I2C module.
  */
@@ -352,6 +350,4 @@ void i2c_hw_init(I2c *i2c, int dev, uint32_t clock)
        i2c->hw->base->TRISE |= (CR2_FREQ_36MHZ + 1);
 
        i2c->hw->base->CR1 |= CR1_PE_SET;
-
-       MOD_INIT(i2c);
 }