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 
9 #pragma once
10 
22 #include "periph_cpu.h"
23 #include "periph_conf_common.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 static const uart_conf_t uart_config[] = {
34  {
35  .dev = NRF_UARTE0,
36  .rx_pin = GPIO_PIN(0, 8),
37  .tx_pin = GPIO_PIN(0, 6),
38 #ifdef MODULE_PERIPH_UART_HW_FC
39  .rts_pin = GPIO_UNDEF,
40  .cts_pin = GPIO_UNDEF,
41 #endif
42  .irqn = UARTE0_UART0_IRQn,
43  },
44  {
45  .dev = NRF_UARTE1,
46  .rx_pin = GPIO_PIN(1, 10),
47  .tx_pin = GPIO_PIN(1, 8),
48 #ifdef MODULE_PERIPH_UART_HW_FC
49  .rts_pin = GPIO_PIN(1, 3),
50  .cts_pin = GPIO_PIN(1, 11),
51 #endif
52  .irqn = UARTE1_IRQn,
53  },
54 };
55 
56 #define UART_0_ISR (isr_uart0)
57 #define UART_1_ISR (isr_uarte1)
58 
59 #define UART_NUMOF ARRAY_SIZE(uart_config)
62 #ifdef __cplusplus
63 }
64 #endif
65 
#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
UART device configuration.
Definition: periph_cpu.h:217
USART_t * dev
pointer to the used UART device
Definition: periph_cpu.h:218