X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fi2c_lm3s.c;h=fd2f5905d4abe74a1ab802feda478b0806f35012;hb=8016ea0a758a96d75ee7d64c773990b38d94fa8e;hp=af3f6a8a9d516cd48b46c28b293e19ea032db9be;hpb=f062d0cd413c738978ac8781da89a12301615754;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/i2c_lm3s.c b/bertos/cpu/cortex-m3/drv/i2c_lm3s.c index af3f6a8a..fd2f5905 100644 --- a/bertos/cpu/cortex-m3/drv/i2c_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/i2c_lm3s.c @@ -32,6 +32,8 @@ * * \brief Driver for the LM3S I2C (implementation) * + * \author Daniele Basile + * */ #include "cfg/cfg_i2c.h" @@ -43,7 +45,6 @@ #include #include // BV() -#include #include #include @@ -195,8 +196,6 @@ static uint8_t i2c_lm3s_getc(I2c *i2c) return data; } -MOD_DEFINE(i2c); - static const I2cVT i2c_lm3s_vt = { .start = i2c_lm3s_start, @@ -206,7 +205,7 @@ static const I2cVT i2c_lm3s_vt = .read = i2c_genericRead, }; -struct I2cHardware i2c_lm3s_hw[] = +static struct I2cHardware i2c_lm3s_hw[] = { { /* I2C0 */ .base = I2C0_MASTER_BASE, @@ -254,6 +253,4 @@ void i2c_hw_init(I2c *i2c, int dev, uint32_t clock) * to the desired clock, never greater. */ HWREG(i2c->hw->base + I2C_O_MTPR) = ((CPU_FREQ + (2 * 10 * clock) - 1) / (2 * 10 * clock)) - 1; - - MOD_INIT(i2c); }