1 /**
2   ******************************************************************************
3   * @file    stm32g4xx_ll_hrtim.c
4   * @author  MCD Application Team
5   * @brief   HRTIM LL module driver.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 #if defined(USE_FULL_LL_DRIVER)
19 
20 /* Includes ------------------------------------------------------------------*/
21 #include "stm32g4xx_ll_hrtim.h"
22 #include "stm32g4xx_ll_bus.h"
23 
24 #ifdef  USE_FULL_ASSERT
25 #include "stm32_assert.h"
26 #else
27 #define assert_param(expr) ((void)0U)
28 #endif
29 
30 /** @addtogroup STM32G4xx_LL_Driver
31   * @{
32   */
33 
34 #if defined (HRTIM1)
35 
36 /** @addtogroup HRTIM_LL
37   * @{
38   */
39 
40 /* Private types -------------------------------------------------------------*/
41 /* Private variables ---------------------------------------------------------*/
42 /* Private constants ---------------------------------------------------------*/
43 /* Private macros ------------------------------------------------------------*/
44 /* Private function prototypes -----------------------------------------------*/
45 /* Exported functions --------------------------------------------------------*/
46 /** @addtogroup HRTIM_LL_Exported_Functions
47   * @{
48   */
49 /**
50   * @brief  Set HRTIM instance registers to their reset values.
51   * @param  HRTIMx High Resolution Timer instance
52   * @retval ErrorStatus enumeration value:
53   *          - SUCCESS: HRTIMx registers are de-initialized
54   *          - ERROR: invalid HRTIMx instance
55   */
LL_HRTIM_DeInit(HRTIM_TypeDef * HRTIMx)56 ErrorStatus LL_HRTIM_DeInit(HRTIM_TypeDef *HRTIMx)
57 {
58   ErrorStatus result = SUCCESS;
59 
60   /* Check the parameters */
61   assert_param(IS_HRTIM_ALL_INSTANCE(HRTIMx));
62   LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_HRTIM1);
63   LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_HRTIM1);
64   return result;
65 }
66 /**
67   * @}
68   */
69 
70 /**
71   * @}
72   */
73 
74 #endif /* HRTIM1 */
75 
76 /**
77   * @}
78   */
79 
80 #endif /* USE_FULL_LL_DRIVER */
81