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
10#pragma once
11
22
23#include "periph_cpu.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33static const uart_conf_t uart_config[] = {
34 {
35 .dev = USART0,
36 .rcu_mask = RCU_APB2EN_USART0EN_Msk,
37 .rx_pin = GPIO_PIN(PORT_A, 10),
38 .tx_pin = GPIO_PIN(PORT_A, 9),
39 .bus = APB2,
40 .irqn = USART0_IRQn,
41 },
42};
43
44#define UART_0_IRQN USART0_IRQn
45
46#define UART_NUMOF ARRAY_SIZE(uart_config)
48
49#ifdef __cplusplus
50}
51#endif
52
@ PORT_A
port A
Definition periph_cpu.h:46
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:45
@ APB2
Advanced Peripheral Bus 2.
Definition periph_cpu.h:79
UART device configuration.
Definition periph_cpu.h:217