Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Inria
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "periph_cpu.h"
20#include "periph_conf_common.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30static const uart_conf_t uart_config[] = {
31 {
32 .dev = NRF_UARTE0,
33 .rx_pin = GPIO_PIN(0, 8),
34 .tx_pin = GPIO_PIN(0, 6),
35#ifdef MODULE_PERIPH_UART_HW_FC
36 .rts_pin = GPIO_UNDEF,
37 .cts_pin = GPIO_UNDEF,
38#endif
39 .irqn = UARTE0_UART0_IRQn,
40 },
41 {
42 .dev = NRF_UARTE1,
43 .rx_pin = GPIO_PIN(1, 10),
44 .tx_pin = GPIO_PIN(1, 8),
45#ifdef MODULE_PERIPH_UART_HW_FC
46 .rts_pin = GPIO_PIN(1, 3),
47 .cts_pin = GPIO_PIN(1, 11),
48#endif
49 .irqn = UARTE1_IRQn,
50 },
51};
52
53#define UART_0_ISR (isr_uart0)
54#define UART_1_ISR (isr_uarte1)
55
56#define UART_NUMOF ARRAY_SIZE(uart_config)
58
59#ifdef __cplusplus
60}
61#endif
62
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:42
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
#define NRF_UARTE0
UART 0.
Definition periph_cpu.h:54
#define NRF_UARTE1
UART 1.
Definition periph_cpu.h:55
UART device configuration.
Definition periph_cpu.h:214