mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
上传了所有todo任务,为底盘新增了超级电容模块
This commit is contained in:
21
README.md
21
README.md
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user