#include <can.hpp>
Public Member Functions | |
template<unsigned RxQueueCapacity> | |
CanDriver (CanRxItem(&rx_queue_storage)[UAVCAN_STM32_NUM_IFACES][RxQueueCapacity]) | |
virtual CanIface * | getIface (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 |
![]() | |
virtual const ICanIface * | getIface (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) |
![]() | |
Noncopyable () | |
~Noncopyable () | |
Static Private Member Functions | |
static void | initOnce () |
Private Attributes | |
CanIface | if0_ |
BusEvent | update_event_ |
CAN driver, incorporates all available CAN ifaces. Please avoid direct use, prefer CanInitHelper instead.
Definition at line 234 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.
|
inline |
Definition at line 250 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.
|
virtual |
Returns an interface by index, or null pointer if the index is out of range.
Implements uavcan::ICanDriver.
Definition at line 1116 of file uc_stm32_can.cpp.
|
inlinevirtual |
Total number of available CAN interfaces. This value shall not change after initialization.
Implements uavcan::ICanDriver.
Definition at line 278 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.
bool uavcan_stm32::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 1125 of file uc_stm32_can.cpp.
bool uavcan_stm32::CanDriver::hasReadableInterfaces | ( | ) | const |
Whether there's at least one interface where receive() would return a frame.
Definition at line 915 of file uc_stm32_can.cpp.
int uavcan_stm32::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 1064 of file uc_stm32_can.cpp.
|
staticprivate |
Definition at line 979 of file uc_stm32_can.cpp.
uavcan::CanSelectMasks uavcan_stm32::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 885 of file uc_stm32_can.cpp.
|
privatevirtual |
Definition at line 926 of file uc_stm32_can.cpp.
|
private |
Definition at line 237 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.
|
private |
Definition at line 236 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.