2022-08-31 15:14:16 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020-2022, CQ 100ask Development Team
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-05-29 Alen first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UART_CONFIG_H__
|
|
|
|
#define __UART_CONFIG_H__
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART1)
|
|
|
|
#ifndef UART1_CONFIG
|
|
|
|
#define UART1_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart1", \
|
|
|
|
.Instance = UART1, \
|
|
|
|
.irq_type = UART1_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART1_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART1 */
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART2)
|
|
|
|
#ifndef UART2_CONFIG
|
|
|
|
#define UART2_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart2", \
|
|
|
|
.Instance = UART2, \
|
|
|
|
.irq_type = UART2_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART2_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART2 */
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART3)
|
|
|
|
#ifndef UART3_CONFIG
|
|
|
|
#define UART3_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart3", \
|
|
|
|
.Instance = UART3, \
|
|
|
|
.irq_type = UART3_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART3_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART3 */
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART4)
|
|
|
|
#ifndef UART4_CONFIG
|
|
|
|
#define UART4_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart4", \
|
|
|
|
.Instance = UART4, \
|
|
|
|
.irq_type = UART4_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART4_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART4 */
|
|
|
|
|
|
|
|
#if defined(BSP_USING_UART5)
|
|
|
|
#ifndef UART5_CONFIG
|
|
|
|
#define UART5_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart5", \
|
|
|
|
.Instance = UART5, \
|
|
|
|
.irq_type = UART5_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART5_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART5 */
|
2022-08-31 22:00:02 +08:00
|
|
|
|
2022-08-31 15:14:16 +08:00
|
|
|
#if defined(BSP_USING_UART6)
|
|
|
|
#ifndef UART6_CONFIG
|
|
|
|
#define UART6_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart6", \
|
|
|
|
.Instance = UART6, \
|
|
|
|
.irq_type = UART6_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART5_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART5 */
|
2022-08-31 22:00:02 +08:00
|
|
|
|
2022-08-31 15:14:16 +08:00
|
|
|
#if defined(BSP_USING_UART7)
|
|
|
|
#ifndef UART7_CONFIG
|
|
|
|
#define UART7_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart7", \
|
|
|
|
.Instance = UART7, \
|
|
|
|
.irq_type = UART7_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART5_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART5 */
|
2022-08-31 22:00:02 +08:00
|
|
|
|
2022-08-31 15:14:16 +08:00
|
|
|
#if defined(BSP_USING_UART8)
|
|
|
|
#ifndef UART8_CONFIG
|
|
|
|
#define UART8_CONFIG \
|
|
|
|
{ \
|
|
|
|
.name = "uart8", \
|
|
|
|
.Instance = UART8, \
|
|
|
|
.irq_type = UART8_IRQn, \
|
|
|
|
}
|
|
|
|
#endif /* UART5_CONFIG */
|
|
|
|
#endif /* BSP_USING_UART5 */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|