void USART1_IRQHandler(void)
{
if (USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
USART_ClearITPendingBit(USART1, USART_IT_RXNE);
pxMBFrameCBByteReceived( );
LAMP_ON;
}
/* Send the received data to the PC Host*/
if(USART_GetITStatus(USART1, USART_IT_TXE) != RESET)
{
USART_ClearITPendingBit(USART1, USART_IT_TXE);
pxMBFrameCBTransmitterEmpty();
// LAMP_ON;
}
#ifdef RTS_ENABLE
if(USART_GetITStatus(USART1, USART_IT_TC) != RESET)
{
USART_ClearITPendingBit(USART1, USART_IT_TC);
USART_ClearFlag(USART1, USART_FLAG_TC);
RTS_READ;
// LAMP_ON;
}
#endif
}
|