embedded/projects/osp-steval-mki109v2/sources/boardsupport/stm32f10x_it.c
void USART1_IRQHandler(void)
{
#if defined STEVAL_MKI109V2
    uint8_t nextByte;

    if(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) != RESET)
    {
        /* Read one byte from the receive data register */
        nextByte = DbgUartReadByte();
        RxBytesToBuff( &gDbgUartPort, nextByte );
    }

    /** If there's more data waiting to be transmitted, get the
    * next byte and start transmission. Otherwise, disable the
    * TX interrupt. It will be re-enabled again when sioWrite()
    * is called to transmit new data.
    */
# ifndef UART_DMA_ENABLE
    if (USART_GetFlagStatus(USART1, USART_FLAG_TXE) != RESET)
    {
        if (GetNextByteToTx( &nextByte ))
        {
            /* Write one byte to the transmit data register */
            USART_SendData(USART1, nextByte);
        }
        else
        {
            /* Disable the USART1 Transmit interrupt */
            USART_ITConfig(USART1, USART_IT_TXE, DISABLE);
        }
    }
# endif
#endif //STEVAL_MKI109V2
}
/****************************************************************************************************
 * @fn      USART1_IRQHandler
 *          This function handles USART1 global interrupt request.
 *
 ***************************************************************************************************/
@fn      USART1_IRQHandler
This function handles USART1 global interrupt request.
@fn USART1_IRQHandler This function handles USART1 global interrupt request .
void USART1_IRQHandler(void)
{
#if defined STEVAL_MKI109V2
    uint8_t nextByte;
    if(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) != RESET)
    {
        nextByte = DbgUartReadByte();
        RxBytesToBuff( &gDbgUartPort, nextByte );
    }
# ifndef UART_DMA_ENABLE
    if (USART_GetFlagStatus(USART1, USART_FLAG_TXE) != RESET)
    {
        if (GetNextByteToTx( &nextByte ))
        {
            USART_SendData(USART1, nextByte);
        }
        else
        {
            USART_ITConfig(USART1, USART_IT_TXE, DISABLE);
        }
    }
# endif
#endif 
}
void USART1_IRQHandler ( void ) { #if defined STEVAL_MKI109V2 uint8_t nextByte ; if ( USART_GetFlagStatus ( USART1 , USART_FLAG_RXNE ) != RESET ) { nextByte = DbgUartReadByte ( ) ; RxBytesToBuff ( & gDbgUartPort , nextByte ) ; } # ifndef UART_DMA_ENABLE if ( USART_GetFlagStatus ( USART1 , USART_FLAG_TXE ) != RESET ) { if ( GetNextByteToTx ( & nextByte ) ) { USART_SendData ( USART1 , nextByte ) ; } else { USART_ITConfig ( USART1 , USART_IT_TXE , DISABLE ) ; } } # endif #endif }
@fn      USART1_IRQHandler
          This function handles USART1 global interrupt request.
@fn USART1_IRQHandler This function handles USART1 global interrupt request .
/* Read one byte from the receive data register */ /** If there's more data waiting to be transmitted, get the
    * next byte and start transmission. Otherwise, disable the
    * TX interrupt. It will be re-enabled again when sioWrite()
    * is called to transmit new data.
    */ /* Write one byte to the transmit data register */ /* Disable the USART1 Transmit interrupt */ //STEVAL_MKI109V2