TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
Loading...
Searching...
No Matches
CAN_frame Struct Reference

Represents a full CAN frame for sending/receiving. More...

#include <can.h>

Data Fields

uint32_t id
uint8_t dlc
char data [8]
uint8_t extended
uint8_t rtr

Detailed Description

Represents a full CAN frame for sending/receiving.

Supports standard 11-bit or extended 29-bit IDs, data length code, payload, and Remote Transmission Request (RTR) flag.

Definition at line 53 of file can.h.

Field Documentation

◆ data

char CAN_frame::data[8]

Payload bytes (up to 8)

Definition at line 56 of file can.h.

Referenced by can_read_rx0(), can_read_rx1(), can_write(), MCP2515_write(), MCP2515_write_n(), and process_can_frame().

◆ dlc

uint8_t CAN_frame::dlc

Data length code (0-8 bytes)

Definition at line 55 of file can.h.

Referenced by can_read_rx0(), can_read_rx1(), and can_write().

◆ extended

uint8_t CAN_frame::extended

Flag for extended (29-bit) ID; false = 11-bit

Definition at line 57 of file can.h.

Referenced by can_write().

◆ id

uint32_t CAN_frame::id

11-bit or 29-bit identifier (extended = true)

Definition at line 54 of file can.h.

Referenced by can_read_rx0(), can_read_rx1(), can_write(), and process_can_frame().

◆ rtr

uint8_t CAN_frame::rtr

Remote Transmission Request flag; true asks other node for a response

Definition at line 58 of file can.h.


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