Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_LLD/BLE_LLD_Pressbutton/Core/Src/stm32wbxx_hal_msp.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_LLD/BLE_LLD_Pressbutton/Core/Src/stm32wbxx_hal_msp.c48
1 files changed, 20 insertions, 28 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_LLD/BLE_LLD_Pressbutton/Core/Src/stm32wbxx_hal_msp.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_LLD/BLE_LLD_Pressbutton/Core/Src/stm32wbxx_hal_msp.c
index 9b680a158..b783825ba 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_LLD/BLE_LLD_Pressbutton/Core/Src/stm32wbxx_hal_msp.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_LLD/BLE_LLD_Pressbutton/Core/Src/stm32wbxx_hal_msp.c
@@ -7,11 +7,11 @@
******************************************************************************
* @attention
*
- * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
+ * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
- * the "License"; You may not use this file except in compliance with the
+ * the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
@@ -81,22 +81,16 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* USER CODE BEGIN LPUART1_MspInit 0 */
/* USER CODE END LPUART1_MspInit 0 */
- /* Peripheral clock enable */
- __HAL_RCC_LPUART1_CLK_ENABLE();
-
+
/* GPIOs configuration */
#if(CFG_DEBUG_TRACE != 0)
gpio_lld_lpuart_init();
#endif
-
+
/* LPUART1 DMA Init */
/* LPUART1_TX Init */
-#ifdef STM32WB35xx
hdma_lpuart1_tx.Instance = DMA1_Channel4;
-#else
- hdma_lpuart1_tx.Instance = DMA1_Channel1;
-#endif
hdma_lpuart1_tx.Init.Request = DMA_REQUEST_LPUART1_TX;
hdma_lpuart1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_lpuart1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
@@ -109,7 +103,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
Error_Handler();
}
-
+
pSyncConfig.SyncSignalID = HAL_DMAMUX1_SYNC_DMAMUX1_CH1_EVT;
pSyncConfig.SyncPolarity = HAL_DMAMUX_SYNC_NO_EVENT;
pSyncConfig.SyncEnable = DISABLE;
@@ -119,9 +113,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
Error_Handler();
}
-
+
__HAL_LINKDMA(huart,hdmatx,hdma_lpuart1_tx);
-
+
/* LPUART1 interrupt Init */
HAL_NVIC_SetPriority(LPUART1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(LPUART1_IRQn);
@@ -138,19 +132,16 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* USER CODE END USART1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
-
+
/* GPIOs configuration */
#if(CFG_DEBUG_TRACE != 0)
gpio_lld_usart_init();
#endif
-
+
+
/* USART1 DMA Init */
/* USART1_TX Init */
-#ifdef STM32WB35xx
- hdma_usart1_tx.Instance = DMA2_Channel4;
-#else
- hdma_usart1_tx.Instance = DMA1_Channel2;
-#endif
+ hdma_usart1_tx.Instance = DMA1_Channel5;
hdma_usart1_tx.Init.Request = DMA_REQUEST_USART1_TX;
hdma_usart1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_usart1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
@@ -163,9 +154,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
Error_Handler();
}
-
+
__HAL_LINKDMA(huart,hdmatx,hdma_usart1_tx);
-
+
/* USART1 interrupt Init */
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART1_IRQn);
@@ -192,13 +183,13 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
/* USER CODE END LPUART1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_LPUART1_CLK_DISABLE();
-
+
/* De-init GPIOs */
gpio_lld_lpuart_deInit();
-
+
/* LPUART1 DMA DeInit */
HAL_DMA_DeInit(huart->hdmatx);
-
+
/* LPUART1 interrupt DeInit */
HAL_NVIC_DisableIRQ(LPUART1_IRQn);
/* USER CODE BEGIN LPUART1_MspDeInit 1 */
@@ -214,13 +205,14 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
/* USER CODE END USART1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART1_CLK_DISABLE();
-
+
/* De-init GPIOs */
gpio_lld_usart_deInit();
-
+
+
/* USART1 DMA DeInit */
HAL_DMA_DeInit(huart->hdmatx);
-
+
/* USART1 interrupt DeInit */
HAL_NVIC_DisableIRQ(USART1_IRQn);
/* USER CODE BEGIN USART1_MspDeInit 1 */