Added flushing of transmit buffer
This commit is contained in:
@@ -64,9 +64,14 @@ class Hardware {
|
||||
return *Registers::IO_REG;
|
||||
}
|
||||
|
||||
static bool txActive() FORCE_INLINE
|
||||
{
|
||||
return !(*Registers::CTRL_STAT_REG_A & (1 << CtrlFlagsA::DATA_REG_EMPTY));
|
||||
}
|
||||
|
||||
static void txByteBlocking(const typename cfg::data_t &byte) FORCE_INLINE
|
||||
{
|
||||
while (!(*Registers::CTRL_STAT_REG_A & (1 << CtrlFlagsA::DATA_REG_EMPTY)))
|
||||
while (txActive())
|
||||
;
|
||||
|
||||
*Registers::IO_REG = byte;
|
||||
|
||||
Reference in New Issue
Block a user