2014-08-05 00:51:23 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 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 directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-02-12 13:25:59 +01:00
|
|
|
* @ingroup boards_yunjia-nrf51822
|
2014-08-05 00:51:23 +02:00
|
|
|
* @{
|
|
|
|
*
|
2014-10-21 16:52:30 +02:00
|
|
|
* @file
|
2014-08-05 00:51:23 +02:00
|
|
|
* @brief Peripheral MCU configuration for the Yunjia NRF51822 board
|
|
|
|
*
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
2014-08-05 00:51:23 +02:00
|
|
|
|
2016-02-17 16:46:42 +01:00
|
|
|
#include "periph_cpu.h"
|
2018-10-28 13:12:48 +01:00
|
|
|
#include "cfg_clock_16_0.h"
|
2019-06-04 12:59:59 +02:00
|
|
|
#include "cfg_timer_012.h"
|
|
|
|
#include "cfg_rtt_default.h"
|
2016-02-17 16:46:42 +01:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-08-05 00:51:23 +02:00
|
|
|
/**
|
|
|
|
* @name UART configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define UART_NUMOF (1U)
|
2014-09-26 14:12:32 +02:00
|
|
|
/* UART pin configuration */
|
2015-10-20 13:10:01 +02:00
|
|
|
#define UART_PIN_RX 1
|
|
|
|
#define UART_PIN_TX 2
|
2014-08-05 00:51:23 +02:00
|
|
|
/** @} */
|
|
|
|
|
2014-08-23 17:31:29 +02:00
|
|
|
/**
|
|
|
|
* @name SPI configuration
|
|
|
|
* @{
|
|
|
|
*/
|
2016-11-08 18:24:28 +01:00
|
|
|
static const spi_conf_t spi_config[] = {
|
|
|
|
{
|
|
|
|
.dev = NRF_SPI0,
|
|
|
|
.sclk = 19,
|
|
|
|
.mosi = 17,
|
|
|
|
.miso = 18
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.dev = NRF_SPI1,
|
|
|
|
.sclk = 22,
|
|
|
|
.mosi = 20,
|
|
|
|
.miso = 21
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
2014-08-23 17:31:29 +02:00
|
|
|
/** @} */
|
|
|
|
|
2016-12-21 11:54:02 +01:00
|
|
|
/**
|
2017-01-26 18:14:32 +01:00
|
|
|
* @name I2C (TWI) configuration
|
2016-12-21 11:54:02 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
static const i2c_conf_t i2c_config[] = {
|
|
|
|
{
|
|
|
|
.dev = NRF_TWI0,
|
|
|
|
.pin_scl = 23,
|
|
|
|
.pin_sda = 24,
|
2018-07-13 11:22:21 +02:00
|
|
|
.ppi = 0,
|
|
|
|
.speed = I2C_SPEED_NORMAL
|
2016-12-21 11:54:02 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
2016-12-21 11:54:02 +01:00
|
|
|
/** @} */
|
|
|
|
|
2015-10-25 14:29:43 +01:00
|
|
|
/**
|
2017-01-26 18:14:32 +01:00
|
|
|
* @name ADC configuration
|
2016-01-27 00:00:19 +01:00
|
|
|
*
|
|
|
|
* The configuration consists simply of a list of channels that should be used
|
2015-10-25 14:29:43 +01:00
|
|
|
* @{
|
|
|
|
*/
|
2020-08-25 16:21:01 +02:00
|
|
|
static const adc_conf_t adc_config[] = {4, 5, 6, 7};
|
|
|
|
|
|
|
|
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
2015-10-25 14:29:43 +01:00
|
|
|
/** @} */
|
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* PERIPH_CONF_H */
|
2022-08-11 16:24:37 +02:00
|
|
|
/** @} */
|