K60: fix compile error

This commit is contained in:
caicai 2013-10-23 12:08:42 +08:00
parent ac5da68db7
commit 15a769c6e4
1 changed files with 3 additions and 3 deletions

View File

@ -162,14 +162,14 @@ static rt_err_t _control(struct rt_serial_device *serial, int cmd, void *arg)
/* disable rx irq */ /* disable rx irq */
uart_reg->C2 &= ~UART_C2_RIE_MASK; uart_reg->C2 &= ~UART_C2_RIE_MASK;
//disable NVIC //disable NVIC
NVICICER1 |= 1 << (uart_irq_num % 32); NVIC->ICER[uart_irq_num / 32] = 1 << (uart_irq_num % 32);
break; break;
case RT_DEVICE_CTRL_SET_INT: case RT_DEVICE_CTRL_SET_INT:
/* enable rx irq */ /* enable rx irq */
uart_reg->C2 |= UART_C2_RIE_MASK; uart_reg->C2 |= UART_C2_RIE_MASK;
//enable NVIC,we are sure uart's NVIC vector is in NVICICPR1 //enable NVIC,we are sure uart's NVIC vector is in NVICICPR1
NVICICPR1 |= 1 << (uart_irq_num % 32); NVIC->ICPR[uart_irq_num / 32] = 1 << (uart_irq_num % 32);
NVICISER1 |= 1 << (uart_irq_num % 32); NVIC->ISER[uart_irq_num / 32] = 1 << (uart_irq_num % 32);
break; break;
case RT_DEVICE_CTRL_SUSPEND: case RT_DEVICE_CTRL_SUSPEND:
/* suspend device */ /* suspend device */