Data Fields
can_frame Struct Reference

CAN frame structure. More...

#include <types.h>

Data Fields

union {
   canid_t   can_id
 
   struct {
      uint32_t   id: 29
 
      uint32_t   err: 1
 
      uint32_t   rtr: 1
 
      uint32_t   eff: 1
 
   } 
 
}; 
 
union {
   uint8_t   can_dlc
 
   uint8_t   dlc
 
}; 
 
uint8_t __pad
 
uint8_t __res0
 
uint8_t __res1
 
uint8_t data [8]
 

Detailed Description

CAN frame structure.

The structure that makes up a CAN message. The unions are provided in order for there to be structural naming compatibility with SocketCAN while at the same time providing an alternative easier to use naming convention. We diverge a bit with TI structural naming convention of the struct in order to provide an option to be compatible with SocketCAN conventions.

See also
CAN_write()
CAN_read()

Field Documentation

§ can_id

canid_t can_frame::can_id

11/29-bit CAN ID + EFF/RTR/ERR flags, SocketCAN

§ id

uint32_t can_frame::id

11/29-bit CAN ID

§ err

uint32_t can_frame::err

error flag

§ rtr

uint32_t can_frame::rtr

remote frame flag

§ eff

uint32_t can_frame::eff

extended frame format flag

§ @1

union { ... }

§ can_dlc

uint8_t can_frame::can_dlc

data length code, SocketCAN compatible

§ dlc

uint8_t can_frame::dlc

data length code

§ @3

union { ... }

§ __pad

uint8_t can_frame::__pad

alignment padding

§ __res0

uint8_t can_frame::__res0

reserved

§ __res1

uint8_t can_frame::__res1

reserved

§ data

uint8_t can_frame::data[8]

CAN frame payload data


The documentation for this struct was generated from the following file:
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale