Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
22#ifndef PERIPH_CONF_H
23#define PERIPH_CONF_H
24
25#include "periph_cpu.h"
26#include "cfg_clock_16_1.h"
27#include "cfg_timer_012.h"
28#include "cfg_rtt_default.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
38static const uart_conf_t uart_config[] = {
39 {
40 .dev = NRF_UART0,
41 .rx_pin = GPIO_PIN(0, 16),
42 .tx_pin = GPIO_PIN(0, 17),
43#ifdef MODULE_PERIPH_UART_HW_FC
44 .rts_pin = GPIO_PIN(0, 19),
45 .cts_pin = GPIO_PIN(0, 18),
46#endif
47 .irqn = UART0_IRQn,
48 },
49};
50
51#define UART_NUMOF ARRAY_SIZE(uart_config)
52#define UART_0_ISR isr_uart0
59static const spi_conf_t spi_config[] = {
60 {
61 .dev = NRF_SPI0,
62 .sclk = 23,
63 .mosi = 22,
64 .miso = 20
65 },
66 {
67 .dev = NRF_SPI1,
68 .sclk = 16,
69 .mosi = 17,
70 .miso = 18
71 }
72};
73
74#define SPI_NUMOF ARRAY_SIZE(spi_config)
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* PERIPH_CONF_H */
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
Common clock configuration for some nrf51 based boards.
Shared timer peripheral configuration mapping timers 0, 1, and 2.
@ UART0_IRQn
UART0
Definition cc2538.h:53
SPI device configuration.
Definition periph_cpu.h:337
SPI_t * dev
pointer to the used SPI device
Definition periph_cpu.h:338
UART device configuration.
Definition periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition periph_cpu.h:219