上传了所有todo任务,为底盘新增了超级电容模块

This commit is contained in:
NeoZng
2022-12-05 22:07:44 +08:00
parent 9c9ea14bde
commit 6d4a0cb148
9 changed files with 280 additions and 13 deletions

View File

@@ -87,7 +87,26 @@
} Motor_Controller_s;
```
数据类型单一、结构不复杂的类型以`_t`后缀结尾表明这是一种数据type复杂的结构体类型使用`_s`结尾表明其功能和内涵多structure
数据类型单一、结构不复杂的类型以`_t`后缀结尾表明这是一种数据type复杂的结构体类型使用`_s`结尾表明其功能和内涵多structure对于某个bsp、module其类型结构体应该称为`xxxInstance`:
```c
typedef struct _
{
CAN_HandleTypeDef *can_handle; // can句柄
CAN_TxHeaderTypeDef txconf; // CAN报文发送配置
uint32_t tx_id; // 发送id
uint32_t tx_mailbox; // CAN消息填入的邮箱号
uint8_t tx_buff[8]; // 发送缓存,最大为8
uint8_t rx_buff[8]; // 接收缓存
uint32_t rx_id; // 接收id
uint8_t rx_len; // 接收长度,可能为0-8
// 接收的回调函数,用于解析接收到的数据
void (*can_module_callback)(struct _ *); // callback needs an instance to tell among registered ones
} CANInstance;
#pragma pack()
```
## BSP层(Board Sopport Package)