xpcc::Mcp2515< SPI, CS, INT > Class Template Reference
[(CAN) Controller Area Network]

Driver for the MPC2515 CAN controller. More...

#include <xpcc/driver/connectivity/can/mcp2515.hpp>

List of all members.

Static Public Member Functions

static bool initialize (can::Bitrate bitrate)
static void setFilter (accessor::Flash< uint8_t > filter)
static void setMode (can::Mode mode)
static bool isMessageAvailable ()
static bool getMessage (can::Message &message)
static bool isReadyToSend ()
static bool sendMessage (const can::Message &message)

Protected Types

 RESET = 0xC0
 READ = 0x03
 READ_RX = 0x90
 WRITE = 0x02
 WRITE_TX = 0x40
 RTS = 0x80
 READ_STATUS = 0xA0
 RX_STATUS = 0xB0
 BIT_MODIFY = 0x05
enum  SpiCommand {
  RESET = 0xC0, READ = 0x03, READ_RX = 0x90, WRITE = 0x02,
  WRITE_TX = 0x40, RTS = 0x80, READ_STATUS = 0xA0, RX_STATUS = 0xB0,
  BIT_MODIFY = 0x05
}

Static Protected Member Functions

static void writeRegister (uint8_t address, uint8_t data)
static uint8_t readRegister (uint8_t address)
static void bitModify (uint8_t address, uint8_t mask, uint8_t data)
static uint8_t readStatus (uint8_t type)
static void writeIdentifier (const uint32_t &identifier, bool isExtendedFrame)
static bool readIdentifier (uint32_t &identifier)

Static Protected Attributes

static SPI spi
static CS chipSelect
static INT interruptPin


Detailed Description

template<typename SPI, typename CS, typename INT>
class xpcc::Mcp2515< SPI, CS, INT >

SPI SPI interface CS Chip select pin INT Interrupt pin

If you want to activate the internal pull-up for the INT pin you need to do this by yourself before calling the initialize method!

Author:
Fabian Greif

Definition at line 139 of file mcp2515.hpp.


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