Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
uavcan_kinetis::CanDriver Class Reference

#include <can.hpp>

Inheritance diagram for uavcan_kinetis::CanDriver:
Inheritance graph
[legend]

Public Member Functions

template<unsigned RxQueueCapacity>
 CanDriver (CanRxItem(&rx_queue_storage)[UAVCAN_KINETIS_NUM_IFACES][RxQueueCapacity])
 
virtual CanIfacegetIface (uavcan::uint8_t iface_index)
 
virtual uavcan::uint8_t getNumIfaces () const
 
bool hadActivity ()
 
bool hasReadableInterfaces () const
 
int init (const uavcan::uint32_t bitrate, const CanIface::OperatingMode mode)
 
uavcan::CanSelectMasks makeSelectMasks (const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces]) const
 
- Public Member Functions inherited from uavcan::ICanDriver
virtual const ICanIfacegetIface (uint8_t iface_index) const
 
virtual int16_t select (CanSelectMasks &inout_masks, const CanFrame *(&pending_tx)[MaxCanIfaces], MonotonicTime blocking_deadline)=0
 
virtual ~ICanDriver ()
 

Private Member Functions

virtual uavcan::int16_t select (uavcan::CanSelectMasks &inout_masks, const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces], uavcan::MonotonicTime blocking_deadline)
 
- Private Member Functions inherited from uavcan::Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Static Private Member Functions

static void initOnce ()
 

Private Attributes

CanIface if0_
 
BusEvent update_event_
 

Detailed Description

CAN driver, incorporates all available CAN ifaces. Please avoid direct use, prefer CanInitHelper instead.

Definition at line 267 of file platform_specific_components/kinetis/libuavcan/driver/include/uavcan_kinetis/can.hpp.

Constructor & Destructor Documentation

◆ CanDriver()

template<unsigned RxQueueCapacity>
uavcan_kinetis::CanDriver::CanDriver ( CanRxItem(&)  rx_queue_storage[UAVCAN_KINETIS_NUM_IFACES][RxQueueCapacity])
inline

Member Function Documentation

◆ getIface()

CanIface * uavcan_kinetis::CanDriver::getIface ( uavcan::uint8_t  iface_index)
virtual

Returns an interface by index, or null pointer if the index is out of range.

Implements uavcan::ICanDriver.

Definition at line 1000 of file uc_kinetis_flexcan.cpp.

◆ getNumIfaces()

virtual uavcan::uint8_t uavcan_kinetis::CanDriver::getNumIfaces ( ) const
inlinevirtual

Total number of available CAN interfaces. This value shall not change after initialization.

Implements uavcan::ICanDriver.

Definition at line 312 of file platform_specific_components/kinetis/libuavcan/driver/include/uavcan_kinetis/can.hpp.

◆ hadActivity()

bool uavcan_kinetis::CanDriver::hadActivity ( )

Whether at least one iface had at least one successful IO since previous call of this method. This is designed for use with iface activity LEDs.

Definition at line 1009 of file uc_kinetis_flexcan.cpp.

◆ hasReadableInterfaces()

bool uavcan_kinetis::CanDriver::hasReadableInterfaces ( ) const

Whether there's at least one interface where receive() would return a frame.

Definition at line 873 of file uc_kinetis_flexcan.cpp.

◆ init()

int uavcan_kinetis::CanDriver::init ( const uavcan::uint32_t  bitrate,
const CanIface::OperatingMode  mode 
)

Returns zero if OK. Returns negative value if failed (e.g. invalid bitrate).

Definition at line 948 of file uc_kinetis_flexcan.cpp.

◆ initOnce()

void uavcan_kinetis::CanDriver::initOnce ( )
staticprivate

Definition at line 918 of file uc_kinetis_flexcan.cpp.

◆ makeSelectMasks()

uavcan::CanSelectMasks uavcan_kinetis::CanDriver::makeSelectMasks ( const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces]) const

This function returns select masks indicating which interfaces are available for read/write.

Definition at line 843 of file uc_kinetis_flexcan.cpp.

◆ select()

uavcan::int16_t uavcan_kinetis::CanDriver::select ( uavcan::CanSelectMasks inout_masks,
const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces],
uavcan::MonotonicTime  blocking_deadline 
)
privatevirtual

Definition at line 884 of file uc_kinetis_flexcan.cpp.

Member Data Documentation

◆ if0_

CanIface uavcan_kinetis::CanDriver::if0_
private

◆ update_event_

BusEvent uavcan_kinetis::CanDriver::update_event_
private

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


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:05