#include <can.hpp>
|
bool | canAcceptNewTxFrame (const uavcan::CanFrame &frame) const |
|
| CanIface (flexcan::CanType *can, BusEvent &update_event, uavcan::uint8_t self_index, CanRxItem *rx_queue_buffer, uavcan::uint8_t rx_queue_capacity) |
|
void | discardTimedOutTxMailboxes (uavcan::MonotonicTime current_time) |
|
virtual uavcan::uint64_t | getErrorCount () const |
|
uavcan::uint8_t | getPeakNumTxMailboxesUsed () const |
|
unsigned | getRxQueueLength () const |
|
uavcan::uint32_t | getRxQueueOverflowCount () const |
|
uavcan::uint32_t | getVoluntaryTxAbortCount () const |
|
bool | hadActivity () |
|
void | handleRxInterrupt (uavcan::uint32_t rx_iflags, uavcan::uint64_t utc_usec) |
|
void | handleTxInterrupt (uavcan::uint32_t tx_iflags, uavcan::uint64_t utc_usec) |
|
int | init (const uavcan::uint32_t bitrate, const OperatingMode mode) |
|
bool | isRxBufferEmpty () const |
|
void | pollErrorFlagsFromISR () |
|
virtual int16_t | receive (CanFrame &out_frame, MonotonicTime &out_ts_monotonic, UtcTime &out_ts_utc, CanIOFlags &out_flags)=0 |
|
virtual int16_t | send (const CanFrame &frame, MonotonicTime tx_deadline, CanIOFlags flags)=0 |
|
virtual | ~ICanIface () |
|
|
int | computeTimings (uavcan::uint32_t target_bitrate, Timings &out_timings) |
|
virtual uavcan::int16_t | configureFilters (const uavcan::CanFilterConfig *filter_configs, uavcan::uint16_t num_configs) |
|
uavcan::int16_t | doReset (Timings timings) |
|
virtual uavcan::uint16_t | getNumFilters () const |
|
void | handleTxMailboxInterrupt (uavcan::uint8_t mailbox_index, bool txok, uavcan::uint64_t utc_usec) |
|
virtual uavcan::int16_t | receive (uavcan::CanFrame &out_frame, uavcan::MonotonicTime &out_ts_monotonic, uavcan::UtcTime &out_ts_utc, uavcan::CanIOFlags &out_flags) |
|
virtual uavcan::int16_t | send (const uavcan::CanFrame &frame, uavcan::MonotonicTime tx_deadline, uavcan::CanIOFlags flags) |
|
bool | setEnable (bool enable_true) |
|
void | setFreeze (bool freeze_true) |
|
void | setMCR (uavcan::uint32_t mask, bool target_state) |
|
bool | waitFreezeAckChange (bool target_state) |
|
bool | waitMCRChange (uavcan::uint32_t mask, bool target_state) |
|
| Noncopyable () |
|
| ~Noncopyable () |
|
Single CAN iface. The application shall not use this directly.
Definition at line 51 of file platform_specific_components/kinetis/libuavcan/driver/include/uavcan_kinetis/can.hpp.
◆ anonymous enum
◆ anonymous enum
◆ anonymous enum
◆ OperatingMode
◆ CanIface()
◆ canAcceptNewTxFrame()
bool uavcan_kinetis::CanIface::canAcceptNewTxFrame |
( |
const uavcan::CanFrame & |
frame | ) |
const |
◆ computeTimings()
◆ configureFilters()
◆ discardTimedOutTxMailboxes()
◆ doReset()
◆ getErrorCount()
Total number of hardware failures and other kinds of errors (e.g. queue overruns). May increase continuously if the interface is not connected to the bus.
Implements uavcan::ICanIface.
Definition at line 820 of file uc_kinetis_flexcan.cpp.
◆ getNumFilters()
◆ getPeakNumTxMailboxesUsed()
uavcan::uint8_t uavcan_kinetis::CanIface::getPeakNumTxMailboxesUsed |
( |
| ) |
const |
|
inline |
◆ getRxQueueLength()
unsigned uavcan_kinetis::CanIface::getRxQueueLength |
( |
| ) |
const |
Returns the number of frames pending in the RX queue. This is intended for debug use only.
Definition at line 826 of file uc_kinetis_flexcan.cpp.
◆ getRxQueueOverflowCount()
◆ getVoluntaryTxAbortCount()
◆ hadActivity()
bool uavcan_kinetis::CanIface::hadActivity |
( |
| ) |
|
Whether this iface had at least one successful IO since the previous call of this method. This is designed for use with iface activity LEDs.
Definition at line 832 of file uc_kinetis_flexcan.cpp.
◆ handleRxInterrupt()
◆ handleTxInterrupt()
◆ handleTxMailboxInterrupt()
◆ init()
Initializes the hardware CAN controller. Assumes:
- Iface clock is enabled
- Iface has been resetted via RCC
- Caller will configure NVIC by itself
Definition at line 500 of file uc_kinetis_flexcan.cpp.
◆ isRxBufferEmpty()
bool uavcan_kinetis::CanIface::isRxBufferEmpty |
( |
| ) |
const |
◆ pollErrorFlagsFromISR()
void uavcan_kinetis::CanIface::pollErrorFlagsFromISR |
( |
| ) |
|
This method is used to count errors and abort transmission on error if necessary. This functionality used to be implemented in the SCE interrupt handler, but that approach was generating too much processing overhead, especially on disconnected interfaces.
Should be called from RX ISR, TX ISR, and select(); interrupts must be enabled.
Definition at line 736 of file uc_kinetis_flexcan.cpp.
◆ receive()
◆ send()
◆ setEnable()
bool uavcan_kinetis::CanIface::setEnable |
( |
bool |
enable_true | ) |
|
|
private |
◆ setFreeze()
void uavcan_kinetis::CanIface::setFreeze |
( |
bool |
freeze_true | ) |
|
|
private |
◆ setMCR()
void uavcan_kinetis::CanIface::setMCR |
( |
uavcan::uint32_t |
mask, |
|
|
bool |
target_state |
|
) |
| |
|
private |
◆ waitFreezeAckChange()
bool uavcan_kinetis::CanIface::waitFreezeAckChange |
( |
bool |
target_state | ) |
|
|
private |
◆ waitMCRChange()
bool uavcan_kinetis::CanIface::waitMCRChange |
( |
uavcan::uint32_t |
mask, |
|
|
bool |
target_state |
|
) |
| |
|
private |
◆ can_
◆ error_cnt_
◆ FIFO_IFLAG1
◆ fifo_warn_cnt_
◆ had_activity_
bool uavcan_kinetis::CanIface::had_activity_ |
|
private |
◆ MaxMB
◆ peak_tx_mailbox_index_
◆ pending_aborts_
◆ pending_tx_
◆ rx_queue_
RxQueue uavcan_kinetis::CanIface::rx_queue_ |
|
private |
◆ self_index_
◆ served_aborts_cnt_
◆ update_event_
BusEvent& uavcan_kinetis::CanIface::update_event_ |
|
private |
The documentation for this class was generated from the following files: