mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
新增了CAN变长度数据帧的基本支持
This commit is contained in:
@@ -19,6 +19,7 @@ typedef struct _
|
||||
uint8_t tx_buff[8];
|
||||
uint8_t rx_buff[8];
|
||||
uint32_t rx_id;
|
||||
uint8_t rx_len;
|
||||
void (*can_module_callback)(struct _ *); // callback needs an instance to tell among registered ones
|
||||
} can_instance;
|
||||
|
||||
@@ -49,4 +50,12 @@ void CANTransmit(can_instance *_instance);
|
||||
*/
|
||||
void CANRegister(can_instance *instance, can_instance_config_s config);
|
||||
|
||||
/**
|
||||
* @brief 修改CAN发送报文的数据帧长度;注意最大长度为8,在没有进行修改的时候,默认长度为8
|
||||
*
|
||||
* @param _instance 要修改长度的can实例
|
||||
* @param length 设定长度
|
||||
*/
|
||||
void CANSetDLC(can_instance *_instance,uint8_t length);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user