Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
zcan_frame Struct Reference

CAN message structure. More...

#include <can.h>

Data Fields

uint32_t id: 29
 
uint32_t fd: 1
 
uint32_t rtr: 1
 
uint32_t id_type: 1
 
uint8_t dlc
 
uint8_t brs: 1
 
uint8_t res: 7
 
union {
   uint8_t   data [8]
 
   uint32_t   data_32 [ceiling_fraction(8, sizeof(uint32_t))]
 
}; 
 

Detailed Description

CAN message structure.

Used to pass can messages from userspace to the driver and from driver to userspace

Field Documentation

◆ 

union { ... } zcan_frame::@105

The frame payload data.

◆ brs

uint8_t zcan_frame::brs

Baud Rate Switch. Frame transfer with different timing during the data phase. Only valid for CAN-FD

◆ data

uint8_t zcan_frame::data[8]

◆ data_32

uint32_t zcan_frame::data_32[ceiling_fraction(8, sizeof(uint32_t))]

◆ dlc

uint8_t zcan_frame::dlc

The length of the message (max. 8) in byte

◆ fd

uint32_t zcan_frame::fd

Frame is in the CAN-FD frame format

◆ id

uint32_t zcan_frame::id

Message identifier

◆ id_type

uint32_t zcan_frame::id_type

Indicates the identifier type (standard or extended) use can_ide enum for assignment

◆ res

uint8_t zcan_frame::res

Reserved for future flags

◆ rtr

uint32_t zcan_frame::rtr

Set the message to a transmission request instead of data frame use can_rtr enum for assignment


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