diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c index 33fd1242b8c..dbefb07ddc9 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c @@ -123,8 +123,11 @@ int board_app_initialize(uintptr_t arg) #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; #endif -#ifdef HAVE_I2C_DRIVER - FAR struct i2c_master_s *i2c; +#ifdef CONFIG_STM32L4_I2C1 + FAR struct i2c_master_s *i2c1; +#endif +#ifdef CONFIG_STM32L4_I2C3 + FAR struct i2c_master_s *i2c3; #endif #ifdef CONFIG_SENSORS_QENCODER int index;