mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/nrf9160dk: add TWI and SPI configuration
This commit is contained in:
parent
1beda0f1e4
commit
0c60a2a600
@ -11,5 +11,7 @@ config BOARD_NRF9160DK
|
||||
bool
|
||||
default y
|
||||
select CPU_MODEL_NRF9160
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
@ -2,5 +2,7 @@ CPU_MODEL = nrf9160
|
||||
CPU = nrf9160
|
||||
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
@ -28,6 +28,37 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
{
|
||||
.dev = NRF_TWIM3_S,
|
||||
.scl = GPIO_PIN(0, 31),
|
||||
.sda = GPIO_PIN(0, 30),
|
||||
.speed = I2C_SPEED_NORMAL
|
||||
}
|
||||
};
|
||||
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{
|
||||
.dev = NRF_SPIM2_S,
|
||||
.sclk = GPIO_PIN(0, 13),
|
||||
.mosi = GPIO_PIN(0, 11),
|
||||
.miso = GPIO_PIN(0, 12),
|
||||
}
|
||||
};
|
||||
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user