Browse Source

boards/yunjia-nrf51822: added I2C configuration

pr/spi.typo
Hauke Petersen 6 years ago
parent
commit
45a6f0a0ac
  1. 1
      boards/yunjia-nrf51822/Makefile.features
  2. 16
      boards/yunjia-nrf51822/include/periph_conf.h

1
boards/yunjia-nrf51822/Makefile.features

@ -4,6 +4,7 @@ FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_flashpage
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer

16
boards/yunjia-nrf51822/include/periph_conf.h

@ -99,6 +99,22 @@ static const timer_conf_t timer_config[] = {
#define SPI_1_PIN_SCK 22
/** @} */
/**
* @brief I2C (TWI) configuration
* @{
*/
static const i2c_conf_t i2c_config[] = {
{
.dev = NRF_TWI0,
.pin_scl = 23,
.pin_sda = 24,
.ppi = 0
}
};
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */
/**
* @brief ADC configuration
*

Loading…
Cancel
Save