1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #6189 from bergzand/stm32f401-i2c

cpu/stm32f4: Add I2C low speed support to the stm32f4
This commit is contained in:
Alexandre Abadie 2016-12-16 14:30:44 +01:00 committed by GitHub
commit 596f8c516b

View File

@ -73,7 +73,13 @@ int i2c_init_master(i2c_t dev, i2c_speed_t speed)
/* read speed configuration */
switch (speed) {
case I2C_SPEED_LOW:
/* 10Kbit/s */
ccr = I2C_APBCLK / 20000;
break;
case I2C_SPEED_NORMAL:
/* 100Kbit/s */
ccr = I2C_APBCLK / 200000;
break;