Apollo 10.0
自动驾驶开放平台
|
#include <sys/ioctl.h>
#include <sys/types.h>
#include <cstdint>
#include <cstdlib>
#include "modules/drivers/canbus/can_client/hermes_can/bcan_defs.h"
宏定义 | |
#define | BCAN_MAX_TX_MSG 256 |
#define | BCAN_MAX_RX_MSG 256 |
#define | BCAN_DEV_UNINIT -1 |
#define | BCAN_DEV_OPEN (1 << 0) |
#define | BCAN_DEV_CLOSE (1 << 1) |
#define | BCAN_DEV_BAUD_SET (1 << 2) |
#define | BCAN_DEV_NORMAL (1 << 3) |
#define | BCAN_DEV_LOOPBACK (1 << 4) |
#define | BCAN_DEV_CONFIG (1 << 5) |
#define | BCAN_DEV_START (1 << 6) |
#define | BCAN_DEV_STOP (1 << 7) |
#define | BCAN_DEV_ACTIVE (1 << 8) |
#define | BCAN_DEV_RECVD (1 << 9) |
类型定义 | |
typedef uint64_t | bcan_hdl_t |
枚举 | |
enum | bcan_baudrate_val { BCAN_BAUDRATE_1M , BCAN_BAUDRATE_500K , BCAN_BAUDRATE_250K , BCAN_BAUDRATE_150K , BCAN_BAUDRATE_NUM } |
函数 | |
const char * | bcan_get_libversion (void) |
const char * | bcan_bld_info (void) |
const char * | bcan_bld_info_short (void) |
const char * | bcan_get_err_msg (int err_code) |
int | bcan_open (uint32_t dev_index, uint32_t flags, uint64_t tx_to, uint64_t rx_to, bcan_hdl_t *hdl) |
int | bcan_close (bcan_hdl_t hdl) |
int | bcan_start (bcan_hdl_t hdl) |
int | bcan_stop (bcan_hdl_t hdl) |
int | bcan_set_loopback (bcan_hdl_t hdl) |
int | bcan_unset_loopback (bcan_hdl_t hdl) |
int | bcan_set_baudrate (bcan_hdl_t hdl, uint32_t rate) |
int | bcan_get_baudrate (bcan_hdl_t hdl, uint32_t *rate) |
int | bcan_recv (bcan_hdl_t hdl, bcan_msg_t *buf, uint32_t num_msg) |
int | bcan_send (bcan_hdl_t hdl, bcan_msg_t *buf, uint32_t num_msg) |
int | bcan_send_hi_pri (bcan_hdl_t hdl, bcan_msg_t *buf) |
int | bcan_get_status (bcan_hdl_t hdl) |
int | bcan_get_err_counter (bcan_hdl_t hdl, uint8_t *rx_err, uint8_t *tx_err) |
int | bcan_id_add (bcan_hdl_t hdl, uint32_t id_start, uint32_t id_end) |
int | bcan_id_add_all (bcan_hdl_t hdl) |
int | bcan_id_remove (bcan_hdl_t hdl, uint32_t id_start, uint32_t id_end) |
int | bcan_id_remove_all (bcan_hdl_t hdl) |
typedef uint64_t bcan_hdl_t |
enum bcan_baudrate_val |
枚举值 | |
---|---|
BCAN_BAUDRATE_1M | |
BCAN_BAUDRATE_500K | |
BCAN_BAUDRATE_250K | |
BCAN_BAUDRATE_150K | |
BCAN_BAUDRATE_NUM |
const char * bcan_bld_info | ( | void | ) |
const char * bcan_bld_info_short | ( | void | ) |
int bcan_close | ( | bcan_hdl_t | hdl | ) |
int bcan_get_baudrate | ( | bcan_hdl_t | hdl, |
uint32_t * | rate | ||
) |
int bcan_get_err_counter | ( | bcan_hdl_t | hdl, |
uint8_t * | rx_err, | ||
uint8_t * | tx_err | ||
) |
const char * bcan_get_err_msg | ( | int | err_code | ) |
const char * bcan_get_libversion | ( | void | ) |
int bcan_get_status | ( | bcan_hdl_t | hdl | ) |
int bcan_id_add | ( | bcan_hdl_t | hdl, |
uint32_t | id_start, | ||
uint32_t | id_end | ||
) |
int bcan_id_add_all | ( | bcan_hdl_t | hdl | ) |
int bcan_id_remove | ( | bcan_hdl_t | hdl, |
uint32_t | id_start, | ||
uint32_t | id_end | ||
) |
int bcan_id_remove_all | ( | bcan_hdl_t | hdl | ) |
int bcan_open | ( | uint32_t | dev_index, |
uint32_t | flags, | ||
uint64_t | tx_to, | ||
uint64_t | rx_to, | ||
bcan_hdl_t * | hdl | ||
) |
int bcan_recv | ( | bcan_hdl_t | hdl, |
bcan_msg_t * | buf, | ||
uint32_t | num_msg | ||
) |
int bcan_send | ( | bcan_hdl_t | hdl, |
bcan_msg_t * | buf, | ||
uint32_t | num_msg | ||
) |
int bcan_send_hi_pri | ( | bcan_hdl_t | hdl, |
bcan_msg_t * | buf | ||
) |
int bcan_set_baudrate | ( | bcan_hdl_t | hdl, |
uint32_t | rate | ||
) |
int bcan_set_loopback | ( | bcan_hdl_t | hdl | ) |
int bcan_start | ( | bcan_hdl_t | hdl | ) |
int bcan_stop | ( | bcan_hdl_t | hdl | ) |
int bcan_unset_loopback | ( | bcan_hdl_t | hdl | ) |