From d75762358d65a14a79b4a885f23d037499448a47 Mon Sep 17 00:00:00 2001 From: jzlv Date: Mon, 26 Jul 2021 10:39:56 +0800 Subject: [PATCH] [refactor] because of using -DBFLB_USE_HAL_DRIVER,so irq register can be removed --- drivers/bl702_driver/hal_drv/src/hal_uart.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/bl702_driver/hal_drv/src/hal_uart.c b/drivers/bl702_driver/hal_drv/src/hal_uart.c index 7cf9d6eb..4c78e957 100644 --- a/drivers/bl702_driver/hal_drv/src/hal_uart.c +++ b/drivers/bl702_driver/hal_drv/src/hal_uart.c @@ -182,8 +182,6 @@ int uart_control(struct device *dev, int cmd, void *args) uart_param_cfg_t *cfg = (uart_param_cfg_t *)args; UART_CFG_Type uart_cfg; - /* Disable uart before config */ - UART_Disable(uart_device->id, UART_TXRX); uint32_t uart_clk = peripheral_clock_get(PERIPHERAL_CLOCK_UART); uart_cfg.uartClk = uart_clk; @@ -199,16 +197,6 @@ int uart_control(struct device *dev, int cmd, void *args) uart_cfg.rxLinMode = UART_RX_LINMODE_ENABLE; uart_cfg.txBreakBitCnt = UART_TX_BREAKBIT_CNT; UART_Init(uart_device->id, &uart_cfg); -#ifdef BSP_USING_UART0 - if (uart_device->id == UART0_ID) - Interrupt_Handler_Register(UART0_IRQn, UART0_IRQ); -#endif -#ifdef BSP_USING_UART1 - if (uart_device->id == UART1_ID) - Interrupt_Handler_Register(UART1_IRQn, UART1_IRQ); -#endif - /* Enable uart */ - UART_Enable(uart_device->id, UART_TXRX); break; } case DEVICE_CTRL_GET_CONFIG /* constant-expression */: