libClearCore/src/SerialBase.cpp
void SerialBase::IrqHandlerException() {
    switch (m_portMode) {
        case SPI:
            // This should not occur, but clear the interrupt flags to be safe.
            m_serPort->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_ERROR;
            break;
        case UART:
        default:
            if (m_serPort->USART.INTFLAG.bit.ERROR) {
                // Clear the interrupt flag
                m_serPort->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_ERROR;
                HandleFrameError();
                HandleParityError();
                HandleOverflow();
            }
            break;
    }
}
/**
    Interrupt handler for any serial port exceptions.

    Should be called by SERCOMx_3 Interrupt Vector.
**/
Interrupt handler for any serial port exceptions.
Should be called by SERCOMx_3 Interrupt Vector.
Interrupt handler for any serial port exceptions . Should be called by SERCOMx_3 Interrupt Vector .
void SerialBase::IrqHandlerException() {
    switch (m_portMode) {
        case SPI:
            m_serPort->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_ERROR;
            break;
        case UART:
        default:
            if (m_serPort->USART.INTFLAG.bit.ERROR) {
                m_serPort->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_ERROR;
                HandleFrameError();
                HandleParityError();
                HandleOverflow();
            }
            break;
    }
}
void SerialBase :: IrqHandlerException ( ) { switch ( m_portMode ) { case SPI : m_serPort -> USART . INTFLAG . reg = SERCOM_USART_INTFLAG_ERROR ; break ; case UART : default : if ( m_serPort -> USART . INTFLAG . bit . ERROR ) { m_serPort -> USART . INTFLAG . reg = SERCOM_USART_INTFLAG_ERROR ; HandleFrameError ( ) ; HandleParityError ( ) ; HandleOverflow ( ) ; } break ; } }
Interrupt handler for any serial port exceptions.
Interrupt handler for any serial port exceptions .
// This should not occur, but clear the interrupt flags to be safe. // Clear the interrupt flag