summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorFuChao <[email protected]>2021-09-09 00:52:22 +0800
committerFuChao <[email protected]>2021-09-09 00:52:22 +0800
commitfc537808cfcd8d2b797a06aae8840a1852dc27bc (patch)
tree01b6d3f67c5b9d16618b25588fe5929b6ce507c8 /bsp
parentdd910a7805153c6421bc58dfa7c7a626474151b4 (diff)
更换格式控制文件位置,删除冗余代码和注释,更正芯片命名
Diffstat (limited to 'bsp')
-rw-r--r--bsp/Vango_V85xx/.config4
-rw-r--r--bsp/Vango_V85xx/.ignore_format.yml6
-rw-r--r--bsp/Vango_V85xx/Kconfig6
-rw-r--r--bsp/Vango_V85xx/Libraries/CMSIS/Vango/V85xx/Include/gd32f10x_conf.h40
-rw-r--r--bsp/Vango_V85xx/drivers/drv_usart.c26
-rw-r--r--bsp/Vango_V85xx/drivers/drv_usart.h9
-rw-r--r--bsp/Vango_V85xx/rtconfig.h4
7 files changed, 15 insertions, 80 deletions
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 <target.h>
@@ -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 <rthw.h>
#include <rtthread.h>
-/* 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 */