Definitions high-level CAN interface. More...
Definitions high-level CAN interface.
Definition in file can.h.
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | can_frame |
Controller Area Network frame. More... | |
struct | can_filter |
Controller Area Network filter. More... | |
struct | can_bittiming |
CAN bit-timing parameters. More... | |
struct | can_bittiming_const |
CAN hardware-dependent bit-timing constant. More... | |
Typedefs | |
typedef uint32_t | canid_t |
Controller Area Network Identifier structure. | |
typedef struct can_frame | can_frame_t |
CAN frame. | |
Enumerations | |
enum | can_state { CAN_STATE_ERROR_ACTIVE = 0 , CAN_STATE_ERROR_WARNING , CAN_STATE_ERROR_PASSIVE , CAN_STATE_BUS_OFF , CAN_STATE_STOPPED , CAN_STATE_SLEEPING , CAN_STATE_MAX } |
CAN operational and error states. More... | |
#define | CAN_MAX_DLEN (8) |
Max data length for classic and FD CAN frames (compliant with libsocketcan macros) | |
#define | CANFD_MAX_DLEN (64) |
CAN FD maximum data length. | |
CAN_ID flags and masks | |
#define | CAN_EFF_FLAG (0x80000000U) |
EFF/SFF is set in the MSB. | |
#define | CAN_RTR_FLAG (0x40000000U) |
remote transmission request | |
#define | CAN_ERR_FLAG (0x20000000U) |
error message frame | |
#define | CAN_SFF_MASK (0x000007FFU) |
standard frame format (SFF) | |
#define | CAN_EFF_MASK (0x1FFFFFFFU) |
extended frame format (EFF) | |
#define | CAN_ERR_MASK (0x1FFFFFFFU) |
omit EFF, RTR, ERR flags | |
CAN FD flags extracted from libsocketcan | |
#define | CANFD_BRS 0x01 |
bit rate switch (second bitrate for payload data) | |
#define | CANFD_ESI 0x02 |
error state indicator of the transmitting node | |
#define | CANFD_FDF 0x04 |
mark CAN FD for dual use of struct canfd_frame | |