重构User_code目录结构:将文件组织到子文件夹中

主要更改:
- 将所有BSP外设文件移动到独立子文件夹(can/, fdcan/, uart/等)
- 将所有Component文件移动到独立子文件夹(pid/, filter/, cmd/等)
- 将所有Device文件移动到独立子文件夹(dr16/, bmi088/等)
- 更新代码生成器以支持新的文件夹结构
- 保持向后兼容性,支持从子文件夹或根目录加载模板
- 添加STRUCTURE.md文档说明新的目录结构

优势:
 更好的代码组织和管理
 便于添加、删除、修改模板
 清晰的模块划分
 向后兼容现有结构
This commit is contained in:
2026-01-01 17:12:40 +08:00
parent daf0a28517
commit eeb02a2de3
89 changed files with 151 additions and 8 deletions

View File

@@ -0,0 +1,39 @@
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ----------------------------------------------------------------- */
#include "bsp/uart.h"
#include "device/device.h"
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
/* Exported functions prototypes -------------------------------------------- */
typedef enum {
VOFA_PROTOCOL_RAWDATA,
VOFA_PROTOCOL_FIREWATER,
VOFA_PROTOCOL_JUSTFLOAT,
} VOFA_Protocol_t;
/**
* @brief 初始化VOFA设备
* @param protocol 设置通信协议
* @return
*/
int8_t VOFA_init(VOFA_Protocol_t protocol);
/**
* @brief 发送数据到VOFA
* @param channels 要发送的通道数据
* @param channel_count 通道数量
* @param dma 是否使用DMA发送
* @return
*/
int8_t VOFA_Send(float* channels, uint8_t channel_count, bool dma);
#ifdef __cplusplus
}
#endif