From 0fc2211c77a90b9782d32edac6f55d4f7f3e1eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=B5=A9=E7=84=B6?= <43113435+0xcccccccccccc@users.noreply.github.com> Date: Tue, 1 Dec 2020 16:52:31 +0800 Subject: [PATCH] Update drv_uart.c fix indentataions --- bsp/ls2kdev/drivers/drv_uart.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bsp/ls2kdev/drivers/drv_uart.c b/bsp/ls2kdev/drivers/drv_uart.c index 7a59d12d32..cee40ff036 100644 --- a/bsp/ls2kdev/drivers/drv_uart.c +++ b/bsp/ls2kdev/drivers/drv_uart.c @@ -47,16 +47,17 @@ static rt_err_t ls2k_uart_set_buad(struct rt_serial_device *serial,struct serial RT_ASSERT(cfg != RT_NULL); uart_dev = (struct rt_uart_ls2k *)serial->parent.user_data; - uint64_t brtc = (125000000U) / (16*(cfg->baud_rate)); + uint64_t brtc = (125000000U) / (16*(cfg->baud_rate)); UART_LCR(uart_dev->base)=0x80; // Activate buadcfg UART_LSB(uart_dev->base)= brtc & 0xff; UART_MSB(uart_dev->base)= brtc >> 8; - if(((((short)UART_MSB(uart_dev->base))<<8) | UART_LSB(uart_dev->base)) != brtc) ret=RT_ERROR; + if(((((short)UART_MSB(uart_dev->base))<<8) | UART_LSB(uart_dev->base)) != brtc) + ret=RT_ERROR; UART_LCR(uart_dev->base)= CFCR_8BITS;// Back to normal - UART_MCR(uart_dev->base)= MCR_IENABLE/* | MCR_DTR | MCR_RTS*/; - UART_IER(uart_dev->base) = 0; + UART_MCR(uart_dev->base)= MCR_IENABLE/* | MCR_DTR | MCR_RTS*/; + UART_IER(uart_dev->base) = 0; } static rt_err_t ls2k_uart_configure(struct rt_serial_device *serial, struct serial_configure *cfg) {