#include <CAN.h>
|
int | computeTimings (uint32_t target_bitrate, Timings &out_timings) |
|
virtual int16_t | send (const uavcan::CanFrame &frame, uavcan::MonotonicTime tx_deadline, uavcan::CanIOFlags flags) override |
|
virtual int16_t | receive (uavcan::CanFrame &out_frame, uavcan::MonotonicTime &out_ts_monotonic, uavcan::UtcTime &out_ts_utc, uavcan::CanIOFlags &out_flags) override |
|
virtual int16_t | configureFilters (const uavcan::CanFilterConfig *filter_configs, uint16_t num_configs) override |
|
virtual uint16_t | getNumFilters () const override |
|
void | handleTxMailboxInterrupt (uint8_t mailbox_index, bool txok, uint64_t utc_usec) |
|
bool | waitMsrINakBitStateChange (bool target_state) |
|
Definition at line 88 of file CAN.h.
◆ anonymous enum
◆ anonymous enum
◆ anonymous enum
Enumerator |
---|
MaxRxQueueCapacity | |
Definition at line 160 of file CAN.h.
◆ OperatingMode
Enumerator |
---|
NormalMode | |
SilentMode | |
Definition at line 164 of file CAN.h.
◆ VRBRAINCAN()
VRBRAIN::VRBRAINCAN::VRBRAINCAN |
( |
bxcan::CanType * |
can, |
|
|
BusEvent * |
update_event, |
|
|
uint8_t |
self_index, |
|
|
uint8_t |
rx_queue_capacity |
|
) |
| |
|
inline |
◆ available()
int32_t VRBRAIN::VRBRAINCAN::available |
( |
| ) |
|
|
override |
◆ begin()
bool VRBRAIN::VRBRAINCAN::begin |
( |
uint32_t |
bitrate | ) |
|
|
override |
◆ canAcceptNewTxFrame()
bool VRBRAIN::VRBRAINCAN::canAcceptNewTxFrame |
( |
const uavcan::CanFrame & |
frame | ) |
const |
◆ computeTimings()
int VRBRAIN::VRBRAINCAN::computeTimings |
( |
uint32_t |
target_bitrate, |
|
|
Timings & |
out_timings |
|
) |
| |
|
private |
◆ configureFilters()
virtual int16_t VRBRAIN::VRBRAINCAN::configureFilters |
( |
const uavcan::CanFilterConfig * |
filter_configs, |
|
|
uint16_t |
num_configs |
|
) |
| |
|
overrideprivatevirtual |
◆ discardTimedOutTxMailboxes()
void VRBRAIN::VRBRAINCAN::discardTimedOutTxMailboxes |
( |
uavcan::MonotonicTime |
current_time | ) |
|
◆ end()
void VRBRAIN::VRBRAINCAN::end |
( |
| ) |
|
|
inlineoverride |
◆ getErrorCount()
virtual uint64_t VRBRAIN::VRBRAINCAN::getErrorCount |
( |
| ) |
const |
|
overridevirtual |
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.
◆ getNumFilters()
virtual uint16_t VRBRAIN::VRBRAINCAN::getNumFilters |
( |
| ) |
const |
|
inlineoverrideprivatevirtual |
◆ getPeakNumTxMailboxesUsed()
uint8_t VRBRAIN::VRBRAINCAN::getPeakNumTxMailboxesUsed |
( |
| ) |
const |
|
inline |
Peak number of TX mailboxes used concurrently since initialization. Range is [1, 3]. Value of 3 suggests that priority inversion could be taking place.
Definition at line 240 of file CAN.h.
◆ getRxQueueLength()
unsigned VRBRAIN::VRBRAINCAN::getRxQueueLength |
( |
| ) |
const |
Returns the number of frames pending in the RX queue. This is intended for debug use only.
◆ getVoluntaryTxAbortCount()
uint32_t VRBRAIN::VRBRAINCAN::getVoluntaryTxAbortCount |
( |
| ) |
const |
|
inline |
Number of times the driver exercised library's requirement to abort transmission on first error. This is an atomic read, it doesn't require a critical section. See uavcan::CanIOFlagAbortOnError.
Definition at line 218 of file CAN.h.
◆ hadActivity()
bool VRBRAIN::VRBRAINCAN::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.
◆ handleRxInterrupt()
void VRBRAIN::VRBRAINCAN::handleRxInterrupt |
( |
uint8_t |
fifo_index, |
|
|
uint64_t |
utc_usec |
|
) |
| |
◆ handleTxInterrupt()
void VRBRAIN::VRBRAINCAN::handleTxInterrupt |
( |
uint64_t |
utc_usec | ) |
|
◆ handleTxMailboxInterrupt()
void VRBRAIN::VRBRAINCAN::handleTxMailboxInterrupt |
( |
uint8_t |
mailbox_index, |
|
|
bool |
txok, |
|
|
uint64_t |
utc_usec |
|
) |
| |
|
private |
◆ init()
int VRBRAIN::VRBRAINCAN::init |
( |
const uint32_t |
bitrate, |
|
|
const OperatingMode |
mode |
|
) |
| |
Initializes the hardware CAN controller. Assumes:
- Iface clock is enabled
- Iface has been resetted via RCC
- Caller will configure NVIC by itself
◆ is_initialized()
bool VRBRAIN::VRBRAINCAN::is_initialized |
( |
| ) |
|
|
override |
◆ isRxBufferEmpty()
bool VRBRAIN::VRBRAINCAN::isRxBufferEmpty |
( |
| ) |
const |
◆ pollErrorFlagsFromISR()
void VRBRAIN::VRBRAINCAN::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.
◆ receive()
virtual int16_t VRBRAIN::VRBRAINCAN::receive |
( |
uavcan::CanFrame & |
out_frame, |
|
|
uavcan::MonotonicTime & |
out_ts_monotonic, |
|
|
uavcan::UtcTime & |
out_ts_utc, |
|
|
uavcan::CanIOFlags & |
out_flags |
|
) |
| |
|
overrideprivatevirtual |
◆ reset()
void VRBRAIN::VRBRAINCAN::reset |
( |
| ) |
|
|
override |
◆ send()
virtual int16_t VRBRAIN::VRBRAINCAN::send |
( |
const uavcan::CanFrame & |
frame, |
|
|
uavcan::MonotonicTime |
tx_deadline, |
|
|
uavcan::CanIOFlags |
flags |
|
) |
| |
|
overrideprivatevirtual |
◆ set_update_event()
void VRBRAIN::VRBRAINCAN::set_update_event |
( |
BusEvent * |
update_event | ) |
|
|
inline |
◆ tx_pending()
int32_t VRBRAIN::VRBRAINCAN::tx_pending |
( |
| ) |
|
|
override |
◆ waitMsrINakBitStateChange()
bool VRBRAIN::VRBRAINCAN::waitMsrINakBitStateChange |
( |
bool |
target_state | ) |
|
|
private |
◆ bitrate_
uint32_t VRBRAIN::VRBRAINCAN::bitrate_ |
|
private |
◆ can_
◆ error_cnt_
uint64_t VRBRAIN::VRBRAINCAN::error_cnt_ |
|
private |
◆ had_activity_
bool VRBRAIN::VRBRAINCAN::had_activity_ |
|
private |
◆ initialized_
bool VRBRAIN::VRBRAINCAN::initialized_ |
|
private |
◆ peak_tx_mailbox_index_
uint8_t VRBRAIN::VRBRAINCAN::peak_tx_mailbox_index_ |
|
private |
◆ pending_tx_
◆ rx_queue_
◆ self_index_
const uint8_t VRBRAIN::VRBRAINCAN::self_index_ |
|
private |
◆ served_aborts_cnt_
uint32_t VRBRAIN::VRBRAINCAN::served_aborts_cnt_ |
|
private |
◆ TSR_ABRQx
◆ update_event_
BusEvent* VRBRAIN::VRBRAINCAN::update_event_ |
|
private |
The documentation for this class was generated from the following file:
- libraries/AP_HAL_VRBRAIN/CAN.h