mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-19 19:43:52 +01:00
51 lines
969 B
C
51 lines
969 B
C
/*
|
|
* SPDX-FileCopyrightText: 2020 Koen Zandberg <koen@bergzand.net>
|
|
* SPDX-FileCopyrightText: 2023 Gunar Schorcht <gunar@schorcht.net>
|
|
* SPDX-License-Identifier: LGPL-2.1-only
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/**
|
|
* @ingroup boards_common_gd32v
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Default UART configuration for GD32VF103 boards
|
|
*
|
|
* @author Koen Zandberg <koen@bergzand.net>
|
|
* @author Gunar Schorcht <gunar@schorcht.net>
|
|
*/
|
|
|
|
#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
|
|
|
|
/** @} */
|