STM32L443xx HAL User Manual
stm32l4xx_ll_crc.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l4xx_ll_crc.c
00004   * @author  MCD Application Team
00005   * @brief   CRC LL module driver.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018 #if defined(USE_FULL_LL_DRIVER)
00019 
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l4xx_ll_crc.h"
00022 #include "stm32l4xx_ll_bus.h"
00023 
00024 #ifdef  USE_FULL_ASSERT
00025 #include "stm32_assert.h"
00026 #else
00027 #define assert_param(expr) ((void)0U)
00028 #endif /* USE_FULL_ASSERT */
00029 
00030 /** @addtogroup STM32L4xx_LL_Driver
00031   * @{
00032   */
00033 
00034 #if defined (CRC)
00035 
00036 /** @addtogroup CRC_LL
00037   * @{
00038   */
00039 
00040 /* Private types -------------------------------------------------------------*/
00041 /* Private variables ---------------------------------------------------------*/
00042 /* Private constants ---------------------------------------------------------*/
00043 /* Private macros ------------------------------------------------------------*/
00044 /* Private function prototypes -----------------------------------------------*/
00045 
00046 /* Exported functions --------------------------------------------------------*/
00047 /** @addtogroup CRC_LL_Exported_Functions
00048   * @{
00049   */
00050 
00051 /** @addtogroup CRC_LL_EF_Init
00052   * @{
00053   */
00054 
00055 /**
00056   * @brief  De-initialize CRC registers (Registers restored to their default values).
00057   * @param  CRCx CRC Instance
00058   * @retval An ErrorStatus enumeration value:
00059   *          - SUCCESS: CRC registers are de-initialized
00060   *          - ERROR: CRC registers are not de-initialized
00061   */
00062 ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx)
00063 {
00064   ErrorStatus status = SUCCESS;
00065 
00066   /* Check the parameters */
00067   assert_param(IS_CRC_ALL_INSTANCE(CRCx));
00068 
00069   if (CRCx == CRC)
00070   {
00071     /* Force CRC reset */
00072     LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_CRC);
00073 
00074     /* Release CRC reset */
00075     LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_CRC);
00076   }
00077   else
00078   {
00079     status = ERROR;
00080   }
00081 
00082   return (status);
00083 }
00084 
00085 /**
00086   * @}
00087   */
00088 
00089 /**
00090   * @}
00091   */
00092 
00093 /**
00094   * @}
00095   */
00096 
00097 #endif /* defined (CRC) */
00098 
00099 /**
00100   * @}
00101   */
00102 
00103 #endif /* USE_FULL_LL_DRIVER */