stm32g4xx_ll_hrtim.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /* Includes ------------------------------------------------------------------*/
  20. #include "stm32g4xx_ll_hrtim.h"
  21. #include "stm32g4xx_ll_bus.h"
  22. #ifdef USE_FULL_ASSERT
  23. #include "stm32_assert.h"
  24. #else
  25. #define assert_param(expr) ((void)0U)
  26. #endif
  27. /** @addtogroup STM32G4xx_LL_Driver
  28. * @{
  29. */
  30. #if defined (HRTIM1)
  31. /** @addtogroup HRTIM_LL
  32. * @{
  33. */
  34. /* Private types -------------------------------------------------------------*/
  35. /* Private variables ---------------------------------------------------------*/
  36. /* Private constants ---------------------------------------------------------*/
  37. /* Private macros ------------------------------------------------------------*/
  38. /* Private function prototypes -----------------------------------------------*/
  39. /* Exported functions --------------------------------------------------------*/
  40. /** @addtogroup HRTIM_LL_Exported_Functions
  41. * @{
  42. */
  43. /**
  44. * @brief Set HRTIM instance registers to their reset values.
  45. * @param HRTIMx High Resolution Timer instance
  46. * @retval ErrorStatus enumeration value:
  47. * - SUCCESS: HRTIMx registers are de-initialized
  48. * - ERROR: invalid HRTIMx instance
  49. */
  50. ErrorStatus LL_HRTIM_DeInit(HRTIM_TypeDef *HRTIMx)
  51. {
  52. ErrorStatus result = SUCCESS;
  53. /* Check the parameters */
  54. assert_param(IS_HRTIM_ALL_INSTANCE(HRTIMx));
  55. LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_HRTIM1);
  56. LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_HRTIM1);
  57. return result;
  58. }
  59. /**
  60. * @}
  61. */
  62. /**
  63. * @}
  64. */
  65. #endif /* HRTIM1 */
  66. /**
  67. * @}
  68. */
  69. #endif /* USE_FULL_LL_DRIVER */