alexeyk13 / rexos

RExOS - Realtime Exokernel Operating System
GNU Lesser General Public License v3.0
98 stars 20 forks source link

userspace/stm32/stm32.h misses I2C_COUNT definition for STM32L0 #24

Closed dimka-rs closed 6 years ago

dimka-rs commented 6 years ago

userspace/stm32/stm32.h: I2C_COUNT not defined for STM32L0 MCUs

alexeyk13 commented 6 years ago

Not a bug. I2C not implemented for L0

dimka-rs commented 6 years ago

I'd say it is a bug since it breaks compilation:

CC: ../../rexos/kernel/stm32/stm32_exo.c
In file included from ./../../rexos/kernel/stm32/stm32_exo.c:20:0:
./../../rexos/kernel/stm32/stm32_i2c.h:61:15: error: 'I2C_COUNT' undeclared here (not in a function)
     I2C* i2cs[I2C_COUNT];
               ^
Makefile:89: recipe for target 'stm32_exo.o' failed
make: *** [stm32_exo.o] Error 1

I suggest define I2C_COUNT as zero since it is not implemented

+++ b/userspace/stm32/stm32.h
@@ -812,6 +812,7 @@
 #define GPIO_COUNT          3
 #define UARTS_COUNT         2
 #define DAC_CHANNELS_COUNT  1
+#define I2C_COUNT           0