truck-code
|
#include <sja1000.h>
PeliCAN address allocation for the CAN controller.
Each address denotes the location of a byte, whose elements are later described throughout this file. The addresses are in incrementing order starting from canmode (address=0) to canclk (address=31).
BYTE canregs::arbitrationlost |
11: arbitration lost capture only
BYTE canregs::canclk |
31: clock divider
BYTE canregs::cancmd |
1: command register
BYTE canregs::canirq |
3: interrupt register
BYTE canregs::canirq_enable |
4: interrupt enable register
BYTE canregs::canmode |
0: mode register
BYTE canregs::canoutc |
8: output control register
BYTE canregs::canrxbufferadr |
30: RX buffer start address (read only)
BYTE canregs::canstat |
2: status register
BYTE canregs::cantest |
9: command register
BYTE canregs::cantim0 |
6: bus timing 0 register
BYTE canregs::cantim1 |
7: bus timing 1 register
BYTE canregs::errorcode |
12: error code capture (read only)
BYTE canregs::errorwarninglimit |
13: error warning limit register
union frame canregs::frame |
TODO
BYTE canregs::frameinfo |
TODO
BYTE canregs::reserved1 |
5: reserved register (read only)
BYTE canregs::reserved2 |
10: reserved register (read only)
BYTE canregs::reserved3 |
29: RX message counter (read only)
BYTE canregs::rxerror |
14: RX error counter
BYTE canregs::txerror |
15: RX error counter