STM32H735xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32h7xx_ll_cordic.c 00004 * @author MCD Application Team 00005 * @brief CORDIC 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 "stm32h7xx_ll_cordic.h" 00022 #include "stm32h7xx_ll_bus.h" 00023 #ifdef USE_FULL_ASSERT 00024 #include "stm32_assert.h" 00025 #else 00026 #define assert_param(expr) ((void)0U) 00027 #endif /* USE_FULL_ASSERT */ 00028 00029 /** @addtogroup STM32H7xx_LL_Driver 00030 * @{ 00031 */ 00032 00033 #if defined(CORDIC) 00034 00035 /** @addtogroup CORDIC_LL 00036 * @{ 00037 */ 00038 00039 /* Private types -------------------------------------------------------------*/ 00040 /* Private variables ---------------------------------------------------------*/ 00041 /* Private constants ---------------------------------------------------------*/ 00042 /* Private macros ------------------------------------------------------------*/ 00043 /* Private function prototypes -----------------------------------------------*/ 00044 00045 /* Exported functions --------------------------------------------------------*/ 00046 /** @addtogroup CORDIC_LL_Exported_Functions 00047 * @{ 00048 */ 00049 00050 /** @addtogroup CORDIC_LL_EF_Init 00051 * @{ 00052 */ 00053 00054 /** 00055 * @brief De-Initialize CORDIC peripheral registers to their default reset values. 00056 * @param CORDICx CORDIC Instance 00057 * @retval An ErrorStatus enumeration value: 00058 * - SUCCESS: CORDIC registers are de-initialized 00059 * - ERROR: CORDIC registers are not de-initialized 00060 */ 00061 ErrorStatus LL_CORDIC_DeInit(CORDIC_TypeDef *CORDICx) 00062 { 00063 ErrorStatus status = SUCCESS; 00064 00065 /* Check the parameters */ 00066 assert_param(IS_CORDIC_ALL_INSTANCE(CORDICx)); 00067 00068 if (CORDICx == CORDIC) 00069 { 00070 /* Force CORDIC reset */ 00071 LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_CORDIC); 00072 00073 /* Release CORDIC reset */ 00074 LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_CORDIC); 00075 } 00076 else 00077 { 00078 status = ERROR; 00079 } 00080 00081 return (status); 00082 } 00083 00084 /** 00085 * @} 00086 */ 00087 00088 /** 00089 * @} 00090 */ 00091 00092 /** 00093 * @} 00094 */ 00095 00096 #endif /* defined(CORDIC) */ 00097 00098 /** 00099 * @} 00100 */ 00101 00102 #endif /* USE_FULL_LL_DRIVER */