7 #ifndef LINUX_LIBV2_SOURCE_CAN_TQ_CAN_H_ 8 #define LINUX_LIBV2_SOURCE_CAN_TQ_CAN_H_ 13 #define CAN_API extern "C" CAN_API int tq_can_close(int fd)
关闭can设备
CAN_API int tq_can_write_data(int fd, struct can_frame data)
用于向can设备中写入数据
CAN_API int tq_can_read_data(int fd, struct can_frame *data, unsigned int timeout_ms)
用于向can设备中读取数据
CAN_API int tq_can_open(const char *dev)
打开can设备
CAN_API int tq_check_can(const char *dev)
查询tq-can-lib库中是否注册了can设备
CAN_API int tq_init_can(const char *dev, int bitrate, int mode)
初始化can设备