STM32F103xB HAL User Manual
stm32f1xx_ll_crc.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32f1xx_ll_crc.c
00004   * @author  MCD Application Team
00005   * @brief   CRC LL module driver.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019 #if defined(USE_FULL_LL_DRIVER)
00020 
00021 /* Includes ------------------------------------------------------------------*/
00022 #include "stm32f1xx_ll_crc.h"
00023 #include "stm32f1xx_ll_bus.h"
00024 
00025 #ifdef  USE_FULL_ASSERT
00026 #include "stm32_assert.h"
00027 #else
00028 #define assert_param(expr) ((void)0U)
00029 #endif/* USE_FULL_ASSERT */
00030 
00031 /** @addtogroup STM32F1xx_LL_Driver
00032   * @{
00033   */
00034 
00035 #if defined (CRC)
00036 
00037 /** @addtogroup CRC_LL
00038   * @{
00039   */
00040 
00041 /* Private types -------------------------------------------------------------*/
00042 /* Private variables ---------------------------------------------------------*/
00043 /* Private constants ---------------------------------------------------------*/
00044 /* Private macros ------------------------------------------------------------*/
00045 /* Private function prototypes -----------------------------------------------*/
00046 
00047 /* Exported functions --------------------------------------------------------*/
00048 /** @addtogroup CRC_LL_Exported_Functions
00049   * @{
00050   */
00051 
00052 /** @addtogroup CRC_LL_EF_Init
00053   * @{
00054   */
00055 
00056 /**
00057   * @brief  De-initialize CRC registers (Registers restored to their default values).
00058   * @param  CRCx CRC Instance
00059   * @retval An ErrorStatus enumeration value:
00060   *          - SUCCESS: CRC registers are de-initialized
00061   *          - ERROR: CRC registers are not de-initialized
00062   */
00063 ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx)
00064 {
00065   ErrorStatus status = SUCCESS;
00066 
00067   /* Check the parameters */
00068   assert_param(IS_CRC_ALL_INSTANCE(CRCx));
00069 
00070   if (CRCx == CRC)
00071   {
00072 
00073     /* Reset the CRC calculation unit */
00074     LL_CRC_ResetCRCCalculationUnit(CRCx);
00075 
00076     /* Reset IDR register */
00077     LL_CRC_Write_IDR(CRCx, 0x00U);
00078   }
00079   else
00080   {
00081     status = ERROR;
00082   }
00083 
00084   return (status);
00085 }
00086 
00087 /**
00088   * @}
00089   */
00090 
00091 /**
00092   * @}
00093   */
00094 
00095 /**
00096   * @}
00097   */
00098 
00099 #endif /* defined (CRC) */
00100 
00101 /**
00102   * @}
00103   */
00104 
00105 #endif /* USE_FULL_LL_DRIVER */
00106 
00107 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
00108