2016-10-29 14:26:31 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup boards_microbit
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Peripheral configuration for the BBC micro:bit
|
|
|
|
*
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
|
|
|
|
|
|
|
#include "periph_cpu.h"
|
2018-10-28 13:12:33 +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-10-29 14:26:31 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2017-01-26 18:14:32 +01:00
|
|
|
* @name UART configuration
|
2016-10-29 14:26:31 +02:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define UART_NUMOF (1U)
|
|
|
|
/* UART pin configuration */
|
|
|
|
#define UART_HWFLOWCTRL 0
|
|
|
|
#define UART_PIN_RX 25
|
|
|
|
#define UART_PIN_TX 24
|
|
|
|
/** @} */
|
|
|
|
|
2016-12-21 11:53:26 +01:00
|
|
|
/**
|
2017-01-26 18:14:32 +01:00
|
|
|
* @name I2C (TWI) configuration
|
2016-12-21 11:53:26 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
static const i2c_conf_t i2c_config[] = {
|
|
|
|
{
|
|
|
|
.dev = NRF_TWI0,
|
|
|
|
.pin_scl = 0,
|
|
|
|
.pin_sda = 30,
|
2018-07-02 17:05:36 +02:00
|
|
|
.ppi = 0,
|
|
|
|
.speed = I2C_SPEED_NORMAL,
|
2016-12-21 11:53:26 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
|
|
|
/** @} */
|
|
|
|
|
2016-10-29 14:26:31 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PERIPH_CONF_H */
|
|
|
|
/** @} */
|