i need configure i2c driver for STM32F051. I not find i2c example for this MCU. I'm using ChibiOS 2.6.3.
If I use this configuration:
Code: Select all
static const I2CConfig i2cfg1 = {
OPMODE_I2C,
400000,
FAST_DUTY_CYCLE_2,
};so when compiling I get this error:
Code: Select all
main.c:56:5: error: 'OPMODE_I2C' undeclared here (not in a function)
main.c:58:5: error: 'FAST_DUTY_CYCLE_2' undeclared here (not in a function)I modified example project ARMCM0-STM32F051-DISCOVERY.
What is wrong?