PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Classes | Namespaces | Macros
mcp2515.h File Reference
#include <PropWare/PropWare.h>
#include <PropWare/serial/spi/spi.h>
+ Include dependency graph for mcp2515.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PropWare::MCP2515
 Control and communicate with the Microchip MCP2515 CAN bus controller. More...
 

Namespaces

 PropWare
 Generic definitions and functions for the Parallax Propeller.
 

Macros

#define TIMEOUTVALUE   50
 
#define MCP_SIDH   0
 
#define MCP_SIDL   1
 
#define MCP_EID8   2
 
#define MCP_EID0   3
 
#define MCP_TXB_EXIDE_M   0x08
 
#define MCP_DLC_MASK   NIBBLE_0
 
#define MCP_RTR_MASK   BIT_6
 
#define MCP_RXB_RX_ANY   0x60
 
#define MCP_RXB_RX_EXT   0x40
 
#define MCP_RXB_RX_STD   0x20
 
#define MCP_RXB_RX_STDEXT   0x00
 
#define MCP_RXB_RX_MASK   0x60
 
#define MCP_RXB_BUKT_MASK   BIT_2
 
#define MCP_TXB_TXBUFE_M   0x80
 
#define MCP_TXB_ABTF_M   0x40
 
#define MCP_TXB_MLOA_M   0x20
 
#define MCP_TXB_TXERR_M   0x10
 
#define MCP_TXB_TXREQ_M   0x08
 
#define MCP_TXB_TXIE_M   0x04
 
#define MCP_TXB_TXP10_M   0x03
 
#define MCP_TXB_RTR_M   0x40
 
#define MCP_RXB_IDE_M   0x08
 
#define MCP_RXB_RTR_M   0x40
 
#define MCP_EFLG_RX1OVR   BIT_7
 
#define MCP_EFLG_RX0OVR   BIT_6
 
#define MCP_EFLG_TXBO   BIT_5
 
#define MCP_EFLG_TXEP   BIT_4
 
#define MCP_EFLG_RXEP   BIT_3
 
#define MCP_EFLG_TXWAR   BIT_2
 
#define MCP_EFLG_RXWAR   BIT_1
 
#define MCP_EFLG_EWARN   BIT_0
 
#define MCP_EFLG_ERRORMASK   (0xF8)
 
#define MCP_TX_INT   0x1C
 
#define MCP_TX01_INT   0x0C
 
#define MCP_RX_INT   0x03
 
#define MCP_NO_INT   0x00
 
#define MCP_TX01_MASK   0x14
 
#define MCP_TX_MASK   0x54
 
#define MCP_N_TXBUFFERS   (3)
 
#define CANUSELOOP   0
 
#define CANSENDTIMEOUT   (200)
 
#define CANAUTOPROCESS   (1)
 
#define CANAUTOON   (1)
 
#define CANAUTOOFF   (0)
 
#define CAN_STDID   (0)
 
#define CAN_EXTID   (1)
 
#define CANDEFAULTIDENT   (0x55CC)
 
#define CANDEFAULTIDENTEXT   (CAN_EXTID)
 
#define ABORT_TX   0x10
 
#define MODE_ONESHOT   0x08
 
#define CLKOUT_ENABLE   0x04
 
#define CLKOUT_DISABLE   0x00
 
#define CLKOUT_PS1   0x00
 
#define CLKOUT_PS2   0x01
 
#define CLKOUT_PS4   0x02
 
#define CLKOUT_PS8   0x03
 

Detailed Description

Author
David Zemon

Inspired by MCP_CAN from https://github.com/coryjfowler/MCP_CAN_lib

Definition in file mcp2515.h.