1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: slstk3402a: add i2c support

This commit is contained in:
Bas Stottelaar 2018-08-05 15:36:46 +02:00
parent f215ee3d8a
commit 9620b45c45
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi

View File

@ -89,7 +89,16 @@ static const adc_chan_conf_t adc_channel_config[] = {
* @{
*/
static const i2c_conf_t i2c_config[] = {
{
.dev = I2C0,
.sda_pin = GPIO_PIN(PC, 10),
.scl_pin = GPIO_PIN(PC, 11),
.loc = I2C_ROUTELOC0_SDALOC_LOC15 |
I2C_ROUTELOC0_SCLLOC_LOC15,
.cmu = cmuClock_I2C0,
.irq = I2C0_IRQn,
.speed = I2C_SPEED_NORMAL
}
};
#define I2C_NUMOF PERIPH_NUMOF(i2c_config)