16_USART_DMA_sender/main.cpp
/**
 * USART1 interrupt handler
 * Receive data from USART1 and send it back.
 */
USART1 interrupt handler
Receive data from USART1 and send it back.
USART1 interrupt handler Receive data from USART1 and send it back .
void USART1_IRQHandler() {
  if ((USART1->SR & USART_SR_RXNE) == USART_SR_RXNE) {
    (void)USART1->DR;                 
    DMA2->HIFCR |= DMA_HIFCR_CTCIF7;  
    DMA2_Stream7->CR |= DMA_SxCR_EN;  
  }
}
void USART1_IRQHandler ( ) { if ( ( USART1 -> SR & USART_SR_RXNE ) == USART_SR_RXNE ) { ( void ) USART1 -> DR ; DMA2 -> HIFCR |= DMA_HIFCR_CTCIF7 ; DMA2_Stream7 -> CR |= DMA_SxCR_EN ; } }
USART1 interrupt handler
 Receive data from USART1 and send it back.
USART1 interrupt handler Receive data from USART1 and send it back .
/* Receive data */ /* Clear interrupt flag */ /* Start DMA transmittion */