diff options
Diffstat (limited to 'bsp/nxp/mcx/mcxn/Libraries')
| -rw-r--r-- | bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c b/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c index e1790359d5..31b457d9fe 100644 --- a/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c +++ b/bsp/nxp/mcx/mcxn/Libraries/drivers/drv_uart.c @@ -133,7 +133,6 @@ static rt_err_t mcx_configure(struct rt_serial_device *serial, struct serial_con { struct mcx_uart *uart; /* Serial port hardware structure, calling the structure initialized above */ lpuart_config_t config;/* It contains basic configuration parameters of the serial port, such as baud rate, data bit, stop bit, and parity check */ - rt_uint32_t irq_regval; RT_ASSERT(serial != RT_NULL); /* assert */ RT_ASSERT(cfg != RT_NULL); @@ -160,14 +159,8 @@ static rt_err_t mcx_configure(struct rt_serial_device *serial, struct serial_con config.enableTx = true; config.enableRx = true; - - irq_regval = LPUART_GetEnabledInterrupts(uart->uart_base); + LPUART_Init(uart->uart_base, &config, CLOCK_GetFreq(uart->clock_src)); - if(irq_regval & kLPUART_RxDataRegFullInterruptEnable) - { - LPUART_EnableInterrupts(uart->uart_base, kLPUART_RxDataRegFullInterruptEnable); - EnableIRQ(uart->irqn); - } return RT_EOK; } |
