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

Set up functions for the Pico CAN Bus board. More...

#include <PicoCANBus.h>

Public Member Functions

 PicoCANBus ()=delete
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 Pico CAN Bus board.

RPi Pico CAN Bus board created by Duncan Greenwood to provide CBUS connection for a RPi Pico. 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: 1: Interrupt from the CAN Controller 2: SCK0 3: MOSI0 4: MISO0 5: CAN CS 21: VLCB green Uninitialized LED pin 20: VLCB yellow Normal LED pin 22: VLCB push button switch pin

Constructor & Destructor Documentation

◆ PicoCANBus()

VLCB::PicoCANBus::PicoCANBus ( )
delete

Member Function Documentation

◆ getGreenLedPin()

byte VLCB::PicoCANBus::getGreenLedPin ( )
static

◆ getYellowLedPin()

byte VLCB::PicoCANBus::getYellowLedPin ( )
static

◆ getSwitchPin()

byte VLCB::PicoCANBus::getSwitchPin ( )
static

◆ setupLEDUserInterface()

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

Setup LED and switch pins for the LEDUserInterface object.

◆ begin()

bool VLCB::PicoCANBus::begin ( )

Prepare the board and CAN controller for operation.

◆ getCanTransport()

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

Get the underlying CAN object.

◆ getCAN2515()

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

Get the underlying CAN2515 object.

◆ hasCanErrors()

bool VLCB::PicoCANBus::hasCanErrors ( )

Member Data Documentation

◆ can2515

CAN2515 VLCB::PicoCANBus::can2515

The underlying CAN2515 transport object.


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