Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
can_frame Struct Reference

CAN frame structure. More...

#include <can.h>

Data Fields

uint32_t id
 Standard (11-bit) or extended (29-bit) CAN identifier.
 
uint8_t dlc
 Data Length Code (DLC) indicating data length in bytes.
 
uint8_t flags
 Flags.
 
uint16_t timestamp
 Captured value of the free-running timer in the CAN controller when this frame was received.
 
union {
   uint8_t   data [CAN_MAX_DLEN]
 Payload data accessed as unsigned 8 bit values. More...
 
   uint32_t   data_32 [DIV_ROUND_UP(CAN_MAX_DLEN,
       sizeof(uint32_t))]
 Payload data accessed as unsigned 32 bit values. More...
 
}; 
 The frame payload data.
 

Detailed Description

CAN frame structure.

Field Documentation

◆ 

union { ... } can_frame::@139

The frame payload data.

◆ data

uint8_t can_frame::data[CAN_MAX_DLEN]

Payload data accessed as unsigned 8 bit values.

◆ data_32

uint32_t can_frame::data_32[DIV_ROUND_UP(CAN_MAX_DLEN, sizeof(uint32_t))]

Payload data accessed as unsigned 32 bit values.

◆ dlc

uint8_t can_frame::dlc

Data Length Code (DLC) indicating data length in bytes.

◆ flags

uint8_t can_frame::flags

Flags.

See also
CAN_FRAME_FLAGS.

◆ id

uint32_t can_frame::id

Standard (11-bit) or extended (29-bit) CAN identifier.

◆ timestamp

uint16_t can_frame::timestamp

Captured value of the free-running timer in the CAN controller when this frame was received.

The timer is incremented every bit time and captured at the start of frame bit (SOF).

Note
CONFIG_CAN_RX_TIMESTAMP must be selected for this field to be available.

The documentation for this struct was generated from the following file: