From 2c7e3b2341498b4a3e111c9b4eaefd9945dcd962 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Mon, 8 Nov 2021 23:05:23 -0600 Subject: [PATCH] Fix a few typos in lpc55xx/uart.c (#888) Some spotted by @tarokajya in #887 --- source/hic_hal/nxp/lpc55xx/uart.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/hic_hal/nxp/lpc55xx/uart.c b/source/hic_hal/nxp/lpc55xx/uart.c index f69648d1db..b8b45c6d9d 100644 --- a/source/hic_hal/nxp/lpc55xx/uart.c +++ b/source/hic_hal/nxp/lpc55xx/uart.c @@ -64,8 +64,8 @@ int32_t uart_initialize(void) { clear_buffers(); cb_buf.tx_size = 0; - Driver_USART0.Initialize(uart_handler); - Driver_USART0.PowerControl(ARM_POWER_FULL); + USART_INSTANCE.Initialize(uart_handler); + USART_INSTANCE.PowerControl(ARM_POWER_FULL); return 1; } @@ -74,8 +74,8 @@ int32_t uart_uninitialize(void) { USART_INSTANCE.Control(ARM_USART_CONTROL_RX, 0); USART_INSTANCE.Control(ARM_USART_ABORT_RECEIVE, 0U); - Driver_USART0.PowerControl(ARM_POWER_OFF); - Driver_USART0.Uninitialize(); + USART_INSTANCE.PowerControl(ARM_POWER_OFF); + USART_INSTANCE.Uninitialize(); clear_buffers(); cb_buf.tx_size = 0; @@ -99,7 +99,7 @@ int32_t uart_set_configuration(UART_Configuration *config) switch (config->DataBits) { case UART_DATA_BITS_5: - control |= UART_DATA_BITS_5; + control |= ARM_USART_DATA_BITS_5; break; case UART_DATA_BITS_6: @@ -107,7 +107,7 @@ int32_t uart_set_configuration(UART_Configuration *config) break; case UART_DATA_BITS_7: - control |= ARM_USART_DATA_BITS_6; + control |= ARM_USART_DATA_BITS_7; break; case UART_DATA_BITS_8: /* fallthrough */ @@ -250,4 +250,3 @@ void uart_handler(uint32_t event) { uart_start_tx_transfer(); } } -