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/NUCLEO-WB35CE/Examples/COMP/COMP_CompareGpioVsVrefInt_IT/Src/stm32wbxx_hal_msp.c')
-rw-r--r--Projects/NUCLEO-WB35CE/Examples/COMP/COMP_CompareGpioVsVrefInt_IT/Src/stm32wbxx_hal_msp.c143
1 files changed, 143 insertions, 0 deletions
diff --git a/Projects/NUCLEO-WB35CE/Examples/COMP/COMP_CompareGpioVsVrefInt_IT/Src/stm32wbxx_hal_msp.c b/Projects/NUCLEO-WB35CE/Examples/COMP/COMP_CompareGpioVsVrefInt_IT/Src/stm32wbxx_hal_msp.c
new file mode 100644
index 000000000..7ad3f0b75
--- /dev/null
+++ b/Projects/NUCLEO-WB35CE/Examples/COMP/COMP_CompareGpioVsVrefInt_IT/Src/stm32wbxx_hal_msp.c
@@ -0,0 +1,143 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file COMP/COMP_CompareGpioVsVrefInt_IT/Src/stm32wbxx_hal_msp.c
+ * @author MCD Application Team
+ * @brief HAL MSP module.
+ ******************************************************************************
+ * @attention
+ *
+ * <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
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN Define */
+
+/* USER CODE END Define */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN Macro */
+
+/* USER CODE END Macro */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* External functions --------------------------------------------------------*/
+/* USER CODE BEGIN ExternalFunctions */
+
+/* USER CODE END ExternalFunctions */
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+/**
+ * Initializes the Global MSP.
+ */
+void HAL_MspInit(void)
+{
+ /* USER CODE BEGIN MspInit 0 */
+
+ /* USER CODE END MspInit 0 */
+
+ /* System interrupt init*/
+
+ /* USER CODE BEGIN MspInit 1 */
+
+ /* USER CODE END MspInit 1 */
+}
+
+/**
+* @brief COMP MSP Initialization
+* This function configures the hardware resources used in this example
+* @param hcomp: COMP handle pointer
+* @retval None
+*/
+void HAL_COMP_MspInit(COMP_HandleTypeDef* hcomp)
+{
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ if(hcomp->Instance==COMP1)
+ {
+ /* USER CODE BEGIN COMP1_MspInit 0 */
+
+ /* USER CODE END COMP1_MspInit 0 */
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ /**COMP1 GPIO Configuration
+ PA1 ------> COMP1_INP
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_1;
+ GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /* COMP1 interrupt Init */
+ HAL_NVIC_SetPriority(COMP_IRQn, 3, 0);
+ HAL_NVIC_EnableIRQ(COMP_IRQn);
+ /* USER CODE BEGIN COMP1_MspInit 1 */
+
+ /* USER CODE END COMP1_MspInit 1 */
+ }
+
+}
+
+/**
+* @brief COMP MSP De-Initialization
+* This function freeze the hardware resources used in this example
+* @param hcomp: COMP handle pointer
+* @retval None
+*/
+void HAL_COMP_MspDeInit(COMP_HandleTypeDef* hcomp)
+{
+ if(hcomp->Instance==COMP1)
+ {
+ /* USER CODE BEGIN COMP1_MspDeInit 0 */
+
+ /* USER CODE END COMP1_MspDeInit 0 */
+
+ /**COMP1 GPIO Configuration
+ PA1 ------> COMP1_INP
+ */
+ HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1);
+
+ /* COMP1 interrupt DeInit */
+ HAL_NVIC_DisableIRQ(COMP_IRQn);
+ /* USER CODE BEGIN COMP1_MspDeInit 1 */
+
+ /* USER CODE END COMP1_MspDeInit 1 */
+ }
+
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
+
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/