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,5),
48  .tx_pin = GPIO_PIN(1,4),
49 #ifdef MODULE_PERIPH_UART_HW_FC
50  .rts_pin = GPIO_PIN(1,6),
51  .cts_pin = GPIO_PIN(1,7),
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)
61 
66 #define NRF5X_ENABLE_DCDC
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* PERIPH_CONF_H */
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition: periph_cpu_common.h:52
uart_conf_t
UART device configuration.
Definition: periph_cpu.h:166
uart_conf_t::dev
cc2538_uart_t * dev
pointer to the used UART device
Definition: periph_cpu.h:167
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35