boards/nrf52840dongle: add I2C pin configuration
This commit is contained in:
parent
729387e090
commit
674d6521c5
@ -12,6 +12,7 @@ config BOARD_NRF52840DONGLE
|
|||||||
default y
|
default y
|
||||||
select BOARD_COMMON_NRF52
|
select BOARD_COMMON_NRF52
|
||||||
select CPU_MODEL_NRF52840XXAA
|
select CPU_MODEL_NRF52840XXAA
|
||||||
|
select HAS_PERIPH_I2C
|
||||||
select HAS_PERIPH_PWM
|
select HAS_PERIPH_PWM
|
||||||
select HAS_PERIPH_UART
|
select HAS_PERIPH_UART
|
||||||
select HAS_PERIPH_SPI
|
select HAS_PERIPH_SPI
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
CPU_MODEL = nrf52840xxaa
|
CPU_MODEL = nrf52840xxaa
|
||||||
|
|
||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_pwm
|
FEATURES_PROVIDED += periph_pwm
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
FEATURES_PROVIDED += periph_usbdev
|
FEATURES_PROVIDED += periph_usbdev
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 Christian Amsüss <chrysn@fsfe.org>
|
* 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
|
* 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
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
@ -14,6 +15,7 @@
|
|||||||
* @brief Peripheral configuration for the nRF52840-Dongle
|
* @brief Peripheral configuration for the nRF52840-Dongle
|
||||||
*
|
*
|
||||||
* @author Christian Amsüss <chrysn@fsfe.org>
|
* @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)
|
#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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user