diff --git a/boards/thingy52/Makefile.features b/boards/thingy52/Makefile.features index ebbf16569c..238ccb7477 100644 --- a/boards/thingy52/Makefile.features +++ b/boards/thingy52/Makefile.features @@ -1,6 +1,7 @@ CPU_MODEL = nrf52832xxaa # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_i2c FEATURES_PROVIDED += periph_uart include $(RIOTBOARD)/common/nrf52/Makefile.nrf52832.features diff --git a/boards/thingy52/include/periph_conf.h b/boards/thingy52/include/periph_conf.h index 210b1bacf8..6e53f6f6c7 100644 --- a/boards/thingy52/include/periph_conf.h +++ b/boards/thingy52/include/periph_conf.h @@ -38,6 +38,30 @@ extern "C" { #define UART_PIN_TX GPIO_PIN(0, 3) /** @} */ +/** + * @name I2C configuration + * @{ + */ +static const i2c_conf_t i2c_config[] = { + { + /* main I2C bus */ + .dev = NRF_TWIM0, + .scl = 8, + .sda = 7, + .speed = I2C_SPEED_NORMAL + }, + { + /* EXT I2C bus */ + .dev = NRF_TWIM1, + .scl = 15, + .sda = 14, + .speed = I2C_SPEED_NORMAL + }, +}; + +#define I2C_NUMOF ARRAY_SIZE(i2c_config) +/** @} */ + #ifdef __cplusplus } #endif