aboutsummaryrefslogtreecommitdiff
path: root/stm-uart.c
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-05-13 12:59:46 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-05-13 12:59:46 +0200
commit4c5cee7be2804953f48c6d1d7132e48bc21373b6 (patch)
treebd2db3691eaf6650beb001a9f358a9fc5a823ec8 /stm-uart.c
parentc670d7b194eea62d6fd6f9de0ae4025abe076ad4 (diff)
rename huart1 and huart2 to huart_mgmt and huart_user
reduces risk of using the wrong one
Diffstat (limited to 'stm-uart.c')
-rw-r--r--stm-uart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stm-uart.c b/stm-uart.c
index 538fe6c..ce52ca0 100644
--- a/stm-uart.c
+++ b/stm-uart.c
@@ -37,8 +37,8 @@
#include <string.h>
-UART_HandleTypeDef huart1;
-UART_HandleTypeDef huart2;
+UART_HandleTypeDef huart_mgmt;
+UART_HandleTypeDef huart_user;
#define DEFAULT_UART STM_UART_USER
@@ -46,9 +46,9 @@ UART_HandleTypeDef huart2;
inline UART_HandleTypeDef *_which_uart(enum stm_uart_port port)
{
if (port == STM_UART_USER) {
- return &huart2;
+ return &huart_user;
} else if (port == STM_UART_MGMT) {
- return &huart1;
+ return &huart_mgmt;
}
return NULL;