提交 15a769c6 编写于 作者: C caicai

K60: fix compile error

上级 ac5da68d
......@@ -162,14 +162,14 @@ static rt_err_t _control(struct rt_serial_device *serial, int cmd, void *arg)
/* disable rx irq */
uart_reg->C2 &= ~UART_C2_RIE_MASK;
//disable NVIC
NVICICER1 |= 1 << (uart_irq_num % 32);
NVIC->ICER[uart_irq_num / 32] = 1 << (uart_irq_num % 32);
break;
case RT_DEVICE_CTRL_SET_INT:
/* enable rx irq */
uart_reg->C2 |= UART_C2_RIE_MASK;
//enable NVIC,we are sure uart's NVIC vector is in NVICICPR1
NVICICPR1 |= 1 << (uart_irq_num % 32);
NVICISER1 |= 1 << (uart_irq_num % 32);
NVIC->ICPR[uart_irq_num / 32] = 1 << (uart_irq_num % 32);
NVIC->ISER[uart_irq_num / 32] = 1 << (uart_irq_num % 32);
break;
case RT_DEVICE_CTRL_SUSPEND:
/* suspend device */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册