|
Open Model Railroad Network (OpenMRN)
|
CAN TX and RX buffer structure. More...
Public Member Functions | |
| void | build_struct_can_frame (struct can_frame *can_frame) |
| Take the contents of the Buffer and fill in a can_frame structure. | |
| void * | get_payload () |
| Get a pointer to the buffer payload. | |
Static Public Attributes | |
| static const size_t | TRANSFER_SIZE = 14 |
| The SPI transfer size in bytes of a buffer transfer. | |
Protected Member Functions | |
| Buffer (struct can_frame *can_frame, uint8_t command) | |
| Constructor. | |
| Buffer (uint8_t command) | |
| Constructor. | |
Protected Attributes | ||
| uint8_t | pad_ [2] | |
| force the data to 32/64-bit allign | ||
| uint8_t | command_ | |
| the transaction command | ||
| uint8_t | sidh_ | |
| standard identifier high byte | ||
| struct { | ||
| uint8_t eid_: 2 | ||
| extended identifier bits 16 and 17 More... | ||
| uint8_t unused1_: 1 | ||
| unused bit More... | ||
| uint8_t exide_: 1 | ||
| extended identifer enable More... | ||
| uint8_t srr_: 1 | ||
| standard frame RTR More... | ||
| uint8_t sid_: 3 | ||
| standard identifier low bits More... | ||
| }; | ||
| uint8_t | eid8_ | |
| extended identifier high byte | ||
| uint8_t | eid0_ | |
| extended identifier low byte | ||
| struct { | ||
| uint8_t dlc_: 4 | ||
| data length code More... | ||
| uint8_t unused3_: 2 | ||
| unused bits More... | ||
| uint8_t rtr_: 1 | ||
| remote transmit request bit More... | ||
| uint8_t unused4_: 1 | ||
| unused bit More... | ||
| }; | ||
| union { | ||
| uint64_t data64_ | ||
| 64-bit data More... | ||
| uint8_t data_ [8] | ||
| all 8 data bytes More... | ||
| }; | ||
CAN TX and RX buffer structure.
Definition at line 382 of file MCP2515Can.hxx.
|
inlineprotected |
Constructor.
| can_frame | reference to a can_frame metadata structure. |
| command | corresponding command for the buffer |
Definition at line 432 of file MCP2515Can.hxx.
|
inlineprotected |
Constructor.
| command | corresponding command for the buffer |
Definition at line 462 of file MCP2515Can.hxx.
|
inline |
Take the contents of the Buffer and fill in a can_frame structure.
| can_frame | CAN frame structure to fill in |
Definition at line 392 of file MCP2515Can.hxx.
|
inline |
Get a pointer to the buffer payload.
Definition at line 421 of file MCP2515Can.hxx.
|
protected |
the transaction command
Definition at line 468 of file MCP2515Can.hxx.
| uint64_t MCP2515Can::Buffer::data64_ |
64-bit data
Definition at line 489 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::data_[8] |
all 8 data bytes
Definition at line 490 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::dlc_ |
data length code
Definition at line 482 of file MCP2515Can.hxx.
|
protected |
extended identifier low byte
Definition at line 479 of file MCP2515Can.hxx.
|
protected |
extended identifier high byte
Definition at line 478 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::eid_ |
extended identifier bits 16 and 17
Definition at line 472 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::exide_ |
extended identifer enable
Definition at line 474 of file MCP2515Can.hxx.
|
protected |
force the data to 32/64-bit allign
Definition at line 467 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::rtr_ |
remote transmit request bit
Definition at line 484 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::sid_ |
standard identifier low bits
Definition at line 476 of file MCP2515Can.hxx.
|
protected |
standard identifier high byte
Definition at line 469 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::srr_ |
standard frame RTR
Definition at line 475 of file MCP2515Can.hxx.
|
static |
The SPI transfer size in bytes of a buffer transfer.
Definition at line 386 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::unused1_ |
unused bit
Definition at line 473 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::unused3_ |
unused bits
Definition at line 483 of file MCP2515Can.hxx.
| uint8_t MCP2515Can::Buffer::unused4_ |
unused bit
Definition at line 485 of file MCP2515Can.hxx.