![]() |
RT-Thread RTOS
An open source embedded real-time operating system
|
#include <dev_can.h>
Data Fields | |
| rt_uint32_t | id: 29 |
| rt_uint32_t | ide: 1 |
| rt_uint32_t | rtr: 1 |
| rt_uint32_t | rsv: 1 |
| rt_uint32_t | len: 8 |
| rt_uint32_t | priv: 8 |
| rt_int32_t | hdr_index: 8 |
| rt_uint32_t | rxfifo: 2 |
| rt_uint32_t | nonblocking: 1 |
| rt_uint8_t | data [8] |
The CAN message structure.
| rt_uint32_t rt_can_msg::id |
CAN ID (Standard or Extended).
| rt_uint32_t rt_can_msg::ide |
Identifier type: 0=Standard ID, 1=Extended ID.
| rt_uint32_t rt_can_msg::rtr |
Frame type: 0=Data Frame, 1=Remote Frame.
| rt_uint32_t rt_can_msg::rsv |
Reserved bit.
| rt_uint32_t rt_can_msg::len |
Data Length Code (DLC) from 0 to 8.
| rt_uint32_t rt_can_msg::priv |
Private data, used to specify the hardware mailbox in private mode.
| rt_int32_t rt_can_msg::hdr_index |
For received messages, the index of the hardware filter that matched the message.
| rt_uint32_t rt_can_msg::rxfifo |
The RX FIFO where the message was received.
| rt_uint32_t rt_can_msg::nonblocking |
Send mode: 0=Blocking (default), 1=Non-blocking.
| rt_uint8_t rt_can_msg::data[8] |
CAN message payload (up to 8 bytes).