nanohub:drivers:st_lsm6dsm: fix compile issue when specific macros are not set

Change-Id: I6ddc0cd9030bde77d9ac523026d50b6911f7adf4
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
diff --git a/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lis3mdl_slave.h b/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lis3mdl_slave.h
index 2832a38..4aed856 100644
--- a/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lis3mdl_slave.h
+++ b/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lis3mdl_slave.h
@@ -25,12 +25,16 @@
 #else /* LSM6DSM_I2C_MASTER_MAGNETOMETER_ENABLED */
 #error "Another magnetometer is already selected! One magn per time can be used."
 #endif /* LSM6DSM_I2C_MASTER_MAGNETOMETER_ENABLED */
-#endif /* LSM6DSM_I2C_MASTER_LIS3MDL */
 
 #if !defined(LSM6DSM_LIS3MDL_I2C_ADDRESS)
 #error "LIS3MDL i2c address macro not defined. Please check README file"
 #endif /* LSM6DSM_LIS3MDL_I2C_ADDRESS */
 
+#else /* LSM6DSM_I2C_MASTER_LIS3MDL */
+#undef LSM6DSM_LIS3MDL_I2C_ADDRESS
+#define LSM6DSM_LIS3MDL_I2C_ADDRESS                     1
+#endif /* LSM6DSM_I2C_MASTER_LIS3MDL */
+
 #define LIS3MDL_KSCALE                                  0.043840420868f    /* MAGN scale @12G in uT/LSB */
 #define LIS3MDL_I2C_ADDRESS                             (LSM6DSM_LIS3MDL_I2C_ADDRESS)
 
diff --git a/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lps22hb_slave.h b/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lps22hb_slave.h
index 221584a..58bee27 100644
--- a/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lps22hb_slave.h
+++ b/firmware/os/drivers/st_lsm6dsm/st_lsm6dsm_lps22hb_slave.h
@@ -25,12 +25,16 @@
 #else /* LSM6DSM_I2C_MASTER_BAROMETER_ENABLED */
 #error "Another barometer is already selected! One baro per time can be used."
 #endif /* LSM6DSM_I2C_MASTER_BAROMETER_ENABLED */
-#endif /* LSM6DSM_I2C_MASTER_LPS22HB */
 
 #if !defined(LSM6DSM_LPS22HB_I2C_ADDRESS)
 #error "LPS22HB i2c address macro not defined. Please check README file"
 #endif /* LSM6DSM_LPS22HB_I2C_ADDRESS */
 
+#else /* LSM6DSM_I2C_MASTER_LPS22HB */
+#undef LSM6DSM_LPS22HB_I2C_ADDRESS
+#define LSM6DSM_LPS22HB_I2C_ADDRESS                     1
+#endif /* LSM6DSM_I2C_MASTER_LPS22HB */
+
 #define LPS22HB_PRESS_KSCALE                            0.000244140625f    /* PRESS scale @1260hPa in hPa/LSB */
 #define LPS22HB_TEMP_KSCALE                             0.01f              /* TEMP scale in *C/LSB */
 #define LPS22HB_I2C_ADDRESS                             (LSM6DSM_LPS22HB_I2C_ADDRESS)