Skip to content

Commit

Permalink
firmware: drivers: uart: Returning int in initialization #43
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelboing committed Dec 29, 2022
1 parent ed9b2fd commit 1bf1dcf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions firmware/drivers/uart/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int uart_init(uart_config_t config)
default:
//TODO Add error log system.
break;

}

switch(config.mode)
{
Expand All @@ -81,7 +81,6 @@ int uart_init(uart_config_t config)
default:
//TODO Add error log system.
break;

}

switch(config.word_length)
Expand All @@ -91,7 +90,6 @@ int uart_init(uart_config_t config)
default:
//TODO Add error log system.
break;

}

switch(config.flow_control)
Expand All @@ -103,7 +101,6 @@ int uart_init(uart_config_t config)
default:
//TODO Add error log system.
break;

}

/* Setup UART parameters. */
Expand All @@ -116,5 +113,6 @@ int uart_init(uart_config_t config)

/* Enable UART. */
usart_enable(usart);


return 0;
}

0 comments on commit 1bf1dcf

Please sign in to comment.