STM32H735xx HAL User Manual
stm32h7xx_hal_dts.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32h7xx_hal_dts.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of DTS HAL module.
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 
00019 /* Define to prevent recursive inclusion -------------------------------------*/
00020 #ifndef __STM32H7xx_HAL_DTS_H
00021 #define __STM32H7xx_HAL_DTS_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 #if defined(DTS)
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32h7xx_hal_def.h"
00030 
00031 /** @addtogroup STM32H7xx_HAL_Driver
00032   * @{
00033   */
00034 
00035 /** @addtogroup DTS
00036   * @{
00037   */
00038 
00039 /* Exported types ------------------------------------------------------------*/
00040 /** @defgroup DTS_Exported_Types DTS Exported Types
00041   * @{
00042   */
00043 
00044 /**
00045   * @brief  DTS Init structure definition
00046   */
00047 typedef struct
00048 {
00049   uint32_t QuickMeasure;  /*!< Specifies the quick measure option selection of the DTS sensor.
00050                                This parameter can be a value of @ref DTS_Quick_Measurement */
00051 
00052   uint32_t RefClock;      /*!< Specifies the reference clock selection of the DTS sensor.
00053                                This parameter can be a value of @ref DTS_Reference_Clock_Selection */
00054 
00055   uint32_t TriggerInput;  /*!< Specifies the trigger input of the DTS sensor.
00056                                This parameter can be a value of @ref DTS_TriggerConfig */
00057 
00058   uint32_t SamplingTime;  /*!< Specifies the sampling time configuration.
00059                                This parameter can be a value of @ref DTS_Sampling_Time */
00060 
00061   uint32_t Divider;       /*!< Specifies the high speed clock divider ratio.
00062                                This parameter can be a value from 0 to 127 */
00063 
00064   uint32_t HighThreshold;  /*!< Specifies the high threshold of the DTS sensor */
00065 
00066   uint32_t LowThreshold;   /*!< Specifies the low threshold of the DTS sensor */
00067 
00068 } DTS_InitTypeDef;
00069 
00070 /**
00071   * @brief  HAL State structures definition
00072   */
00073 typedef enum
00074 {
00075   HAL_DTS_STATE_RESET       = 0x00UL,     /*!< DTS not yet initialized or disabled */
00076   HAL_DTS_STATE_READY       = 0x01UL,     /*!< DTS initialized and ready for use   */
00077   HAL_DTS_STATE_BUSY        = 0x02UL,     /*!< DTS is running                      */
00078   HAL_DTS_STATE_TIMEOUT     = 0x03UL,     /*!< Timeout state                       */
00079   HAL_DTS_STATE_ERROR       = 0x04UL      /*!< Internal Process error              */
00080 } HAL_DTS_StateTypeDef;
00081 
00082 /**
00083   * @brief  DTS Handle Structure definition
00084   */
00085 #if (USE_HAL_DTS_REGISTER_CALLBACKS == 1)
00086 typedef struct __DTS_HandleTypeDef
00087 #else
00088 typedef struct
00089 #endif /* USE_HAL_DTS_REGISTER_CALLBACKS */
00090 {
00091   DTS_TypeDef         *Instance;    /*!< Register base address */
00092   DTS_InitTypeDef     Init;         /*!< DTS required parameters */
00093   HAL_LockTypeDef     Lock;         /*!< DTS Locking object */
00094   __IO HAL_DTS_StateTypeDef  State; /*!< DTS peripheral state  */
00095 #if (USE_HAL_DTS_REGISTER_CALLBACKS == 1)
00096   void (* MspInitCallback)(struct __DTS_HandleTypeDef *hdts);         /*!< DTS Base Msp Init Callback                   */
00097   void (* MspDeInitCallback)(struct __DTS_HandleTypeDef *hdts);       /*!< DTS Base Msp DeInit Callback                 */
00098   void (* DTS_EndCallback)(struct __DTS_HandleTypeDef *hdts);         /*!< End measure Callback                         */
00099   void (* DTS_LowCallback)(struct __DTS_HandleTypeDef *hdts);         /*!< low threshold Callback                       */
00100   void (* DTS_HighCallback)(struct __DTS_HandleTypeDef *hdts);        /*!< high threshold Callback                      */
00101   void (* DTS_AsyncEndCallback)(struct __DTS_HandleTypeDef *hdts);    /*!< Asynchronous end of measure Callback         */
00102   void (* DTS_AsyncLowCallback)(struct __DTS_HandleTypeDef *hdts);    /*!< Asynchronous low threshold Callback          */
00103   void (* DTS_AsyncHighCallback(struct __DTS_HandleTypeDef *hdts);    /*!< Asynchronous high threshold Callback         */
00104 #endif /* USE_HAL_DTS_REGISTER_CALLBACKS */
00105 } DTS_HandleTypeDef;
00106 
00107 /**
00108   * @}
00109   */
00110 
00111 /* Exported constants --------------------------------------------------------*/
00112 /** @defgroup DTS_Exported_Constants DTS Exported Constants
00113   * @{
00114   */
00115 
00116 /** @defgroup DTS_TriggerConfig  DTS Trigger Configuration
00117   * @{
00118   */
00119 /* @brief No Hardware trigger detection */
00120 #define DTS_TRIGGER_HW_NONE   (0UL)
00121 
00122 /* @brief External Interrupt Mode with LPTIMER1 trigger detection */
00123 #define DTS_TRIGGER_LPTIMER1  DTS_CFGR1_TS1_INTRIG_SEL_0
00124 
00125 /* @brief External Interrupt Mode with LPTIMER2 trigger detection */
00126 #define DTS_TRIGGER_LPTIMER2  DTS_CFGR1_TS1_INTRIG_SEL_1
00127 
00128 /* @brief External Interrupt Mode with LPTIMER3 trigger detection */
00129 #define DTS_TRIGGER_LPTIMER3 (DTS_CFGR1_TS1_INTRIG_SEL_0 | DTS_CFGR1_TS1_INTRIG_SEL_1)
00130 
00131 /* @brief External Interrupt Mode with EXTI13 trigger detection */
00132 #define DTS_TRIGGER_EXTI13    DTS_CFGR1_TS1_INTRIG_SEL_2
00133 /**
00134   * @}
00135   */
00136 
00137 /** @defgroup DTS_Quick_Measurement  DTS Quick Measurement
00138   * @{
00139   */
00140 #define DTS_QUICKMEAS_ENABLE    DTS_CFGR1_Q_MEAS_OPT      /*!< Enable the Quick Measure (Measure without calibration) */
00141 #define DTS_QUICKMEAS_DISABLE   (0x0UL)                   /*!< Disable the Quick Measure (Measure with calibration) */
00142 /**
00143   * @}
00144   */
00145 
00146 /** @defgroup DTS_Reference_Clock_Selection   DTS Reference Clock Selection
00147   * @{
00148   */
00149 #define DTS_REFCLKSEL_LSE   DTS_CFGR1_REFCLK_SEL          /*!< Low speed REF clock (LSE) */
00150 #define DTS_REFCLKSEL_PCLK (0UL)                          /*!< High speed REF clock (PCLK) */
00151 /**
00152   * @}
00153   */
00154 
00155 /** @defgroup DTS_Sampling_Time   DTS Sampling Time
00156   * @{
00157   */
00158 #define DTS_SMP_TIME_1_CYCLE     DTS_CFGR1_TS1_SMP_TIME_0                                                                                   /*!< 1 clock cycle for the sampling time  */
00159 #define DTS_SMP_TIME_2_CYCLE     DTS_CFGR1_TS1_SMP_TIME_1                                                                                   /*!< 2 clock cycle for the sampling time  */
00160 #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  */
00161 #define DTS_SMP_TIME_4_CYCLE    (DTS_CFGR1_TS1_SMP_TIME_2)                                                                                 /*!< 4 clock cycle for the sampling time  */
00162 #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  */
00163 #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  */
00164 #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  */
00165 #define DTS_SMP_TIME_8_CYCLE    (DTS_CFGR1_TS1_SMP_TIME_3)                                                                                  /*!< 8 clock cycle for the sampling time  */
00166 #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  */
00167 #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 */
00168 #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 */
00169 #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 */
00170 #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 */
00171 #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 */
00172 #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 */
00173 /**
00174   * @}
00175   */
00176 /** @defgroup DTS_Flag_Definitions DTS Flag Definitions
00177   * @{
00178   */
00179 #define DTS_FLAG_TS1_ITE   DTS_SR_TS1_ITEF   /*!< Interrupt flag for end of measure for DTS1 */
00180 #define DTS_FLAG_TS1_ITL   DTS_SR_TS1_ITLF   /*!< Interrupt flag for low threshold for DTS1  */
00181 #define DTS_FLAG_TS1_ITH   DTS_SR_TS1_ITHF   /*!< Interrupt flag for high threshold for DTS1 */
00182 #define DTS_FLAG_TS1_AITE  DTS_SR_TS1_AITEF  /*!< Asynchronous Interrupt flag for end of measure for DTS1 */
00183 #define DTS_FLAG_TS1_AITL  DTS_SR_TS1_AITLF  /*!< Asynchronous Interrupt flag for low threshold for DTS1  */
00184 #define DTS_FLAG_TS1_AITH  DTS_SR_TS1_AITHF  /*!< Asynchronous Interrupt flag for high threshold for DTS1 */
00185 #define DTS_FLAG_TS1_RDY   DTS_SR_TS1_RDY    /*!< Ready flag for DTS1 */
00186 /**
00187   * @}
00188   */
00189 
00190 /** @defgroup DTS_Interrupts_Definitions DTS Interrupts Definitions
00191   * @{
00192   */
00193 #define DTS_IT_TS1_ITE  DTS_ITENR_TS1_ITEEN   /*!< Enable interrupt flag for end of measure for DTS1 */
00194 #define DTS_IT_TS1_ITL  DTS_ITENR_TS1_ITLEN   /*!< Enable interrupt flag for low threshold for DTS1  */
00195 #define DTS_IT_TS1_ITH  DTS_ITENR_TS1_ITHEN   /*!< Enable interrupt flag for high threshold for DTS1 */
00196 #define DTS_IT_TS1_AITE DTS_ITENR_TS1_AITEEN  /*!< Enable asynchronous interrupt flag for end of measure for DTS1 */
00197 #define DTS_IT_TS1_AITL DTS_ITENR_TS1_AITLEN  /*!< Enable asynchronous interrupt flag for low threshold for DTS1  */
00198 #define DTS_IT_TS1_AITH DTS_ITENR_TS1_AITHEN  /*!< Enable asynchronous interrupt flag for high threshold for DTS1 */
00199 /**
00200   * @}
00201   */
00202 
00203 /**
00204   * @}
00205   */
00206 /* Exported macros -----------------------------------------------------------*/
00207 /** @defgroup DTS_Exported_Macros DTS Exported Macros
00208   * @{
00209   */
00210 
00211 /** @brief  Reset DTS handle state
00212   * @param  __HANDLE__ DTS handle.
00213   * @retval None
00214   */
00215 #define __HAL_DTS_RESET_HANDLE_STATE(__HANDLE__)    ((__HANDLE__)->State = HAL_DTS_STATE_RESET)
00216 
00217 /**
00218   * @brief  Enable the specified DTS sensor
00219   * @param  __HANDLE__ DTS handle.
00220   * @retval None
00221   */
00222 #define __HAL_DTS_ENABLE(__HANDLE__)  SET_BIT((__HANDLE__)->Instance->CFGR1, DTS_CFGR1_TS1_EN)
00223 
00224 /**
00225   * @brief  Disable the specified DTS sensor
00226   * @param  __HANDLE__ DTS handle.
00227   * @retval None
00228   */
00229 #define __HAL_DTS_DISABLE(__HANDLE__)    CLEAR_BIT((__HANDLE__)->Instance->CFGR1, DTS_CFGR1_TS1_EN)
00230 
00231 /**
00232   * @brief  Enable the DTS EXTI line in interrupt mode
00233   * @retval None
00234   */
00235 #define __HAL_DTS_EXTI_WAKEUP_ENABLE_IT()  SET_BIT(EXTI->IMR3, DTS_EXTI_LINE_DTS1)
00236 
00237 /**
00238   * @brief  Disable the DTS EXTI line in interrupt mode
00239   * @retval None
00240   */
00241 #define __HAL_DTS_EXTI_WAKEUP_DISABLE_IT()  CLEAR_BIT(EXTI->IMR3, DTS_EXTI_LINE_DTS1)
00242 
00243 /**
00244   * @brief  Enable the DTS EXTI Line in event mode
00245   * @retval None
00246   */
00247 #define __HAL_DTS_EXTI_WAKEUP_ENABLE_EVENT() SET_BIT(EXTI->EMR3, DTS_EXTI_LINE_DTS1)
00248 
00249 /**
00250   * @brief  Disable the DTS EXTI Line in event mode
00251   * @retval None
00252   */
00253 #define __HAL_DTS_EXTI_WAKEUP_DISABLE_EVENT()  CLEAR_BIT(EXTI->EMR3, DTS_EXTI_LINE_DTS1)
00254 
00255 /** @brief  Checks whether the specified DTS flag is set or not.
00256   * @param  __HANDLE__ specifies the DTS Handle.
00257   * @param  __FLAG__ specifies the flag to check.
00258   *        This parameter can be one of the following values:
00259   *            @arg DTS_FLAG_TS1_ITE : interrupt flag for end of measure for DTS1
00260   *            @arg DTS_FLAG_TS1_ITL : interrupt flag for low threshold for DTS1
00261   *            @arg DTS_FLAG_TS1_ITH : interrupt flag for high threshold for DTS1
00262   *            @arg DTS_FLAG_TS1_AITE: asynchronous interrupt flag for end of measure for DTS1
00263   *            @arg DTS_FLAG_TS1_AITL: asynchronous interrupt flag for low threshold for DTS1
00264   *            @arg DTS_FLAG_TS1_AITH: asynchronous interrupt flag for high threshold for DTS1
00265   *            @arg DTS_FLAG_TS1_RDY : Ready flag for DTS1
00266   *            @retval The new state of __FLAG__ (SET or RESET).
00267   */
00268 #define __HAL_DTS_GET_FLAG(__HANDLE__, __FLAG__)  \
00269         (((((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__)))? SET : RESET)
00270 
00271 
00272 /** @brief  Clears the specified DTS pending flag.
00273   * @param  __HANDLE__ specifies the DTS Handle.
00274   * @param  __FLAG__ specifies the flag to check.
00275   *          This parameter can be any combination of the following values:
00276   *            @arg DTS_FLAG_TS1_ITE : interrupt flag for end of measure for DTS1
00277   *            @arg DTS_FLAG_TS1_ITL : interrupt flag for low threshold for DTS1
00278   *            @arg DTS_FLAG_TS1_ITH : interrupt flag for high threshold for DTS1
00279   *            @arg DTS_FLAG_TS1_AITE: asynchronous interrupt flag for end of measure for DTS1
00280   *            @arg DTS_FLAG_TS1_AITL: asynchronous interrupt flag for low threshold for DTS1
00281   *            @arg DTS_FLAG_TS1_AITH: asynchronous interrupt flag for high threshold for DTS1
00282   * @retval None
00283   */
00284 #define __HAL_DTS_CLEAR_FLAG(__HANDLE__, __FLAG__)  \
00285         ((__HANDLE__)->Instance->ICIFR  = (__FLAG__))
00286 
00287 
00288 /** @brief  Enable the specified DTS interrupt.
00289   * @param  __HANDLE__ specifies the DTS Handle.
00290   * @param  __INTERRUPT__ specifies the DTS interrupt source to enable.
00291   *          This parameter can be one of the following values:
00292   *            @arg DTS_IT_TS1_ITE  : interrupt flag for end of measure for DTS1
00293   *            @arg DTS_IT_TS1_ITL  : interrupt flag for low of measure for DTS1
00294   *            @arg DTS_IT_TS1_ITH  : interrupt flag for high of measure for DTS1
00295   *            @arg DTS_IT_TS1_AITE : asynchronous interrupt flag for end of measure for DTS1
00296   *            @arg DTS_IT_TS1_AITL : asynchronous interrupt flag for low of measure for DTS1
00297   *            @arg DTS_IT_TS1_AITH : asynchronous interrupt flag for high of measure for DTS1
00298   * @retval None
00299   */
00300 #define __HAL_DTS_ENABLE_IT(__HANDLE__, __INTERRUPT__)  \
00301         SET_BIT((__HANDLE__)->Instance->ITENR, __INTERRUPT__)
00302 
00303 
00304 /** @brief  Disable the specified DTS interrupt.
00305   * @param  __HANDLE__ specifies the DTS Handle.
00306   * @param  __INTERRUPT__ specifies the DTS interrupt source to enable.
00307   *          This parameter can be one of the following values:
00308   *            @arg DTS_IT_TS1_ITE  : interrupt flag for end of measure for DTS1
00309   *            @arg DTS_IT_TS1_ITL  : interrupt flag for low of measure for DTS1
00310   *            @arg DTS_IT_TS1_ITH  : interrupt flag for high of measure for DTS1
00311   *            @arg DTS_IT_TS1_AITE : asynchronous interrupt flag for end of measure for DTS1
00312   *            @arg DTS_IT_TS1_AITL : asynchronous interrupt flag for low of measure for DTS1
00313   *            @arg DTS_IT_TS1_AITH : asynchronous interrupt flag for high of measure for DTS1
00314   * @retval None
00315   */
00316 #define __HAL_DTS_DISABLE_IT(__HANDLE__,__INTERRUPT__)  \
00317         CLEAR_BIT((__HANDLE__)->Instance->ITENR, __INTERRUPT__)
00318 
00319 
00320 /** @brief  Check whether the specified DTS interrupt source is enabled or not.
00321   * @param __HANDLE__ DTS handle.
00322   * @param __INTERRUPT__ DTS interrupt source to check
00323   *          This parameter can be one of the following values:
00324   *            @arg DTS_IT_TS1_ITE  : interrupt flag for end of measure for DTS1
00325   *            @arg DTS_IT_TS1_ITL  : interrupt flag for low of measure for DTS1
00326   *            @arg DTS_IT_TS1_ITH  : interrupt flag for high of measure for DTS1
00327   *            @arg DTS_IT_TS1_AITE : asynchronous interrupt flag for end of measure for DTS1
00328   *            @arg DTS_IT_TS1_AITL : asynchronous interrupt flag for low of measure for DTS1
00329   *            @arg DTS_IT_TS1_AITH : asynchronous interrupt flag for high of measure for DTS1
00330   * @retval State of interruption (SET or RESET)
00331   */
00332 #define __HAL_DTS_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)  \
00333         (( ((__HANDLE__)->Instance->ITENR & (__INTERRUPT__)) == (__INTERRUPT__) \
00334         )? SET : RESET)
00335 
00336 
00337 /** @brief  Check whether the specified DTS REFCLK is selected
00338   * @param __HANDLE__ DTS handle.
00339   * @param __REFCLK__ DTS reference clock to check
00340   *          This parameter can be one of the following values:
00341   * @arg DTS_REFCLKSEL_LSE:   Low speed REF clock
00342   * @arg DTS_REFCLKSEL_PCLK:  High speed REF clock
00343   * @retval State of the REF clock tested (SET or RESET)
00344   */
00345 #define __HAL_DTS_GET_REFCLK(__HANDLE__, __REFCLK__)  ((((__HANDLE__)->Instance->CFGR1 & (__REFCLK__)) == (__REFCLK__))? SET : RESET)
00346 
00347 /** @brief  Get Trigger
00348   * @param __HANDLE__ DTS handle.
00349   * @retval One of the following trigger
00350   *     DTS_TRIGGER_HW_NONE : No HW trigger (SW trigger)
00351   *     DTS_TRIGGER_LPTIMER1: LPTIMER1 trigger
00352   *     DTS_TRIGGER_LPTIMER2: LPTIMER2 trigger
00353   *     DTS_TRIGGER_LPTIMER3: LPTIMER3 trigger
00354   *     DTS_TRIGGER_EXTI13  : EXTI13 trigger
00355   */
00356 #define __HAL_DTS_GET_TRIGGER(__HANDLE__)  ((__HANDLE__)->Instance->CFGR1 & (DTS_CFGR1_TS1_INTRIG_SEL))
00357 /**
00358   * @}
00359   */
00360 
00361 /* Exported functions --------------------------------------------------------*/
00362 /** @addtogroup DTS_Exported_Functions
00363   * @{
00364   */
00365 
00366 /** @addtogroup DTS_Exported_Functions_Group1
00367   * @{
00368   */
00369 /* Initialization and de-initialization functions  **********************************/
00370 HAL_StatusTypeDef HAL_DTS_Init(DTS_HandleTypeDef *hdts);
00371 HAL_StatusTypeDef HAL_DTS_DeInit(DTS_HandleTypeDef *hdts);
00372 void              HAL_DTS_MspInit(DTS_HandleTypeDef *hdts);
00373 void              HAL_DTS_MspDeInit(DTS_HandleTypeDef *hdts);
00374 /**
00375   * @}
00376   */
00377 
00378 /* IO operation functions  *****************************************************/
00379 /** @addtogroup DTS_Exported_Functions_Group2
00380   * @{
00381   */
00382 HAL_StatusTypeDef HAL_DTS_Start(DTS_HandleTypeDef *hdts);
00383 HAL_StatusTypeDef HAL_DTS_Stop(DTS_HandleTypeDef *hdts);
00384 HAL_StatusTypeDef HAL_DTS_GetTemperature(DTS_HandleTypeDef *hdts, int32_t *Temperature);
00385 HAL_StatusTypeDef HAL_DTS_Start_IT(DTS_HandleTypeDef *hdts);
00386 HAL_StatusTypeDef HAL_DTS_Stop_IT(DTS_HandleTypeDef *hdts);
00387 void              HAL_DTS_IRQHandler(DTS_HandleTypeDef *hdts);
00388 HAL_DTS_StateTypeDef HAL_DTS_GetState(DTS_HandleTypeDef *hdts);
00389 /* Callback in Interrupt mode */
00390 void              HAL_DTS_EndCallback(DTS_HandleTypeDef *hdts);
00391 void              HAL_DTS_LowCallback(DTS_HandleTypeDef *hdts);
00392 void              HAL_DTS_HighCallback(DTS_HandleTypeDef *hdts);
00393 void              HAL_DTS_AsyncEndCallback(DTS_HandleTypeDef *hdts);
00394 void              HAL_DTS_AsyncLowCallback(DTS_HandleTypeDef *hdts);
00395 void              HAL_DTS_AsyncHighCallback(DTS_HandleTypeDef *hdts);
00396 /**
00397   * @}
00398   */
00399 
00400 /* Private types -------------------------------------------------------------*/
00401 /* Private constants ---------------------------------------------------------*/
00402 /** @defgroup DTS_Private_Constants DTS Private Constants
00403   * @{
00404   */
00405 /** @defgroup DTS_ExtiLine DTS EXTI Lines
00406   * @{
00407   */
00408 #define DTS_EXTI_LINE_DTS1           (EXTI_IMR3_IM88)  /*!< EXTI line 88 connected to DTS1 output */
00409 /**
00410   * @}
00411   */
00412 /**
00413   * @}
00414   */
00415 
00416 /* Private macros ------------------------------------------------------------*/
00417 /** @defgroup DTS_Private_Macros DTS Private Macros
00418   * @{
00419   */
00420 
00421 /** @defgroup DTS_IS_DTS_Definitions  DTS Private macros to check input parameters
00422   * @{
00423   */
00424 #define IS_DTS_QUICKMEAS(__SEL__)   (((__SEL__) == DTS_QUICKMEAS_DISABLE) || \
00425                                      ((__SEL__) == DTS_QUICKMEAS_ENABLE))
00426 
00427 #define IS_DTS_REFCLK(__SEL__)      (((__SEL__) == DTS_REFCLKSEL_LSE) || \
00428                                      ((__SEL__) == DTS_REFCLKSEL_PCLK))
00429 
00430 #define IS_DTS_TRIGGERINPUT(__INPUT__)  (((__INPUT__) == DTS_TRIGGER_HW_NONE)   || \
00431                                          ((__INPUT__) == DTS_TRIGGER_LPTIMER1)  || \
00432                                          ((__INPUT__) == DTS_TRIGGER_LPTIMER2)  || \
00433                                          ((__INPUT__) == DTS_TRIGGER_LPTIMER3)  || \
00434                                          ((__INPUT__) == DTS_TRIGGER_EXTI13))
00435 
00436 #define IS_DTS_THRESHOLD(__THRESHOLD__)  ((__THRESHOLD__) <= 0xFFFFUL)
00437 
00438 #define IS_DTS_DIVIDER_RATIO_NUMBER(__NUMBER__) (((__NUMBER__) >= (2UL)) && ((__NUMBER__) <= (127UL)))
00439 
00440 #define IS_DTS_SAMPLINGTIME(__CYCLE__)  (((__CYCLE__) == DTS_SMP_TIME_1_CYCLE)  || \
00441                                              ((__CYCLE__) == DTS_SMP_TIME_2_CYCLE)    || \
00442                                              ((__CYCLE__) == DTS_SMP_TIME_3_CYCLE)    || \
00443                                              ((__CYCLE__) == DTS_SMP_TIME_4_CYCLE)    || \
00444                                              ((__CYCLE__) == DTS_SMP_TIME_5_CYCLE)    || \
00445                                              ((__CYCLE__) == DTS_SMP_TIME_6_CYCLE)    || \
00446                                              ((__CYCLE__) == DTS_SMP_TIME_7_CYCLE)    || \
00447                                              ((__CYCLE__) == DTS_SMP_TIME_8_CYCLE)    || \
00448                                              ((__CYCLE__) == DTS_SMP_TIME_9_CYCLE)    || \
00449                                              ((__CYCLE__) == DTS_SMP_TIME_10_CYCLE)   || \
00450                                              ((__CYCLE__) == DTS_SMP_TIME_11_CYCLE)   || \
00451                                              ((__CYCLE__) == DTS_SMP_TIME_12_CYCLE)   || \
00452                                              ((__CYCLE__) == DTS_SMP_TIME_13_CYCLE)   || \
00453                                              ((__CYCLE__) == DTS_SMP_TIME_14_CYCLE)   || \
00454                                              ((__CYCLE__) == DTS_SMP_TIME_15_CYCLE))
00455 
00456 /**
00457   * @}
00458   */
00459 
00460 /**
00461   * @}
00462   */
00463 
00464 /* Private functions ---------------------------------------------------------*/
00465 
00466 /**
00467   * @}
00468   */
00469 
00470 /**
00471   * @}
00472   */
00473 
00474 #endif /* DTS */
00475 
00476 #ifdef __cplusplus
00477 }
00478 #endif
00479 
00480 #endif /* __STM32H7xx_HAL_DTS_H */
00481