Transport implementation for the MCP2515/25625 CAN controllers.
More...
#include <CAN2515.h>
Transport implementation for the MCP2515/25625 CAN controllers.
◆ CAN2515()
| VLCB::CAN2515::CAN2515 |
( |
| ) |
|
◆ begin()
| bool VLCB::CAN2515::begin |
( |
bool | poll = false, |
|
|
SPIClass & | spi = SPI ) |
initialise the CAN controller and buffers, and attach the ISR default poll arg is set to false, so as not to break existing code
◆ available()
| bool VLCB::CAN2515::available |
( |
| ) |
|
|
overridevirtual |
◆ getNextCanFrame()
| CANFrame VLCB::CAN2515::getNextCanFrame |
( |
| ) |
|
|
overridevirtual |
get next unprocessed message from the buffer must call available first to ensure there is something to get
Implements VLCB::CanTransport.
◆ sendCanFrame()
| bool VLCB::CAN2515::sendCanFrame |
( |
CANFrame * | frame | ) |
|
|
overridevirtual |
◆ reset()
| void VLCB::CAN2515::reset |
( |
| ) |
|
|
overridevirtual |
◆ getHardwareType()
| virtual byte VLCB::CAN2515::getHardwareType |
( |
| ) |
|
|
inlineoverridevirtual |
Get the hardware type of the concrete transport class.
Reimplemented from VLCB::CanTransport.
◆ setNumBuffers()
| void VLCB::CAN2515::setNumBuffers |
( |
byte | num_rx_buffers, |
|
|
byte | num_tx_buffers = 0 ) |
set the number of CAN frame receive buffers this can be tuned according to bus load and available memory
◆ printStatus()
| void VLCB::CAN2515::printStatus |
( |
| ) |
|
display the CAN bus status instrumentation
◆ setOscFreq()
| void VLCB::CAN2515::setOscFreq |
( |
unsigned long | freq | ) |
|
set the MCP2515 crystal frequency default is 16MHz but some modules have an 8MHz crystal
◆ setPins()
| void VLCB::CAN2515::setPins |
( |
byte | cs_pin, |
|
|
byte | int_pin ) |
set the CS and interrupt pins - option to override defaults
◆ receiveCounter()
| virtual unsigned int VLCB::CAN2515::receiveCounter |
( |
| ) |
|
|
inlineoverridevirtual |
◆ transmitCounter()
| virtual unsigned int VLCB::CAN2515::transmitCounter |
( |
| ) |
|
|
inlineoverridevirtual |
◆ receiveErrorCounter()
| virtual unsigned int VLCB::CAN2515::receiveErrorCounter |
( |
| ) |
|
|
inlineoverridevirtual |
◆ transmitErrorCounter()
| virtual unsigned int VLCB::CAN2515::transmitErrorCounter |
( |
| ) |
|
|
inlineoverridevirtual |
◆ receiveBufferSize()
| virtual unsigned int VLCB::CAN2515::receiveBufferSize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ transmitBufferSize()
| virtual unsigned int VLCB::CAN2515::transmitBufferSize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ receiveBufferUsage()
| virtual unsigned int VLCB::CAN2515::receiveBufferUsage |
( |
| ) |
|
|
inlineoverridevirtual |
◆ transmitBufferUsage()
| virtual unsigned int VLCB::CAN2515::transmitBufferUsage |
( |
| ) |
|
|
inlineoverridevirtual |
◆ receiveBufferPeak()
| virtual unsigned int VLCB::CAN2515::receiveBufferPeak |
( |
| ) |
|
|
inlineoverridevirtual |
◆ transmitBufferPeak()
| virtual unsigned int VLCB::CAN2515::transmitBufferPeak |
( |
| ) |
|
|
inlineoverridevirtual |
◆ errorStatus()
| virtual unsigned int VLCB::CAN2515::errorStatus |
( |
| ) |
|
|
inlineoverridevirtual |
The documentation for this class was generated from the following files: