mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 02:53:34 +08:00
Temporary fix to STM32 driver
This commit is contained in:
@@ -551,7 +551,10 @@ void CanIface::discardTimedOutTxMailboxes(uavcan::MonotonicTime current_time)
|
|||||||
|
|
||||||
bool CanIface::isTxBufferFull() const
|
bool CanIface::isTxBufferFull() const
|
||||||
{
|
{
|
||||||
return (can_->TSR & (bxcan::TSR_TME0 | bxcan::TSR_TME1 | bxcan::TSR_TME2)) == 0; // Interrupts enabled
|
// TODO FIXME HACK: Implement proper arbitration instead of a one-by-one transmission.
|
||||||
|
// This function can be executed outside of a critical section.
|
||||||
|
static const uavcan::uint32_t TME = bxcan::TSR_TME0 | bxcan::TSR_TME1 | bxcan::TSR_TME2;
|
||||||
|
return (can_->TSR & TME) != TME; // All empty!
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CanIface::isRxBufferEmpty() const
|
bool CanIface::isRxBufferEmpty() const
|
||||||
|
|||||||
Reference in New Issue
Block a user