isotp-c
Platform-independent ISO 15765-2 transport for embedded C
Loading...
Searching...
No Matches
CAN frame constants

Values used to configure CAN and CAN FD transmission. More...

Macros

#define ISOTP_CAN_DL_CLASSIC   8
#define ISOTP_CAN_FRAME_FLAG_NONE   0x00
#define ISOTP_CAN_FRAME_FLAG_FD   0x01
#define ISOTP_CAN_FRAME_FLAG_BRS   0x02
#define ISOTP_SF_MAX_PAYLOAD(can_dl)

Detailed Description

Values used to configure CAN and CAN FD transmission.

Macro Definition Documentation

◆ ISOTP_CAN_DL_CLASSIC

#define ISOTP_CAN_DL_CLASSIC   8

Number of payload bytes in a full Classical CAN frame.

Examples
isotp_example_callbacks.c, isotp_example_can_fd.c, isotp_example_polling.c, and isotp_example_streaming.c.

Definition at line 54 of file isotp_defines.h.

◆ ISOTP_CAN_FRAME_FLAG_BRS

#define ISOTP_CAN_FRAME_FLAG_BRS   0x02

Enable CAN FD bit-rate switching for the data phase.

Examples
isotp_example_can_fd.c.

Definition at line 70 of file isotp_defines.h.

◆ ISOTP_CAN_FRAME_FLAG_FD

#define ISOTP_CAN_FRAME_FLAG_FD   0x01

Transmit a CAN FD frame.

Examples
isotp_example_can_fd.c.

Definition at line 68 of file isotp_defines.h.

◆ ISOTP_CAN_FRAME_FLAG_NONE

#define ISOTP_CAN_FRAME_FLAG_NONE   0x00

Transmit a Classical CAN frame; no optional frame properties are set.

Definition at line 66 of file isotp_defines.h.

◆ ISOTP_SF_MAX_PAYLOAD

#define ISOTP_SF_MAX_PAYLOAD ( can_dl)
Value:
((can_dl) > ISOTP_CAN_DL_CLASSIC ? (uint32_t)((can_dl) - 2u) : (uint32_t)((can_dl) - 1u))
#define ISOTP_CAN_DL_CLASSIC

Largest ISO-TP payload that fits in one frame for a given CAN_DL.

CAN FD data lengths use the two-byte SF_DL escape header; Classical CAN uses a one-byte header.

Definition at line 78 of file isotp_defines.h.