35#ifndef _FREERTOS_DRIVERS_NXP_LPC17XX40XXCAN_HXX_
36#define _FREERTOS_DRIVERS_NXP_LPC17XX40XXCAN_HXX_
43#if defined (CHIP_LPC175X_6X)
44#include "cmsis_175x_6x.h"
45#elif defined (CHIP_LPC177X_9X)
46#include "cmsis_177x_8x.h"
47#elif defined (CHIP_LPC407X_8X)
48#include "cmsis_407x_8x.h"
50#error "LPC CHIP undefined"
53#include "can_17xx_40xx.h"
76 for (
unsigned i = 0; i < 2; ++i)
Base class for a CAN device for the Arduino environment.
const char * name
device name
Specialization of CAN driver for LPC17xx and LPC40xx CAN.
void enable() override
function to enable device
void disable() override
function to disable device
static unsigned int intCount
one interrupt vector is shared between two CAN controllers, so we need to keep track of the number of...
static void interrupt_handler()
Translate an interrupt handler into C++ object context.
void tx_msg() override
function to try and transmit a message
static LpcCan * instances[2]
Instance pointers help us get context from the interrupt handler(s)
LPC_CAN_T * base
base address of this device
LpcCan()
Default constructor.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.