Loading...
Searching...
No Matches
cfg_uart_default.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Koen Zandberg <koen@bergzand.net>
3 * 2023 Gunar Schorcht <gunar@schorcht.net>
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef CFG_UART_DEFAULT_H
22#define CFG_UART_DEFAULT_H
23
24#include "periph_cpu.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34static const uart_conf_t uart_config[] = {
35 {
36 .dev = USART0,
37 .rcu_mask = RCU_APB2EN_USART0EN_Msk,
38 .rx_pin = GPIO_PIN(PORT_A, 10),
39 .tx_pin = GPIO_PIN(PORT_A, 9),
40 .bus = APB2,
41 .irqn = USART0_IRQn,
42 },
43};
44
45#define UART_0_IRQN USART0_IRQn
46
47#define UART_NUMOF ARRAY_SIZE(uart_config)
50#ifdef __cplusplus
51}
52#endif
53
54#endif /* CFG_UART_DEFAULT_H */
@ PORT_A
port A
Definition periph_cpu.h:47
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ APB2
Advanced Peripheral Bus 2
Definition periph_cpu.h:80
UART device configuration.
Definition periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition periph_cpu.h:219