Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2018 Freie Universität Berlin
3 * 2018 Inria
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
22#ifndef PERIPH_CONF_H
23#define PERIPH_CONF_H
24
25#include "periph_conf_common.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35static const spi_conf_t spi_config[] = {
36 {
37 .dev = NRF_SPIM0,
38 .sclk = GPIO_PIN(0, 25),
39 .mosi = GPIO_PIN(0, 23),
40 .miso = GPIO_PIN(0, 24),
41 .ppi = 0,
42 }
43};
44#define SPI_NUMOF ARRAY_SIZE(spi_config)
51static const uart_conf_t uart_config[] = {
52 { /* Mapped to USB virtual COM port */
53 .dev = NRF_UARTE0,
54 .rx_pin = GPIO_PIN(0, 8),
55 .tx_pin = GPIO_PIN(0, 6),
56#ifdef MODULE_PERIPH_UART_HW_FC
57 .rts_pin = GPIO_UNDEF,
58 .cts_pin = GPIO_UNDEF,
59#endif
60 .irqn = UARTE0_UART0_IRQn,
61 },
62};
63
64#define UART_NUMOF ARRAY_SIZE(uart_config)
65#define UART_0_ISR (isr_uart0)
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* PERIPH_CONF_H */
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
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