aboutsummaryrefslogtreecommitdiff
path: root/stm-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'stm-init.c')
-rw-r--r--stm-init.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/stm-init.c b/stm-init.c
index 216f127..efcc025 100644
--- a/stm-init.c
+++ b/stm-init.c
@@ -123,16 +123,16 @@ void SystemClock_Config(void)
/* USART1 init function */
static void MX_USART1_UART_Init(void)
{
- huart1.Instance = USART1;
- huart1.Init.BaudRate = USART1_BAUD_RATE;
- huart1.Init.WordLength = UART_WORDLENGTH_8B;
- huart1.Init.StopBits = UART_STOPBITS_1;
- huart1.Init.Parity = UART_PARITY_NONE;
- huart1.Init.Mode = UART_MODE_TX_RX;
- huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- huart1.Init.OverSampling = UART_OVERSAMPLING_16;
-
- if (HAL_UART_Init(&huart1) != HAL_OK) {
+ huart_mgmt.Instance = USART1;
+ huart_mgmt.Init.BaudRate = USART1_BAUD_RATE;
+ huart_mgmt.Init.WordLength = UART_WORDLENGTH_8B;
+ huart_mgmt.Init.StopBits = UART_STOPBITS_1;
+ huart_mgmt.Init.Parity = UART_PARITY_NONE;
+ huart_mgmt.Init.Mode = UART_MODE_TX_RX;
+ huart_mgmt.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ huart_mgmt.Init.OverSampling = UART_OVERSAMPLING_16;
+
+ if (HAL_UART_Init(&huart_mgmt) != HAL_OK) {
/* Initialization Error */
Error_Handler();
}
@@ -140,16 +140,16 @@ static void MX_USART1_UART_Init(void)
/* USART2 init function */
static void MX_USART2_UART_Init(void)
{
- huart2.Instance = USART2;
- huart2.Init.BaudRate = USART2_BAUD_RATE;
- huart2.Init.WordLength = UART_WORDLENGTH_8B;
- huart2.Init.StopBits = UART_STOPBITS_1;
- huart2.Init.Parity = UART_PARITY_NONE;
- huart2.Init.Mode = UART_MODE_TX_RX;
- huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- huart2.Init.OverSampling = UART_OVERSAMPLING_16;
-
- if (HAL_UART_Init(&huart2) != HAL_OK) {
+ huart_user.Instance = USART2;
+ huart_user.Init.BaudRate = USART2_BAUD_RATE;
+ huart_user.Init.WordLength = UART_WORDLENGTH_8B;
+ huart_user.Init.StopBits = UART_STOPBITS_1;
+ huart_user.Init.Parity = UART_PARITY_NONE;
+ huart_user.Init.Mode = UART_MODE_TX_RX;
+ huart_user.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ huart_user.Init.OverSampling = UART_OVERSAMPLING_16;
+
+ if (HAL_UART_Init(&huart_user) != HAL_OK) {
/* Initialization Error */
Error_Handler();
}