CAN Bus Soldered Arduino Library 1.0.0
This is a library for the MCP2518 Can Bus Breakout by Soldered
Loading...
Searching...
No Matches
MCP_CAN Class Referenceabstract

#include <mcp_can_fd.h>

Inherited by mcp2518fd.

Public Member Functions

virtual void enableTxInterrupt (bool enable=true)=0
 
virtual void reserveTxBuffers (byte nTxBuf=0)=0
 
virtual byte getLastTxBuffer ()=0
 
virtual byte begin (uint32_t speedset, const byte clockset)=0
 
virtual byte init_Mask (byte num, byte ext, unsigned long ulData)=0
 
virtual byte init_Filt (byte num, byte ext, unsigned long ulData)=0
 
virtual void setSleepWakeup (byte enable)=0
 
virtual byte sleep ()=0
 
virtual byte wake ()=0
 
virtual byte __setMode (byte opMode)=0
 
virtual byte getMode ()=0
 
virtual byte checkError (uint8_t *err_ptr=NULL)=0
 
virtual byte checkReceive (void)=0
 
virtual byte readMsgBufID (byte status, volatile unsigned long *id, volatile byte *ext, volatile byte *rtr, volatile byte *len, volatile byte *buf)=0
 
virtual byte readMsgBufID (unsigned long *ID, byte *len, byte *buf)=0
 
virtual byte readMsgBuf (byte *len, byte *buf)=0
 
unsigned long getCanId (void)
 
byte isRemoteRequest (void)
 
byte isExtendedFrame (void)
 
virtual byte trySendMsgBuf (unsigned long id, byte ext, byte rtr, byte len, const byte *buf, byte iTxBuf=0xff)=0
 
virtual byte sendMsgBuf (byte status, unsigned long id, byte ext, byte rtr, byte len, volatile const byte *buf)=0
 
virtual byte sendMsgBuf (unsigned long id, byte ext, byte rtrBit, byte len, const byte *buf, bool wait_sent=true)=0
 
virtual void clearBufferTransmitIfFlags (byte flags=0)=0
 
virtual byte readRxTxStatus (void)=0
 
virtual byte checkClearRxStatus (byte *status)=0
 
virtual byte checkClearTxStatus (byte *status, byte iTxBuf=0xff)=0
 
virtual bool mcpPinMode (const byte pin, const byte mode)=0
 
virtual bool mcpDigitalWrite (const byte pin, const byte mode)=0
 
virtual byte mcpDigitalRead (const byte pin)=0
 
 MCP_CAN (byte _CS)
 
void init_CS (byte _CS)
 
void setSPI (SPIClass *_pSPI)
 

Protected Attributes

byte ext_flg
 
unsigned long can_id
 
byte rtr
 
byte SPICS
 
SPIClass * pSPI
 
byte mcpMode
 

Constructor & Destructor Documentation

◆ MCP_CAN()

MCP_CAN::MCP_CAN ( byte _CS)

Member Function Documentation

◆ __setMode()

virtual byte MCP_CAN::__setMode ( byte opMode)
pure virtual

Implemented in mcp2518fd.

◆ begin()

virtual byte MCP_CAN::begin ( uint32_t speedset,
const byte clockset )
pure virtual

Implemented in mcp2518fd.

◆ checkClearRxStatus()

virtual byte MCP_CAN::checkClearRxStatus ( byte * status)
pure virtual

Implemented in mcp2518fd.

◆ checkClearTxStatus()

virtual byte MCP_CAN::checkClearTxStatus ( byte * status,
byte iTxBuf = 0xff )
pure virtual

Implemented in mcp2518fd.

◆ checkError()

virtual byte MCP_CAN::checkError ( uint8_t * err_ptr = NULL)
pure virtual

Implemented in mcp2518fd.

◆ checkReceive()

virtual byte MCP_CAN::checkReceive ( void )
pure virtual

Implemented in mcp2518fd.

◆ clearBufferTransmitIfFlags()

virtual void MCP_CAN::clearBufferTransmitIfFlags ( byte flags = 0)
pure virtual

Implemented in mcp2518fd.

◆ enableTxInterrupt()

virtual void MCP_CAN::enableTxInterrupt ( bool enable = true)
pure virtual

Implemented in mcp2518fd.

