Browse Source

更换格式控制文件位置,删除冗余代码和注释,更正芯片命名

FuChao 3 years ago
parent
commit
fc537808cf

+ 1 - 2
.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
+- bsp/mm32f327x/Libraries

+ 2 - 2
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

+ 6 - 0
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

+ 3 - 3
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"

+ 0 - 40
bsp/Vango_V85xx/Libraries/CMSIS/Vango/V85xx/Include/gd32f10x_conf.h

@@ -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 */
-

+ 1 - 25
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);

+ 1 - 8
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;

+ 2 - 2
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 */