X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fi2c_stm32.c;h=9fd53f0128e1ea249ad28101842a9ff4517267aa;hb=8e6b1e394127c3e1635dffd1aa424b4971ef8a4f;hp=97c491abd0234a006f27a51474230f276d4bf598;hpb=f062d0cd413c738978ac8781da89a12301615754;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/i2c_stm32.c b/bertos/cpu/cortex-m3/drv/i2c_stm32.c index 97c491ab..9fd53f01 100644 --- a/bertos/cpu/cortex-m3/drv/i2c_stm32.c +++ b/bertos/cpu/cortex-m3/drv/i2c_stm32.c @@ -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); }