I am trying to create a very simple i2c test program to run on my STM32L0 (discovery kit). I have modified the miniblink program in libopencm3-examples/examples/stm32/l0/stm32l0538-disco.
But if I just include the i2c header file:
#include <libopencm3/stm32/i2c.h>
And run make I get the error:
../../../../../libopencm3//include/libopencm3/stm32/i2c.h:36:9: error: #error "stm32 family not defined."
Upon investigating this file it appears that there are rules defined for each of the other models but not for the l0, why is this? Does libopencm3 not support i2c on the STM32L0 series?
#if defined(STM32F0)
# include <libopencm3/stm32/f0/i2c.h>
#elif defined(STM32F1)
# include <libopencm3/stm32/f1/i2c.h>
#elif defined(STM32F2)
# include <libopencm3/stm32/f2/i2c.h>
#elif defined(STM32F3)
# include <libopencm3/stm32/f3/i2c.h>
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/i2c.h>
#elif defined(STM32L1)
# include <libopencm3/stm32/l1/i2c.h>
#else
# error "stm32 family not defined."
#endif
I had a look at libopencm3/stm32/l1/i2c.h and all it seems to do is import the common i2c library anyway. Is there any way I can just use the i2c library for the l1?
Thanks