refactor(bsp): 删除无实际作用的 bsp_uart 模块
分析结论: Bsp 层并存 bsp_uart.{c,h} 与 bsp_usart.{c,h} 两套串口支持包,
其中 bsp_uart 是死代码,证据:
1. bsp_uart 只导出一个函数 UartSendTxMessage()(HAL_UART_Transmit 阻塞
发送 + 最多 5 次重发),全工程检索无任何调用方;
2. #include "bsp_uart.h" 只出现在 bsp_uart.c 自身,Application/Core 层
一律包含 bsp_usart.h;
3. bsp_uart.h 里的 UART1/UART2 宏也无人使用,仅被 bsp_usart.c 的注释提及;
4. 真正在用的是 bsp_usart.{c,h}(USART1/3/6 的 DMA 循环接收 + 空闲中断整帧
回调 + TX DMA),main.c/stm32f4xx_it.c/referee_task/can_task 均依赖它。
变更:
- 删除 云台/底盘 各自的 Bsp/Src/bsp_uart.c 与 Bsp/Inc/bsp_uart.h;
- 从两个 Keil 工程的 .uvprojx(编译文件列表)与 .uvoptx(文件选项)中摘除
对应条目,工程文件良构性已校验通过。
注: bsp_usart.c 中 usart1_tx_dma_enable()/usart6_tx_dma_enable() 目前也
无调用方(仅 usart1_tx_dma_init() 被 can_task 调用,为视觉自瞄预留),属接口
预留而非死模块,本次保留。
This commit is contained in:
@@ -1456,30 +1456,6 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>98</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Bsp\Src\bsp_uart.c</PathWithFileName>
|
||||
<FilenameWithoutPath>bsp_uart.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>99</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Bsp\Inc\bsp_uart.h</PathWithFileName>
|
||||
<FilenameWithoutPath>bsp_uart.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
||||
@@ -2504,16 +2504,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Bsp\Inc\bsp_usart.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bsp_uart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Bsp\Src\bsp_uart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bsp_uart.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Bsp\Inc\bsp_uart.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
||||
@@ -1415,30 +1415,6 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>95</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Bsp\Src\bsp_uart.c</PathWithFileName>
|
||||
<FilenameWithoutPath>bsp_uart.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>96</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Bsp\Inc\bsp_uart.h</PathWithFileName>
|
||||
<FilenameWithoutPath>bsp_uart.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
||||
@@ -2438,16 +2438,6 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Bsp\Inc\bsp_usart.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bsp_uart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Bsp\Src\bsp_uart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bsp_uart.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Bsp\Inc\bsp_uart.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
||||
Reference in New Issue
Block a user