STM32F479xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_ll_lptim.h 00004 * @author MCD Application Team 00005 * @brief Header file of LPTIM LL module. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© Copyright (c) 2016 STMicroelectronics. 00010 * All rights reserved.</center></h2> 00011 * 00012 * This software component is licensed by ST under BSD 3-Clause license, 00013 * the "License"; You may not use this file except in compliance with the 00014 * License. You may obtain a copy of the License at: 00015 * opensource.org/licenses/BSD-3-Clause 00016 * 00017 ****************************************************************************** 00018 */ 00019 00020 /* Define to prevent recursive inclusion -------------------------------------*/ 00021 #ifndef STM32F4xx_LL_LPTIM_H 00022 #define STM32F4xx_LL_LPTIM_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 /* Includes ------------------------------------------------------------------*/ 00029 #include "stm32f4xx.h" 00030 00031 /** @addtogroup STM32F4xx_LL_Driver 00032 * @{ 00033 */ 00034 00035 #if defined (LPTIM1) 00036 00037 /** @defgroup LPTIM_LL LPTIM 00038 * @{ 00039 */ 00040 00041 /* Private types -------------------------------------------------------------*/ 00042 /* Private variables ---------------------------------------------------------*/ 00043 00044 /* Private constants ---------------------------------------------------------*/ 00045 00046 /* Private macros ------------------------------------------------------------*/ 00047 #if defined(USE_FULL_LL_DRIVER) 00048 /** @defgroup LPTIM_LL_Private_Macros LPTIM Private Macros 00049 * @{ 00050 */ 00051 /** 00052 * @} 00053 */ 00054 #endif /*USE_FULL_LL_DRIVER*/ 00055 00056 /* Exported types ------------------------------------------------------------*/ 00057 #if defined(USE_FULL_LL_DRIVER) 00058 /** @defgroup LPTIM_LL_ES_INIT LPTIM Exported Init structure 00059 * @{ 00060 */ 00061 00062 /** 00063 * @brief LPTIM Init structure definition 00064 */ 00065 typedef struct 00066 { 00067 uint32_t ClockSource; /*!< Specifies the source of the clock used by the LPTIM instance. 00068 This parameter can be a value of @ref LPTIM_LL_EC_CLK_SOURCE. 00069 00070 This feature can be modified afterwards using unitary 00071 function @ref LL_LPTIM_SetClockSource().*/ 00072 00073 uint32_t Prescaler; /*!< Specifies the prescaler division ratio. 00074 This parameter can be a value of @ref LPTIM_LL_EC_PRESCALER. 00075 00076 This feature can be modified afterwards using using unitary 00077 function @ref LL_LPTIM_SetPrescaler().*/ 00078 00079 uint32_t Waveform; /*!< Specifies the waveform shape. 00080 This parameter can be a value of @ref LPTIM_LL_EC_OUTPUT_WAVEFORM. 00081 00082 This feature can be modified afterwards using unitary 00083 function @ref LL_LPTIM_ConfigOutput().*/ 00084 00085 uint32_t Polarity; /*!< Specifies waveform polarity. 00086 This parameter can be a value of @ref LPTIM_LL_EC_OUTPUT_POLARITY. 00087 00088 This feature can be modified afterwards using unitary 00089 function @ref LL_LPTIM_ConfigOutput().*/ 00090 } LL_LPTIM_InitTypeDef; 00091 00092 /** 00093 * @} 00094 */ 00095 #endif /* USE_FULL_LL_DRIVER */ 00096 00097 /* Exported constants --------------------------------------------------------*/ 00098 /** @defgroup LPTIM_LL_Exported_Constants LPTIM Exported Constants 00099 * @{ 00100 */ 00101 00102 /** @defgroup LPTIM_LL_EC_GET_FLAG Get Flags Defines 00103 * @brief Flags defines which can be used with LL_LPTIM_ReadReg function 00104 * @{ 00105 */ 00106 #define LL_LPTIM_ISR_CMPM LPTIM_ISR_CMPM /*!< Compare match */ 00107 #define LL_LPTIM_ISR_CMPOK LPTIM_ISR_CMPOK /*!< Compare register update OK */ 00108 #define LL_LPTIM_ISR_ARRM LPTIM_ISR_ARRM /*!< Autoreload match */ 00109 #define LL_LPTIM_ISR_EXTTRIG LPTIM_ISR_EXTTRIG /*!< External trigger edge event */ 00110 #define LL_LPTIM_ISR_ARROK LPTIM_ISR_ARROK /*!< Autoreload register update OK */ 00111 #define LL_LPTIM_ISR_UP LPTIM_ISR_UP /*!< Counter direction change down to up */ 00112 #define LL_LPTIM_ISR_DOWN LPTIM_ISR_DOWN /*!< Counter direction change up to down */ 00113 /** 00114 * @} 00115 */ 00116 00117 /** @defgroup LPTIM_LL_EC_IT IT Defines 00118 * @brief IT defines which can be used with LL_LPTIM_ReadReg and LL_LPTIM_WriteReg functions 00119 * @{ 00120 */ 00121 #define LL_LPTIM_IER_CMPMIE LPTIM_IER_CMPMIE /*!< Compare match */ 00122 #define LL_LPTIM_IER_CMPOKIE LPTIM_IER_CMPOKIE /*!< Compare register update OK */ 00123 #define LL_LPTIM_IER_ARRMIE LPTIM_IER_ARRMIE /*!< Autoreload match */ 00124 #define LL_LPTIM_IER_EXTTRIGIE LPTIM_IER_EXTTRIGIE /*!< External trigger edge event */ 00125 #define LL_LPTIM_IER_ARROKIE LPTIM_IER_ARROKIE /*!< Autoreload register update OK */ 00126 #define LL_LPTIM_IER_UPIE LPTIM_IER_UPIE /*!< Counter direction change down to up */ 00127 #define LL_LPTIM_IER_DOWNIE LPTIM_IER_DOWNIE /*!< Counter direction change up to down */ 00128 /** 00129 * @} 00130 */ 00131 00132 /** @defgroup LPTIM_LL_EC_OPERATING_MODE Operating Mode 00133 * @{ 00134 */ 00135 #define LL_LPTIM_OPERATING_MODE_CONTINUOUS LPTIM_CR_CNTSTRT /*!<LP Timer starts in continuous mode*/ 00136 #define LL_LPTIM_OPERATING_MODE_ONESHOT LPTIM_CR_SNGSTRT /*!<LP Tilmer starts in single mode*/ 00137 /** 00138 * @} 00139 */ 00140 00141 /** @defgroup LPTIM_LL_EC_UPDATE_MODE Update Mode 00142 * @{ 00143 */ 00144 #define LL_LPTIM_UPDATE_MODE_IMMEDIATE 0x00000000U /*!<Preload is disabled: registers are updated after each APB bus write access*/ 00145 #define LL_LPTIM_UPDATE_MODE_ENDOFPERIOD LPTIM_CFGR_PRELOAD /*!<preload is enabled: registers are updated at the end of the current LPTIM period*/ 00146 /** 00147 * @} 00148 */ 00149 00150 /** @defgroup LPTIM_LL_EC_COUNTER_MODE Counter Mode 00151 * @{ 00152 */ 00153 #define LL_LPTIM_COUNTER_MODE_INTERNAL 0x00000000U /*!<The counter is incremented following each internal clock pulse*/ 00154 #define LL_LPTIM_COUNTER_MODE_EXTERNAL LPTIM_CFGR_COUNTMODE /*!<The counter is incremented following each valid clock pulse on the LPTIM external Input1*/ 00155 /** 00156 * @} 00157 */ 00158 00159 /** @defgroup LPTIM_LL_EC_OUTPUT_WAVEFORM Output Waveform Type 00160 * @{ 00161 */ 00162 #define LL_LPTIM_OUTPUT_WAVEFORM_PWM 0x00000000U /*!<LPTIM generates either a PWM waveform or a One pulse waveform depending on chosen operating mode CONTINUOUS or SINGLE*/ 00163 #define LL_LPTIM_OUTPUT_WAVEFORM_SETONCE LPTIM_CFGR_WAVE /*!<LPTIM generates a Set Once waveform*/ 00164 /** 00165 * @} 00166 */ 00167 00168 /** @defgroup LPTIM_LL_EC_OUTPUT_POLARITY Output Polarity 00169 * @{ 00170 */ 00171 #define LL_LPTIM_OUTPUT_POLARITY_REGULAR 0x00000000U /*!<The LPTIM output reflects the compare results between LPTIMx_ARR and LPTIMx_CMP registers*/ 00172 #define LL_LPTIM_OUTPUT_POLARITY_INVERSE LPTIM_CFGR_WAVPOL /*!<The LPTIM output reflects the inverse of the compare results between LPTIMx_ARR and LPTIMx_CMP registers*/ 00173 /** 00174 * @} 00175 */ 00176 00177 /** @defgroup LPTIM_LL_EC_PRESCALER Prescaler Value 00178 * @{ 00179 */ 00180 #define LL_LPTIM_PRESCALER_DIV1 0x00000000U /*!<Prescaler division factor is set to 1*/ 00181 #define LL_LPTIM_PRESCALER_DIV2 LPTIM_CFGR_PRESC_0 /*!<Prescaler division factor is set to 2*/ 00182 #define LL_LPTIM_PRESCALER_DIV4 LPTIM_CFGR_PRESC_1 /*!<Prescaler division factor is set to 4*/ 00183 #define LL_LPTIM_PRESCALER_DIV8 (LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_0) /*!<Prescaler division factor is set to 8*/ 00184 #define LL_LPTIM_PRESCALER_DIV16 LPTIM_CFGR_PRESC_2 /*!<Prescaler division factor is set to 16*/ 00185 #define LL_LPTIM_PRESCALER_DIV32 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_0) /*!<Prescaler division factor is set to 32*/ 00186 #define LL_LPTIM_PRESCALER_DIV64 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_1) /*!<Prescaler division factor is set to 64*/ 00187 #define LL_LPTIM_PRESCALER_DIV128 LPTIM_CFGR_PRESC /*!<Prescaler division factor is set to 128*/ 00188 /** 00189 * @} 00190 */ 00191 00192 /** @defgroup LPTIM_LL_EC_TRIG_SOURCE Trigger Source 00193 * @{ 00194 */ 00195 #define LL_LPTIM_TRIG_SOURCE_GPIO 0x00000000U /*!<External input trigger is connected to TIMx_ETR input*/ 00196 #define LL_LPTIM_TRIG_SOURCE_RTCALARMA LPTIM_CFGR_TRIGSEL_0 /*!<External input trigger is connected to RTC Alarm A*/ 00197 #define LL_LPTIM_TRIG_SOURCE_RTCALARMB LPTIM_CFGR_TRIGSEL_1 /*!<External input trigger is connected to RTC Alarm B*/ 00198 #define LL_LPTIM_TRIG_SOURCE_RTCTAMP1 (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0) /*!<External input trigger is connected to RTC Tamper 1*/ 00199 #define LL_LPTIM_TRIG_SOURCE_TIM1_TRGO LPTIM_CFGR_TRIGSEL_2 /*!<External input trigger is connected to TIM1*/ 00200 #define LL_LPTIM_TRIG_SOURCE_TIM5_TRGO (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0) /*!<External input trigger is connected to TIM5*/ 00201 /** 00202 * @} 00203 */ 00204 00205 /** @defgroup LPTIM_LL_EC_TRIG_FILTER Trigger Filter 00206 * @{ 00207 */ 00208 #define LL_LPTIM_TRIG_FILTER_NONE 0x00000000U /*!<Any trigger active level change is considered as a valid trigger*/ 00209 #define LL_LPTIM_TRIG_FILTER_2 LPTIM_CFGR_TRGFLT_0 /*!<Trigger active level change must be stable for at least 2 clock periods before it is considered as valid trigger*/ 00210 #define LL_LPTIM_TRIG_FILTER_4 LPTIM_CFGR_TRGFLT_1 /*!<Trigger active level change must be stable for at least 4 clock periods before it is considered as valid trigger*/ 00211 #define LL_LPTIM_TRIG_FILTER_8 LPTIM_CFGR_TRGFLT /*!<Trigger active level change must be stable for at least 8 clock periods before it is considered as valid trigger*/ 00212 /** 00213 * @} 00214 */ 00215 00216 /** @defgroup LPTIM_LL_EC_TRIG_POLARITY Trigger Polarity 00217 * @{ 00218 */ 00219 #define LL_LPTIM_TRIG_POLARITY_RISING LPTIM_CFGR_TRIGEN_0 /*!<LPTIM counter starts when a rising edge is detected*/ 00220 #define LL_LPTIM_TRIG_POLARITY_FALLING LPTIM_CFGR_TRIGEN_1 /*!<LPTIM counter starts when a falling edge is detected*/ 00221 #define LL_LPTIM_TRIG_POLARITY_RISING_FALLING LPTIM_CFGR_TRIGEN /*!<LPTIM counter starts when a rising or a falling edge is detected*/ 00222 /** 00223 * @} 00224 */ 00225 00226 /** @defgroup LPTIM_LL_EC_CLK_SOURCE Clock Source 00227 * @{ 00228 */ 00229 #define LL_LPTIM_CLK_SOURCE_INTERNAL 0x00000000U /*!<LPTIM is clocked by internal clock source (APB clock or any of the embedded oscillators)*/ 00230 #define LL_LPTIM_CLK_SOURCE_EXTERNAL LPTIM_CFGR_CKSEL /*!<LPTIM is clocked by an external clock source through the LPTIM external Input1*/ 00231 /** 00232 * @} 00233 */ 00234 00235 /** @defgroup LPTIM_LL_EC_CLK_FILTER Clock Filter 00236 * @{ 00237 */ 00238 #define LL_LPTIM_CLK_FILTER_NONE 0x00000000U /*!<Any external clock signal level change is considered as a valid transition*/ 00239 #define LL_LPTIM_CLK_FILTER_2 LPTIM_CFGR_CKFLT_0 /*!<External clock signal level change must be stable for at least 2 clock periods before it is considered as valid transition*/ 00240 #define LL_LPTIM_CLK_FILTER_4 LPTIM_CFGR_CKFLT_1 /*!<External clock signal level change must be stable for at least 4 clock periods before it is considered as valid transition*/ 00241 #define LL_LPTIM_CLK_FILTER_8 LPTIM_CFGR_CKFLT /*!<External clock signal level change must be stable for at least 8 clock periods before it is considered as valid transition*/ 00242 /** 00243 * @} 00244 */ 00245 00246 /** @defgroup LPTIM_LL_EC_CLK_POLARITY Clock Polarity 00247 * @{ 00248 */ 00249 #define LL_LPTIM_CLK_POLARITY_RISING 0x00000000U /*!< The rising edge is the active edge used for counting*/ 00250 #define LL_LPTIM_CLK_POLARITY_FALLING LPTIM_CFGR_CKPOL_0 /*!< The falling edge is the active edge used for counting*/ 00251 #define LL_LPTIM_CLK_POLARITY_RISING_FALLING LPTIM_CFGR_CKPOL_1 /*!< Both edges are active edges*/ 00252 /** 00253 * @} 00254 */ 00255 00256 /** @defgroup LPTIM_LL_EC_ENCODER_MODE Encoder Mode 00257 * @{ 00258 */ 00259 #define LL_LPTIM_ENCODER_MODE_RISING 0x00000000U /*!< The rising edge is the active edge used for counting*/ 00260 #define LL_LPTIM_ENCODER_MODE_FALLING LPTIM_CFGR_CKPOL_0 /*!< The falling edge is the active edge used for counting*/ 00261 #define LL_LPTIM_ENCODER_MODE_RISING_FALLING LPTIM_CFGR_CKPOL_1 /*!< Both edges are active edges*/ 00262 /** 00263 * @} 00264 */ 00265 00266 /** @defgroup LPTIM_EC_INPUT1_SRC Input1 Source 00267 * @{ 00268 */ 00269 #define LL_LPTIM_INPUT1_SRC_PAD_AF 0x00000000U 00270 #define LL_LPTIM_INPUT1_SRC_PAD_PA4 LPTIM_OR_OR_0 00271 #define LL_LPTIM_INPUT1_SRC_PAD_PB9 LPTIM_OR_OR_1 00272 #define LL_LPTIM_INPUT1_SRC_TIM_DAC LPTIM_OR_OR 00273 /** 00274 * @} 00275 */ 00276 00277 /** 00278 * @} 00279 */ 00280 00281 /* Exported macro ------------------------------------------------------------*/ 00282 /** @defgroup LPTIM_LL_Exported_Macros LPTIM Exported Macros 00283 * @{ 00284 */ 00285 00286 /** @defgroup LPTIM_LL_EM_WRITE_READ Common Write and read registers Macros 00287 * @{ 00288 */ 00289 00290 /** 00291 * @brief Write a value in LPTIM register 00292 * @param __INSTANCE__ LPTIM Instance 00293 * @param __REG__ Register to be written 00294 * @param __VALUE__ Value to be written in the register 00295 * @retval None 00296 */ 00297 #define LL_LPTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__)) 00298 00299 /** 00300 * @brief Read a value in LPTIM register 00301 * @param __INSTANCE__ LPTIM Instance 00302 * @param __REG__ Register to be read 00303 * @retval Register value 00304 */ 00305 #define LL_LPTIM_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__) 00306 /** 00307 * @} 00308 */ 00309 00310 /** 00311 * @} 00312 */ 00313 00314 /* Exported functions --------------------------------------------------------*/ 00315 /** @defgroup LPTIM_LL_Exported_Functions LPTIM Exported Functions 00316 * @{ 00317 */ 00318 00319 #if defined(USE_FULL_LL_DRIVER) 00320 /** @defgroup LPTIM_LL_EF_Init Initialisation and deinitialisation functions 00321 * @{ 00322 */ 00323 00324 ErrorStatus LL_LPTIM_DeInit(LPTIM_TypeDef *LPTIMx); 00325 void LL_LPTIM_StructInit(LL_LPTIM_InitTypeDef *LPTIM_InitStruct); 00326 ErrorStatus LL_LPTIM_Init(LPTIM_TypeDef *LPTIMx, LL_LPTIM_InitTypeDef *LPTIM_InitStruct); 00327 void LL_LPTIM_Disable(LPTIM_TypeDef *LPTIMx); 00328 /** 00329 * @} 00330 */ 00331 #endif /* USE_FULL_LL_DRIVER */ 00332 00333 /** @defgroup LPTIM_LL_EF_LPTIM_Configuration LPTIM Configuration 00334 * @{ 00335 */ 00336 00337 /** 00338 * @brief Enable the LPTIM instance 00339 * @note After setting the ENABLE bit, a delay of two counter clock is needed 00340 * before the LPTIM instance is actually enabled. 00341 * @rmtoll CR ENABLE LL_LPTIM_Enable 00342 * @param LPTIMx Low-Power Timer instance 00343 * @retval None 00344 */ 00345 __STATIC_INLINE void LL_LPTIM_Enable(LPTIM_TypeDef *LPTIMx) 00346 { 00347 SET_BIT(LPTIMx->CR, LPTIM_CR_ENABLE); 00348 } 00349 00350 /** 00351 * @brief Indicates whether the LPTIM instance is enabled. 00352 * @rmtoll CR ENABLE LL_LPTIM_IsEnabled 00353 * @param LPTIMx Low-Power Timer instance 00354 * @retval State of bit (1 or 0). 00355 */ 00356 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabled(LPTIM_TypeDef *LPTIMx) 00357 { 00358 return (((READ_BIT(LPTIMx->CR, LPTIM_CR_ENABLE) == LPTIM_CR_ENABLE) ? 1UL : 0UL)); 00359 } 00360 00361 /** 00362 * @brief Starts the LPTIM counter in the desired mode. 00363 * @note LPTIM instance must be enabled before starting the counter. 00364 * @note It is possible to change on the fly from One Shot mode to 00365 * Continuous mode. 00366 * @rmtoll CR CNTSTRT LL_LPTIM_StartCounter\n 00367 * CR SNGSTRT LL_LPTIM_StartCounter 00368 * @param LPTIMx Low-Power Timer instance 00369 * @param OperatingMode This parameter can be one of the following values: 00370 * @arg @ref LL_LPTIM_OPERATING_MODE_CONTINUOUS 00371 * @arg @ref LL_LPTIM_OPERATING_MODE_ONESHOT 00372 * @retval None 00373 */ 00374 __STATIC_INLINE void LL_LPTIM_StartCounter(LPTIM_TypeDef *LPTIMx, uint32_t OperatingMode) 00375 { 00376 MODIFY_REG(LPTIMx->CR, LPTIM_CR_CNTSTRT | LPTIM_CR_SNGSTRT, OperatingMode); 00377 } 00378 00379 /** 00380 * @brief Set the LPTIM registers update mode (enable/disable register preload) 00381 * @note This function must be called when the LPTIM instance is disabled. 00382 * @rmtoll CFGR PRELOAD LL_LPTIM_SetUpdateMode 00383 * @param LPTIMx Low-Power Timer instance 00384 * @param UpdateMode This parameter can be one of the following values: 00385 * @arg @ref LL_LPTIM_UPDATE_MODE_IMMEDIATE 00386 * @arg @ref LL_LPTIM_UPDATE_MODE_ENDOFPERIOD 00387 * @retval None 00388 */ 00389 __STATIC_INLINE void LL_LPTIM_SetUpdateMode(LPTIM_TypeDef *LPTIMx, uint32_t UpdateMode) 00390 { 00391 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD, UpdateMode); 00392 } 00393 00394 /** 00395 * @brief Get the LPTIM registers update mode 00396 * @rmtoll CFGR PRELOAD LL_LPTIM_GetUpdateMode 00397 * @param LPTIMx Low-Power Timer instance 00398 * @retval Returned value can be one of the following values: 00399 * @arg @ref LL_LPTIM_UPDATE_MODE_IMMEDIATE 00400 * @arg @ref LL_LPTIM_UPDATE_MODE_ENDOFPERIOD 00401 */ 00402 __STATIC_INLINE uint32_t LL_LPTIM_GetUpdateMode(LPTIM_TypeDef *LPTIMx) 00403 { 00404 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD)); 00405 } 00406 00407 /** 00408 * @brief Set the auto reload value 00409 * @note The LPTIMx_ARR register content must only be modified when the LPTIM is enabled 00410 * @note After a write to the LPTIMx_ARR register a new write operation to the 00411 * same register can only be performed when the previous write operation 00412 * is completed. Any successive write before the ARROK flag is set, will 00413 * lead to unpredictable results. 00414 * @note autoreload value be strictly greater than the compare value. 00415 * @rmtoll ARR ARR LL_LPTIM_SetAutoReload 00416 * @param LPTIMx Low-Power Timer instance 00417 * @param AutoReload Value between Min_Data=0x00 and Max_Data=0xFFFF 00418 * @retval None 00419 */ 00420 __STATIC_INLINE void LL_LPTIM_SetAutoReload(LPTIM_TypeDef *LPTIMx, uint32_t AutoReload) 00421 { 00422 MODIFY_REG(LPTIMx->ARR, LPTIM_ARR_ARR, AutoReload); 00423 } 00424 00425 /** 00426 * @brief Get actual auto reload value 00427 * @rmtoll ARR ARR LL_LPTIM_GetAutoReload 00428 * @param LPTIMx Low-Power Timer instance 00429 * @retval AutoReload Value between Min_Data=0x00 and Max_Data=0xFFFF 00430 */ 00431 __STATIC_INLINE uint32_t LL_LPTIM_GetAutoReload(LPTIM_TypeDef *LPTIMx) 00432 { 00433 return (uint32_t)(READ_BIT(LPTIMx->ARR, LPTIM_ARR_ARR)); 00434 } 00435 00436 /** 00437 * @brief Set the compare value 00438 * @note After a write to the LPTIMx_CMP register a new write operation to the 00439 * same register can only be performed when the previous write operation 00440 * is completed. Any successive write before the CMPOK flag is set, will 00441 * lead to unpredictable results. 00442 * @rmtoll CMP CMP LL_LPTIM_SetCompare 00443 * @param LPTIMx Low-Power Timer instance 00444 * @param CompareValue Value between Min_Data=0x00 and Max_Data=0xFFFF 00445 * @retval None 00446 */ 00447 __STATIC_INLINE void LL_LPTIM_SetCompare(LPTIM_TypeDef *LPTIMx, uint32_t CompareValue) 00448 { 00449 MODIFY_REG(LPTIMx->CMP, LPTIM_CMP_CMP, CompareValue); 00450 } 00451 00452 /** 00453 * @brief Get actual compare value 00454 * @rmtoll CMP CMP LL_LPTIM_GetCompare 00455 * @param LPTIMx Low-Power Timer instance 00456 * @retval CompareValue Value between Min_Data=0x00 and Max_Data=0xFFFF 00457 */ 00458 __STATIC_INLINE uint32_t LL_LPTIM_GetCompare(LPTIM_TypeDef *LPTIMx) 00459 { 00460 return (uint32_t)(READ_BIT(LPTIMx->CMP, LPTIM_CMP_CMP)); 00461 } 00462 00463 /** 00464 * @brief Get actual counter value 00465 * @note When the LPTIM instance is running with an asynchronous clock, reading 00466 * the LPTIMx_CNT register may return unreliable values. So in this case 00467 * it is necessary to perform two consecutive read accesses and verify 00468 * that the two returned values are identical. 00469 * @rmtoll CNT CNT LL_LPTIM_GetCounter 00470 * @param LPTIMx Low-Power Timer instance 00471 * @retval Counter value 00472 */ 00473 __STATIC_INLINE uint32_t LL_LPTIM_GetCounter(LPTIM_TypeDef *LPTIMx) 00474 { 00475 return (uint32_t)(READ_BIT(LPTIMx->CNT, LPTIM_CNT_CNT)); 00476 } 00477 00478 /** 00479 * @brief Set the counter mode (selection of the LPTIM counter clock source). 00480 * @note The counter mode can be set only when the LPTIM instance is disabled. 00481 * @rmtoll CFGR COUNTMODE LL_LPTIM_SetCounterMode 00482 * @param LPTIMx Low-Power Timer instance 00483 * @param CounterMode This parameter can be one of the following values: 00484 * @arg @ref LL_LPTIM_COUNTER_MODE_INTERNAL 00485 * @arg @ref LL_LPTIM_COUNTER_MODE_EXTERNAL 00486 * @retval None 00487 */ 00488 __STATIC_INLINE void LL_LPTIM_SetCounterMode(LPTIM_TypeDef *LPTIMx, uint32_t CounterMode) 00489 { 00490 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE, CounterMode); 00491 } 00492 00493 /** 00494 * @brief Get the counter mode 00495 * @rmtoll CFGR COUNTMODE LL_LPTIM_GetCounterMode 00496 * @param LPTIMx Low-Power Timer instance 00497 * @retval Returned value can be one of the following values: 00498 * @arg @ref LL_LPTIM_COUNTER_MODE_INTERNAL 00499 * @arg @ref LL_LPTIM_COUNTER_MODE_EXTERNAL 00500 */ 00501 __STATIC_INLINE uint32_t LL_LPTIM_GetCounterMode(LPTIM_TypeDef *LPTIMx) 00502 { 00503 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE)); 00504 } 00505 00506 /** 00507 * @brief Configure the LPTIM instance output (LPTIMx_OUT) 00508 * @note This function must be called when the LPTIM instance is disabled. 00509 * @note Regarding the LPTIM output polarity the change takes effect 00510 * immediately, so the output default value will change immediately after 00511 * the polarity is re-configured, even before the timer is enabled. 00512 * @rmtoll CFGR WAVE LL_LPTIM_ConfigOutput\n 00513 * CFGR WAVPOL LL_LPTIM_ConfigOutput 00514 * @param LPTIMx Low-Power Timer instance 00515 * @param Waveform This parameter can be one of the following values: 00516 * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_PWM 00517 * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_SETONCE 00518 * @param Polarity This parameter can be one of the following values: 00519 * @arg @ref LL_LPTIM_OUTPUT_POLARITY_REGULAR 00520 * @arg @ref LL_LPTIM_OUTPUT_POLARITY_INVERSE 00521 * @retval None 00522 */ 00523 __STATIC_INLINE void LL_LPTIM_ConfigOutput(LPTIM_TypeDef *LPTIMx, uint32_t Waveform, uint32_t Polarity) 00524 { 00525 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE | LPTIM_CFGR_WAVPOL, Waveform | Polarity); 00526 } 00527 00528 /** 00529 * @brief Set waveform shape 00530 * @rmtoll CFGR WAVE LL_LPTIM_SetWaveform 00531 * @param LPTIMx Low-Power Timer instance 00532 * @param Waveform This parameter can be one of the following values: 00533 * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_PWM 00534 * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_SETONCE 00535 * @retval None 00536 */ 00537 __STATIC_INLINE void LL_LPTIM_SetWaveform(LPTIM_TypeDef *LPTIMx, uint32_t Waveform) 00538 { 00539 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE, Waveform); 00540 } 00541 00542 /** 00543 * @brief Get actual waveform shape 00544 * @rmtoll CFGR WAVE LL_LPTIM_GetWaveform 00545 * @param LPTIMx Low-Power Timer instance 00546 * @retval Returned value can be one of the following values: 00547 * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_PWM 00548 * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_SETONCE 00549 */ 00550 __STATIC_INLINE uint32_t LL_LPTIM_GetWaveform(LPTIM_TypeDef *LPTIMx) 00551 { 00552 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVE)); 00553 } 00554 00555 /** 00556 * @brief Set output polarity 00557 * @rmtoll CFGR WAVPOL LL_LPTIM_SetPolarity 00558 * @param LPTIMx Low-Power Timer instance 00559 * @param Polarity This parameter can be one of the following values: 00560 * @arg @ref LL_LPTIM_OUTPUT_POLARITY_REGULAR 00561 * @arg @ref LL_LPTIM_OUTPUT_POLARITY_INVERSE 00562 * @retval None 00563 */ 00564 __STATIC_INLINE void LL_LPTIM_SetPolarity(LPTIM_TypeDef *LPTIMx, uint32_t Polarity) 00565 { 00566 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL, Polarity); 00567 } 00568 00569 /** 00570 * @brief Get actual output polarity 00571 * @rmtoll CFGR WAVPOL LL_LPTIM_GetPolarity 00572 * @param LPTIMx Low-Power Timer instance 00573 * @retval Returned value can be one of the following values: 00574 * @arg @ref LL_LPTIM_OUTPUT_POLARITY_REGULAR 00575 * @arg @ref LL_LPTIM_OUTPUT_POLARITY_INVERSE 00576 */ 00577 __STATIC_INLINE uint32_t LL_LPTIM_GetPolarity(LPTIM_TypeDef *LPTIMx) 00578 { 00579 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL)); 00580 } 00581 00582 /** 00583 * @brief Set actual prescaler division ratio. 00584 * @note This function must be called when the LPTIM instance is disabled. 00585 * @note When the LPTIM is configured to be clocked by an internal clock source 00586 * and the LPTIM counter is configured to be updated by active edges 00587 * detected on the LPTIM external Input1, the internal clock provided to 00588 * the LPTIM must be not be prescaled. 00589 * @rmtoll CFGR PRESC LL_LPTIM_SetPrescaler 00590 * @param LPTIMx Low-Power Timer instance 00591 * @param Prescaler This parameter can be one of the following values: 00592 * @arg @ref LL_LPTIM_PRESCALER_DIV1 00593 * @arg @ref LL_LPTIM_PRESCALER_DIV2 00594 * @arg @ref LL_LPTIM_PRESCALER_DIV4 00595 * @arg @ref LL_LPTIM_PRESCALER_DIV8 00596 * @arg @ref LL_LPTIM_PRESCALER_DIV16 00597 * @arg @ref LL_LPTIM_PRESCALER_DIV32 00598 * @arg @ref LL_LPTIM_PRESCALER_DIV64 00599 * @arg @ref LL_LPTIM_PRESCALER_DIV128 00600 * @retval None 00601 */ 00602 __STATIC_INLINE void LL_LPTIM_SetPrescaler(LPTIM_TypeDef *LPTIMx, uint32_t Prescaler) 00603 { 00604 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRESC, Prescaler); 00605 } 00606 00607 /** 00608 * @brief Get actual prescaler division ratio. 00609 * @rmtoll CFGR PRESC LL_LPTIM_GetPrescaler 00610 * @param LPTIMx Low-Power Timer instance 00611 * @retval Returned value can be one of the following values: 00612 * @arg @ref LL_LPTIM_PRESCALER_DIV1 00613 * @arg @ref LL_LPTIM_PRESCALER_DIV2 00614 * @arg @ref LL_LPTIM_PRESCALER_DIV4 00615 * @arg @ref LL_LPTIM_PRESCALER_DIV8 00616 * @arg @ref LL_LPTIM_PRESCALER_DIV16 00617 * @arg @ref LL_LPTIM_PRESCALER_DIV32 00618 * @arg @ref LL_LPTIM_PRESCALER_DIV64 00619 * @arg @ref LL_LPTIM_PRESCALER_DIV128 00620 */ 00621 __STATIC_INLINE uint32_t LL_LPTIM_GetPrescaler(LPTIM_TypeDef *LPTIMx) 00622 { 00623 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRESC)); 00624 } 00625 00626 /** 00627 * @brief Set LPTIM input 1 source (default GPIO). 00628 * @rmtoll OR OR LL_LPTIM_SetInput1Src 00629 * @param LPTIMx Low-Power Timer instance 00630 * @param Src This parameter can be one of the following values: 00631 * @arg @ref LL_LPTIM_INPUT1_SRC_PAD_AF 00632 * @arg @ref LL_LPTIM_INPUT1_SRC_PAD_PA4 00633 * @arg @ref LL_LPTIM_INPUT1_SRC_PAD_PB9 00634 * @arg @ref LL_LPTIM_INPUT1_SRC_TIM_DAC 00635 * @retval None 00636 */ 00637 __STATIC_INLINE void LL_LPTIM_SetInput1Src(LPTIM_TypeDef *LPTIMx, uint32_t Src) 00638 { 00639 MODIFY_REG(LPTIMx->OR, LPTIM_OR_OR, Src); 00640 } 00641 00642 /** 00643 * @} 00644 */ 00645 00646 /** @defgroup LPTIM_LL_EF_Trigger_Configuration Trigger Configuration 00647 * @{ 00648 */ 00649 00650 /** 00651 * @brief Enable the timeout function 00652 * @note This function must be called when the LPTIM instance is disabled. 00653 * @note The first trigger event will start the timer, any successive trigger 00654 * event will reset the counter and the timer will restart. 00655 * @note The timeout value corresponds to the compare value; if no trigger 00656 * occurs within the expected time frame, the MCU is waked-up by the 00657 * compare match event. 00658 * @rmtoll CFGR TIMOUT LL_LPTIM_EnableTimeout 00659 * @param LPTIMx Low-Power Timer instance 00660 * @retval None 00661 */ 00662 __STATIC_INLINE void LL_LPTIM_EnableTimeout(LPTIM_TypeDef *LPTIMx) 00663 { 00664 SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT); 00665 } 00666 00667 /** 00668 * @brief Disable the timeout function 00669 * @note This function must be called when the LPTIM instance is disabled. 00670 * @note A trigger event arriving when the timer is already started will be 00671 * ignored. 00672 * @rmtoll CFGR TIMOUT LL_LPTIM_DisableTimeout 00673 * @param LPTIMx Low-Power Timer instance 00674 * @retval None 00675 */ 00676 __STATIC_INLINE void LL_LPTIM_DisableTimeout(LPTIM_TypeDef *LPTIMx) 00677 { 00678 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT); 00679 } 00680 00681 /** 00682 * @brief Indicate whether the timeout function is enabled. 00683 * @rmtoll CFGR TIMOUT LL_LPTIM_IsEnabledTimeout 00684 * @param LPTIMx Low-Power Timer instance 00685 * @retval State of bit (1 or 0). 00686 */ 00687 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledTimeout(LPTIM_TypeDef *LPTIMx) 00688 { 00689 return (((READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT) == LPTIM_CFGR_TIMOUT) ? 1UL : 0UL)); 00690 } 00691 00692 /** 00693 * @brief Start the LPTIM counter 00694 * @note This function must be called when the LPTIM instance is disabled. 00695 * @rmtoll CFGR TRIGEN LL_LPTIM_TrigSw 00696 * @param LPTIMx Low-Power Timer instance 00697 * @retval None 00698 */ 00699 __STATIC_INLINE void LL_LPTIM_TrigSw(LPTIM_TypeDef *LPTIMx) 00700 { 00701 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN); 00702 } 00703 00704 /** 00705 * @brief Configure the external trigger used as a trigger event for the LPTIM. 00706 * @note This function must be called when the LPTIM instance is disabled. 00707 * @note An internal clock source must be present when a digital filter is 00708 * required for the trigger. 00709 * @rmtoll CFGR TRIGSEL LL_LPTIM_ConfigTrigger\n 00710 * CFGR TRGFLT LL_LPTIM_ConfigTrigger\n 00711 * CFGR TRIGEN LL_LPTIM_ConfigTrigger 00712 * @param LPTIMx Low-Power Timer instance 00713 * @param Source This parameter can be one of the following values: 00714 * @arg @ref LL_LPTIM_TRIG_SOURCE_GPIO 00715 * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMA 00716 * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMB 00717 * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCTAMP1 00718 * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM1_TRGO 00719 * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM5_TRGO 00720 * @param Filter This parameter can be one of the following values: 00721 * @arg @ref LL_LPTIM_TRIG_FILTER_NONE 00722 * @arg @ref LL_LPTIM_TRIG_FILTER_2 00723 * @arg @ref LL_LPTIM_TRIG_FILTER_4 00724 * @arg @ref LL_LPTIM_TRIG_FILTER_8 00725 * @param Polarity This parameter can be one of the following values: 00726 * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING 00727 * @arg @ref LL_LPTIM_TRIG_POLARITY_FALLING 00728 * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING_FALLING 00729 * @retval None 00730 */ 00731 __STATIC_INLINE void LL_LPTIM_ConfigTrigger(LPTIM_TypeDef *LPTIMx, uint32_t Source, uint32_t Filter, uint32_t Polarity) 00732 { 00733 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL | LPTIM_CFGR_TRGFLT | LPTIM_CFGR_TRIGEN, Source | Filter | Polarity); 00734 } 00735 00736 /** 00737 * @brief Get actual external trigger source. 00738 * @rmtoll CFGR TRIGSEL LL_LPTIM_GetTriggerSource 00739 * @param LPTIMx Low-Power Timer instance 00740 * @retval Returned value can be one of the following values: 00741 * @arg @ref LL_LPTIM_TRIG_SOURCE_GPIO 00742 * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMA 00743 * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMB 00744 * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCTAMP1 00745 * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM1_TRGO 00746 * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM5_TRGO 00747 */ 00748 __STATIC_INLINE uint32_t LL_LPTIM_GetTriggerSource(LPTIM_TypeDef *LPTIMx) 00749 { 00750 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL)); 00751 } 00752 00753 /** 00754 * @brief Get actual external trigger filter. 00755 * @rmtoll CFGR TRGFLT LL_LPTIM_GetTriggerFilter 00756 * @param LPTIMx Low-Power Timer instance 00757 * @retval Returned value can be one of the following values: 00758 * @arg @ref LL_LPTIM_TRIG_FILTER_NONE 00759 * @arg @ref LL_LPTIM_TRIG_FILTER_2 00760 * @arg @ref LL_LPTIM_TRIG_FILTER_4 00761 * @arg @ref LL_LPTIM_TRIG_FILTER_8 00762 */ 00763 __STATIC_INLINE uint32_t LL_LPTIM_GetTriggerFilter(LPTIM_TypeDef *LPTIMx) 00764 { 00765 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRGFLT)); 00766 } 00767 00768 /** 00769 * @brief Get actual external trigger polarity. 00770 * @rmtoll CFGR TRIGEN LL_LPTIM_GetTriggerPolarity 00771 * @param LPTIMx Low-Power Timer instance 00772 * @retval Returned value can be one of the following values: 00773 * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING 00774 * @arg @ref LL_LPTIM_TRIG_POLARITY_FALLING 00775 * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING_FALLING 00776 */ 00777 __STATIC_INLINE uint32_t LL_LPTIM_GetTriggerPolarity(LPTIM_TypeDef *LPTIMx) 00778 { 00779 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN)); 00780 } 00781 00782 /** 00783 * @} 00784 */ 00785 00786 /** @defgroup LPTIM_LL_EF_Clock_Configuration Clock Configuration 00787 * @{ 00788 */ 00789 00790 /** 00791 * @brief Set the source of the clock used by the LPTIM instance. 00792 * @note This function must be called when the LPTIM instance is disabled. 00793 * @rmtoll CFGR CKSEL LL_LPTIM_SetClockSource 00794 * @param LPTIMx Low-Power Timer instance 00795 * @param ClockSource This parameter can be one of the following values: 00796 * @arg @ref LL_LPTIM_CLK_SOURCE_INTERNAL 00797 * @arg @ref LL_LPTIM_CLK_SOURCE_EXTERNAL 00798 * @retval None 00799 */ 00800 __STATIC_INLINE void LL_LPTIM_SetClockSource(LPTIM_TypeDef *LPTIMx, uint32_t ClockSource) 00801 { 00802 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKSEL, ClockSource); 00803 } 00804 00805 /** 00806 * @brief Get actual LPTIM instance clock source. 00807 * @rmtoll CFGR CKSEL LL_LPTIM_GetClockSource 00808 * @param LPTIMx Low-Power Timer instance 00809 * @retval Returned value can be one of the following values: 00810 * @arg @ref LL_LPTIM_CLK_SOURCE_INTERNAL 00811 * @arg @ref LL_LPTIM_CLK_SOURCE_EXTERNAL 00812 */ 00813 __STATIC_INLINE uint32_t LL_LPTIM_GetClockSource(LPTIM_TypeDef *LPTIMx) 00814 { 00815 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKSEL)); 00816 } 00817 00818 /** 00819 * @brief Configure the active edge or edges used by the counter when 00820 the LPTIM is clocked by an external clock source. 00821 * @note This function must be called when the LPTIM instance is disabled. 00822 * @note When both external clock signal edges are considered active ones, 00823 * the LPTIM must also be clocked by an internal clock source with a 00824 * frequency equal to at least four times the external clock frequency. 00825 * @note An internal clock source must be present when a digital filter is 00826 * required for external clock. 00827 * @rmtoll CFGR CKFLT LL_LPTIM_ConfigClock\n 00828 * CFGR CKPOL LL_LPTIM_ConfigClock 00829 * @param LPTIMx Low-Power Timer instance 00830 * @param ClockFilter This parameter can be one of the following values: 00831 * @arg @ref LL_LPTIM_CLK_FILTER_NONE 00832 * @arg @ref LL_LPTIM_CLK_FILTER_2 00833 * @arg @ref LL_LPTIM_CLK_FILTER_4 00834 * @arg @ref LL_LPTIM_CLK_FILTER_8 00835 * @param ClockPolarity This parameter can be one of the following values: 00836 * @arg @ref LL_LPTIM_CLK_POLARITY_RISING 00837 * @arg @ref LL_LPTIM_CLK_POLARITY_FALLING 00838 * @arg @ref LL_LPTIM_CLK_POLARITY_RISING_FALLING 00839 * @retval None 00840 */ 00841 __STATIC_INLINE void LL_LPTIM_ConfigClock(LPTIM_TypeDef *LPTIMx, uint32_t ClockFilter, uint32_t ClockPolarity) 00842 { 00843 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKFLT | LPTIM_CFGR_CKPOL, ClockFilter | ClockPolarity); 00844 } 00845 00846 /** 00847 * @brief Get actual clock polarity 00848 * @rmtoll CFGR CKPOL LL_LPTIM_GetClockPolarity 00849 * @param LPTIMx Low-Power Timer instance 00850 * @retval Returned value can be one of the following values: 00851 * @arg @ref LL_LPTIM_CLK_POLARITY_RISING 00852 * @arg @ref LL_LPTIM_CLK_POLARITY_FALLING 00853 * @arg @ref LL_LPTIM_CLK_POLARITY_RISING_FALLING 00854 */ 00855 __STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity(LPTIM_TypeDef *LPTIMx) 00856 { 00857 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL)); 00858 } 00859 00860 /** 00861 * @brief Get actual clock digital filter 00862 * @rmtoll CFGR CKFLT LL_LPTIM_GetClockFilter 00863 * @param LPTIMx Low-Power Timer instance 00864 * @retval Returned value can be one of the following values: 00865 * @arg @ref LL_LPTIM_CLK_FILTER_NONE 00866 * @arg @ref LL_LPTIM_CLK_FILTER_2 00867 * @arg @ref LL_LPTIM_CLK_FILTER_4 00868 * @arg @ref LL_LPTIM_CLK_FILTER_8 00869 */ 00870 __STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter(LPTIM_TypeDef *LPTIMx) 00871 { 00872 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKFLT)); 00873 } 00874 00875 /** 00876 * @} 00877 */ 00878 00879 /** @defgroup LPTIM_LL_EF_Encoder_Mode Encoder Mode 00880 * @{ 00881 */ 00882 00883 /** 00884 * @brief Configure the encoder mode. 00885 * @note This function must be called when the LPTIM instance is disabled. 00886 * @rmtoll CFGR CKPOL LL_LPTIM_SetEncoderMode 00887 * @param LPTIMx Low-Power Timer instance 00888 * @param EncoderMode This parameter can be one of the following values: 00889 * @arg @ref LL_LPTIM_ENCODER_MODE_RISING 00890 * @arg @ref LL_LPTIM_ENCODER_MODE_FALLING 00891 * @arg @ref LL_LPTIM_ENCODER_MODE_RISING_FALLING 00892 * @retval None 00893 */ 00894 __STATIC_INLINE void LL_LPTIM_SetEncoderMode(LPTIM_TypeDef *LPTIMx, uint32_t EncoderMode) 00895 { 00896 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKPOL, EncoderMode); 00897 } 00898 00899 /** 00900 * @brief Get actual encoder mode. 00901 * @rmtoll CFGR CKPOL LL_LPTIM_GetEncoderMode 00902 * @param LPTIMx Low-Power Timer instance 00903 * @retval Returned value can be one of the following values: 00904 * @arg @ref LL_LPTIM_ENCODER_MODE_RISING 00905 * @arg @ref LL_LPTIM_ENCODER_MODE_FALLING 00906 * @arg @ref LL_LPTIM_ENCODER_MODE_RISING_FALLING 00907 */ 00908 __STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode(LPTIM_TypeDef *LPTIMx) 00909 { 00910 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL)); 00911 } 00912 00913 /** 00914 * @brief Enable the encoder mode 00915 * @note This function must be called when the LPTIM instance is disabled. 00916 * @note In this mode the LPTIM instance must be clocked by an internal clock 00917 * source. Also, the prescaler division ratio must be equal to 1. 00918 * @note LPTIM instance must be configured in continuous mode prior enabling 00919 * the encoder mode. 00920 * @rmtoll CFGR ENC LL_LPTIM_EnableEncoderMode 00921 * @param LPTIMx Low-Power Timer instance 00922 * @retval None 00923 */ 00924 __STATIC_INLINE void LL_LPTIM_EnableEncoderMode(LPTIM_TypeDef *LPTIMx) 00925 { 00926 SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC); 00927 } 00928 00929 /** 00930 * @brief Disable the encoder mode 00931 * @note This function must be called when the LPTIM instance is disabled. 00932 * @rmtoll CFGR ENC LL_LPTIM_DisableEncoderMode 00933 * @param LPTIMx Low-Power Timer instance 00934 * @retval None 00935 */ 00936 __STATIC_INLINE void LL_LPTIM_DisableEncoderMode(LPTIM_TypeDef *LPTIMx) 00937 { 00938 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC); 00939 } 00940 00941 /** 00942 * @brief Indicates whether the LPTIM operates in encoder mode. 00943 * @rmtoll CFGR ENC LL_LPTIM_IsEnabledEncoderMode 00944 * @param LPTIMx Low-Power Timer instance 00945 * @retval State of bit (1 or 0). 00946 */ 00947 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode(LPTIM_TypeDef *LPTIMx) 00948 { 00949 return (((READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC) == LPTIM_CFGR_ENC) ? 1UL : 0UL)); 00950 } 00951 00952 /** 00953 * @} 00954 */ 00955 00956 /** @defgroup LPTIM_LL_EF_FLAG_Management FLAG Management 00957 * @{ 00958 */ 00959 00960 /** 00961 * @brief Clear the compare match flag (CMPMCF) 00962 * @rmtoll ICR CMPMCF LL_LPTIM_ClearFLAG_CMPM 00963 * @param LPTIMx Low-Power Timer instance 00964 * @retval None 00965 */ 00966 __STATIC_INLINE void LL_LPTIM_ClearFLAG_CMPM(LPTIM_TypeDef *LPTIMx) 00967 { 00968 SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPMCF); 00969 } 00970 00971 /** 00972 * @brief Inform application whether a compare match interrupt has occurred. 00973 * @rmtoll ISR CMPM LL_LPTIM_IsActiveFlag_CMPM 00974 * @param LPTIMx Low-Power Timer instance 00975 * @retval State of bit (1 or 0). 00976 */ 00977 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPM(LPTIM_TypeDef *LPTIMx) 00978 { 00979 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPM) == LPTIM_ISR_CMPM) ? 1UL : 0UL)); 00980 } 00981 00982 /** 00983 * @brief Clear the autoreload match flag (ARRMCF) 00984 * @rmtoll ICR ARRMCF LL_LPTIM_ClearFLAG_ARRM 00985 * @param LPTIMx Low-Power Timer instance 00986 * @retval None 00987 */ 00988 __STATIC_INLINE void LL_LPTIM_ClearFLAG_ARRM(LPTIM_TypeDef *LPTIMx) 00989 { 00990 SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARRMCF); 00991 } 00992 00993 /** 00994 * @brief Inform application whether a autoreload match interrupt has occurred. 00995 * @rmtoll ISR ARRM LL_LPTIM_IsActiveFlag_ARRM 00996 * @param LPTIMx Low-Power Timer instance 00997 * @retval State of bit (1 or 0). 00998 */ 00999 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARRM(LPTIM_TypeDef *LPTIMx) 01000 { 01001 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARRM) == LPTIM_ISR_ARRM) ? 1UL : 0UL)); 01002 } 01003 01004 /** 01005 * @brief Clear the external trigger valid edge flag(EXTTRIGCF). 01006 * @rmtoll ICR EXTTRIGCF LL_LPTIM_ClearFlag_EXTTRIG 01007 * @param LPTIMx Low-Power Timer instance 01008 * @retval None 01009 */ 01010 __STATIC_INLINE void LL_LPTIM_ClearFlag_EXTTRIG(LPTIM_TypeDef *LPTIMx) 01011 { 01012 SET_BIT(LPTIMx->ICR, LPTIM_ICR_EXTTRIGCF); 01013 } 01014 01015 /** 01016 * @brief Inform application whether a valid edge on the selected external trigger input has occurred. 01017 * @rmtoll ISR EXTTRIG LL_LPTIM_IsActiveFlag_EXTTRIG 01018 * @param LPTIMx Low-Power Timer instance 01019 * @retval State of bit (1 or 0). 01020 */ 01021 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_EXTTRIG(LPTIM_TypeDef *LPTIMx) 01022 { 01023 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_EXTTRIG) == LPTIM_ISR_EXTTRIG) ? 1UL : 0UL)); 01024 } 01025 01026 /** 01027 * @brief Clear the compare register update interrupt flag (CMPOKCF). 01028 * @rmtoll ICR CMPOKCF LL_LPTIM_ClearFlag_CMPOK 01029 * @param LPTIMx Low-Power Timer instance 01030 * @retval None 01031 */ 01032 __STATIC_INLINE void LL_LPTIM_ClearFlag_CMPOK(LPTIM_TypeDef *LPTIMx) 01033 { 01034 SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPOKCF); 01035 } 01036 01037 /** 01038 * @brief Informs application whether the APB bus write operation to the LPTIMx_CMP register has been successfully 01039 completed. If so, a new one can be initiated. 01040 * @rmtoll ISR CMPOK LL_LPTIM_IsActiveFlag_CMPOK 01041 * @param LPTIMx Low-Power Timer instance 01042 * @retval State of bit (1 or 0). 01043 */ 01044 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPOK(LPTIM_TypeDef *LPTIMx) 01045 { 01046 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPOK) == LPTIM_ISR_CMPOK) ? 1UL : 0UL)); 01047 } 01048 01049 /** 01050 * @brief Clear the autoreload register update interrupt flag (ARROKCF). 01051 * @rmtoll ICR ARROKCF LL_LPTIM_ClearFlag_ARROK 01052 * @param LPTIMx Low-Power Timer instance 01053 * @retval None 01054 */ 01055 __STATIC_INLINE void LL_LPTIM_ClearFlag_ARROK(LPTIM_TypeDef *LPTIMx) 01056 { 01057 SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARROKCF); 01058 } 01059 01060 /** 01061 * @brief Informs application whether the APB bus write operation to the LPTIMx_ARR register has been successfully 01062 completed. If so, a new one can be initiated. 01063 * @rmtoll ISR ARROK LL_LPTIM_IsActiveFlag_ARROK 01064 * @param LPTIMx Low-Power Timer instance 01065 * @retval State of bit (1 or 0). 01066 */ 01067 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARROK(LPTIM_TypeDef *LPTIMx) 01068 { 01069 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARROK) == LPTIM_ISR_ARROK) ? 1UL : 0UL)); 01070 } 01071 01072 /** 01073 * @brief Clear the counter direction change to up interrupt flag (UPCF). 01074 * @rmtoll ICR UPCF LL_LPTIM_ClearFlag_UP 01075 * @param LPTIMx Low-Power Timer instance 01076 * @retval None 01077 */ 01078 __STATIC_INLINE void LL_LPTIM_ClearFlag_UP(LPTIM_TypeDef *LPTIMx) 01079 { 01080 SET_BIT(LPTIMx->ICR, LPTIM_ICR_UPCF); 01081 } 01082 01083 /** 01084 * @brief Informs the application whether the counter direction has changed from down to up (when the LPTIM instance 01085 operates in encoder mode). 01086 * @rmtoll ISR UP LL_LPTIM_IsActiveFlag_UP 01087 * @param LPTIMx Low-Power Timer instance 01088 * @retval State of bit (1 or 0). 01089 */ 01090 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_UP(LPTIM_TypeDef *LPTIMx) 01091 { 01092 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_UP) == LPTIM_ISR_UP) ? 1UL : 0UL)); 01093 } 01094 01095 /** 01096 * @brief Clear the counter direction change to down interrupt flag (DOWNCF). 01097 * @rmtoll ICR DOWNCF LL_LPTIM_ClearFlag_DOWN 01098 * @param LPTIMx Low-Power Timer instance 01099 * @retval None 01100 */ 01101 __STATIC_INLINE void LL_LPTIM_ClearFlag_DOWN(LPTIM_TypeDef *LPTIMx) 01102 { 01103 SET_BIT(LPTIMx->ICR, LPTIM_ICR_DOWNCF); 01104 } 01105 01106 /** 01107 * @brief Informs the application whether the counter direction has changed from up to down (when the LPTIM instance 01108 operates in encoder mode). 01109 * @rmtoll ISR DOWN LL_LPTIM_IsActiveFlag_DOWN 01110 * @param LPTIMx Low-Power Timer instance 01111 * @retval State of bit (1 or 0). 01112 */ 01113 __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_DOWN(LPTIM_TypeDef *LPTIMx) 01114 { 01115 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_DOWN) == LPTIM_ISR_DOWN) ? 1UL : 0UL)); 01116 } 01117 01118 /** 01119 * @} 01120 */ 01121 01122 /** @defgroup LPTIM_LL_EF_IT_Management Interrupt Management 01123 * @{ 01124 */ 01125 01126 /** 01127 * @brief Enable compare match interrupt (CMPMIE). 01128 * @rmtoll IER CMPMIE LL_LPTIM_EnableIT_CMPM 01129 * @param LPTIMx Low-Power Timer instance 01130 * @retval None 01131 */ 01132 __STATIC_INLINE void LL_LPTIM_EnableIT_CMPM(LPTIM_TypeDef *LPTIMx) 01133 { 01134 SET_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE); 01135 } 01136 01137 /** 01138 * @brief Disable compare match interrupt (CMPMIE). 01139 * @rmtoll IER CMPMIE LL_LPTIM_DisableIT_CMPM 01140 * @param LPTIMx Low-Power Timer instance 01141 * @retval None 01142 */ 01143 __STATIC_INLINE void LL_LPTIM_DisableIT_CMPM(LPTIM_TypeDef *LPTIMx) 01144 { 01145 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE); 01146 } 01147 01148 /** 01149 * @brief Indicates whether the compare match interrupt (CMPMIE) is enabled. 01150 * @rmtoll IER CMPMIE LL_LPTIM_IsEnabledIT_CMPM 01151 * @param LPTIMx Low-Power Timer instance 01152 * @retval State of bit (1 or 0). 01153 */ 01154 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPM(LPTIM_TypeDef *LPTIMx) 01155 { 01156 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE) == LPTIM_IER_CMPMIE) ? 1UL : 0UL)); 01157 } 01158 01159 /** 01160 * @brief Enable autoreload match interrupt (ARRMIE). 01161 * @rmtoll IER ARRMIE LL_LPTIM_EnableIT_ARRM 01162 * @param LPTIMx Low-Power Timer instance 01163 * @retval None 01164 */ 01165 __STATIC_INLINE void LL_LPTIM_EnableIT_ARRM(LPTIM_TypeDef *LPTIMx) 01166 { 01167 SET_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE); 01168 } 01169 01170 /** 01171 * @brief Disable autoreload match interrupt (ARRMIE). 01172 * @rmtoll IER ARRMIE LL_LPTIM_DisableIT_ARRM 01173 * @param LPTIMx Low-Power Timer instance 01174 * @retval None 01175 */ 01176 __STATIC_INLINE void LL_LPTIM_DisableIT_ARRM(LPTIM_TypeDef *LPTIMx) 01177 { 01178 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE); 01179 } 01180 01181 /** 01182 * @brief Indicates whether the autoreload match interrupt (ARRMIE) is enabled. 01183 * @rmtoll IER ARRMIE LL_LPTIM_IsEnabledIT_ARRM 01184 * @param LPTIMx Low-Power Timer instance 01185 * @retval State of bit (1 or 0). 01186 */ 01187 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARRM(LPTIM_TypeDef *LPTIMx) 01188 { 01189 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE) == LPTIM_IER_ARRMIE) ? 1UL : 0UL)); 01190 } 01191 01192 /** 01193 * @brief Enable external trigger valid edge interrupt (EXTTRIGIE). 01194 * @rmtoll IER EXTTRIGIE LL_LPTIM_EnableIT_EXTTRIG 01195 * @param LPTIMx Low-Power Timer instance 01196 * @retval None 01197 */ 01198 __STATIC_INLINE void LL_LPTIM_EnableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx) 01199 { 01200 SET_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE); 01201 } 01202 01203 /** 01204 * @brief Disable external trigger valid edge interrupt (EXTTRIGIE). 01205 * @rmtoll IER EXTTRIGIE LL_LPTIM_DisableIT_EXTTRIG 01206 * @param LPTIMx Low-Power Timer instance 01207 * @retval None 01208 */ 01209 __STATIC_INLINE void LL_LPTIM_DisableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx) 01210 { 01211 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE); 01212 } 01213 01214 /** 01215 * @brief Indicates external trigger valid edge interrupt (EXTTRIGIE) is enabled. 01216 * @rmtoll IER EXTTRIGIE LL_LPTIM_IsEnabledIT_EXTTRIG 01217 * @param LPTIMx Low-Power Timer instance 01218 * @retval State of bit (1 or 0). 01219 */ 01220 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_EXTTRIG(LPTIM_TypeDef *LPTIMx) 01221 { 01222 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE) == LPTIM_IER_EXTTRIGIE) ? 1UL : 0UL)); 01223 } 01224 01225 /** 01226 * @brief Enable compare register write completed interrupt (CMPOKIE). 01227 * @rmtoll IER CMPOKIE LL_LPTIM_EnableIT_CMPOK 01228 * @param LPTIMx Low-Power Timer instance 01229 * @retval None 01230 */ 01231 __STATIC_INLINE void LL_LPTIM_EnableIT_CMPOK(LPTIM_TypeDef *LPTIMx) 01232 { 01233 SET_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE); 01234 } 01235 01236 /** 01237 * @brief Disable compare register write completed interrupt (CMPOKIE). 01238 * @rmtoll IER CMPOKIE LL_LPTIM_DisableIT_CMPOK 01239 * @param LPTIMx Low-Power Timer instance 01240 * @retval None 01241 */ 01242 __STATIC_INLINE void LL_LPTIM_DisableIT_CMPOK(LPTIM_TypeDef *LPTIMx) 01243 { 01244 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE); 01245 } 01246 01247 /** 01248 * @brief Indicates whether the compare register write completed interrupt (CMPOKIE) is enabled. 01249 * @rmtoll IER CMPOKIE LL_LPTIM_IsEnabledIT_CMPOK 01250 * @param LPTIMx Low-Power Timer instance 01251 * @retval State of bit (1 or 0). 01252 */ 01253 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPOK(LPTIM_TypeDef *LPTIMx) 01254 { 01255 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE) == LPTIM_IER_CMPOKIE) ? 1UL : 0UL)); 01256 } 01257 01258 /** 01259 * @brief Enable autoreload register write completed interrupt (ARROKIE). 01260 * @rmtoll IER ARROKIE LL_LPTIM_EnableIT_ARROK 01261 * @param LPTIMx Low-Power Timer instance 01262 * @retval None 01263 */ 01264 __STATIC_INLINE void LL_LPTIM_EnableIT_ARROK(LPTIM_TypeDef *LPTIMx) 01265 { 01266 SET_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE); 01267 } 01268 01269 /** 01270 * @brief Disable autoreload register write completed interrupt (ARROKIE). 01271 * @rmtoll IER ARROKIE LL_LPTIM_DisableIT_ARROK 01272 * @param LPTIMx Low-Power Timer instance 01273 * @retval None 01274 */ 01275 __STATIC_INLINE void LL_LPTIM_DisableIT_ARROK(LPTIM_TypeDef *LPTIMx) 01276 { 01277 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE); 01278 } 01279 01280 /** 01281 * @brief Indicates whether the autoreload register write completed interrupt (ARROKIE) is enabled. 01282 * @rmtoll IER ARROKIE LL_LPTIM_IsEnabledIT_ARROK 01283 * @param LPTIMx Low-Power Timer instance 01284 * @retval State of bit(1 or 0). 01285 */ 01286 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARROK(LPTIM_TypeDef *LPTIMx) 01287 { 01288 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE) == LPTIM_IER_ARROKIE) ? 1UL : 0UL)); 01289 } 01290 01291 /** 01292 * @brief Enable direction change to up interrupt (UPIE). 01293 * @rmtoll IER UPIE LL_LPTIM_EnableIT_UP 01294 * @param LPTIMx Low-Power Timer instance 01295 * @retval None 01296 */ 01297 __STATIC_INLINE void LL_LPTIM_EnableIT_UP(LPTIM_TypeDef *LPTIMx) 01298 { 01299 SET_BIT(LPTIMx->IER, LPTIM_IER_UPIE); 01300 } 01301 01302 /** 01303 * @brief Disable direction change to up interrupt (UPIE). 01304 * @rmtoll IER UPIE LL_LPTIM_DisableIT_UP 01305 * @param LPTIMx Low-Power Timer instance 01306 * @retval None 01307 */ 01308 __STATIC_INLINE void LL_LPTIM_DisableIT_UP(LPTIM_TypeDef *LPTIMx) 01309 { 01310 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_UPIE); 01311 } 01312 01313 /** 01314 * @brief Indicates whether the direction change to up interrupt (UPIE) is enabled. 01315 * @rmtoll IER UPIE LL_LPTIM_IsEnabledIT_UP 01316 * @param LPTIMx Low-Power Timer instance 01317 * @retval State of bit(1 or 0). 01318 */ 01319 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_UP(LPTIM_TypeDef *LPTIMx) 01320 { 01321 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_UPIE) == LPTIM_IER_UPIE) ? 1UL : 0UL)); 01322 } 01323 01324 /** 01325 * @brief Enable direction change to down interrupt (DOWNIE). 01326 * @rmtoll IER DOWNIE LL_LPTIM_EnableIT_DOWN 01327 * @param LPTIMx Low-Power Timer instance 01328 * @retval None 01329 */ 01330 __STATIC_INLINE void LL_LPTIM_EnableIT_DOWN(LPTIM_TypeDef *LPTIMx) 01331 { 01332 SET_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE); 01333 } 01334 01335 /** 01336 * @brief Disable direction change to down interrupt (DOWNIE). 01337 * @rmtoll IER DOWNIE LL_LPTIM_DisableIT_DOWN 01338 * @param LPTIMx Low-Power Timer instance 01339 * @retval None 01340 */ 01341 __STATIC_INLINE void LL_LPTIM_DisableIT_DOWN(LPTIM_TypeDef *LPTIMx) 01342 { 01343 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE); 01344 } 01345 01346 /** 01347 * @brief Indicates whether the direction change to down interrupt (DOWNIE) is enabled. 01348 * @rmtoll IER DOWNIE LL_LPTIM_IsEnabledIT_DOWN 01349 * @param LPTIMx Low-Power Timer instance 01350 * @retval State of bit(1 or 0). 01351 */ 01352 __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_DOWN(LPTIM_TypeDef *LPTIMx) 01353 { 01354 return ((READ_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE) == LPTIM_IER_DOWNIE) ? 1UL : 0UL); 01355 } 01356 01357 /** 01358 * @} 01359 */ 01360 01361 /** 01362 * @} 01363 */ 01364 01365 /** 01366 * @} 01367 */ 01368 01369 #endif /* LPTIM1 */ 01370 01371 /** 01372 * @} 01373 */ 01374 01375 #ifdef __cplusplus 01376 } 01377 #endif 01378 01379 #endif /* STM32F4xx_LL_LPTIM_H */ 01380 01381 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/