Exemple #1
0
/**
  * @brief  This function handles SC_USART global interrupt request.
  * @param  None
  * @retval None
  */
void SC_USART_IRQHandler(void)
{   
  HAL_SMARTCARD_IRQHandler(&SCHandle);
//  /* If a Frame error is signaled by the card */
//  if(USART_GetITStatus(SC_USART, USART_IT_FE) != RESET)
//  {
//    USART_ReceiveData(SC_USART);
//
//    /* Resend the byte that failed to be received (by the Smartcard) correctly */
//    SC_ParityErrorHandler();
//  }
//  
//  /* If the SC_USART detects a parity error */
//  if(USART_GetITStatus(SC_USART, USART_IT_PE) != RESET)
//  {
//    /* Enable SC_USART RXNE Interrupt (until receiving the corrupted byte) */
//    USART_ITConfig(SC_USART, USART_IT_RXNE, ENABLE);
//    /* Flush the SC_USART DR register */
//    USART_ReceiveData(SC_USART);
//  }
//  
//  if(USART_GetITStatus(SC_USART, USART_IT_RXNE) != RESET)
//  {
//    /* Disable SC_USART RXNE Interrupt */
//    USART_ITConfig(SC_USART, USART_IT_RXNE, DISABLE);
//    USART_ReceiveData(SC_USART);
//  }
//  
//  /* If a Overrun error is signaled by the card */
//  if(USART_GetITStatus(SC_USART, USART_IT_ORE) != RESET)
//  {
//    USART_ReceiveData(SC_USART);
//  }
//  /* If a Noise error is signaled by the card */
//  if(USART_GetITStatus(SC_USART, USART_IT_NE) != RESET)
//  {
//    USART_ReceiveData(SC_USART);
//  }
}
/**
  * @brief  This function handles SC_USART global interrupt request.
  * @param  None
  * @retval None
  */
void SC_USART_IRQHandler(void)
{   
  HAL_SMARTCARD_IRQHandler(&SCHandle);
}