Merge pull request #11189 from klutvott123/move-telemetry-displayport-init
[betaflight.git] / lib / main / STM32G4 / Drivers / STM32G4xx_HAL_Driver / Src / stm32g4xx_ll_crc.c
blob7e68754f23a0a806ab75b2e79e0bdc276c5d802d
1 /**
2 ******************************************************************************
3 * @file stm32g4xx_ll_crc.c
4 * @author MCD Application Team
5 * @brief CRC LL module driver.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; Copyright (c) 2018 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
19 #if defined(USE_FULL_LL_DRIVER)
21 /* Includes ------------------------------------------------------------------*/
22 #include "stm32g4xx_ll_crc.h"
23 #include "stm32g4xx_ll_bus.h"
25 #ifdef USE_FULL_ASSERT
26 #include "stm32_assert.h"
27 #else
28 #define assert_param(expr) ((void)0U)
29 #endif
31 /** @addtogroup STM32G4xx_LL_Driver
32 * @{
35 #if defined (CRC)
37 /** @addtogroup CRC_LL
38 * @{
41 /* Private types -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 /* Private constants ---------------------------------------------------------*/
44 /* Private macros ------------------------------------------------------------*/
45 /* Private function prototypes -----------------------------------------------*/
47 /* Exported functions --------------------------------------------------------*/
48 /** @addtogroup CRC_LL_Exported_Functions
49 * @{
52 /** @addtogroup CRC_LL_EF_Init
53 * @{
56 /**
57 * @brief De-initialize CRC registers (Registers restored to their default values).
58 * @param CRCx CRC Instance
59 * @retval An ErrorStatus enumeration value:
60 * - SUCCESS: CRC registers are de-initialized
61 * - ERROR: CRC registers are not de-initialized
63 ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx)
65 ErrorStatus status = SUCCESS;
67 /* Check the parameters */
68 assert_param(IS_CRC_ALL_INSTANCE(CRCx));
70 if (CRCx == CRC)
72 /* Force CRC reset */
73 LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_CRC);
75 /* Release CRC reset */
76 LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_CRC);
78 else
80 status = ERROR;
83 return (status);
86 /**
87 * @}
90 /**
91 * @}
94 /**
95 * @}
98 #endif /* defined (CRC) */
101 * @}
104 #endif /* USE_FULL_LL_DRIVER */
106 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/