diff --git a/boards/b-l475e-iot01a/Makefile.dep b/boards/b-l475e-iot01a/Makefile.dep index 5472bf8b8d8fd463a18815c0f10e5d348f90fe51..eded089b924532fc704855e9d3f826374e57988b 100644 --- a/boards/b-l475e-iot01a/Makefile.dep +++ b/boards/b-l475e-iot01a/Makefile.dep @@ -1,3 +1,6 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio + USEMODULE += hts221 + USEMODULE += lis3mdl + USEMODULE += lsm6dsl endif diff --git a/boards/b-l475e-iot01a/include/board.h b/boards/b-l475e-iot01a/include/board.h index 34e24e72e6707117366d8e1992bb1ff194ad440f..b7afdc3d69bd7de9e25465dd7a9a5fe8fc304e00 100644 --- a/boards/b-l475e-iot01a/include/board.h +++ b/boards/b-l475e-iot01a/include/board.h @@ -51,6 +51,28 @@ extern "C" { */ #define BTN_B1_PIN GPIO_PIN(PORT_C, 13) +/** + * @name HTS221 temperature/humidity sensor configuration + * @{ + */ +#define HTS221_PARAM_I2C I2C_DEV(1) +/** @} */ + +/** + * @name LIS3MDL 3-axis magnetometer configuration + * @{ + */ +#define LIS3MDL_PARAM_I2C I2C_DEV(1) +/** @} */ + +/** + * @name LSM6DSL accelerometer sensor configuration + * @{ + */ +#define LSM6DSL_PARAM_I2C I2C_DEV(1) +#define LSM6DSL_PARAM_ADDR (0x6A) +/** @} */ + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ diff --git a/boards/b-l475e-iot01a/include/periph_conf.h b/boards/b-l475e-iot01a/include/periph_conf.h index e9b8834bce13f321c69fdad6a4acffdef1c57a9f..121f000b08b1b37d904d1e4d242c746643267762 100644 --- a/boards/b-l475e-iot01a/include/periph_conf.h +++ b/boards/b-l475e-iot01a/include/periph_conf.h @@ -204,10 +204,22 @@ static const i2c_conf_t i2c_config[] = { .bus = APB1, .rcc_mask = RCC_APB1ENR1_I2C1EN, .irqn = I2C1_ER_IRQn, - } + }, + { + .dev = I2C2, + .speed = I2C_SPEED_NORMAL, + .scl_pin = GPIO_PIN(PORT_B, 10), + .sda_pin = GPIO_PIN(PORT_B, 11), + .scl_af = GPIO_AF4, + .sda_af = GPIO_AF4, + .bus = APB1, + .rcc_mask = RCC_APB1ENR1_I2C2EN, + .irqn = I2C2_ER_IRQn, + }, }; #define I2C_0_ISR isr_i2c1_er +#define I2C_1_ISR isr_i2c2_er #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0])) /** @} */