Motion_EC_HC32_archived/board/board_config.h

93 lines
2.7 KiB
C

/*
* @Description:
* @Date: 2022-01-06 14:27:36
* @LastEditors: CK.Zh
* @LastEditTime: 2022-01-10 20:03:16
* @FilePath: /motion_ec_rtt/board/board_config.h
*/
/*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-09-05 DongBowen first version
*/
#ifndef __BOARD_CONFIG_H__
#define __BOARD_CONFIG_H__
#include <rtconfig.h>
// #include "ddl.h"
#include "gpio.h"
#include "uart.h"
#include "sysctrl.h"
/*********** Port configure *********/
#if defined(BSP_USING_UART0)
#define UART0_RX_PORT GpioPortA
#define UART0_RX_PIN GpioPin10
#define UART0_RX_AF GpioAf1
#define UART0_TX_PORT GpioPortA
#define UART0_TX_PIN GpioPin9
#define UART0_TX_AF GpioAf1
#endif
#if defined(BSP_USING_UART1)
#define UART1_RX_PORT GpioPortA
#define UART1_RX_PIN GpioPin3
#define UART1_RX_AF GpioAf1
#define UART1_TX_PORT GpioPortA
#define UART1_TX_PIN GpioPin2
#define UART1_TX_AF GpioAf1
#endif
// #if defined(BSP_USING_UART2)
// #define UART2_RX_PORT GpioPortA
// #define UART2_RX_PIN GpioPin3
// #define UART2_RX_AF GpioAf1
// #define UART2_TX_PORT GpioPortA
// #define UART2_TX_PIN GpioPin2
// #define UART2_TX_AF GpioAf1
// #endif
// #if defined(BSP_USING_UART3)
// #define UART3_RX_PORT GpioPortA
// #define UART3_RX_PIN GpioPin3
// #define UART3_RX_AF GpioAf1
// #define UART3_TX_PORT GpioPortA
// #define UART3_TX_PIN GpioPin2
// #define UART3_TX_AF GpioAf1
// #endif
#if defined(BSP_USING_LPUART0)
#define LPUART0_RX_PORT GpioPortC
#define LPUART0_RX_PIN GpioPin11
#define LPUART0_RX_AF GpioAf2
#define LPUART0_TX_PORT GpioPortC
#define LPUART0_TX_PIN GpioPin10
#define LPUART0_TX_AF GpioAf2
#endif
// #if defined(BSP_USING_LPUART1)
// #define LPUART1_RX_PORT GpioPortA
// #define LPUART1_RX_PIN GpioPin3
// #define LPUART1_RX_AF GpioAf1
// #define LPUART1_TX_PORT GpioPortA
// #define LPUART1_TX_PIN GpioPin2
// #define LPUART1_TX_AF GpioAf1
// #endif
#endif