Fixed flushing not blocking correctly
This commit is contained in:
@@ -111,8 +111,11 @@ class Hardware1 {
|
||||
|
||||
static void flushTx() FORCE_INLINE
|
||||
{
|
||||
while (HardwareImpl::txActive())
|
||||
while (!HardwareImpl::txEmpty())
|
||||
;
|
||||
while (!HardwareImpl::txComplete())
|
||||
;
|
||||
HardwareImpl::clearTxComplete();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -178,8 +181,11 @@ class Hardware1<mode, cfg, Driven::INTERRUPT> {
|
||||
{
|
||||
while (sm_txBuf.head != sm_txBuf.tail)
|
||||
;
|
||||
while (HardwareImpl::txActive())
|
||||
while (!HardwareImpl::txEmpty())
|
||||
;
|
||||
while (!HardwareImpl::txComplete())
|
||||
;
|
||||
HardwareImpl::clearTxComplete();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user