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