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
|
|
|
|
|
|
|
|
/**
|
2023-11-22 15:27:59 +01:00
|
|
|
* @name UART configuration
|
2016-10-29 14:26:31 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2023-11-22 15:27:59 +01:00
|
|
|
static const uart_conf_t uart_config[] = {
|
|
|
|
{ /* Mapped to USB virtual COM port */
|
|
|
|
.dev = NRF_UART0,
|
|
|
|
.rx_pin = GPIO_PIN(0, 25),
|
|
|
|
.tx_pin = GPIO_PIN(0, 24),
|
|
|
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
|
|
|
.rts_pin = GPIO_UNDEF,
|
|
|
|
.cts_pin = GPIO_UNDEF,
|
|
|
|
#endif
|
|
|
|
.irqn = UART0_IRQn,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
|
|
|
#define UART_0_ISR isr_uart0
|
2016-10-29 14:26:31 +02:00
|
|
|
/** @} */
|
|
|
|
|
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
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-07-18 15:14:29 +02:00
|
|
|
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
2016-12-21 11:53:26 +01:00
|
|
|
/** @} */
|
|
|
|
|
2016-10-29 14:26:31 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PERIPH_CONF_H */
|
|
|
|
/** @} */
|