feat(cproject): 重构项目文件结构并添加EtherCAT通信支持

- 将设备相关文件重新组织为device/spi和comm分组
- 添加EtherCAT从站通信模块(esc_exmc_bus、esc_lan9252、ethercat_slave等)
- 添加EXMC外设组件支持
- 统一文件命名规范为小写

refactor(canfd): 优化CANFD模块中断安全性和配置方式

- 替换自定义临界区函数为RT_CRITICAL_SAVE/RESTORE宏
- 使用配置常量CONFIG_IRQ_PREEMPT_CAN替代硬编码值
- 简化邮箱满时的处理逻辑,移除不必要的SysTick等待
- 移除废弃的中断保存头文件引用

refactor(timer): 更新定时器配置以使用配置常量

- 修复头文件包含路径大小写问题
- 使用CONFIG_NVIC_PRIORITY_GROUP配置项替代硬编码值
This commit is contained in:
cbb
2026-06-26 00:57:59 +08:00
parent 86c0ec730b
commit 1612e326ee
32 changed files with 1378 additions and 147 deletions
+29 -16
View File
@@ -1,4 +1,4 @@
# A project translates into one executable or library.
# A project translates into one executable or library.
project:
groups:
@@ -22,26 +22,38 @@ project:
- file: ./sys/config.h
- group: device
files:
- file: ./device/adc.h
- file: ./device/adc.cpp
- file: ./device/canfd.h
- file: ./device/canfd.cpp
- file: ./device/timer.h
- file: ./device/timer.cpp
- file: ./device/usart0.h
- file: ./device/usart0.cpp
- file: ./device/adc.h
- file: ./device/ADC.cpp
- file: ./device/canfd.h
- file: ./device/CANFD.cpp
- file: ./device/app_spi_command.h
- file: ./device/app_spi_command.cpp
- file: ./device/spi_command_handler.h
- file: ./device/app_spi_command_defs.h
- file: ./device/app_spi_cmd_boot_request.cpp
- file: ./device/app_spi_cmd_ota_wait.cpp
- file: ./device/app_spi_cmd_ping.cpp
- file: ./device/app_spi_cmd_can_bridge.cpp
- file: ./device/Timer.h
- file: ./device/Timer.cpp
- file: ./device/temp_sensor.h
- file: ./device/watchdog.h
- file: ./device/temp_sensor.cpp
- file: ./device/watchdog.h
- file: ./device/watchdog.cpp
- group: device/spi
files:
- file: ./device/spi/app_spi_command.h
- file: ./device/spi/app_spi_command.cpp
- file: ./device/spi/spi_command_handler.h
- file: ./device/spi/app_spi_command_defs.h
- file: ./device/spi/app_spi_cmd_boot_request.cpp
- file: ./device/spi/app_spi_cmd_ota_wait.cpp
- file: ./device/spi/app_spi_cmd_ping.cpp
- file: ./device/spi/app_spi_cmd_can_bridge.cpp
- group: comm
files:
- file: ./comm/esc_exmc_bus.h
- file: ./comm/esc_exmc_bus.cpp
- file: ./comm/esc_lan9252.h
- file: ./comm/esc_lan9252.cpp
- file: ./comm/ethercat_slave.h
- file: ./comm/ethercat_slave.cpp
- file: ./comm/ethercat_sync.h
- file: ./comm/ethercat_sync.cpp
# List components to use for your application.
# A software component is a re-usable unit that may be configurable.
@@ -53,6 +65,7 @@ project:
- component: Device:GD32E50x_StdPeripherals:CRC
- component: Device:GD32E50x_StdPeripherals:DBG
- component: Device:GD32E50x_StdPeripherals:DMA
- component: Device:GD32E50x_StdPeripherals:EXMC
- component: Device:GD32E50x_StdPeripherals:EXTI
- component: Device:GD32E50x_StdPeripherals:FMC
- component: Device:GD32E50x_StdPeripherals:GPIO