[upadte] Configure the priority of STM32 uart rx interrupts | 显式配置STM32串口接收中断优先级.
This commit is contained in:
parent
997c652784
commit
0a5d7d60eb
|
@ -211,7 +211,8 @@ static rt_err_t stm32_control(struct rt_serial_device *serial, int cmd, void *ar
|
||||||
/* enable interrupt */
|
/* enable interrupt */
|
||||||
case RT_DEVICE_CTRL_SET_INT:
|
case RT_DEVICE_CTRL_SET_INT:
|
||||||
/* enable rx irq */
|
/* enable rx irq */
|
||||||
NVIC_EnableIRQ(uart->config->irq_type);
|
HAL_NVIC_SetPriority(uart->config->irq_type, 1, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(uart->config->irq_type);
|
||||||
/* enable interrupt */
|
/* enable interrupt */
|
||||||
__HAL_UART_ENABLE_IT(&(uart->handle), UART_IT_RXNE);
|
__HAL_UART_ENABLE_IT(&(uart->handle), UART_IT_RXNE);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue