Create release.yml
[betaflight.git] / lib / main / STM32H7 / Drivers / STM32H7xx_HAL_Driver / Inc / stm32h7xx_hal_dts.h
blob63815fb4783b1855f5c027835f326cad674454b4
1 /**
2 ******************************************************************************
3 * @file stm32h7xx_hal_dts.h
4 * @author MCD Application Team
5 * @brief Header file of DTS HAL module.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32H7xx_HAL_DTS_H
22 #define __STM32H7xx_HAL_DTS_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #if defined(DTS)
29 /* Includes ------------------------------------------------------------------*/
30 #include "stm32h7xx_hal_def.h"
32 /** @addtogroup STM32H7xx_HAL_Driver
33 * @{
36 /** @addtogroup DTS
37 * @{
40 /* Exported types ------------------------------------------------------------*/
41 /** @defgroup DTS_Exported_Types DTS Exported Types
42 * @{
45 /**
46 * @brief DTS Init structure definition
48 typedef struct
50 uint32_t QuickMeasure; /*!< Specifies the quick measure option selection of the DTS sensor.
51 This parameter can be a value of @ref DTS_Quick_Measurement */
53 uint32_t RefClock; /*!< Specifies the reference clock selection of the DTS sensor.
54 This parameter can be a value of @ref DTS_Reference_Clock_Selection */
56 uint32_t TriggerInput; /*!< Specifies the trigger input of the DTS sensor.
57 This parameter can be a value of @ref DTS_TriggerConfig */
59 uint32_t SamplingTime; /*!< Specifies the sampling time configuration.
60 This parameter can be a value of @ref DTS_Sampling_Time */
62 uint32_t Divider; /*!< Specifies the high speed clock divider ratio.
63 This parameter can be a value from 0 to 127 */
65 uint32_t HighThreshold; /*!< Specifies the high threshold of the DTS sensor */
67 uint32_t LowThreshold; /*!< Specifies the low threshold of the DTS sensor */
69 } DTS_InitTypeDef;
71 /**
72 * @brief HAL State structures definition
74 typedef enum
76 HAL_DTS_STATE_RESET = 0x00UL, /*!< DTS not yet initialized or disabled */
77 HAL_DTS_STATE_READY = 0x01UL, /*!< DTS initialized and ready for use */
78 HAL_DTS_STATE_BUSY = 0x02UL, /*!< DTS is running */
79 HAL_DTS_STATE_TIMEOUT = 0x03UL, /*!< Timeout state */
80 HAL_DTS_STATE_ERROR = 0x04UL /*!< Internal Process error */
81 } HAL_DTS_StateTypeDef;
83 /**
84 * @brief DTS Handle Structure definition
86 #if (USE_HAL_DTS_REGISTER_CALLBACKS == 1)
87 typedef struct __DTS_HandleTypeDef
88 #else
89 typedef struct
90 #endif /* USE_HAL_DTS_REGISTER_CALLBACKS */
92 DTS_TypeDef *Instance; /*!< Register base address */
93 DTS_InitTypeDef Init; /*!< DTS required parameters */
94 HAL_LockTypeDef Lock; /*!< DTS Locking object */
95 __IO HAL_DTS_StateTypeDef State; /*!< DTS peripheral state */
96 #if (USE_HAL_DTS_REGISTER_CALLBACKS == 1)
97 void (* MspInitCallback)(struct __DTS_HandleTypeDef *hdts); /*!< DTS Base Msp Init Callback */
98 void (* MspDeInitCallback)(struct __DTS_HandleTypeDef *hdts); /*!< DTS Base Msp DeInit Callback */
99 void (* DTS_EndCallback)(struct __DTS_HandleTypeDef *hdts); /*!< End measure Callback */
100 void (* DTS_LowCallback)(struct __DTS_HandleTypeDef *hdts); /*!< low threshold Callback */
101 void (* DTS_HighCallback)(struct __DTS_HandleTypeDef *hdts); /*!< high threshold Callback */
102 void (* DTS_AsyncEndCallback)(struct __DTS_HandleTypeDef *hdts); /*!< Asynchronous end of measure Callback */
103 void (* DTS_AsyncLowCallback)(struct __DTS_HandleTypeDef *hdts); /*!< Asynchronous low threshold Callback */
104 void (* DTS_AsyncHighCallback(struct __DTS_HandleTypeDef *hdts); /*!< Asynchronous high threshold Callback */
105 #endif /* USE_HAL_DTS_REGISTER_CALLBACKS */
106 } DTS_HandleTypeDef;
109 * @}
112 /* Exported constants --------------------------------------------------------*/
113 /** @defgroup DTS_Exported_Constants DTS Exported Constants
114 * @{
117 /** @defgroup DTS_TriggerConfig DTS Trigger Configuration
118 * @{
120 /* @brief No Hardware trigger detection */
121 #define DTS_TRIGGER_HW_NONE (0UL)
123 /* @brief External Interrupt Mode with LPTIMER1 trigger detection */
124 #define DTS_TRIGGER_LPTIMER1 DTS_CFGR1_TS1_INTRIG_SEL_0
126 /* @brief External Interrupt Mode with LPTIMER2 trigger detection */
127 #define DTS_TRIGGER_LPTIMER2 DTS_CFGR1_TS1_INTRIG_SEL_1
129 /* @brief External Interrupt Mode with LPTIMER3 trigger detection */
130 #define DTS_TRIGGER_LPTIMER3 (DTS_CFGR1_TS1_INTRIG_SEL_0 | DTS_CFGR1_TS1_INTRIG_SEL_1)
132 /* @brief External Interrupt Mode with EXTI13 trigger detection */
133 #define DTS_TRIGGER_EXTI13 DTS_CFGR1_TS1_INTRIG_SEL_2
135 * @}
138 /** @defgroup DTS_Quick_Measurement DTS Quick Measurement
139 * @{
141 #define DTS_QUICKMEAS_ENABLE DTS_CFGR1_Q_MEAS_OPT /*!< Enable the Quick Measure (Measure without calibration) */
142 #define DTS_QUICKMEAS_DISABLE (0x0UL) /*!< Disable the Quick Measure (Measure with calibration) */
144 * @}
147 /** @defgroup DTS_Reference_Clock_Selection DTS Reference Clock Selection
148 * @{
150 #define DTS_REFCLKSEL_LSE DTS_CFGR1_REFCLK_SEL /*!< Low speed REF clock (LSE) */
151 #define DTS_REFCLKSEL_PCLK (0UL) /*!< High speed REF clock (PCLK) */
153 * @}
156 /** @defgroup DTS_Sampling_Time DTS Sampling Time
157 * @{
159 #define DTS_SMP_TIME_1_CYCLE DTS_CFGR1_TS1_SMP_TIME_0 /*!< 1 clock cycle for the sampling time */
160 #define DTS_SMP_TIME_2_CYCLE DTS_CFGR1_TS1_SMP_TIME_1 /*!< 2 clock cycle for the sampling time */
161 #define DTS_SMP_TIME_3_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_1) /*!< 3 clock cycle for the sampling time */
162 #define DTS_SMP_TIME_4_CYCLE (DTS_CFGR1_TS1_SMP_TIME_2) /*!< 4 clock cycle for the sampling time */
163 #define DTS_SMP_TIME_5_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_2) /*!< 5 clock cycle for the sampling time */
164 #define DTS_SMP_TIME_6_CYCLE (DTS_CFGR1_TS1_SMP_TIME_1 | DTS_CFGR1_TS1_SMP_TIME_2) /*!< 6 clock cycle for the sampling time */
165 #define DTS_SMP_TIME_7_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_1 | DTS_CFGR1_TS1_SMP_TIME_2) /*!< 7 clock cycle for the sampling time */
166 #define DTS_SMP_TIME_8_CYCLE (DTS_CFGR1_TS1_SMP_TIME_3) /*!< 8 clock cycle for the sampling time */
167 #define DTS_SMP_TIME_9_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 9 clock cycle for the sampling time */
168 #define DTS_SMP_TIME_10_CYCLE (DTS_CFGR1_TS1_SMP_TIME_1 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 10 clock cycle for the sampling time */
169 #define DTS_SMP_TIME_11_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_1 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 11 clock cycle for the sampling time */
170 #define DTS_SMP_TIME_12_CYCLE (DTS_CFGR1_TS1_SMP_TIME_2 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 12 clock cycle for the sampling time */
171 #define DTS_SMP_TIME_13_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_2 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 13 clock cycle for the sampling time */
172 #define DTS_SMP_TIME_14_CYCLE (DTS_CFGR1_TS1_SMP_TIME_1 | DTS_CFGR1_TS1_SMP_TIME_2 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 14 clock cycle for the sampling time */
173 #define DTS_SMP_TIME_15_CYCLE (DTS_CFGR1_TS1_SMP_TIME_0 | DTS_CFGR1_TS1_SMP_TIME_1 | DTS_CFGR1_TS1_SMP_TIME_2 | DTS_CFGR1_TS1_SMP_TIME_3) /*!< 15 clock cycle for the sampling time */
175 * @}
177 /** @defgroup DTS_Flag_Definitions DTS Flag Definitions
178 * @{
180 #define DTS_FLAG_TS1_ITE DTS_SR_TS1_ITEF /*!< Interrupt flag for end of measure for DTS1 */
181 #define DTS_FLAG_TS1_ITL DTS_SR_TS1_ITLF /*!< Interrupt flag for low threshold for DTS1 */
182 #define DTS_FLAG_TS1_ITH DTS_SR_TS1_ITHF /*!< Interrupt flag for high threshold for DTS1 */
183 #define DTS_FLAG_TS1_AITE DTS_SR_TS1_AITEF /*!< Asynchronous Interrupt flag for end of measure for DTS1 */
184 #define DTS_FLAG_TS1_AITL DTS_SR_TS1_AITLF /*!< Asynchronous Interrupt flag for low threshold for DTS1 */
185 #define DTS_FLAG_TS1_AITH DTS_SR_TS1_AITHF /*!< Asynchronous Interrupt flag for high threshold for DTS1 */
186 #define DTS_FLAG_TS1_RDY DTS_SR_TS1_RDY /*!< Ready flag for DTS1 */
188 * @}
191 /** @defgroup DTS_Interrupts_Definitions DTS Interrupts Definitions
192 * @{
194 #define DTS_IT_TS1_ITE DTS_ITENR_TS1_ITEEN /*!< Enable interrupt flag for end of measure for DTS1 */
195 #define DTS_IT_TS1_ITL DTS_ITENR_TS1_ITLEN /*!< Enable interrupt flag for low threshold for DTS1 */
196 #define DTS_IT_TS1_ITH DTS_ITENR_TS1_ITHEN /*!< Enable interrupt flag for high threshold for DTS1 */
197 #define DTS_IT_TS1_AITE DTS_ITENR_TS1_AITEEN /*!< Enable asynchronous interrupt flag for end of measure for DTS1 */
198 #define DTS_IT_TS1_AITL DTS_ITENR_TS1_AITLEN /*!< Enable asynchronous interrupt flag for low threshold for DTS1 */
199 #define DTS_IT_TS1_AITH DTS_ITENR_TS1_AITHEN /*!< Enable asynchronous interrupt flag for high threshold for DTS1 */
201 * @}
205 * @}
207 /* Exported macros -----------------------------------------------------------*/
208 /** @defgroup DTS_Exported_Macros DTS Exported Macros
209 * @{
212 /** @brief Reset DTS handle state
213 * @param __HANDLE__ DTS handle.
214 * @retval None
216 #define __HAL_DTS_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DTS_STATE_RESET)
219 * @brief Enable the specified DTS sensor
220 * @param __HANDLE__ DTS handle.
221 * @retval None
223 #define __HAL_DTS_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CFGR1, DTS_CFGR1_TS1_EN)
226 * @brief Disable the specified DTS sensor
227 * @param __HANDLE__ DTS handle.
228 * @retval None
230 #define __HAL_DTS_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CFGR1, DTS_CFGR1_TS1_EN)
233 * @brief Enable the DTS EXTI line in interrupt mode
234 * @retval None
236 #define __HAL_DTS_EXTI_WAKEUP_ENABLE_IT() SET_BIT(EXTI->IMR3, DTS_EXTI_LINE_DTS1)
239 * @brief Disable the DTS EXTI line in interrupt mode
240 * @retval None
242 #define __HAL_DTS_EXTI_WAKEUP_DISABLE_IT() CLEAR_BIT(EXTI->IMR3, DTS_EXTI_LINE_DTS1)
245 * @brief Enable the DTS EXTI Line in event mode
246 * @retval None
248 #define __HAL_DTS_EXTI_WAKEUP_ENABLE_EVENT() SET_BIT(EXTI->EMR3, DTS_EXTI_LINE_DTS1)
251 * @brief Disable the DTS EXTI Line in event mode
252 * @retval None
254 #define __HAL_DTS_EXTI_WAKEUP_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR3, DTS_EXTI_LINE_DTS1)
256 /** @brief Checks whether the specified DTS flag is set or not.
257 * @param __HANDLE__ specifies the DTS Handle.
258 * @param __FLAG__ specifies the flag to check.
259 * This parameter can be one of the following values:
260 * @arg DTS_FLAG_TS1_ITE : interrupt flag for end of measure for DTS1
261 * @arg DTS_FLAG_TS1_ITL : interrupt flag for low threshold for DTS1
262 * @arg DTS_FLAG_TS1_ITH : interrupt flag for high threshold for DTS1
263 * @arg DTS_FLAG_TS1_AITE: asynchronous interrupt flag for end of measure for DTS1
264 * @arg DTS_FLAG_TS1_AITL: asynchronous interrupt flag for low threshold for DTS1
265 * @arg DTS_FLAG_TS1_AITH: asynchronous interrupt flag for high threshold for DTS1
266 * @arg DTS_FLAG_TS1_RDY : Ready flag for DTS1
267 * @retval The new state of __FLAG__ (SET or RESET).
269 #define __HAL_DTS_GET_FLAG(__HANDLE__, __FLAG__) \
270 (((((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__)))? SET : RESET)
273 /** @brief Clears the specified DTS pending flag.
274 * @param __HANDLE__ specifies the DTS Handle.
275 * @param __FLAG__ specifies the flag to check.
276 * This parameter can be any combination of the following values:
277 * @arg DTS_FLAG_TS1_ITE : interrupt flag for end of measure for DTS1
278 * @arg DTS_FLAG_TS1_ITL : interrupt flag for low threshold for DTS1
279 * @arg DTS_FLAG_TS1_ITH : interrupt flag for high threshold for DTS1
280 * @arg DTS_FLAG_TS1_AITE: asynchronous interrupt flag for end of measure for DTS1
281 * @arg DTS_FLAG_TS1_AITL: asynchronous interrupt flag for low threshold for DTS1
282 * @arg DTS_FLAG_TS1_AITH: asynchronous interrupt flag for high threshold for DTS1
283 * @retval None
285 #define __HAL_DTS_CLEAR_FLAG(__HANDLE__, __FLAG__) \
286 ((__HANDLE__)->Instance->ICIFR = (__FLAG__))
289 /** @brief Enable the specified DTS interrupt.
290 * @param __HANDLE__ specifies the DTS Handle.
291 * @param __INTERRUPT__ specifies the DTS interrupt source to enable.
292 * This parameter can be one of the following values:
293 * @arg DTS_IT_TS1_ITE : interrupt flag for end of measure for DTS1
294 * @arg DTS_IT_TS1_ITL : interrupt flag for low of measure for DTS1
295 * @arg DTS_IT_TS1_ITH : interrupt flag for high of measure for DTS1
296 * @arg DTS_IT_TS1_AITE : asynchronous interrupt flag for end of measure for DTS1
297 * @arg DTS_IT_TS1_AITL : asynchronous interrupt flag for low of measure for DTS1
298 * @arg DTS_IT_TS1_AITH : asynchronous interrupt flag for high of measure for DTS1
299 * @retval None
301 #define __HAL_DTS_ENABLE_IT(__HANDLE__, __INTERRUPT__) \
302 SET_BIT((__HANDLE__)->Instance->ITENR, __INTERRUPT__)
305 /** @brief Disable the specified DTS interrupt.
306 * @param __HANDLE__ specifies the DTS Handle.
307 * @param __INTERRUPT__ specifies the DTS interrupt source to enable.
308 * This parameter can be one of the following values:
309 * @arg DTS_IT_TS1_ITE : interrupt flag for end of measure for DTS1
310 * @arg DTS_IT_TS1_ITL : interrupt flag for low of measure for DTS1
311 * @arg DTS_IT_TS1_ITH : interrupt flag for high of measure for DTS1
312 * @arg DTS_IT_TS1_AITE : asynchronous interrupt flag for end of measure for DTS1
313 * @arg DTS_IT_TS1_AITL : asynchronous interrupt flag for low of measure for DTS1
314 * @arg DTS_IT_TS1_AITH : asynchronous interrupt flag for high of measure for DTS1
315 * @retval None
317 #define __HAL_DTS_DISABLE_IT(__HANDLE__,__INTERRUPT__) \
318 CLEAR_BIT((__HANDLE__)->Instance->ITENR, __INTERRUPT__)
321 /** @brief Check whether the specified DTS interrupt source is enabled or not.
322 * @param __HANDLE__ DTS handle.
323 * @param __INTERRUPT__ DTS interrupt source to check
324 * This parameter can be one of the following values:
325 * @arg DTS_IT_TS1_ITE : interrupt flag for end of measure for DTS1
326 * @arg DTS_IT_TS1_ITL : interrupt flag for low of measure for DTS1
327 * @arg DTS_IT_TS1_ITH : interrupt flag for high of measure for DTS1
328 * @arg DTS_IT_TS1_AITE : asynchronous interrupt flag for end of measure for DTS1
329 * @arg DTS_IT_TS1_AITL : asynchronous interrupt flag for low of measure for DTS1
330 * @arg DTS_IT_TS1_AITH : asynchronous interrupt flag for high of measure for DTS1
331 * @retval State of interruption (SET or RESET)
333 #define __HAL_DTS_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) \
334 (( ((__HANDLE__)->Instance->ITENR & (__INTERRUPT__)) == (__INTERRUPT__) \
335 )? SET : RESET)
338 /** @brief Check whether the specified DTS REFCLK is selected
339 * @param __HANDLE__ DTS handle.
340 * @param __REFCLK__ DTS reference clock to check
341 * This parameter can be one of the following values:
342 * @arg DTS_REFCLKSEL_LSE: Low speed REF clock
343 * @arg DTS_REFCLKSEL_PCLK: High speed REF clock
344 * @retval State of the REF clock tested (SET or RESET)
346 #define __HAL_DTS_GET_REFCLK(__HANDLE__, __REFCLK__) ((((__HANDLE__)->Instance->CFGR1 & (__REFCLK__)) == (__REFCLK__))? SET : RESET)
348 /** @brief Get Trigger
349 * @param __HANDLE__ DTS handle.
350 * @retval One of the following trigger
351 * DTS_TRIGGER_HW_NONE : No HW trigger (SW trigger)
352 * DTS_TRIGGER_LPTIMER1: LPTIMER1 trigger
353 * DTS_TRIGGER_LPTIMER2: LPTIMER2 trigger
354 * DTS_TRIGGER_LPTIMER3: LPTIMER3 trigger
355 * DTS_TRIGGER_EXTI13 : EXTI13 trigger
357 #define __HAL_DTS_GET_TRIGGER(__HANDLE__) ((__HANDLE__)->Instance->CFGR1 & (DTS_CFGR1_TS1_INTRIG_SEL))
359 * @}
362 /* Exported functions --------------------------------------------------------*/
363 /** @addtogroup DTS_Exported_Functions
364 * @{
367 /** @addtogroup DTS_Exported_Functions_Group1
368 * @{
370 /* Initialization and de-initialization functions **********************************/
371 HAL_StatusTypeDef HAL_DTS_Init(DTS_HandleTypeDef *hdts);
372 HAL_StatusTypeDef HAL_DTS_DeInit(DTS_HandleTypeDef *hdts);
373 void HAL_DTS_MspInit(DTS_HandleTypeDef *hdts);
374 void HAL_DTS_MspDeInit(DTS_HandleTypeDef *hdts);
376 * @}
379 /* IO operation functions *****************************************************/
380 /** @addtogroup DTS_Exported_Functions_Group2
381 * @{
383 HAL_StatusTypeDef HAL_DTS_Start(DTS_HandleTypeDef *hdts);
384 HAL_StatusTypeDef HAL_DTS_Stop(DTS_HandleTypeDef *hdts);
385 HAL_StatusTypeDef HAL_DTS_GetTemperature(DTS_HandleTypeDef *hdts, int32_t *Temperature);
386 HAL_StatusTypeDef HAL_DTS_Start_IT(DTS_HandleTypeDef *hdts);
387 HAL_StatusTypeDef HAL_DTS_Stop_IT(DTS_HandleTypeDef *hdts);
388 void HAL_DTS_IRQHandler(DTS_HandleTypeDef *hdts);
389 HAL_DTS_StateTypeDef HAL_DTS_GetState(DTS_HandleTypeDef *hdts);
390 /* Callback in Interrupt mode */
391 void HAL_DTS_EndCallback(DTS_HandleTypeDef *hdts);
392 void HAL_DTS_LowCallback(DTS_HandleTypeDef *hdts);
393 void HAL_DTS_HighCallback(DTS_HandleTypeDef *hdts);
394 void HAL_DTS_AsyncEndCallback(DTS_HandleTypeDef *hdts);
395 void HAL_DTS_AsyncLowCallback(DTS_HandleTypeDef *hdts);
396 void HAL_DTS_AsyncHighCallback(DTS_HandleTypeDef *hdts);
398 * @}
401 /* Private types -------------------------------------------------------------*/
402 /* Private constants ---------------------------------------------------------*/
403 /** @defgroup DTS_Private_Constants DTS Private Constants
404 * @{
406 /** @defgroup DTS_ExtiLine DTS EXTI Lines
407 * @{
409 #define DTS_EXTI_LINE_DTS1 (EXTI_IMR3_IM88) /*!< EXTI line 88 connected to DTS1 output */
411 * @}
414 * @}
417 /* Private macros ------------------------------------------------------------*/
418 /** @defgroup DTS_Private_Macros DTS Private Macros
419 * @{
422 /** @defgroup DTS_IS_DTS_Definitions DTS Private macros to check input parameters
423 * @{
425 #define IS_DTS_QUICKMEAS(__SEL__) (((__SEL__) == DTS_QUICKMEAS_DISABLE) || \
426 ((__SEL__) == DTS_QUICKMEAS_ENABLE))
428 #define IS_DTS_REFCLK(__SEL__) (((__SEL__) == DTS_REFCLKSEL_LSE) || \
429 ((__SEL__) == DTS_REFCLKSEL_PCLK))
431 #define IS_DTS_TRIGGERINPUT(__INPUT__) (((__INPUT__) == DTS_TRIGGER_HW_NONE) || \
432 ((__INPUT__) == DTS_TRIGGER_LPTIMER1) || \
433 ((__INPUT__) == DTS_TRIGGER_LPTIMER2) || \
434 ((__INPUT__) == DTS_TRIGGER_LPTIMER3) || \
435 ((__INPUT__) == DTS_TRIGGER_EXTI13))
437 #define IS_DTS_THRESHOLD(__THRESHOLD__) ((__THRESHOLD__) <= 0xFFFFUL)
439 #define IS_DTS_DIVIDER_RATIO_NUMBER(__NUMBER__) (((__NUMBER__) >= (2UL)) && ((__NUMBER__) <= (127UL)))
441 #define IS_DTS_SAMPLINGTIME(__CYCLE__) (((__CYCLE__) == DTS_SMP_TIME_1_CYCLE) || \
442 ((__CYCLE__) == DTS_SMP_TIME_2_CYCLE) || \
443 ((__CYCLE__) == DTS_SMP_TIME_3_CYCLE) || \
444 ((__CYCLE__) == DTS_SMP_TIME_4_CYCLE) || \
445 ((__CYCLE__) == DTS_SMP_TIME_5_CYCLE) || \
446 ((__CYCLE__) == DTS_SMP_TIME_6_CYCLE) || \
447 ((__CYCLE__) == DTS_SMP_TIME_7_CYCLE) || \
448 ((__CYCLE__) == DTS_SMP_TIME_8_CYCLE) || \
449 ((__CYCLE__) == DTS_SMP_TIME_9_CYCLE) || \
450 ((__CYCLE__) == DTS_SMP_TIME_10_CYCLE) || \
451 ((__CYCLE__) == DTS_SMP_TIME_11_CYCLE) || \
452 ((__CYCLE__) == DTS_SMP_TIME_12_CYCLE) || \
453 ((__CYCLE__) == DTS_SMP_TIME_13_CYCLE) || \
454 ((__CYCLE__) == DTS_SMP_TIME_14_CYCLE) || \
455 ((__CYCLE__) == DTS_SMP_TIME_15_CYCLE))
458 * @}
462 * @}
465 /* Private functions ---------------------------------------------------------*/
468 * @}
472 * @}
475 #endif /* DTS */
477 #ifdef __cplusplus
479 #endif
481 #endif /* __STM32H7xx_HAL_DTS_H */
483 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/