1 /** 2 ****************************************************************************** 3 * @file stm32h5xx_ll_dlyb.h 4 * @author MCD Application Team 5 * @brief Header file of DelayBlock module. 6 ****************************************************************************** 7 * @attention 8 * 9 * Copyright (c) 2022 STMicroelectronics. 10 * All rights reserved. 11 * 12 * This software is licensed under terms that can be found in the LICENSE file 13 * in the root directory of this software component. 14 * If no LICENSE file comes with this software, it is provided AS-IS. 15 * 16 ****************************************************************************** 17 */ 18 19 /* Define to prevent recursive inclusion -------------------------------------*/ 20 #ifndef STM32H5xx_LL_DLYB_H 21 #define STM32H5xx_LL_DLYB_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32h5xx_hal_def.h" 29 30 /** @addtogroup STM32H5xx_LL_Driver 31 * @{ 32 */ 33 34 #if defined(HAL_SD_MODULE_ENABLED) || defined(HAL_OSPI_MODULE_ENABLED) || defined(HAL_XSPI_MODULE_ENABLED) 35 36 /* Exported types ------------------------------------------------------------*/ 37 /** @defgroup DLYB_LL DLYB 38 * @{ 39 */ 40 41 /** 42 * @brief DLYB Configuration Structure definition 43 */ 44 45 typedef struct 46 { 47 uint32_t Units; /*!< Specifies the Delay of a unit delay cell. 48 This parameter can be a value between 0 and DLYB_MAX_UNIT */ 49 50 uint32_t PhaseSel; /*!< Specifies the Phase for the output clock. 51 This parameter can be a value between 0 and DLYB_MAX_SELECT */ 52 } LL_DLYB_CfgTypeDef; 53 54 /* Exported constants --------------------------------------------------------*/ 55 /** @defgroup DLYB_Exported_Constants DLYB Exported Constants 56 * @{ 57 */ 58 59 #define DLYB_MAX_UNIT ((uint32_t)0x00000080U) /*!< Max UNIT value (128) */ 60 #define DLYB_MAX_SELECT ((uint32_t)0x0000000CU) /*!< Max SELECT value (12) */ 61 62 /** 63 * @} 64 */ 65 66 /** @defgroup DLYB_LL_Flags DLYB Flags 67 * @{ 68 */ 69 70 #define DLYB_FLAG_LNGF DLYB_CFGR_LNGF 71 72 /** 73 * @} 74 */ 75 76 /* Exported functions --------------------------------------------------------*/ 77 78 /** @defgroup DLYB_LL_Exported_Functions DLYB Exported Functions 79 * @{ 80 */ 81 82 /** @defgroup DLYB_LL_Configuration Configuration functions 83 * @{ 84 */ 85 86 /** 87 * @brief DLYB Enable 88 * @param DLYBx DLYB Instance 89 * @retval None 90 */ 91 LL_DLYB_Enable(DLYB_TypeDef * DLYBx)92__STATIC_INLINE void LL_DLYB_Enable(DLYB_TypeDef *DLYBx) 93 { 94 SET_BIT(DLYBx->CR, DLYB_CR_DEN); 95 } 96 97 /** @brief Disable the DLYB. 98 * @param DLYBx DLYB Instance. 99 * @retval None 100 */ 101 LL_DLYB_Disable(DLYB_TypeDef * DLYBx)102__STATIC_INLINE void LL_DLYB_Disable(DLYB_TypeDef *DLYBx) 103 { 104 CLEAR_BIT(DLYBx->CR, DLYB_CR_DEN); 105 } 106 107 /** 108 * @} 109 */ 110 111 /** @defgroup DLYB_Control_Functions DLYB Control functions 112 * @{ 113 */ 114 115 void LL_DLYB_SetDelay(DLYB_TypeDef *DLYBx, LL_DLYB_CfgTypeDef *pdlyb_cfg); 116 void LL_DLYB_GetDelay(DLYB_TypeDef *DLYBx, LL_DLYB_CfgTypeDef *pdlyb_cfg); 117 uint32_t LL_DLYB_GetClockPeriod(DLYB_TypeDef *DLYBx, LL_DLYB_CfgTypeDef *pdlyb_cfg); 118 119 /** 120 * @} 121 */ 122 123 /** 124 * @} 125 */ 126 127 /** 128 * @} 129 */ 130 131 #endif /* HAL_SD_MODULE_ENABLED || HAL_OSPI_MODULE_ENABLED || HAL_XSPI_MODULE_ENABLED */ 132 133 /** 134 * @} 135 */ 136 137 #ifdef __cplusplus 138 } 139 #endif 140 141 #endif /* STM32H5xx_LL_DLYB_H */ 142