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

boards/nrf52840dongle: add I2C pin configuration

This commit is contained in:
Hauke Petersen 2021-04-27 11:39:04 +02:00
parent 729387e090
commit 674d6521c5
3 changed files with 19 additions and 0 deletions

View File

@ -12,6 +12,7 @@ config BOARD_NRF52840DONGLE
default y
select BOARD_COMMON_NRF52
select CPU_MODEL_NRF52840XXAA
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_UART
select HAS_PERIPH_SPI

View File

@ -1,6 +1,7 @@
CPU_MODEL = nrf52840xxaa
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_usbdev

View File

@ -1,5 +1,6 @@
/*
* Copyright (C) 2019 Christian Amsüss <chrysn@fsfe.org>
* 2021 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
@ -14,6 +15,7 @@
* @brief Peripheral configuration for the nRF52840-Dongle
*
* @author Christian Amsüss <chrysn@fsfe.org>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
*/
@ -95,6 +97,21 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF ARRAY_SIZE(spi_config)
/** @} */
/**
* @name I2C configuration
* @{
*/
static const i2c_conf_t i2c_config[] = {
{
.dev = NRF_TWIM1,
.scl = GPIO_PIN(0, 29),
.sda = GPIO_PIN(0, 31),
.speed = I2C_SPEED_NORMAL
}
};
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
/** @} */
#ifdef __cplusplus
}
#endif