Skip to content
Snippets Groups Projects
Commit 596f8c51 authored by Alexandre Abadie's avatar Alexandre Abadie Committed by GitHub
Browse files

Merge pull request #6189 from bergzand/stm32f401-i2c

cpu/stm32f4: Add I2C low speed support to the stm32f4
parents 2c02520f 3ec401da
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment