Fixed flushing not blocking correctly
This commit is contained in:
@@ -107,8 +107,11 @@ class Hardware0 {
|
||||
|
||||
static void flushTx() FORCE_INLINE
|
||||
{
|
||||
while (HardwareImpl::txActive())
|
||||
while (!HardwareImpl::txEmpty())
|
||||
;
|
||||
while (!HardwareImpl::txComplete())
|
||||
;
|
||||
HardwareImpl::clearTxComplete();
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -174,8 +177,11 @@ class Hardware0<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