periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef PERIPH_CONF_H
21 #define PERIPH_CONF_H
22 
23 #include "periph_cpu.h"
24 #include "periph_conf_common.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 static const uart_conf_t uart_config[] = {
35  {
36  .dev = NRF_UARTE0,
37  .rx_pin = GPIO_PIN(0, 8),
38  .tx_pin = GPIO_PIN(0, 6),
39 #ifdef MODULE_PERIPH_UART_HW_FC
40  .rts_pin = GPIO_UNDEF,
41  .cts_pin = GPIO_UNDEF,
42 #endif
43  .irqn = UARTE0_UART0_IRQn,
44  },
45  {
46  .dev = NRF_UARTE1,
47  .rx_pin = GPIO_PIN(1, 10),
48  .tx_pin = GPIO_PIN(1, 8),
49 #ifdef MODULE_PERIPH_UART_HW_FC
50  .rts_pin = GPIO_PIN(1, 3),
51  .cts_pin = GPIO_PIN(1, 11),
52 #endif
53  .irqn = UARTE1_IRQn,
54  },
55 };
56 
57 #define UART_0_ISR (isr_uart0)
58 #define UART_1_ISR (isr_uarte1)
59 
60 #define UART_NUMOF ARRAY_SIZE(uart_config)
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #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.
static const uart_conf_t uart_config[]
UART configuration.
Definition: periph_conf.h:39
UART device configuration.
Definition: periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition: periph_cpu.h:219