summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-01-12 12:30:18 +0700
committerhathach <[email protected]>2023-01-12 12:30:18 +0700
commit658897cf4e3058aee66f65c17a152ef65b1671c1 (patch)
tree9623b40900c4a00606d166f108d852bd964dbd8f
parente61d4aefe6b9fbab862e7c440ff9ff25ebb5092c (diff)
fix redundant-decls warnings with USART_Printf_Init()
-rw-r--r--hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.c2
-rw-r--r--hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.h2
-rw-r--r--hw/bsp/ch32v307/ch32v30x_it.h2
-rw-r--r--hw/bsp/ch32v307/family.c2
-rw-r--r--hw/bsp/ch32v307/family.mk6
5 files changed, 5 insertions, 9 deletions
diff --git a/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.c b/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.c
index 416782d0e..ad8b32957 100644
--- a/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.c
+++ b/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.c
@@ -75,7 +75,7 @@ void uart_sync(void)
}
-void USART_Printf_Init(uint32_t baudrate)
+void usart_printf_init(uint32_t baudrate)
{
GPIO_InitTypeDef GPIO_InitStructure;
USART_InitTypeDef USART_InitStructure;
diff --git a/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.h b/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.h
index 4348438bb..a7e070585 100644
--- a/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.h
+++ b/hw/bsp/ch32v307/boards/CH32V307V-R1-1v0/debug_uart.h
@@ -28,4 +28,4 @@
void uart_write(char c);
void uart_sync(void);
-void USART_Printf_Init(uint32_t baudrate);
+void usart_printf_init(uint32_t baudrate);
diff --git a/hw/bsp/ch32v307/ch32v30x_it.h b/hw/bsp/ch32v307/ch32v30x_it.h
index 6475c5f11..42f285edf 100644
--- a/hw/bsp/ch32v307/ch32v30x_it.h
+++ b/hw/bsp/ch32v307/ch32v30x_it.h
@@ -10,7 +10,7 @@
#ifndef __CH32V30x_IT_H
#define __CH32V30x_IT_H
-#include "debug.h"
+// #include "debug.h"
#endif /* __CH32V30x_IT_H */
diff --git a/hw/bsp/ch32v307/family.c b/hw/bsp/ch32v307/family.c
index 428466ad7..0260918ab 100644
--- a/hw/bsp/ch32v307/family.c
+++ b/hw/bsp/ch32v307/family.c
@@ -68,7 +68,7 @@ void board_init(void) {
SysTick_Config(SystemCoreClock / 1000);
#endif
- USART_Printf_Init(115200);
+ usart_printf_init(115200);
RCC_USBCLK48MConfig(RCC_USBCLK48MCLKSource_USBPHY);
RCC_USBHSPLLCLKConfig(RCC_HSBHSPLLCLKSource_HSE);
diff --git a/hw/bsp/ch32v307/family.mk b/hw/bsp/ch32v307/family.mk
index ffc992f21..93370fc57 100644
--- a/hw/bsp/ch32v307/family.mk
+++ b/hw/bsp/ch32v307/family.mk
@@ -30,9 +30,6 @@ CFLAGS += \
-Xlinker --gc-sections \
-DBOARD_TUD_MAX_SPEED=OPT_MODE_HIGH_SPEED
-# caused by extra void USART_Printf_Init() in debug_uart.h and EVT/EXAME/SRC/DEBUG/debug.h
-CFLAGS += -Wno-error=redundant-decls
-
LDFLAGS += \
-Xlinker --gc-sections --specs=nano.specs --specs=nosys.specs
@@ -49,8 +46,7 @@ SRC_S += \
INC += \
$(TOP)/$(BOARD_PATH) \
- $(TOP)/$(CH32V307_SDK_SRC)/Peripheral/inc \
- $(TOP)/$(CH32V307_SDK_SRC)/Debug
+ $(TOP)/$(CH32V307_SDK_SRC)/Peripheral/inc
# For freeRTOS port source
FREERTOS_PORT = RISC-V