1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

boards/thingy52: added I2C configuration

This commit is contained in:
Hauke Petersen 2018-01-23 15:52:45 +01:00 committed by Benjamin Valentin
parent 8a69e4ac69
commit 9c853b598d
2 changed files with 25 additions and 0 deletions

View File

@ -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

View File

@ -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