From fc537808cfcd8d2b797a06aae8840a1852dc27bc Mon Sep 17 00:00:00 2001 From: FuChao Date: Thu, 9 Sep 2021 00:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=A0=BC=E5=BC=8F=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=96=87=E4=BB=B6=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81=E5=92=8C=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=EF=BC=8C=E6=9B=B4=E6=AD=A3=E8=8A=AF=E7=89=87=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ignore_format.yml | 3 +- bsp/Vango_V85xx/.config | 4 +- bsp/Vango_V85xx/.ignore_format.yml | 6 +++ bsp/Vango_V85xx/Kconfig | 6 +-- .../CMSIS/Vango/V85xx/Include/gd32f10x_conf.h | 40 ------------------- bsp/Vango_V85xx/drivers/drv_usart.c | 26 +----------- bsp/Vango_V85xx/drivers/drv_usart.h | 9 +---- bsp/Vango_V85xx/rtconfig.h | 4 +- 8 files changed, 16 insertions(+), 82 deletions(-) create mode 100644 bsp/Vango_V85xx/.ignore_format.yml delete mode 100644 bsp/Vango_V85xx/Libraries/CMSIS/Vango/V85xx/Include/gd32f10x_conf.h diff --git a/.ignore_format.yml b/.ignore_format.yml index aa14e76302..de70d29c63 100644 --- a/.ignore_format.yml +++ b/.ignore_format.yml @@ -11,5 +11,4 @@ dir_path: - components/net/lwip-2.0.2 - components/net/lwip-2.0.3 - components/net/lwip-2.1.2 -- bsp/mm32f327x/Libraries -- bsp/Vango_V85xx/Libraries \ No newline at end of file +- bsp/mm32f327x/Libraries \ No newline at end of file diff --git a/bsp/Vango_V85xx/.config b/bsp/Vango_V85xx/.config index 08a729e049..a126fcbfae 100644 --- a/bsp/Vango_V85xx/.config +++ b/bsp/Vango_V85xx/.config @@ -578,8 +578,8 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_TERMBOX is not set -CONFIG_SOC_SERIES_GD32F1=y -CONFIG_SOC_GD32103C=y +CONFIG_SOC_SERIES_V85XX=y +CONFIG_SOC_V85XX=y # # On-chip Peripheral Drivers diff --git a/bsp/Vango_V85xx/.ignore_format.yml b/bsp/Vango_V85xx/.ignore_format.yml new file mode 100644 index 0000000000..98f16fd398 --- /dev/null +++ b/bsp/Vango_V85xx/.ignore_format.yml @@ -0,0 +1,6 @@ +# files format check exclude path, please follow the instructions below to modify; +# If you need to exclude an entire folder, add the folder path in dir_path; +# If you need to exclude a file, add the path to the file in file_path. + +dir_path: +- Libraries/VangoV85xx_standard_peripheral \ No newline at end of file diff --git a/bsp/Vango_V85xx/Kconfig b/bsp/Vango_V85xx/Kconfig index 97fb8f2b2c..df8194d747 100644 --- a/bsp/Vango_V85xx/Kconfig +++ b/bsp/Vango_V85xx/Kconfig @@ -21,15 +21,15 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -config SOC_SERIES_GD32F1 +config SOC_SERIES_V85XX bool default y -config SOC_GD32103C +config SOC_V85XX bool select RT_USING_COMPONENTS_INIT select RT_USING_USER_MAIN - select SOC_SERIES_GD32F1 + select SOC_SERIES_V85XX default y menu "On-chip Peripheral Drivers" diff --git a/bsp/Vango_V85xx/Libraries/CMSIS/Vango/V85xx/Include/gd32f10x_conf.h b/bsp/Vango_V85xx/Libraries/CMSIS/Vango/V85xx/Include/gd32f10x_conf.h deleted file mode 100644 index b9e3e3646c..0000000000 --- a/bsp/Vango_V85xx/Libraries/CMSIS/Vango/V85xx/Include/gd32f10x_conf.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - ****************************************************************************** - * @brief Configuration file. - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GD32F10X_CONF_H -#define __GD32F10X_CONF_H - -/* Includes ------------------------------------------------------------------*/ -/* Comment the line below to disable peripheral header file inclusion */ -#include "lib_ana.h" -#include "lib_adc.h" -#include "lib_adc_tiny.h" -#include "lib_clk.h" -#include "lib_comp.h" -#include "lib_crypt.h" -#include "lib_dma.h" -#include "lib_flash.h" -#include "lib_gpio.h" -#include "lib_i2c.h" -#include "lib_iso7816.h" -#include "lib_lcd.h" -#include "lib_misc.h" -#include "lib_pmu.h" -#include "lib_pwm.h" -#include "lib_rtc.h" -#include "lib_spi.h" -#include "lib_tmr.h" -#include "lib_u32k.h" -#include "lib_uart.h" -#include "lib_version.h" -#include "lib_wdt.h" -#include "lib_LoadNVR.h" -#include "lib_CodeRAM.h" -#include "lib_cortex.h" - -#endif /* __GD32F10X_CONF_H */ - diff --git a/bsp/Vango_V85xx/drivers/drv_usart.c b/bsp/Vango_V85xx/drivers/drv_usart.c index 026151c446..5a8e8567ac 100644 --- a/bsp/Vango_V85xx/drivers/drv_usart.c +++ b/bsp/Vango_V85xx/drivers/drv_usart.c @@ -6,6 +6,7 @@ * Change Logs: * Date Author Notes * 2021-01-04 iysheng first version + * 2021-09-07 FuC Suit for Vango V85XX */ #include @@ -109,9 +110,6 @@ static const struct V85xx_uart uarts[] = { { UART0, /* uart peripheral index */ UART0_IRQn, /* uart iqrn */ - // // RCU_UART0, RCU_GPIOA, RCU_GPIOA, /* periph clock, tx gpio clock, rt gpio clock */ - // GPIOA, GPIOA, /* tx port, tx alternate, tx pin */ - // GPIO_PIN_9, GPIO_PIN_10, /* rx port, rx alternate, rx pin */ &serial0, "uart0", }, @@ -121,9 +119,6 @@ static const struct V85xx_uart uarts[] = { { UART1, /* uart peripheral index */ UART1_IRQn, /* uart iqrn */ - // RCU_UART1, RCU_GPIOA, RCU_GPIOA, /* periph clock, tx gpio clock, rt gpio clock */ - // GPIOA, GPIOA, /* tx port, tx alternate, tx pin */ - // GPIO_PIN_2, GPIO_PIN_3, /* rx port, rx alternate, rx pin */ &serial1, "uart1", }, @@ -133,9 +128,6 @@ static const struct V85xx_uart uarts[] = { { UART2, /* uart peripheral index */ UART2_IRQn, /* uart iqrn */ - // RCU_UART2, RCU_GPIOB, RCU_GPIOB, /* periph clock, tx gpio clock, rt gpio clock */ - // GPIOB, GPIOB, /* tx port, tx alternate, tx pin */ - // GPIO_PIN_10, GPIO_PIN_11, /* rx port, rx alternate, rx pin */ &serial2, "uart2", }, @@ -145,9 +137,6 @@ static const struct V85xx_uart uarts[] = { { UART3, /* uart peripheral index */ UART3_IRQn, /* uart iqrn */ - // RCU_UART3, RCU_GPIOC, RCU_GPIOC, /* periph clock, tx gpio clock, rt gpio clock */ - // GPIOC, GPIOC, /* tx port, tx alternate, tx pin */ - // GPIO_PIN_10, GPIO_PIN_11, /* rx port, rx alternate, rx pin */ &serial3, "uart3", }, @@ -157,9 +146,6 @@ static const struct V85xx_uart uarts[] = { { UART4, /* uart peripheral index */ UART4_IRQn, /* uart iqrn */ - // RCU_UART4, RCU_GPIOC, RCU_GPIOD, /* periph clock, tx gpio clock, rt gpio clock */ - // GPIOC, GPIOD, /* tx port, tx alternate, tx pin */ - // GPIO_PIN_12, GPIO_PIN_2, /* rx port, rx alternate, rx pin */ &serial4, "uart4", }, @@ -191,15 +177,6 @@ static rt_err_t V85xx_configure(struct rt_serial_device *serial, struct serial_c break; } - // switch (cfg->stop_bits) { - // case STOP_BITS_2: - // UART_InitParaStruct.UART_STBits = UART_STBITS_2; - // break; - // default: - // UART_InitParaStruct.UART_STBits = UART_STBITS_1; - // break; - // } - switch (cfg->parity) { case PARITY_ODD: UART_InitParaStruct.Parity = UART_PARITY_ODD; @@ -212,7 +189,6 @@ static rt_err_t V85xx_configure(struct rt_serial_device *serial, struct serial_c break; } - // UART_InitParaStruct.UART_HardwareFlowControl = UART_HARDWAREFLOWCONTROL_NONE; UART_InitParaStruct.Mode = UART_MODE_RX | UART_MODE_TX; UART_Init(UARTx, &UART_InitParaStruct); UART_Cmd(UARTx, UART_InitParaStruct.Mode, ENABLE); diff --git a/bsp/Vango_V85xx/drivers/drv_usart.h b/bsp/Vango_V85xx/drivers/drv_usart.h index c558ac7d6f..02074a1b65 100644 --- a/bsp/Vango_V85xx/drivers/drv_usart.h +++ b/bsp/Vango_V85xx/drivers/drv_usart.h @@ -14,17 +14,10 @@ #include #include -/* GD32 uart driver */ +/* V85XX uart driver */ struct V85xx_uart { UART_TypeDef * uart_periph; IRQn_Type irqn; - // rcu_periph_enum per_clk; - // rcu_periph_enum tx_gpio_clk; - // rcu_periph_enum rx_gpio_clk; - // GPIO_TypeDef * tx_port; - // GPIO_TypeDef * rx_port; - // uint16_t tx_pin; - // uint16_t rx_pin; struct rt_serial_device *serial; char *device_name; diff --git a/bsp/Vango_V85xx/rtconfig.h b/bsp/Vango_V85xx/rtconfig.h index 266486186f..a1a5cba83d 100644 --- a/bsp/Vango_V85xx/rtconfig.h +++ b/bsp/Vango_V85xx/rtconfig.h @@ -171,8 +171,8 @@ /* entertainment: terminal games and other interesting software packages */ -#define SOC_SERIES_GD32F1 -#define SOC_GD32103C +#define SOC_SERIES_V85XX +#define SOC_V85XX /* On-chip Peripheral Drivers */ -- GitLab