summaryrefslogtreecommitdiff
path: root/ucoo/hal/i2c/i2c_hard.stm32.cc
diff options
context:
space:
mode:
authorNicolas Schodet2015-04-20 16:31:13 +0200
committerNicolas Schodet2019-10-07 00:44:50 +0200
commit2b6317815bf86c80047c5d3b42602f81b8c21d01 (patch)
tree1dff127e53988fc781357400a024a8de853b9a7f /ucoo/hal/i2c/i2c_hard.stm32.cc
parent9901e49f990b7e1ab9646295999fc5544e388f1d (diff)
Update to new libopencm3 version
- remove f4/ from include directory - rename some SysTick registers - rename APB freq variables
Diffstat (limited to 'ucoo/hal/i2c/i2c_hard.stm32.cc')
-rw-r--r--ucoo/hal/i2c/i2c_hard.stm32.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ucoo/hal/i2c/i2c_hard.stm32.cc b/ucoo/hal/i2c/i2c_hard.stm32.cc
index 8122d15..a9e8f00 100644
--- a/ucoo/hal/i2c/i2c_hard.stm32.cc
+++ b/ucoo/hal/i2c/i2c_hard.stm32.cc
@@ -24,7 +24,7 @@
#include "i2c_hard.stm32.hh"
#include <libopencm3/stm32/i2c.h>
-#include <libopencm3/stm32/f4/rcc.h>
+#include <libopencm3/stm32/rcc.h>
#include <libopencm3/cm3/nvic.h>
#include "ucoo/utils/trace.hh"
@@ -105,7 +105,7 @@ I2cHard::enable (int speed)
// TODO: make sure the bus is free!!! How!
I2C_CR1 (base) = 0;
// Compute clock parameters.
- int pclk = rcc_ppre1_frequency;
+ int pclk = rcc_apb1_frequency;
int pclk_mhz = pclk / 1000000;
uint16_t ccr, tris;
if (speed <= 100000)