[ST_MICRO]/STM32F42014. 12. 15. 18:17

STM32F4 UART interrupt 테스트

STM32F4 UART interrupt 테스트



void U0_SetInt(void)

{

    /* NVIC for USART1 */

    HAL_NVIC_SetPriority(USART1_IRQn, 0, 1);

    HAL_NVIC_EnableIRQ(USART1_IRQn);

    

      /* Enable the UART Data Register not empty Interrupt */

    __HAL_UART_ENABLE_IT(&UartHandle, UART_IT_RXNE);

}




void USART1_IRQHandler(void)

{

    U0_PutByte(U0_GetByte());

}


Posted by nexp

댓글을 달아 주세요