Skip to content

Commit

Permalink
Fix a few typos in lpc55xx/uart.c (#888)
Browse files Browse the repository at this point in the history
Some spotted by @tarokajya in #887
  • Loading branch information
mbrossard authored Nov 9, 2021
1 parent 82d9b4d commit 2c6f6e0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions source/hic_hal/nxp/lpc55xx/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;

Expand All @@ -99,15 +99,15 @@ 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:
control |= ARM_USART_DATA_BITS_6;
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 */
Expand Down Expand Up @@ -250,4 +250,3 @@ void uart_handler(uint32_t event) {
uart_start_tx_transfer();
}
}

0 comments on commit 2c6f6e0

Please sign in to comment.