VLCB
Loading...
Searching...
No Matches
VLCB::CANSHIELD Class Reference

Set up functions for the CANSHIELD board. More...

#include <CANSHIELD.h>

Public Member Functions

bool begin ()
 Prepare the board and CAN controller for operation.
CanTransport * getCanTransport ()
 Get the underlying CAN object.
CAN2515 * getCAN2515 ()
 Get the underlying CAN2515 object.
bool hasCanErrors ()

Static Public Member Functions

static byte getGreenLedPin ()
static byte getYellowLedPin ()
static byte getSwitchPin ()
static void setupLEDUserInterface (VLCB::LEDUserInterface &ledUserInterface)
 Setup LED and switch pins for the LEDUserInterface object.

Public Attributes

CAN2515 can2515
 The underlying CAN2515 transport object.

Detailed Description

Set up functions for the CANSHIELD board.

CANSHIELD (available as MERG kit 110) is a shield for Arduino Uno/Mega/Nano. It contains an on-obard MCP2515 CAN controller and CBUS LEDs and push button. This class contains functions for setting up SPI pins, oscillator frequency, CBUS LEDs and pushbutton pins.

This board has:

  • MCP2515 CAN Controller
  • Running at 16 MHz
  • Pin assignment: 2: Interrupt from the CAN Controller 4: VLCB green Uninitialized LED pin 7: VLCB yellow Normal LED pin 8: VLCB push button switch pin 10: SPI CS 11: SPI SI 12: SPI SO 13: SPI SCK

Member Function Documentation

◆ getGreenLedPin()

byte VLCB::CANSHIELD::getGreenLedPin ( )
static

◆ getYellowLedPin()

byte VLCB::CANSHIELD::getYellowLedPin ( )
static

◆ getSwitchPin()

byte VLCB::CANSHIELD::getSwitchPin ( )
static

◆ setupLEDUserInterface()

void VLCB::CANSHIELD::setupLEDUserInterface ( VLCB::LEDUserInterface & ledUserInterface)
static

Setup LED and switch pins for the LEDUserInterface object.

◆ begin()

bool VLCB::CANSHIELD::begin ( )

Prepare the board and CAN controller for operation.

◆ getCanTransport()

CanTransport * VLCB::CANSHIELD::getCanTransport ( )
inline

Get the underlying CAN object.

◆ getCAN2515()

CAN2515 * VLCB::CANSHIELD::getCAN2515 ( )
inline

Get the underlying CAN2515 object.

◆ hasCanErrors()

bool VLCB::CANSHIELD::hasCanErrors ( )

Member Data Documentation

◆ can2515

CAN2515 VLCB::CANSHIELD::can2515

The underlying CAN2515 transport object.


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