8000 Fix a few typos in lpc55xx/uart.c (#888) · ARMmbed/DAPLink@2c6f6e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c6f6e0

Browse files
authored
Fix a few typos in lpc55xx/uart.c (#888)
Some spotted by @tarokajya in #887
1 parent 82d9b4d commit 2c6f6e0

File tree

1 file changed

+6
-7
lines changed
  • source/hic_hal/nxp/lpc55xx

1 file changed

+6
-7
lines changed

source/hic_hal/nxp/lpc55xx/uart.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ int32_t uart_initialize(void)
6464
{
6565
clear_buffers();
6666
cb_buf.tx_size = 0;
67-
Driver_USART0.Initialize(uart_handler);
68-
Driver_USART0.PowerControl(ARM_POWER_FULL);
67+
USART_INSTANCE.Initialize(uart_handler);
68+
USART_INSTANCE.PowerControl(ARM_POWER_FULL);
6969

7070
return 1;
7171
}
@@ -74,8 +74,8 @@ int32_t uart_uninitialize(void)
7474
{
7575
USART_INSTANCE.Control(ARM_USART_CONTROL_RX, 0);
7676
USART_INSTANCE.Control(ARM_USART_ABORT_RECEIVE, 0U);
77-
Driver_USART0.PowerControl(ARM_POWER_OFF);
78-
Driver_USART0.Uninitialize();
77+
USART_INSTANCE.PowerControl(ARM_POWER_OFF);
78+
USART_INSTANCE.Uninitialize();
7979
clear_buffers();
8080
cb_buf.tx_size = 0;
8181

@@ -99,15 +99,15 @@ int32_t uart_set_configuration(UART_Configuration *config)
9999

100100
switch (config->DataBits) {
101101
case UART_DATA_BITS_5:
102-
control |= UART_DATA_BITS_5;
102+
control |= ARM_USART_DATA_BITS_5;
103103
break;
104104

105105
case UART_DATA_BITS_6:
106106
control |= ARM_USART_DATA_BITS_6;
107107
break;
108108

109109
case UART_DATA_BITS_7:
110-
control |= ARM_USART_DATA_BITS_6;
110+
control |= ARM_USART_DATA_BITS_7;
111111
break;
112112

113113
case UART_DATA_BITS_8: /* fallthrough */
@@ -250,4 +250,3 @@ void uart_handler(uint32_t event) {
250250
uart_start_tx_transfer();
251251
}
252252
}
253-

0 commit comments

Comments
 (0)
0