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 
10 #pragma once
11 
24 #include "periph_conf_common.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 static const spi_conf_t spi_config[] = {
35  {
36  .dev = NRF_SPIM0,
37  .sclk = GPIO_PIN(0, 25),
38  .mosi = GPIO_PIN(0, 23),
39  .miso = GPIO_PIN(0, 24),
40  .ppi = 0,
41  }
42 };
43 #define SPI_NUMOF ARRAY_SIZE(spi_config)
50 static const uart_conf_t uart_config[] = {
51  { /* Mapped to USB virtual COM port */
52  .dev = NRF_UARTE0,
53  .rx_pin = GPIO_PIN(0, 8),
54  .tx_pin = GPIO_PIN(0, 6),
55 #ifdef MODULE_PERIPH_UART_HW_FC
56  .rts_pin = GPIO_UNDEF,
57  .cts_pin = GPIO_UNDEF,
58 #endif
59  .irqn = UARTE0_UART0_IRQn,
60  },
61 };
62 
63 #define UART_NUMOF ARRAY_SIZE(uart_config)
64 #define UART_0_ISR (isr_uart0)
67 #ifdef __cplusplus
68 }
69 #endif
70 
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:45
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
static const uart_conf_t uart_config[]
UART configuration.
Definition: periph_conf.h:38
static const spi_conf_t spi_config[]
SPI configuration.
Definition: periph_conf.h:96
SPI device configuration.
Definition: periph_cpu.h:336
SPI_t * dev
pointer to the used SPI device
Definition: periph_cpu.h:337
UART device configuration.
Definition: periph_cpu.h:217
USART_t * dev
pointer to the used UART device
Definition: periph_cpu.h:218