![]() |
Macro defines for CANCTRL - Can Control Register(documentation p. 58) More...
Modules | |
MCP2515_STATUS | |
Macro defines for CANSTAT - Can Status Register(documentation p. 59) | |
MCP2515_REGISTER_ADDRESSES | |
Register addresses for MCP2515. | |
MCP2515_CONTROL_ADDRESSES | |
Control Addresses for MCP2515. | |
Defines | |
#define | CANCTRL_REQOP_MASK ((uint8_t)( (1<<7)|(1<<6)|(1<<5) )) |
REQOP MASK. | |
#define | CANCTRL_REQOP_SHIFT ((uint8_t)(5)) |
REQOP_SHIFT. | |
#define | CANCTRL_ABAT ((uint8_t)(4)) |
ABAT. | |
#define | CANCTRL_OSM ((uint8_t)(3)) |
OSM. | |
#define | CANCTRL_CLKEN ((uint8_t)(2)) |
CLKEN. | |
#define | CANCTRL_CLKPRE_MASK ((uint8_t)( (1<<1)|(1<<0) )) |
CLKPRE. | |
#define | REG_OFFSET 0x10 |
#define | REC_REG_0 0 |
#define | REC_REG_1 1 |
#define | SEND_REG_0 0 |
#define | SEND_REG_1 1 |
#define | SEND_REG_2 2 |
Enumerations | |
enum | CONTROL_REQOP { CANCTRL_REQOP_NORMAL = 0, CANCTRL_REQOP_SLEEP, CANCTRL_REQOP_LOOPBACK, CANCTRL_REQOP_LISTEN_ONLY, CANCTRL_REQOP_CONFIGURATION } |
Request Operation Mode bits <2:0> More... |
Macro defines for CANCTRL - Can Control Register(documentation p. 58)
Address: XFh
#define CANCTRL_ABAT ((uint8_t)(4)) |
ABAT.
Abort All Pending Transmissions bit 1 - Request abort of all pending transmit buffers 0 - Terminate request to abort transmissions
#define CANCTRL_CLKEN ((uint8_t)(2)) |
CLKEN.
CLKOUT Pin Enable bit 1 - Enabled 0 - Disabled
#define CANCTRL_CLKPRE_MASK ((uint8_t)( (1<<1)|(1<<0) )) |
CLKPRE.
CLKOUT Pin Prescaler bits <1:0> 00 - FCLKOUT = System Clock/1 01 - FCLKOUT = System Clock/2 10 - FCLKOUT = System Clock/4 11 - FCLKOUT = System Clock/8
#define CANCTRL_OSM ((uint8_t)(3)) |
OSM.
One Shot Mode bit 1 - Enabled. Message will only attempt to transmit one time 0 - Disabled. Message will reattempt transmission if required
#define CANCTRL_REQOP_MASK ((uint8_t)( (1<<7)|(1<<6)|(1<<5) )) |
REQOP MASK.
Request Operation Mode bits <2:0> 000 = Set Normal Operation mode 001 = Set Sleep mode 010 = Set Loopback mode 011 = Listen-only mode 100 = Configuration mode
#define CANCTRL_REQOP_SHIFT ((uint8_t)(5)) |
REQOP_SHIFT.
Request Operation Mode bits set based on CONTROL_REQOP enum
#define REG_OFFSET 0x10 |
Description for receiving and sending function
enum CONTROL_REQOP |
Request Operation Mode bits <2:0>