2014-10-26 15:59:38 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Christian Mehlis <mehlis@inf.fu-berlin.de>
|
|
|
|
*
|
2016-11-08 18:24:28 +01:00
|
|
|
* 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.
|
2014-10-26 15:59:38 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-02-12 13:26:50 +01:00
|
|
|
* @ingroup boards_airfy-beacon
|
2014-10-26 15:59:38 +01:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Peripheral MCU configuration for the Airfy Beacon board
|
|
|
|
*
|
|
|
|
* @author Christian Mehlis <mehlis@inf.fu-berlin.de>
|
2014-11-12 13:17:41 +01:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2014-10-26 15:59:38 +01:00
|
|
|
*/
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
2014-10-26 15:59:38 +01:00
|
|
|
|
2016-02-17 16:44:11 +01:00
|
|
|
#include "periph_cpu.h"
|
2018-10-28 13:11:45 +01:00
|
|
|
#include "cfg_clock_16_1.h"
|
2019-06-04 12:59:59 +02:00
|
|
|
#include "cfg_timer_012.h"
|
|
|
|
#include "cfg_rtt_default.h"
|
2016-02-17 16:44:11 +01:00
|
|
|
|
2014-10-26 15:59:38 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name UART configuration
|
2015-10-20 13:04:29 +02:00
|
|
|
*
|
2017-04-10 19:04:32 +02:00
|
|
|
* The CPU only supports one UART device, so we keep it simple
|
2014-10-26 15:59:38 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define UART_NUMOF (1U)
|
|
|
|
#define UART_PIN_RX 17
|
|
|
|
#define UART_PIN_TX 18
|
|
|
|
/** @} */
|
|
|
|
|
2014-08-23 17:31:29 +02:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name SPI configuration
|
2014-08-23 17:31:29 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2016-11-08 18:24:28 +01:00
|
|
|
static const spi_conf_t spi_config[] = {
|
|
|
|
{
|
|
|
|
.dev = NRF_SPI0,
|
|
|
|
.sclk = 15,
|
|
|
|
.mosi = 13,
|
|
|
|
.miso = 14
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
2014-08-23 17:31:29 +02:00
|
|
|
/** @} */
|
|
|
|
|
2016-11-17 22:56:18 +01:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name I2C (TWI) configuration
|
2016-11-17 22:56:18 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
static const i2c_conf_t i2c_config[] = {
|
|
|
|
{
|
|
|
|
.dev = NRF_TWI0,
|
|
|
|
.pin_scl = 7,
|
|
|
|
.pin_sda = 8,
|
2018-07-02 17:28:42 +02:00
|
|
|
.ppi = 0,
|
|
|
|
.speed = I2C_SPEED_NORMAL,
|
2016-11-17 22:56:18 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.dev = NRF_TWI1,
|
|
|
|
.pin_scl = 9,
|
|
|
|
.pin_sda = 10,
|
2018-07-02 17:28:42 +02:00
|
|
|
.ppi = 1,
|
|
|
|
.speed = I2C_SPEED_NORMAL,
|
2016-11-17 22:56:18 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
|
|
|
/** @} */
|
|
|
|
|
2015-10-25 14:29:43 +01:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name ADC configuration
|
2016-03-11 19:43:23 +01:00
|
|
|
*
|
|
|
|
* The configuration consists simply of a list of channels that should be used
|
2015-10-25 14:29:43 +01:00
|
|
|
* @{
|
|
|
|
*/
|
2016-03-11 19:43:23 +01:00
|
|
|
#define ADC_CONFIG {3, 4, 5, 6}
|
|
|
|
#define ADC_NUMOF (4)
|
2015-10-25 14:29:43 +01:00
|
|
|
/** @} */
|
|
|
|
|
2014-10-26 15:59:38 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* end extern "C" */
|
|
|
|
#endif
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* PERIPH_CONF_H */
|