9#ifndef FLEX_CAN_T4_PLUGIN_HPP
10#define FLEX_CAN_T4_PLUGIN_HPP
12#include "FlexCAN_T4.hpp"
35 void close()
override;
51#if defined(__IMXRT1062__)
52 static FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_512> can0;
53 static FlexCAN_T4<CAN2, RX_SIZE_256, TX_SIZE_512> can1;
54 static FlexCAN_T4<CAN3, RX_SIZE_256, TX_SIZE_512> can2;
55#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
56 static FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_512> can0;
57 static FlexCAN_T4<CAN2, RX_SIZE_256, TX_SIZE_512> can1;
An abstraction between this CAN stack and any hardware layer.
A base class for a CAN driver. Can be derived into your platform's required interface.
A classical CAN frame, with 8 data bytes.
An abstract base class for a CAN driver.
A CAN frame for interfacing with a hardware layer, like socket CAN or other interface.
An interface for using FlexCAN_T4 on a Teensy4/4.1 device.
bool write_frame(const isobus::CANMessageFrame &canFrame) override
Writes a frame to the bus (synchronous)
bool isOpen
Tracks if the connection is open/connected.
bool get_is_valid() const override
Returns if the connection with the hardware is valid.
void close() override
Closes the connection to the hardware.
FlexCANT4Plugin(std::uint8_t channel)
Constructor for the FlexCANT4Plugin.
std::uint8_t selectedChannel
The channel that this plugin is assigned to.
bool read_frame(isobus::CANMessageFrame &canFrame) override
Returns a frame from the hardware (synchronous), or false if no frame can be read.
virtual ~FlexCANT4Plugin()=default
The destructor for FlexCANT4Plugin.
void open() override
Connects to the hardware you specified in the constructor's channel argument.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...