mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
56 lines
1.1 KiB
C
56 lines
1.1 KiB
C
/*
|
|
* Copyright (C) 2020 Koen Zandberg <koen@bergzand.net>
|
|
* 2023 Gunar Schorcht <gunar@schorcht.net>
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
* directory for more details.
|
|
*/
|
|
|
|
/**
|
|
* @ingroup boards_common_gd32v
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Default UART configuration for GD32VF103 boards
|
|
*
|
|
* @author Koen Zandberg <koen@bergzand.net>
|
|
* @author Gunar Schorcht <gunar@schorcht.net>
|
|
*/
|
|
|
|
#ifndef CFG_UART_DEFAULT_H
|
|
#define CFG_UART_DEFAULT_H
|
|
|
|
#include "periph_cpu.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @name UART configuration
|
|
* @{
|
|
*/
|
|
static const uart_conf_t uart_config[] = {
|
|
{
|
|
.dev = USART0,
|
|
.rcu_mask = RCU_APB2EN_USART0EN_Msk,
|
|
.rx_pin = GPIO_PIN(PORT_A, 10),
|
|
.tx_pin = GPIO_PIN(PORT_A, 9),
|
|
.bus = APB2,
|
|
.irqn = USART0_IRQn,
|
|
},
|
|
};
|
|
|
|
#define UART_0_IRQN USART0_IRQn
|
|
|
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
|
/** @} */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* CFG_UART_DEFAULT_H */
|
|
/** @} */
|