mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Temporary fix to STM32 driver
This commit is contained in:
parent
8d00058307
commit
19cd458ae6
@ -551,7 +551,10 @@ void CanIface::discardTimedOutTxMailboxes(uavcan::MonotonicTime current_time)
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user