STM32F479xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_ll_crc.c 00004 * @author MCD Application Team 00005 * @brief CRC LL module driver. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© 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 "stm32f4xx_ll_crc.h" 00023 #include "stm32f4xx_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 STM32F4xx_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 /* Force CRC reset */ 00073 LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_CRC); 00074 00075 /* Release CRC reset */ 00076 LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_CRC); 00077 } 00078 else 00079 { 00080 status = ERROR; 00081 } 00082 00083 return (status); 00084 } 00085 00086 /** 00087 * @} 00088 */ 00089 00090 /** 00091 * @} 00092 */ 00093 00094 /** 00095 * @} 00096 */ 00097 00098 #endif /* defined (CRC) */ 00099 00100 /** 00101 * @} 00102 */ 00103 00104 #endif /* USE_FULL_LL_DRIVER */ 00105 00106 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00107