◆ getCanId()

unsigned long MCP_CAN::getCanId ( void )
inline

◆ getLastTxBuffer()

virtual byte MCP_CAN::getLastTxBuffer ( )
pure virtual

Implemented in mcp2518fd.

◆ getMode()

virtual byte MCP_CAN::getMode ( )
pure virtual

Implemented in mcp2518fd.

◆ init_CS()

void MCP_CAN::init_CS ( byte _CS)

◆ init_Filt()

virtual byte MCP_CAN::init_Filt ( byte num,
byte ext,
unsigned long ulData )
pure virtual

Implemented in mcp2518fd.

◆ init_Mask()

virtual byte MCP_CAN::init_Mask ( byte num,
byte ext,
unsigned long ulData )
pure virtual

Implemented in mcp2518fd.

◆ isExtendedFrame()

byte MCP_CAN::isExtendedFrame ( void )
inline

◆ isRemoteRequest()

byte MCP_CAN::isRemoteRequest ( void )
inline

◆ mcpDigitalRead()

virtual byte MCP_CAN::mcpDigitalRead ( const byte pin)
pure virtual

Implemented in mcp2518fd.

◆ mcpDigitalWrite()

virtual bool MCP_CAN::mcpDigitalWrite ( const byte pin,
const byte mode )
pure virtual

Implemented in mcp2518fd.

◆ mcpPinMode()

virtual bool MCP_CAN::mcpPinMode ( const byte pin,
const byte mode )
pure virtual

Implemented in mcp2518fd.

◆ readMsgBuf()

virtual byte MCP_CAN::readMsgBuf ( byte * len,
byte * buf )
pure virtual

Implemented in mcp2518fd.

◆ readMsgBufID() [1/2]

virtual byte MCP_CAN::readMsgBufID ( byte status,
volatile unsigned long * id,
volatile byte * ext,
volatile byte * rtr,
volatile byte * len,
volatile byte * buf )
pure virtual

Implemented in mcp2518fd.

◆ readMsgBufID() [2/2]

virtual byte MCP_CAN::readMsgBufID ( unsigned long * ID,
byte * len,
byte * buf )
pure virtual

Implemented in mcp2518fd.

◆ readRxTxStatus()

virtual byte MCP_CAN::readRxTxStatus ( void )
pure virtual

Implemented in mcp2518fd.

◆ reserveTxBuffers()

virtual void MCP_CAN::reserveTxBuffers ( byte nTxBuf = 0)
pure virtual

Implemented in mcp2518fd.

◆ sendMsgBuf() [1/2]

virtual byte MCP_CAN::sendMsgBuf ( byte status,
unsigned long id,
byte ext,
byte rtr,
byte len,
volatile const byte * buf )
pure virtual

Implemented in mcp2518fd.

◆ sendMsgBuf() [2/2]

virtual byte MCP_CAN::sendMsgBuf ( unsigned long id,
byte ext,
byte rtrBit,
byte len,
const byte * buf,
bool wait_sent = true )
pure virtual

Implemented in mcp2518fd.

◆ setSleepWakeup()

virtual void MCP_CAN::setSleepWakeup ( byte enable)
pure virtual

Implemented in mcp2518fd.

◆ setSPI()

void MCP_CAN::setSPI ( SPIClass * _pSPI)

◆ sleep()

virtual byte MCP_CAN::sleep ( )
pure virtual

Implemented in mcp2518fd.

◆ trySendMsgBuf()

virtual byte MCP_CAN::trySendMsgBuf ( unsigned long id,
byte ext,
byte rtr,
byte len,
const byte * buf,
byte iTxBuf = 0xff )
pure virtual

Implemented in mcp2518fd.

◆ wake()

virtual byte MCP_CAN::wake ( )
pure virtual

Implemented in mcp2518fd.

Member Data Documentation

◆ can_id

unsigned long MCP_CAN::can_id
protected

◆ ext_flg

byte MCP_CAN::ext_flg
protected

◆ mcpMode

byte MCP_CAN::mcpMode
protected

◆ pSPI

SPIClass* MCP_CAN::pSPI
protected

◆ rtr

byte MCP_CAN::rtr
protected

◆ SPICS

byte MCP_CAN::SPICS
protected

The documentation for this class was generated from the following files: