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
@@ -0,0 +1,25 @@
#ifndef DEVICE_SPI_COMMAND_HANDLER_H
#define DEVICE_SPI_COMMAND_HANDLER_H
#include <cstdint>
class AppSpiCommand;
struct SpiCommandContext {
uint8_t frame_type;
const uint8_t *payload;
uint16_t payload_len;
uint8_t *tx_buf;
uint16_t tx_buf_size;
uint16_t *tx_len;
};
class ISpiCommandHandler {
public:
~ISpiCommandHandler() {}
virtual bool canHandle(uint8_t frame_type) const = 0;
virtual void handle(AppSpiCommand &bus, const SpiCommandContext &ctx) = 0;
};
#endif /* DEVICE_SPI_COMMAND_HANDLER_H */