libClearCore/src/SerialBase.cpp
void SerialBase::TxPump() {
    while (m_outHead != m_outTail) {
        if (!m_serPort->USART.INTFLAG.bit.DRE) {
            // Data register is full; can't send anything more right now
            return;
        }
        int32_t nextIndex = NextIndex(m_outHead);
        m_serPort->USART.DATA.bit.DATA = m_bufferOut[m_outHead];
        m_outHead = nextIndex;
    }

    DisableDreInterruptUart();
}
/**
    Transmit any data waiting in the tx buffer
**/
Transmit any data waiting in the tx buffer
Transmit any data waiting in the tx buffer
void SerialBase::TxPump() {
    while (m_outHead != m_outTail) {
        if (!m_serPort->USART.INTFLAG.bit.DRE) {
            return;
        }
        int32_t nextIndex = NextIndex(m_outHead);
        m_serPort->USART.DATA.bit.DATA = m_bufferOut[m_outHead];
        m_outHead = nextIndex;
    }
    DisableDreInterruptUart();
}
void SerialBase :: TxPump ( ) { while ( m_outHead != m_outTail ) { if ( ! m_serPort -> USART . INTFLAG . bit . DRE ) { return ; } int32_t nextIndex = NextIndex ( m_outHead ) ; m_serPort -> USART . DATA . bit . DATA = m_bufferOut [ m_outHead ] ; m_outHead = nextIndex ; } DisableDreInterruptUart ( ) ; }
Transmit any data waiting in the tx buffer
Transmit any data waiting in the tx buffer
// Data register is full; can't send anything more right now