Loading...
Searching...
No Matches
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
21
22#include "periph_cpu.h"
23#include "periph_conf_common.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33static 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, 5),
47 .tx_pin = GPIO_PIN(1, 4),
48#ifdef MODULE_PERIPH_UART_HW_FC
49 .rts_pin = GPIO_PIN(1, 6),
50 .cts_pin = GPIO_PIN(1, 7),
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)
61
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.
UART device configuration.
Definition periph_cpu.h:217