projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix project generation for ATmega CPU.
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
i2c_stm32.c
diff --git
a/bertos/cpu/cortex-m3/drv/i2c_stm32.c
b/bertos/cpu/cortex-m3/drv/i2c_stm32.c
index 97c491abd0234a006f27a51474230f276d4bf598..9fd53f0128e1ea249ad28101842a9ff4517267aa 100644
(file)
--- 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,
};
.read = i2c_genericRead,
};
-struct I2cHardware i2c_stm32_hw[] =
+st
atic st
ruct I2cHardware i2c_stm32_hw[] =
{
{ /* I2C1 */
.base = (struct stm32_i2c *)I2C1_BASE,
{
{ /* I2C1 */
.base = (struct stm32_i2c *)I2C1_BASE,
@@
-317,8
+317,6
@@
struct I2cHardware i2c_stm32_hw[] =
},
};
},
};
-MOD_DEFINE(i2c);
-
/**
* Initialize I2C module.
*/
/**
* 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;
i2c->hw->base->TRISE |= (CR2_FREQ_36MHZ + 1);
i2c->hw->base->CR1 |= CR1_PE_SET;
-
- MOD_INIT(i2c);
}
}