The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_ARCH_MAX/TOOLCHAIN_ARM_STD/stm32f4xx_ll_lptim.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
- Parent:
- TARGET_NUCLEO_F413ZH/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_ll_lptim.h@163:e59c8e839560
mbed library. Release version 164
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Anna Bridge |
160:5571c4ff569f | 1 | /** |
Anna Bridge |
160:5571c4ff569f | 2 | ****************************************************************************** |
Anna Bridge |
160:5571c4ff569f | 3 | * @file stm32f4xx_ll_lptim.h |
Anna Bridge |
160:5571c4ff569f | 4 | * @author MCD Application Team |
Anna Bridge |
160:5571c4ff569f | 5 | * @brief Header file of LPTIM LL module. |
Anna Bridge |
160:5571c4ff569f | 6 | ****************************************************************************** |
Anna Bridge |
160:5571c4ff569f | 7 | * @attention |
Anna Bridge |
160:5571c4ff569f | 8 | * |
Anna Bridge |
160:5571c4ff569f | 9 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
Anna Bridge |
160:5571c4ff569f | 10 | * |
Anna Bridge |
160:5571c4ff569f | 11 | * Redistribution and use in source and binary forms, with or without modification, |
Anna Bridge |
160:5571c4ff569f | 12 | * are permitted provided that the following conditions are met: |
Anna Bridge |
160:5571c4ff569f | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
Anna Bridge |
160:5571c4ff569f | 14 | * this list of conditions and the following disclaimer. |
Anna Bridge |
160:5571c4ff569f | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Anna Bridge |
160:5571c4ff569f | 16 | * this list of conditions and the following disclaimer in the documentation |
Anna Bridge |
160:5571c4ff569f | 17 | * and/or other materials provided with the distribution. |
Anna Bridge |
160:5571c4ff569f | 18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Anna Bridge |
160:5571c4ff569f | 19 | * may be used to endorse or promote products derived from this software |
Anna Bridge |
160:5571c4ff569f | 20 | * without specific prior written permission. |
Anna Bridge |
160:5571c4ff569f | 21 | * |
Anna Bridge |
160:5571c4ff569f | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Anna Bridge |
160:5571c4ff569f | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Anna Bridge |
160:5571c4ff569f | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Anna Bridge |
160:5571c4ff569f | 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Anna Bridge |
160:5571c4ff569f | 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Anna Bridge |
160:5571c4ff569f | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Anna Bridge |
160:5571c4ff569f | 28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Anna Bridge |
160:5571c4ff569f | 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Anna Bridge |
160:5571c4ff569f | 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Anna Bridge |
160:5571c4ff569f | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Anna Bridge |
160:5571c4ff569f | 32 | * |
Anna Bridge |
160:5571c4ff569f | 33 | ****************************************************************************** |
Anna Bridge |
160:5571c4ff569f | 34 | */ |
Anna Bridge |
160:5571c4ff569f | 35 | |
Anna Bridge |
160:5571c4ff569f | 36 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 37 | #ifndef __STM32F4xx_LL_LPTIM_H |
Anna Bridge |
160:5571c4ff569f | 38 | #define __STM32F4xx_LL_LPTIM_H |
Anna Bridge |
160:5571c4ff569f | 39 | |
Anna Bridge |
160:5571c4ff569f | 40 | #ifdef __cplusplus |
Anna Bridge |
160:5571c4ff569f | 41 | extern "C" { |
Anna Bridge |
160:5571c4ff569f | 42 | #endif |
Anna Bridge |
160:5571c4ff569f | 43 | |
Anna Bridge |
160:5571c4ff569f | 44 | /* Includes ------------------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 45 | #include "stm32f4xx.h" |
Anna Bridge |
160:5571c4ff569f | 46 | |
Anna Bridge |
160:5571c4ff569f | 47 | /** @addtogroup STM32F4xx_LL_Driver |
Anna Bridge |
160:5571c4ff569f | 48 | * @{ |
Anna Bridge |
160:5571c4ff569f | 49 | */ |
Anna Bridge |
160:5571c4ff569f | 50 | #if defined (LPTIM1) |
Anna Bridge |
160:5571c4ff569f | 51 | |
Anna Bridge |
160:5571c4ff569f | 52 | /** @defgroup LPTIM_LL LPTIM |
Anna Bridge |
160:5571c4ff569f | 53 | * @{ |
Anna Bridge |
160:5571c4ff569f | 54 | */ |
Anna Bridge |
160:5571c4ff569f | 55 | |
Anna Bridge |
160:5571c4ff569f | 56 | /* Private types -------------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 57 | /* Private variables ---------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 58 | |
Anna Bridge |
160:5571c4ff569f | 59 | /* Private constants ---------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 60 | |
Anna Bridge |
160:5571c4ff569f | 61 | /* Private macros ------------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 62 | #if defined(USE_FULL_LL_DRIVER) |
Anna Bridge |
160:5571c4ff569f | 63 | /** @defgroup LPTIM_LL_Private_Macros LPTIM Private Macros |
Anna Bridge |
160:5571c4ff569f | 64 | * @{ |
Anna Bridge |
160:5571c4ff569f | 65 | */ |
Anna Bridge |
160:5571c4ff569f | 66 | /** |
Anna Bridge |
160:5571c4ff569f | 67 | * @} |
Anna Bridge |
160:5571c4ff569f | 68 | */ |
Anna Bridge |
160:5571c4ff569f | 69 | #endif /*USE_FULL_LL_DRIVER*/ |
Anna Bridge |
160:5571c4ff569f | 70 | |
Anna Bridge |
160:5571c4ff569f | 71 | /* Exported types ------------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 72 | #if defined(USE_FULL_LL_DRIVER) |
Anna Bridge |
160:5571c4ff569f | 73 | /** @defgroup LPTIM_LL_ES_INIT LPTIM Exported Init structure |
Anna Bridge |
160:5571c4ff569f | 74 | * @{ |
Anna Bridge |
160:5571c4ff569f | 75 | */ |
Anna Bridge |
160:5571c4ff569f | 76 | |
Anna Bridge |
160:5571c4ff569f | 77 | /** |
Anna Bridge |
160:5571c4ff569f | 78 | * @brief LPTIM Init structure definition |
Anna Bridge |
160:5571c4ff569f | 79 | */ |
Anna Bridge |
160:5571c4ff569f | 80 | typedef struct |
Anna Bridge |
160:5571c4ff569f | 81 | { |
Anna Bridge |
160:5571c4ff569f | 82 | uint32_t ClockSource; /*!< Specifies the source of the clock used by the LPTIM instance. |
Anna Bridge |
160:5571c4ff569f | 83 | This parameter can be a value of @ref LPTIM_LL_EC_CLK_SOURCE. |
Anna Bridge |
160:5571c4ff569f | 84 | |
Anna Bridge |
160:5571c4ff569f | 85 | This feature can be modified afterwards using unitary function @ref LL_LPTIM_SetClockSource().*/ |
Anna Bridge |
160:5571c4ff569f | 86 | |
Anna Bridge |
160:5571c4ff569f | 87 | uint32_t Prescaler; /*!< Specifies the prescaler division ratio. |
Anna Bridge |
160:5571c4ff569f | 88 | This parameter can be a value of @ref LPTIM_LL_EC_PRESCALER. |
Anna Bridge |
160:5571c4ff569f | 89 | |
Anna Bridge |
160:5571c4ff569f | 90 | This feature can be modified afterwards using using unitary function @ref LL_LPTIM_SetPrescaler().*/ |
Anna Bridge |
160:5571c4ff569f | 91 | |
Anna Bridge |
160:5571c4ff569f | 92 | uint32_t Waveform; /*!< Specifies the waveform shape. |
Anna Bridge |
160:5571c4ff569f | 93 | This parameter can be a value of @ref LPTIM_LL_EC_OUTPUT_WAVEFORM. |
Anna Bridge |
160:5571c4ff569f | 94 | |
Anna Bridge |
160:5571c4ff569f | 95 | This feature can be modified afterwards using unitary function @ref LL_LPTIM_ConfigOutput().*/ |
Anna Bridge |
160:5571c4ff569f | 96 | |
Anna Bridge |
160:5571c4ff569f | 97 | uint32_t Polarity; /*!< Specifies waveform polarity. |
Anna Bridge |
160:5571c4ff569f | 98 | This parameter can be a value of @ref LPTIM_LL_EC_OUTPUT_POLARITY. |
Anna Bridge |
160:5571c4ff569f | 99 | |
Anna Bridge |
160:5571c4ff569f | 100 | This feature can be modified afterwards using unitary function @ref LL_LPTIM_ConfigOutput().*/ |
Anna Bridge |
160:5571c4ff569f | 101 | } LL_LPTIM_InitTypeDef; |
Anna Bridge |
160:5571c4ff569f | 102 | |
Anna Bridge |
160:5571c4ff569f | 103 | /** |
Anna Bridge |
160:5571c4ff569f | 104 | * @} |
Anna Bridge |
160:5571c4ff569f | 105 | */ |
Anna Bridge |
160:5571c4ff569f | 106 | #endif /* USE_FULL_LL_DRIVER */ |
Anna Bridge |
160:5571c4ff569f | 107 | |
Anna Bridge |
160:5571c4ff569f | 108 | /* Exported constants --------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 109 | /** @defgroup LPTIM_LL_Exported_Constants LPTIM Exported Constants |
Anna Bridge |
160:5571c4ff569f | 110 | * @{ |
Anna Bridge |
160:5571c4ff569f | 111 | */ |
Anna Bridge |
160:5571c4ff569f | 112 | |
Anna Bridge |
160:5571c4ff569f | 113 | /** @defgroup LPTIM_LL_EC_GET_FLAG Get Flags Defines |
Anna Bridge |
160:5571c4ff569f | 114 | * @brief Flags defines which can be used with LL_LPTIM_ReadReg function |
Anna Bridge |
160:5571c4ff569f | 115 | * @{ |
Anna Bridge |
160:5571c4ff569f | 116 | */ |
Anna Bridge |
160:5571c4ff569f | 117 | #define LL_LPTIM_ISR_CMPM LPTIM_ISR_CMPM /*!< Compare match */ |
Anna Bridge |
160:5571c4ff569f | 118 | #define LL_LPTIM_ISR_ARRM LPTIM_ISR_ARRM /*!< Autoreload match */ |
Anna Bridge |
160:5571c4ff569f | 119 | #define LL_LPTIM_ISR_EXTTRIG LPTIM_ISR_EXTTRIG /*!< External trigger edge event */ |
Anna Bridge |
160:5571c4ff569f | 120 | #define LL_LPTIM_ISR_CMPOK LPTIM_ISR_CMPOK /*!< Compare register update OK */ |
Anna Bridge |
160:5571c4ff569f | 121 | #define LL_LPTIM_ISR_ARROK LPTIM_ISR_ARROK /*!< Autoreload register update OK */ |
Anna Bridge |
160:5571c4ff569f | 122 | #define LL_LPTIM_ISR_UP LPTIM_ISR_UP /*!< Counter direction change down to up */ |
Anna Bridge |
160:5571c4ff569f | 123 | #define LL_LPTIM_ISR_DOWN LPTIM_ISR_DOWN /*!< Counter direction change up to down */ |
Anna Bridge |
160:5571c4ff569f | 124 | /** |
Anna Bridge |
160:5571c4ff569f | 125 | * @} |
Anna Bridge |
160:5571c4ff569f | 126 | */ |
Anna Bridge |
160:5571c4ff569f | 127 | |
Anna Bridge |
160:5571c4ff569f | 128 | /** @defgroup LPTIM_LL_EC_IT IT Defines |
Anna Bridge |
160:5571c4ff569f | 129 | * @brief IT defines which can be used with LL_LPTIM_ReadReg and LL_LPTIM_WriteReg functions |
Anna Bridge |
160:5571c4ff569f | 130 | * @{ |
Anna Bridge |
160:5571c4ff569f | 131 | */ |
Anna Bridge |
160:5571c4ff569f | 132 | #define LL_LPTIM_IER_CMPMIE LPTIM_IER_CMPMIE /*!< Compare match Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 133 | #define LL_LPTIM_IER_ARRMIE LPTIM_IER_ARRMIE /*!< Autoreload match Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 134 | #define LL_LPTIM_IER_EXTTRIGIE LPTIM_IER_EXTTRIGIE /*!< External trigger valid edge Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 135 | #define LL_LPTIM_IER_CMPOKIE LPTIM_IER_CMPOKIE /*!< Compare register update OK Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 136 | #define LL_LPTIM_IER_ARROKIE LPTIM_IER_ARROKIE /*!< Autoreload register update OK Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 137 | #define LL_LPTIM_IER_UPIE LPTIM_IER_UPIE /*!< Direction change to UP Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 138 | #define LL_LPTIM_IER_DOWNIE LPTIM_IER_DOWNIE /*!< Direction change to down Interrupt Enable */ |
Anna Bridge |
160:5571c4ff569f | 139 | /** |
Anna Bridge |
160:5571c4ff569f | 140 | * @} |
Anna Bridge |
160:5571c4ff569f | 141 | */ |
Anna Bridge |
160:5571c4ff569f | 142 | |
Anna Bridge |
160:5571c4ff569f | 143 | /** @defgroup LPTIM_LL_EC_OPERATING_MODE Operating Mode |
Anna Bridge |
160:5571c4ff569f | 144 | * @{ |
Anna Bridge |
160:5571c4ff569f | 145 | */ |
Anna Bridge |
160:5571c4ff569f | 146 | #define LL_LPTIM_OPERATING_MODE_CONTINUOUS LPTIM_CR_CNTSTRT /*!<LP Timer starts in continuous mode*/ |
Anna Bridge |
160:5571c4ff569f | 147 | #define LL_LPTIM_OPERATING_MODE_ONESHOT LPTIM_CR_SNGSTRT /*!<LP Tilmer starts in single mode*/ |
Anna Bridge |
160:5571c4ff569f | 148 | /** |
Anna Bridge |
160:5571c4ff569f | 149 | * @} |
Anna Bridge |
160:5571c4ff569f | 150 | */ |
Anna Bridge |
160:5571c4ff569f | 151 | |
Anna Bridge |
160:5571c4ff569f | 152 | /** @defgroup LPTIM_LL_EC_UPDATE_MODE Update Mode |
Anna Bridge |
160:5571c4ff569f | 153 | * @{ |
Anna Bridge |
160:5571c4ff569f | 154 | */ |
Anna Bridge |
160:5571c4ff569f | 155 | #define LL_LPTIM_UPDATE_MODE_IMMEDIATE 0x00000000U /*!<Preload is disabled: registers are updated after each APB bus write access*/ |
Anna Bridge |
160:5571c4ff569f | 156 | #define LL_LPTIM_UPDATE_MODE_ENDOFPERIOD LPTIM_CFGR_PRELOAD /*!<preload is enabled: registers are updated at the end of the current LPTIM period*/ |
Anna Bridge |
160:5571c4ff569f | 157 | /** |
Anna Bridge |
160:5571c4ff569f | 158 | * @} |
Anna Bridge |
160:5571c4ff569f | 159 | */ |
Anna Bridge |
160:5571c4ff569f | 160 | |
Anna Bridge |
160:5571c4ff569f | 161 | /** @defgroup LPTIM_LL_EC_COUNTER_MODE Counter Mode |
Anna Bridge |
160:5571c4ff569f | 162 | * @{ |
Anna Bridge |
160:5571c4ff569f | 163 | */ |
Anna Bridge |
160:5571c4ff569f | 164 | #define LL_LPTIM_COUNTER_MODE_INTERNAL 0x00000000U /*!<The counter is incremented following each internal clock pulse*/ |
Anna Bridge |
160:5571c4ff569f | 165 | #define LL_LPTIM_COUNTER_MODE_EXTERNAL LPTIM_CFGR_COUNTMODE /*!<The counter is incremented following each valid clock pulse on the LPTIM external Input1*/ |
Anna Bridge |
160:5571c4ff569f | 166 | /** |
Anna Bridge |
160:5571c4ff569f | 167 | * @} |
Anna Bridge |
160:5571c4ff569f | 168 | */ |
Anna Bridge |
160:5571c4ff569f | 169 | |
Anna Bridge |
160:5571c4ff569f | 170 | /** @defgroup LPTIM_LL_EC_OUTPUT_WAVEFORM Output Waveform Type |
Anna Bridge |
160:5571c4ff569f | 171 | * @{ |
Anna Bridge |
160:5571c4ff569f | 172 | */ |
Anna Bridge |
160:5571c4ff569f | 173 | #define LL_LPTIM_OUTPUT_WAVEFORM_PWM 0x00000000U /*!<LPTIM generates either a PWM waveform or a One pulse waveform depending on chosen operating mode CONTINOUS or SINGLE*/ |
Anna Bridge |
160:5571c4ff569f | 174 | #define LL_LPTIM_OUTPUT_WAVEFORM_SETONCE LPTIM_CFGR_WAVE /*!<LPTIM generates a Set Once waveform*/ |
Anna Bridge |
160:5571c4ff569f | 175 | /** |
Anna Bridge |
160:5571c4ff569f | 176 | * @} |
Anna Bridge |
160:5571c4ff569f | 177 | */ |
Anna Bridge |
160:5571c4ff569f | 178 | |
Anna Bridge |
160:5571c4ff569f | 179 | /** @defgroup LPTIM_LL_EC_OUTPUT_POLARITY Output Polarity |
Anna Bridge |
160:5571c4ff569f | 180 | * @{ |
Anna Bridge |
160:5571c4ff569f | 181 | */ |
Anna Bridge |
160:5571c4ff569f | 182 | #define LL_LPTIM_OUTPUT_POLARITY_REGULAR 0x00000000U /*!<The LPTIM output reflects the compare results between LPTIMx_ARR and LPTIMx_CMP registers*/ |
Anna Bridge |
160:5571c4ff569f | 183 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 184 | /** |
Anna Bridge |
160:5571c4ff569f | 185 | * @} |
Anna Bridge |
160:5571c4ff569f | 186 | */ |
Anna Bridge |
160:5571c4ff569f | 187 | |
Anna Bridge |
160:5571c4ff569f | 188 | /** @defgroup LPTIM_LL_EC_PRESCALER Prescaler Value |
Anna Bridge |
160:5571c4ff569f | 189 | * @{ |
Anna Bridge |
160:5571c4ff569f | 190 | */ |
Anna Bridge |
160:5571c4ff569f | 191 | #define LL_LPTIM_PRESCALER_DIV1 0x00000000U /*!<Prescaler division factor is set to 1*/ |
Anna Bridge |
160:5571c4ff569f | 192 | #define LL_LPTIM_PRESCALER_DIV2 LPTIM_CFGR_PRESC_0 /*!<Prescaler division factor is set to 2*/ |
Anna Bridge |
160:5571c4ff569f | 193 | #define LL_LPTIM_PRESCALER_DIV4 LPTIM_CFGR_PRESC_1 /*!<Prescaler division factor is set to 4*/ |
Anna Bridge |
160:5571c4ff569f | 194 | #define LL_LPTIM_PRESCALER_DIV8 (LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_0) /*!<Prescaler division factor is set to 8*/ |
Anna Bridge |
160:5571c4ff569f | 195 | #define LL_LPTIM_PRESCALER_DIV16 LPTIM_CFGR_PRESC_2 /*!<Prescaler division factor is set to 16*/ |
Anna Bridge |
160:5571c4ff569f | 196 | #define LL_LPTIM_PRESCALER_DIV32 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_0) /*!<Prescaler division factor is set to 32*/ |
Anna Bridge |
160:5571c4ff569f | 197 | #define LL_LPTIM_PRESCALER_DIV64 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_1) /*!<Prescaler division factor is set to 64*/ |
Anna Bridge |
160:5571c4ff569f | 198 | #define LL_LPTIM_PRESCALER_DIV128 LPTIM_CFGR_PRESC /*!<Prescaler division factor is set to 128*/ |
Anna Bridge |
160:5571c4ff569f | 199 | /** |
Anna Bridge |
160:5571c4ff569f | 200 | * @} |
Anna Bridge |
160:5571c4ff569f | 201 | */ |
Anna Bridge |
160:5571c4ff569f | 202 | |
Anna Bridge |
160:5571c4ff569f | 203 | /** @defgroup LPTIM_LL_EC_TRIG_SOURCE Trigger Source |
Anna Bridge |
160:5571c4ff569f | 204 | * @{ |
Anna Bridge |
160:5571c4ff569f | 205 | */ |
Anna Bridge |
160:5571c4ff569f | 206 | #define LL_LPTIM_TRIG_SOURCE_GPIO 0x00000000U /*!<External input trigger is connected to TIMx_ETR input*/ |
Anna Bridge |
160:5571c4ff569f | 207 | #define LL_LPTIM_TRIG_SOURCE_RTCALARMA LPTIM_CFGR_TRIGSEL_0 /*!<External input trigger is connected to RTC Alarm A*/ |
Anna Bridge |
160:5571c4ff569f | 208 | #define LL_LPTIM_TRIG_SOURCE_RTCALARMB LPTIM_CFGR_TRIGSEL_1 /*!<External input trigger is connected to RTC Alarm B*/ |
Anna Bridge |
160:5571c4ff569f | 209 | #define LL_LPTIM_TRIG_SOURCE_RTCTAMP1 (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0) /*!<External input trigger is connected to RTC Tamper 1*/ |
Anna Bridge |
160:5571c4ff569f | 210 | #define LL_LPTIM_TRIG_SOURCE_TIM1_TRGO LPTIM_CFGR_TRIGSEL_2 /*!<External input trigger is connected to TIM1*/ |
Anna Bridge |
160:5571c4ff569f | 211 | #define LL_LPTIM_TRIG_SOURCE_TIM5_TRGO (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0) /*!<External input trigger is connected to TIM5*/ |
Anna Bridge |
160:5571c4ff569f | 212 | /** |
Anna Bridge |
160:5571c4ff569f | 213 | * @} |
Anna Bridge |
160:5571c4ff569f | 214 | */ |
Anna Bridge |
160:5571c4ff569f | 215 | |
Anna Bridge |
160:5571c4ff569f | 216 | /** @defgroup LPTIM_LL_EC_TRIG_FILTER Trigger Filter |
Anna Bridge |
160:5571c4ff569f | 217 | * @{ |
Anna Bridge |
160:5571c4ff569f | 218 | */ |
Anna Bridge |
160:5571c4ff569f | 219 | #define LL_LPTIM_TRIG_FILTER_NONE 0x00000000U /*!<Any trigger active level change is considered as a valid trigger*/ |
Anna Bridge |
160:5571c4ff569f | 220 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 221 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 222 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 223 | /** |
Anna Bridge |
160:5571c4ff569f | 224 | * @} |
Anna Bridge |
160:5571c4ff569f | 225 | */ |
Anna Bridge |
160:5571c4ff569f | 226 | |
Anna Bridge |
160:5571c4ff569f | 227 | /** @defgroup LPTIM_LL_EC_TRIG_POLARITY Trigger Polarity |
Anna Bridge |
160:5571c4ff569f | 228 | * @{ |
Anna Bridge |
160:5571c4ff569f | 229 | */ |
Anna Bridge |
160:5571c4ff569f | 230 | #define LL_LPTIM_TRIG_POLARITY_RISING LPTIM_CFGR_TRIGEN_0 /*!<LPTIM counter starts when a rising edge is detected*/ |
Anna Bridge |
160:5571c4ff569f | 231 | #define LL_LPTIM_TRIG_POLARITY_FALLING LPTIM_CFGR_TRIGEN_1 /*!<LPTIM counter starts when a falling edge is detected*/ |
Anna Bridge |
160:5571c4ff569f | 232 | #define LL_LPTIM_TRIG_POLARITY_RISING_FALLING LPTIM_CFGR_TRIGEN /*!<LPTIM counter starts when a rising or a falling edge is detected*/ |
Anna Bridge |
160:5571c4ff569f | 233 | /** |
Anna Bridge |
160:5571c4ff569f | 234 | * @} |
Anna Bridge |
160:5571c4ff569f | 235 | */ |
Anna Bridge |
160:5571c4ff569f | 236 | |
Anna Bridge |
160:5571c4ff569f | 237 | /** @defgroup LPTIM_LL_EC_CLK_SOURCE Clock Source |
Anna Bridge |
160:5571c4ff569f | 238 | * @{ |
Anna Bridge |
160:5571c4ff569f | 239 | */ |
Anna Bridge |
160:5571c4ff569f | 240 | #define LL_LPTIM_CLK_SOURCE_INTERNAL 0x00000000U /*!<LPTIM is clocked by internal clock source (APB clock or any of the embedded oscillators)*/ |
Anna Bridge |
160:5571c4ff569f | 241 | #define LL_LPTIM_CLK_SOURCE_EXTERNAL LPTIM_CFGR_CKSEL /*!<LPTIM is clocked by an external clock source through the LPTIM external Input1*/ |
Anna Bridge |
160:5571c4ff569f | 242 | /** |
Anna Bridge |
160:5571c4ff569f | 243 | * @} |
Anna Bridge |
160:5571c4ff569f | 244 | */ |
Anna Bridge |
160:5571c4ff569f | 245 | |
Anna Bridge |
160:5571c4ff569f | 246 | /** @defgroup LPTIM_LL_EC_CLK_FILTER Clock Filter |
Anna Bridge |
160:5571c4ff569f | 247 | * @{ |
Anna Bridge |
160:5571c4ff569f | 248 | */ |
Anna Bridge |
160:5571c4ff569f | 249 | #define LL_LPTIM_CLK_FILTER_NONE 0x00000000U /*!<Any external clock signal level change is considered as a valid transition*/ |
Anna Bridge |
160:5571c4ff569f | 250 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 251 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 252 | #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*/ |
Anna Bridge |
160:5571c4ff569f | 253 | /** |
Anna Bridge |
160:5571c4ff569f | 254 | * @} |
Anna Bridge |
160:5571c4ff569f | 255 | */ |
Anna Bridge |
160:5571c4ff569f | 256 | |
Anna Bridge |
160:5571c4ff569f | 257 | /** @defgroup LPTIM_LL_EC_CLK_POLARITY Clock Polarity |
Anna Bridge |
160:5571c4ff569f | 258 | * @{ |
Anna Bridge |
160:5571c4ff569f | 259 | */ |
Anna Bridge |
160:5571c4ff569f | 260 | #define LL_LPTIM_CLK_POLARITY_RISING 0x00000000U /*!< The rising edge is the active edge used for counting*/ |
Anna Bridge |
160:5571c4ff569f | 261 | #define LL_LPTIM_CLK_POLARITY_FALLING LPTIM_CFGR_CKPOL_0 /*!< The falling edge is the active edge used for counting*/ |
Anna Bridge |
160:5571c4ff569f | 262 | #define LL_LPTIM_CLK_POLARITY_RISING_FALLING LPTIM_CFGR_CKPOL_1 /*!< Both edges are active edges*/ |
Anna Bridge |
160:5571c4ff569f | 263 | /** |
Anna Bridge |
160:5571c4ff569f | 264 | * @} |
Anna Bridge |
160:5571c4ff569f | 265 | */ |
Anna Bridge |
160:5571c4ff569f | 266 | |
Anna Bridge |
160:5571c4ff569f | 267 | /** @defgroup LPTIM_LL_EC_ENCODER_MODE Encoder Mode |
Anna Bridge |
160:5571c4ff569f | 268 | * @{ |
Anna Bridge |
160:5571c4ff569f | 269 | */ |
Anna Bridge |
160:5571c4ff569f | 270 | #define LL_LPTIM_ENCODER_MODE_RISING 0x00000000U /*!< The rising edge is the active edge used for counting*/ |
Anna Bridge |
160:5571c4ff569f | 271 | #define LL_LPTIM_ENCODER_MODE_FALLING LPTIM_CFGR_CKPOL_0 /*!< The falling edge is the active edge used for counting*/ |
Anna Bridge |
160:5571c4ff569f | 272 | #define LL_LPTIM_ENCODER_MODE_RISING_FALLING LPTIM_CFGR_CKPOL_1 /*!< Both edges are active edges*/ |
Anna Bridge |
160:5571c4ff569f | 273 | /** |
Anna Bridge |
160:5571c4ff569f | 274 | * @} |
Anna Bridge |
160:5571c4ff569f | 275 | */ |
Anna Bridge |
160:5571c4ff569f | 276 | |
Anna Bridge |
160:5571c4ff569f | 277 | |
Anna Bridge |
160:5571c4ff569f | 278 | /** |
Anna Bridge |
160:5571c4ff569f | 279 | * @} |
Anna Bridge |
160:5571c4ff569f | 280 | */ |
Anna Bridge |
160:5571c4ff569f | 281 | |
Anna Bridge |
160:5571c4ff569f | 282 | /* Exported macro ------------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 283 | /** @defgroup LPTIM_LL_Exported_Macros LPTIM Exported Macros |
Anna Bridge |
160:5571c4ff569f | 284 | * @{ |
Anna Bridge |
160:5571c4ff569f | 285 | */ |
Anna Bridge |
160:5571c4ff569f | 286 | |
Anna Bridge |
160:5571c4ff569f | 287 | /** @defgroup LPTIM_LL_EM_WRITE_READ Common Write and read registers Macros |
Anna Bridge |
160:5571c4ff569f | 288 | * @{ |
Anna Bridge |
160:5571c4ff569f | 289 | */ |
Anna Bridge |
160:5571c4ff569f | 290 | |
Anna Bridge |
160:5571c4ff569f | 291 | /** |
Anna Bridge |
160:5571c4ff569f | 292 | * @brief Write a value in LPTIM register |
Anna Bridge |
160:5571c4ff569f | 293 | * @param __INSTANCE__ LPTIM Instance |
Anna Bridge |
160:5571c4ff569f | 294 | * @param __REG__ Register to be written |
Anna Bridge |
160:5571c4ff569f | 295 | * @param __VALUE__ Value to be written in the register |
Anna Bridge |
160:5571c4ff569f | 296 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 297 | */ |
Anna Bridge |
160:5571c4ff569f | 298 | #define LL_LPTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) |
Anna Bridge |
160:5571c4ff569f | 299 | |
Anna Bridge |
160:5571c4ff569f | 300 | /** |
Anna Bridge |
160:5571c4ff569f | 301 | * @brief Read a value in LPTIM register |
Anna Bridge |
160:5571c4ff569f | 302 | * @param __INSTANCE__ LPTIM Instance |
Anna Bridge |
160:5571c4ff569f | 303 | * @param __REG__ Register to be read |
Anna Bridge |
160:5571c4ff569f | 304 | * @retval Register value |
Anna Bridge |
160:5571c4ff569f | 305 | */ |
Anna Bridge |
160:5571c4ff569f | 306 | #define LL_LPTIM_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) |
Anna Bridge |
160:5571c4ff569f | 307 | /** |
Anna Bridge |
160:5571c4ff569f | 308 | * @} |
Anna Bridge |
160:5571c4ff569f | 309 | */ |
Anna Bridge |
160:5571c4ff569f | 310 | |
Anna Bridge |
160:5571c4ff569f | 311 | /** |
Anna Bridge |
160:5571c4ff569f | 312 | * @} |
Anna Bridge |
160:5571c4ff569f | 313 | */ |
Anna Bridge |
160:5571c4ff569f | 314 | |
Anna Bridge |
160:5571c4ff569f | 315 | |
Anna Bridge |
160:5571c4ff569f | 316 | /* Exported functions --------------------------------------------------------*/ |
Anna Bridge |
160:5571c4ff569f | 317 | /** @defgroup LPTIM_LL_Exported_Functions LPTIM Exported Functions |
Anna Bridge |
160:5571c4ff569f | 318 | * @{ |
Anna Bridge |
160:5571c4ff569f | 319 | */ |
Anna Bridge |
160:5571c4ff569f | 320 | |
Anna Bridge |
160:5571c4ff569f | 321 | /** @defgroup LPTIM_LL_EF_LPTIM_Configuration LPTIM Configuration |
Anna Bridge |
160:5571c4ff569f | 322 | * @{ |
Anna Bridge |
160:5571c4ff569f | 323 | */ |
Anna Bridge |
160:5571c4ff569f | 324 | |
Anna Bridge |
160:5571c4ff569f | 325 | /** |
Anna Bridge |
160:5571c4ff569f | 326 | * @brief Enable the LPTIM instance |
Anna Bridge |
160:5571c4ff569f | 327 | * @note After setting the ENABLE bit, a delay of two counter clock is needed |
Anna Bridge |
160:5571c4ff569f | 328 | * before the LPTIM instance is actually enabled. |
Anna Bridge |
160:5571c4ff569f | 329 | * @rmtoll CR ENABLE LL_LPTIM_Enable |
Anna Bridge |
160:5571c4ff569f | 330 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 331 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 332 | */ |
Anna Bridge |
160:5571c4ff569f | 333 | __STATIC_INLINE void LL_LPTIM_Enable(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 334 | { |
Anna Bridge |
160:5571c4ff569f | 335 | SET_BIT(LPTIMx->CR, LPTIM_CR_ENABLE); |
Anna Bridge |
160:5571c4ff569f | 336 | } |
Anna Bridge |
160:5571c4ff569f | 337 | |
Anna Bridge |
160:5571c4ff569f | 338 | /** |
Anna Bridge |
160:5571c4ff569f | 339 | * @brief Disable the LPTIM instance |
Anna Bridge |
160:5571c4ff569f | 340 | * @rmtoll CR ENABLE LL_LPTIM_Disable |
Anna Bridge |
160:5571c4ff569f | 341 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 342 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 343 | */ |
Anna Bridge |
160:5571c4ff569f | 344 | __STATIC_INLINE void LL_LPTIM_Disable(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 345 | { |
Anna Bridge |
160:5571c4ff569f | 346 | CLEAR_BIT(LPTIMx->CR, LPTIM_CR_ENABLE); |
Anna Bridge |
160:5571c4ff569f | 347 | } |
Anna Bridge |
160:5571c4ff569f | 348 | |
Anna Bridge |
160:5571c4ff569f | 349 | /** |
Anna Bridge |
160:5571c4ff569f | 350 | * @brief Indicates whether the LPTIM instance is enabled. |
Anna Bridge |
160:5571c4ff569f | 351 | * @rmtoll CR ENABLE LL_LPTIM_IsEnabled |
Anna Bridge |
160:5571c4ff569f | 352 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 353 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 354 | */ |
Anna Bridge |
160:5571c4ff569f | 355 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabled(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 356 | { |
Anna Bridge |
160:5571c4ff569f | 357 | return (READ_BIT(LPTIMx->CR, LPTIM_CR_ENABLE) == (LPTIM_CR_ENABLE)); |
Anna Bridge |
160:5571c4ff569f | 358 | } |
Anna Bridge |
160:5571c4ff569f | 359 | |
Anna Bridge |
160:5571c4ff569f | 360 | /** |
Anna Bridge |
160:5571c4ff569f | 361 | * @brief Starts the LPTIM counter in the desired mode. |
Anna Bridge |
160:5571c4ff569f | 362 | * @note LPTIM instance must be enabled before starting the counter. |
Anna Bridge |
160:5571c4ff569f | 363 | * @note It is possible to change on the fly from One Shot mode to |
Anna Bridge |
160:5571c4ff569f | 364 | * Continuous mode. |
Anna Bridge |
160:5571c4ff569f | 365 | * @rmtoll CR CNTSTRT LL_LPTIM_StartCounter\n |
Anna Bridge |
160:5571c4ff569f | 366 | * CR SNGSTRT LL_LPTIM_StartCounter |
Anna Bridge |
160:5571c4ff569f | 367 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 368 | * @param OperatingMode This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 369 | * @arg @ref LL_LPTIM_OPERATING_MODE_CONTINUOUS |
Anna Bridge |
160:5571c4ff569f | 370 | * @arg @ref LL_LPTIM_OPERATING_MODE_ONESHOT |
Anna Bridge |
160:5571c4ff569f | 371 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 372 | */ |
Anna Bridge |
160:5571c4ff569f | 373 | __STATIC_INLINE void LL_LPTIM_StartCounter(LPTIM_TypeDef *LPTIMx, uint32_t OperatingMode) |
Anna Bridge |
160:5571c4ff569f | 374 | { |
Anna Bridge |
160:5571c4ff569f | 375 | MODIFY_REG(LPTIMx->CR, LPTIM_CR_CNTSTRT | LPTIM_CR_SNGSTRT, OperatingMode); |
Anna Bridge |
160:5571c4ff569f | 376 | } |
Anna Bridge |
160:5571c4ff569f | 377 | |
Anna Bridge |
160:5571c4ff569f | 378 | |
Anna Bridge |
160:5571c4ff569f | 379 | /** |
Anna Bridge |
160:5571c4ff569f | 380 | * @brief Set the LPTIM registers update mode (enable/disable register preload) |
Anna Bridge |
160:5571c4ff569f | 381 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 382 | * @rmtoll CFGR PRELOAD LL_LPTIM_SetUpdateMode |
Anna Bridge |
160:5571c4ff569f | 383 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 384 | * @param UpdateMode This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 385 | * @arg @ref LL_LPTIM_UPDATE_MODE_IMMEDIATE |
Anna Bridge |
160:5571c4ff569f | 386 | * @arg @ref LL_LPTIM_UPDATE_MODE_ENDOFPERIOD |
Anna Bridge |
160:5571c4ff569f | 387 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 388 | */ |
Anna Bridge |
160:5571c4ff569f | 389 | __STATIC_INLINE void LL_LPTIM_SetUpdateMode(LPTIM_TypeDef *LPTIMx, uint32_t UpdateMode) |
Anna Bridge |
160:5571c4ff569f | 390 | { |
Anna Bridge |
160:5571c4ff569f | 391 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD, UpdateMode); |
Anna Bridge |
160:5571c4ff569f | 392 | } |
Anna Bridge |
160:5571c4ff569f | 393 | |
Anna Bridge |
160:5571c4ff569f | 394 | /** |
Anna Bridge |
160:5571c4ff569f | 395 | * @brief Get the LPTIM registers update mode |
Anna Bridge |
160:5571c4ff569f | 396 | * @rmtoll CFGR PRELOAD LL_LPTIM_GetUpdateMode |
Anna Bridge |
160:5571c4ff569f | 397 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 398 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 399 | * @arg @ref LL_LPTIM_UPDATE_MODE_IMMEDIATE |
Anna Bridge |
160:5571c4ff569f | 400 | * @arg @ref LL_LPTIM_UPDATE_MODE_ENDOFPERIOD |
Anna Bridge |
160:5571c4ff569f | 401 | */ |
Anna Bridge |
160:5571c4ff569f | 402 | __STATIC_INLINE uint32_t LL_LPTIM_GetUpdateMode(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 403 | { |
Anna Bridge |
160:5571c4ff569f | 404 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD)); |
Anna Bridge |
160:5571c4ff569f | 405 | } |
Anna Bridge |
160:5571c4ff569f | 406 | |
Anna Bridge |
160:5571c4ff569f | 407 | /** |
Anna Bridge |
160:5571c4ff569f | 408 | * @brief Set the auto reload value |
Anna Bridge |
160:5571c4ff569f | 409 | * @note The LPTIMx_ARR register content must only be modified when the LPTIM is enabled |
Anna Bridge |
160:5571c4ff569f | 410 | * @note After a write to the LPTIMx_ARR register a new write operation to the |
Anna Bridge |
160:5571c4ff569f | 411 | * same register can only be performed when the previous write operation |
Anna Bridge |
160:5571c4ff569f | 412 | * is completed. Any successive write before the ARROK flag be set, will |
Anna Bridge |
160:5571c4ff569f | 413 | * lead to unpredictable results. |
Anna Bridge |
160:5571c4ff569f | 414 | * @note autoreload value be strictly greater than the compare value. |
Anna Bridge |
160:5571c4ff569f | 415 | * @rmtoll ARR ARR LL_LPTIM_SetAutoReload |
Anna Bridge |
160:5571c4ff569f | 416 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 417 | * @param AutoReload Value between Min_Data=0x00 and Max_Data=0xFFFF |
Anna Bridge |
160:5571c4ff569f | 418 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 419 | */ |
Anna Bridge |
160:5571c4ff569f | 420 | __STATIC_INLINE void LL_LPTIM_SetAutoReload(LPTIM_TypeDef *LPTIMx, uint32_t AutoReload) |
Anna Bridge |
160:5571c4ff569f | 421 | { |
Anna Bridge |
160:5571c4ff569f | 422 | MODIFY_REG(LPTIMx->ARR, LPTIM_ARR_ARR, AutoReload); |
Anna Bridge |
160:5571c4ff569f | 423 | } |
Anna Bridge |
160:5571c4ff569f | 424 | |
Anna Bridge |
160:5571c4ff569f | 425 | /** |
Anna Bridge |
160:5571c4ff569f | 426 | * @brief Get actual auto reload value |
Anna Bridge |
160:5571c4ff569f | 427 | * @rmtoll ARR ARR LL_LPTIM_GetAutoReload |
Anna Bridge |
160:5571c4ff569f | 428 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 429 | * @retval AutoReload Value between Min_Data=0x00 and Max_Data=0xFFFF |
Anna Bridge |
160:5571c4ff569f | 430 | */ |
Anna Bridge |
160:5571c4ff569f | 431 | __STATIC_INLINE uint32_t LL_LPTIM_GetAutoReload(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 432 | { |
Anna Bridge |
160:5571c4ff569f | 433 | return (uint32_t)(READ_BIT(LPTIMx->ARR, LPTIM_ARR_ARR)); |
Anna Bridge |
160:5571c4ff569f | 434 | } |
Anna Bridge |
160:5571c4ff569f | 435 | |
Anna Bridge |
160:5571c4ff569f | 436 | /** |
Anna Bridge |
160:5571c4ff569f | 437 | * @brief Set the compare value |
Anna Bridge |
160:5571c4ff569f | 438 | * @note After a write to the LPTIMx_CMP register a new write operation to the |
Anna Bridge |
160:5571c4ff569f | 439 | * same register can only be performed when the previous write operation |
Anna Bridge |
160:5571c4ff569f | 440 | * is completed. Any successive write before the CMPOK flag be set, will |
Anna Bridge |
160:5571c4ff569f | 441 | * lead to unpredictable results. |
Anna Bridge |
160:5571c4ff569f | 442 | * @rmtoll CMP CMP LL_LPTIM_SetCompare |
Anna Bridge |
160:5571c4ff569f | 443 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 444 | * @param CompareValue Value between Min_Data=0x00 and Max_Data=0xFFFF |
Anna Bridge |
160:5571c4ff569f | 445 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 446 | */ |
Anna Bridge |
160:5571c4ff569f | 447 | __STATIC_INLINE void LL_LPTIM_SetCompare(LPTIM_TypeDef *LPTIMx, uint32_t CompareValue) |
Anna Bridge |
160:5571c4ff569f | 448 | { |
Anna Bridge |
160:5571c4ff569f | 449 | MODIFY_REG(LPTIMx->CMP, LPTIM_CMP_CMP, CompareValue); |
Anna Bridge |
160:5571c4ff569f | 450 | } |
Anna Bridge |
160:5571c4ff569f | 451 | |
Anna Bridge |
160:5571c4ff569f | 452 | /** |
Anna Bridge |
160:5571c4ff569f | 453 | * @brief Get actual compare value |
Anna Bridge |
160:5571c4ff569f | 454 | * @rmtoll CMP CMP LL_LPTIM_GetCompare |
Anna Bridge |
160:5571c4ff569f | 455 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 456 | * @retval CompareValue Value between Min_Data=0x00 and Max_Data=0xFFFF |
Anna Bridge |
160:5571c4ff569f | 457 | */ |
Anna Bridge |
160:5571c4ff569f | 458 | __STATIC_INLINE uint32_t LL_LPTIM_GetCompare(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 459 | { |
Anna Bridge |
160:5571c4ff569f | 460 | return (uint32_t)(READ_BIT(LPTIMx->CMP, LPTIM_CMP_CMP)); |
Anna Bridge |
160:5571c4ff569f | 461 | } |
Anna Bridge |
160:5571c4ff569f | 462 | |
Anna Bridge |
160:5571c4ff569f | 463 | /** |
Anna Bridge |
160:5571c4ff569f | 464 | * @brief Get actual counter value |
Anna Bridge |
160:5571c4ff569f | 465 | * @note When the LPTIM instance is running with an asynchronous clock, reading |
Anna Bridge |
160:5571c4ff569f | 466 | * the LPTIMx_CNT register may return unreliable values. So in this case |
Anna Bridge |
160:5571c4ff569f | 467 | * it is necessary to perform two consecutive read accesses and verify |
Anna Bridge |
160:5571c4ff569f | 468 | * that the two returned values are identical. |
Anna Bridge |
160:5571c4ff569f | 469 | * @rmtoll CNT CNT LL_LPTIM_GetCounter |
Anna Bridge |
160:5571c4ff569f | 470 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 471 | * @retval Counter value |
Anna Bridge |
160:5571c4ff569f | 472 | */ |
Anna Bridge |
160:5571c4ff569f | 473 | __STATIC_INLINE uint32_t LL_LPTIM_GetCounter(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 474 | { |
Anna Bridge |
160:5571c4ff569f | 475 | return (uint32_t)(READ_BIT(LPTIMx->CNT, LPTIM_CNT_CNT)); |
Anna Bridge |
160:5571c4ff569f | 476 | } |
Anna Bridge |
160:5571c4ff569f | 477 | |
Anna Bridge |
160:5571c4ff569f | 478 | /** |
Anna Bridge |
160:5571c4ff569f | 479 | * @brief Set the counter mode (selection of the LPTIM counter clock source). |
Anna Bridge |
160:5571c4ff569f | 480 | * @note The counter mode can be set only when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 481 | * @rmtoll CFGR COUNTMODE LL_LPTIM_SetCounterMode |
Anna Bridge |
160:5571c4ff569f | 482 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 483 | * @param CounterMode This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 484 | * @arg @ref LL_LPTIM_COUNTER_MODE_INTERNAL |
Anna Bridge |
160:5571c4ff569f | 485 | * @arg @ref LL_LPTIM_COUNTER_MODE_EXTERNAL |
Anna Bridge |
160:5571c4ff569f | 486 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 487 | */ |
Anna Bridge |
160:5571c4ff569f | 488 | __STATIC_INLINE void LL_LPTIM_SetCounterMode(LPTIM_TypeDef *LPTIMx, uint32_t CounterMode) |
Anna Bridge |
160:5571c4ff569f | 489 | { |
Anna Bridge |
160:5571c4ff569f | 490 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE, CounterMode); |
Anna Bridge |
160:5571c4ff569f | 491 | } |
Anna Bridge |
160:5571c4ff569f | 492 | |
Anna Bridge |
160:5571c4ff569f | 493 | /** |
Anna Bridge |
160:5571c4ff569f | 494 | * @brief Get the counter mode |
Anna Bridge |
160:5571c4ff569f | 495 | * @rmtoll CFGR COUNTMODE LL_LPTIM_GetCounterMode |
Anna Bridge |
160:5571c4ff569f | 496 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 497 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 498 | * @arg @ref LL_LPTIM_COUNTER_MODE_INTERNAL |
Anna Bridge |
160:5571c4ff569f | 499 | * @arg @ref LL_LPTIM_COUNTER_MODE_EXTERNAL |
Anna Bridge |
160:5571c4ff569f | 500 | */ |
Anna Bridge |
160:5571c4ff569f | 501 | __STATIC_INLINE uint32_t LL_LPTIM_GetCounterMode(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 502 | { |
Anna Bridge |
160:5571c4ff569f | 503 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE)); |
Anna Bridge |
160:5571c4ff569f | 504 | } |
Anna Bridge |
160:5571c4ff569f | 505 | |
Anna Bridge |
160:5571c4ff569f | 506 | /** |
Anna Bridge |
160:5571c4ff569f | 507 | * @brief Configure the LPTIM instance output (LPTIMx_OUT) |
Anna Bridge |
160:5571c4ff569f | 508 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 509 | * @note Regarding the LPTIM output polarity the change takes effect |
Anna Bridge |
160:5571c4ff569f | 510 | * immediately, so the output default value will change immediately after |
Anna Bridge |
160:5571c4ff569f | 511 | * the polarity is re-configured, even before the timer is enabled. |
Anna Bridge |
160:5571c4ff569f | 512 | * @rmtoll CFGR WAVE LL_LPTIM_ConfigOutput\n |
Anna Bridge |
160:5571c4ff569f | 513 | * CFGR WAVPOL LL_LPTIM_ConfigOutput |
Anna Bridge |
160:5571c4ff569f | 514 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 515 | * @param Waveform This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 516 | * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_PWM |
Anna Bridge |
160:5571c4ff569f | 517 | * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_SETONCE |
Anna Bridge |
160:5571c4ff569f | 518 | * @param Polarity This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 519 | * @arg @ref LL_LPTIM_OUTPUT_POLARITY_REGULAR |
Anna Bridge |
160:5571c4ff569f | 520 | * @arg @ref LL_LPTIM_OUTPUT_POLARITY_INVERSE |
Anna Bridge |
160:5571c4ff569f | 521 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 522 | */ |
Anna Bridge |
160:5571c4ff569f | 523 | __STATIC_INLINE void LL_LPTIM_ConfigOutput(LPTIM_TypeDef *LPTIMx, uint32_t Waveform, uint32_t Polarity) |
Anna Bridge |
160:5571c4ff569f | 524 | { |
Anna Bridge |
160:5571c4ff569f | 525 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE | LPTIM_CFGR_WAVPOL, Waveform | Polarity); |
Anna Bridge |
160:5571c4ff569f | 526 | } |
Anna Bridge |
160:5571c4ff569f | 527 | |
Anna Bridge |
160:5571c4ff569f | 528 | /** |
Anna Bridge |
160:5571c4ff569f | 529 | * @brief Set waveform shape |
Anna Bridge |
160:5571c4ff569f | 530 | * @rmtoll CFGR WAVE LL_LPTIM_SetWaveform |
Anna Bridge |
160:5571c4ff569f | 531 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 532 | * @param Waveform This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 533 | * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_PWM |
Anna Bridge |
160:5571c4ff569f | 534 | * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_SETONCE |
Anna Bridge |
160:5571c4ff569f | 535 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 536 | */ |
Anna Bridge |
160:5571c4ff569f | 537 | __STATIC_INLINE void LL_LPTIM_SetWaveform(LPTIM_TypeDef *LPTIMx, uint32_t Waveform) |
Anna Bridge |
160:5571c4ff569f | 538 | { |
Anna Bridge |
160:5571c4ff569f | 539 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE, Waveform); |
Anna Bridge |
160:5571c4ff569f | 540 | } |
Anna Bridge |
160:5571c4ff569f | 541 | |
Anna Bridge |
160:5571c4ff569f | 542 | /** |
Anna Bridge |
160:5571c4ff569f | 543 | * @brief Get actual waveform shape |
Anna Bridge |
160:5571c4ff569f | 544 | * @rmtoll CFGR WAVE LL_LPTIM_GetWaveform |
Anna Bridge |
160:5571c4ff569f | 545 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 546 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 547 | * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_PWM |
Anna Bridge |
160:5571c4ff569f | 548 | * @arg @ref LL_LPTIM_OUTPUT_WAVEFORM_SETONCE |
Anna Bridge |
160:5571c4ff569f | 549 | */ |
Anna Bridge |
160:5571c4ff569f | 550 | __STATIC_INLINE uint32_t LL_LPTIM_GetWaveform(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 551 | { |
Anna Bridge |
160:5571c4ff569f | 552 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVE)); |
Anna Bridge |
160:5571c4ff569f | 553 | } |
Anna Bridge |
160:5571c4ff569f | 554 | |
Anna Bridge |
160:5571c4ff569f | 555 | /** |
Anna Bridge |
160:5571c4ff569f | 556 | * @brief Set output polarity |
Anna Bridge |
160:5571c4ff569f | 557 | * @rmtoll CFGR WAVPOL LL_LPTIM_SetPolarity |
Anna Bridge |
160:5571c4ff569f | 558 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 559 | * @param Polarity This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 560 | * @arg @ref LL_LPTIM_OUTPUT_POLARITY_REGULAR |
Anna Bridge |
160:5571c4ff569f | 561 | * @arg @ref LL_LPTIM_OUTPUT_POLARITY_INVERSE |
Anna Bridge |
160:5571c4ff569f | 562 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 563 | */ |
Anna Bridge |
160:5571c4ff569f | 564 | __STATIC_INLINE void LL_LPTIM_SetPolarity(LPTIM_TypeDef *LPTIMx, uint32_t Polarity) |
Anna Bridge |
160:5571c4ff569f | 565 | { |
Anna Bridge |
160:5571c4ff569f | 566 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL, Polarity); |
Anna Bridge |
160:5571c4ff569f | 567 | } |
Anna Bridge |
160:5571c4ff569f | 568 | |
Anna Bridge |
160:5571c4ff569f | 569 | /** |
Anna Bridge |
160:5571c4ff569f | 570 | * @brief Get actual output polarity |
Anna Bridge |
160:5571c4ff569f | 571 | * @rmtoll CFGR WAVPOL LL_LPTIM_GetPolarity |
Anna Bridge |
160:5571c4ff569f | 572 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 573 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 574 | * @arg @ref LL_LPTIM_OUTPUT_POLARITY_REGULAR |
Anna Bridge |
160:5571c4ff569f | 575 | * @arg @ref LL_LPTIM_OUTPUT_POLARITY_INVERSE |
Anna Bridge |
160:5571c4ff569f | 576 | */ |
Anna Bridge |
160:5571c4ff569f | 577 | __STATIC_INLINE uint32_t LL_LPTIM_GetPolarity(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 578 | { |
Anna Bridge |
160:5571c4ff569f | 579 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL)); |
Anna Bridge |
160:5571c4ff569f | 580 | } |
Anna Bridge |
160:5571c4ff569f | 581 | |
Anna Bridge |
160:5571c4ff569f | 582 | /** |
Anna Bridge |
160:5571c4ff569f | 583 | * @brief Set actual prescaler division ratio. |
Anna Bridge |
160:5571c4ff569f | 584 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 585 | * @note When the LPTIM is configured to be clocked by an internal clock source |
Anna Bridge |
160:5571c4ff569f | 586 | * and the LPTIM counter is configured to be updated by active edges |
Anna Bridge |
160:5571c4ff569f | 587 | * detected on the LPTIM external Input1, the internal clock provided to |
Anna Bridge |
160:5571c4ff569f | 588 | * the LPTIM must be not be prescaled. |
Anna Bridge |
160:5571c4ff569f | 589 | * @rmtoll CFGR PRESC LL_LPTIM_SetPrescaler |
Anna Bridge |
160:5571c4ff569f | 590 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 591 | * @param Prescaler This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 592 | * @arg @ref LL_LPTIM_PRESCALER_DIV1 |
Anna Bridge |
160:5571c4ff569f | 593 | * @arg @ref LL_LPTIM_PRESCALER_DIV2 |
Anna Bridge |
160:5571c4ff569f | 594 | * @arg @ref LL_LPTIM_PRESCALER_DIV4 |
Anna Bridge |
160:5571c4ff569f | 595 | * @arg @ref LL_LPTIM_PRESCALER_DIV8 |
Anna Bridge |
160:5571c4ff569f | 596 | * @arg @ref LL_LPTIM_PRESCALER_DIV16 |
Anna Bridge |
160:5571c4ff569f | 597 | * @arg @ref LL_LPTIM_PRESCALER_DIV32 |
Anna Bridge |
160:5571c4ff569f | 598 | * @arg @ref LL_LPTIM_PRESCALER_DIV64 |
Anna Bridge |
160:5571c4ff569f | 599 | * @arg @ref LL_LPTIM_PRESCALER_DIV128 |
Anna Bridge |
160:5571c4ff569f | 600 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 601 | */ |
Anna Bridge |
160:5571c4ff569f | 602 | __STATIC_INLINE void LL_LPTIM_SetPrescaler(LPTIM_TypeDef *LPTIMx, uint32_t Prescaler) |
Anna Bridge |
160:5571c4ff569f | 603 | { |
Anna Bridge |
160:5571c4ff569f | 604 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRESC, Prescaler); |
Anna Bridge |
160:5571c4ff569f | 605 | } |
Anna Bridge |
160:5571c4ff569f | 606 | |
Anna Bridge |
160:5571c4ff569f | 607 | /** |
Anna Bridge |
160:5571c4ff569f | 608 | * @brief Get actual prescaler division ratio. |
Anna Bridge |
160:5571c4ff569f | 609 | * @rmtoll CFGR PRESC LL_LPTIM_GetPrescaler |
Anna Bridge |
160:5571c4ff569f | 610 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 611 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 612 | * @arg @ref LL_LPTIM_PRESCALER_DIV1 |
Anna Bridge |
160:5571c4ff569f | 613 | * @arg @ref LL_LPTIM_PRESCALER_DIV2 |
Anna Bridge |
160:5571c4ff569f | 614 | * @arg @ref LL_LPTIM_PRESCALER_DIV4 |
Anna Bridge |
160:5571c4ff569f | 615 | * @arg @ref LL_LPTIM_PRESCALER_DIV8 |
Anna Bridge |
160:5571c4ff569f | 616 | * @arg @ref LL_LPTIM_PRESCALER_DIV16 |
Anna Bridge |
160:5571c4ff569f | 617 | * @arg @ref LL_LPTIM_PRESCALER_DIV32 |
Anna Bridge |
160:5571c4ff569f | 618 | * @arg @ref LL_LPTIM_PRESCALER_DIV64 |
Anna Bridge |
160:5571c4ff569f | 619 | * @arg @ref LL_LPTIM_PRESCALER_DIV128 |
Anna Bridge |
160:5571c4ff569f | 620 | */ |
Anna Bridge |
160:5571c4ff569f | 621 | __STATIC_INLINE uint32_t LL_LPTIM_GetPrescaler(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 622 | { |
Anna Bridge |
160:5571c4ff569f | 623 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRESC)); |
Anna Bridge |
160:5571c4ff569f | 624 | } |
Anna Bridge |
160:5571c4ff569f | 625 | |
Anna Bridge |
160:5571c4ff569f | 626 | |
Anna Bridge |
160:5571c4ff569f | 627 | /** |
Anna Bridge |
160:5571c4ff569f | 628 | * @} |
Anna Bridge |
160:5571c4ff569f | 629 | */ |
Anna Bridge |
160:5571c4ff569f | 630 | |
Anna Bridge |
160:5571c4ff569f | 631 | /** @defgroup LPTIM_LL_EF_Trigger_Configuration Trigger Configuration |
Anna Bridge |
160:5571c4ff569f | 632 | * @{ |
Anna Bridge |
160:5571c4ff569f | 633 | */ |
Anna Bridge |
160:5571c4ff569f | 634 | |
Anna Bridge |
160:5571c4ff569f | 635 | /** |
Anna Bridge |
160:5571c4ff569f | 636 | * @brief Enable the timeout function |
Anna Bridge |
160:5571c4ff569f | 637 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 638 | * @note The first trigger event will start the timer, any successive trigger |
Anna Bridge |
160:5571c4ff569f | 639 | * event will reset the counter and the timer will restart. |
Anna Bridge |
160:5571c4ff569f | 640 | * @note The timeout value corresponds to the compare value; if no trigger |
Anna Bridge |
160:5571c4ff569f | 641 | * occurs within the expected time frame, the MCU is waked-up by the |
Anna Bridge |
160:5571c4ff569f | 642 | * compare match event. |
Anna Bridge |
160:5571c4ff569f | 643 | * @rmtoll CFGR TIMOUT LL_LPTIM_EnableTimeout |
Anna Bridge |
160:5571c4ff569f | 644 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 645 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 646 | */ |
Anna Bridge |
160:5571c4ff569f | 647 | __STATIC_INLINE void LL_LPTIM_EnableTimeout(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 648 | { |
Anna Bridge |
160:5571c4ff569f | 649 | SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT); |
Anna Bridge |
160:5571c4ff569f | 650 | } |
Anna Bridge |
160:5571c4ff569f | 651 | |
Anna Bridge |
160:5571c4ff569f | 652 | /** |
Anna Bridge |
160:5571c4ff569f | 653 | * @brief Disable the timeout function |
Anna Bridge |
160:5571c4ff569f | 654 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 655 | * @note A trigger event arriving when the timer is already started will be |
Anna Bridge |
160:5571c4ff569f | 656 | * ignored. |
Anna Bridge |
160:5571c4ff569f | 657 | * @rmtoll CFGR TIMOUT LL_LPTIM_DisableTimeout |
Anna Bridge |
160:5571c4ff569f | 658 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 659 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 660 | */ |
Anna Bridge |
160:5571c4ff569f | 661 | __STATIC_INLINE void LL_LPTIM_DisableTimeout(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 662 | { |
Anna Bridge |
160:5571c4ff569f | 663 | CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT); |
Anna Bridge |
160:5571c4ff569f | 664 | } |
Anna Bridge |
160:5571c4ff569f | 665 | |
Anna Bridge |
160:5571c4ff569f | 666 | /** |
Anna Bridge |
160:5571c4ff569f | 667 | * @brief Indicate whether the timeout function is enabled. |
Anna Bridge |
160:5571c4ff569f | 668 | * @rmtoll CFGR TIMOUT LL_LPTIM_IsEnabledTimeout |
Anna Bridge |
160:5571c4ff569f | 669 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 670 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 671 | */ |
Anna Bridge |
160:5571c4ff569f | 672 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledTimeout(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 673 | { |
Anna Bridge |
160:5571c4ff569f | 674 | return (READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT) == (LPTIM_CFGR_TIMOUT)); |
Anna Bridge |
160:5571c4ff569f | 675 | } |
Anna Bridge |
160:5571c4ff569f | 676 | |
Anna Bridge |
160:5571c4ff569f | 677 | /** |
Anna Bridge |
160:5571c4ff569f | 678 | * @brief Start the LPTIM counter |
Anna Bridge |
160:5571c4ff569f | 679 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 680 | * @rmtoll CFGR TRIGEN LL_LPTIM_TrigSw |
Anna Bridge |
160:5571c4ff569f | 681 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 682 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 683 | */ |
Anna Bridge |
160:5571c4ff569f | 684 | __STATIC_INLINE void LL_LPTIM_TrigSw(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 685 | { |
Anna Bridge |
160:5571c4ff569f | 686 | CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN); |
Anna Bridge |
160:5571c4ff569f | 687 | } |
Anna Bridge |
160:5571c4ff569f | 688 | |
Anna Bridge |
160:5571c4ff569f | 689 | /** |
Anna Bridge |
160:5571c4ff569f | 690 | * @brief Configure the external trigger used as a trigger event for the LPTIM. |
Anna Bridge |
160:5571c4ff569f | 691 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 692 | * @note An internal clock source must be present when a digital filter is |
Anna Bridge |
160:5571c4ff569f | 693 | * required for the trigger. |
Anna Bridge |
160:5571c4ff569f | 694 | * @rmtoll CFGR TRIGSEL LL_LPTIM_ConfigTrigger\n |
Anna Bridge |
160:5571c4ff569f | 695 | * CFGR TRGFLT LL_LPTIM_ConfigTrigger\n |
Anna Bridge |
160:5571c4ff569f | 696 | * CFGR TRIGEN LL_LPTIM_ConfigTrigger |
Anna Bridge |
160:5571c4ff569f | 697 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 698 | * @param Source This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 699 | * @arg @ref LL_LPTIM_TRIG_SOURCE_GPIO |
Anna Bridge |
160:5571c4ff569f | 700 | * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMA |
Anna Bridge |
160:5571c4ff569f | 701 | * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMB |
Anna Bridge |
160:5571c4ff569f | 702 | * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCTAMP1 |
Anna Bridge |
160:5571c4ff569f | 703 | * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM1_TRGO |
Anna Bridge |
160:5571c4ff569f | 704 | * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM5_TRGO |
Anna Bridge |
160:5571c4ff569f | 705 | * @param Filter This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 706 | * @arg @ref LL_LPTIM_TRIG_FILTER_NONE |
Anna Bridge |
160:5571c4ff569f | 707 | * @arg @ref LL_LPTIM_TRIG_FILTER_2 |
Anna Bridge |
160:5571c4ff569f | 708 | * @arg @ref LL_LPTIM_TRIG_FILTER_4 |
Anna Bridge |
160:5571c4ff569f | 709 | * @arg @ref LL_LPTIM_TRIG_FILTER_8 |
Anna Bridge |
160:5571c4ff569f | 710 | * @param Polarity This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 711 | * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING |
Anna Bridge |
160:5571c4ff569f | 712 | * @arg @ref LL_LPTIM_TRIG_POLARITY_FALLING |
Anna Bridge |
160:5571c4ff569f | 713 | * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING_FALLING |
Anna Bridge |
160:5571c4ff569f | 714 | * (*) value not defined in all devices. |
Anna Bridge |
160:5571c4ff569f | 715 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 716 | */ |
Anna Bridge |
160:5571c4ff569f | 717 | __STATIC_INLINE void LL_LPTIM_ConfigTrigger(LPTIM_TypeDef *LPTIMx, uint32_t Source, uint32_t Filter, uint32_t Polarity) |
Anna Bridge |
160:5571c4ff569f | 718 | { |
Anna Bridge |
160:5571c4ff569f | 719 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL | LPTIM_CFGR_TRGFLT | LPTIM_CFGR_TRIGEN, Source | Filter | Polarity); |
Anna Bridge |
160:5571c4ff569f | 720 | } |
Anna Bridge |
160:5571c4ff569f | 721 | |
Anna Bridge |
160:5571c4ff569f | 722 | /** |
Anna Bridge |
160:5571c4ff569f | 723 | * @brief Get actual external trigger source. |
Anna Bridge |
160:5571c4ff569f | 724 | * @rmtoll CFGR TRIGSEL LL_LPTIM_GetTriggerSource |
Anna Bridge |
160:5571c4ff569f | 725 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 726 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 727 | * @arg @ref LL_LPTIM_TRIG_SOURCE_GPIO |
Anna Bridge |
160:5571c4ff569f | 728 | * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMA |
Anna Bridge |
160:5571c4ff569f | 729 | * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCALARMB |
Anna Bridge |
160:5571c4ff569f | 730 | * @arg @ref LL_LPTIM_TRIG_SOURCE_RTCTAMP1 |
Anna Bridge |
160:5571c4ff569f | 731 | * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM1_TRGO |
Anna Bridge |
160:5571c4ff569f | 732 | * @arg @ref LL_LPTIM_TRIG_SOURCE_TIM5_TRGO |
Anna Bridge |
160:5571c4ff569f | 733 | */ |
Anna Bridge |
160:5571c4ff569f | 734 | __STATIC_INLINE uint32_t LL_LPTIM_GetTriggerSource(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 735 | { |
Anna Bridge |
160:5571c4ff569f | 736 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL)); |
Anna Bridge |
160:5571c4ff569f | 737 | } |
Anna Bridge |
160:5571c4ff569f | 738 | |
Anna Bridge |
160:5571c4ff569f | 739 | /** |
Anna Bridge |
160:5571c4ff569f | 740 | * @brief Get actual external trigger filter. |
Anna Bridge |
160:5571c4ff569f | 741 | * @rmtoll CFGR TRGFLT LL_LPTIM_GetTriggerFilter |
Anna Bridge |
160:5571c4ff569f | 742 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 743 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 744 | * @arg @ref LL_LPTIM_TRIG_FILTER_NONE |
Anna Bridge |
160:5571c4ff569f | 745 | * @arg @ref LL_LPTIM_TRIG_FILTER_2 |
Anna Bridge |
160:5571c4ff569f | 746 | * @arg @ref LL_LPTIM_TRIG_FILTER_4 |
Anna Bridge |
160:5571c4ff569f | 747 | * @arg @ref LL_LPTIM_TRIG_FILTER_8 |
Anna Bridge |
160:5571c4ff569f | 748 | */ |
Anna Bridge |
160:5571c4ff569f | 749 | __STATIC_INLINE uint32_t LL_LPTIM_GetTriggerFilter(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 750 | { |
Anna Bridge |
160:5571c4ff569f | 751 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRGFLT)); |
Anna Bridge |
160:5571c4ff569f | 752 | } |
Anna Bridge |
160:5571c4ff569f | 753 | |
Anna Bridge |
160:5571c4ff569f | 754 | /** |
Anna Bridge |
160:5571c4ff569f | 755 | * @brief Get actual external trigger polarity. |
Anna Bridge |
160:5571c4ff569f | 756 | * @rmtoll CFGR TRIGEN LL_LPTIM_GetTriggerPolarity |
Anna Bridge |
160:5571c4ff569f | 757 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 758 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 759 | * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING |
Anna Bridge |
160:5571c4ff569f | 760 | * @arg @ref LL_LPTIM_TRIG_POLARITY_FALLING |
Anna Bridge |
160:5571c4ff569f | 761 | * @arg @ref LL_LPTIM_TRIG_POLARITY_RISING_FALLING |
Anna Bridge |
160:5571c4ff569f | 762 | */ |
Anna Bridge |
160:5571c4ff569f | 763 | __STATIC_INLINE uint32_t LL_LPTIM_GetTriggerPolarity(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 764 | { |
Anna Bridge |
160:5571c4ff569f | 765 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN)); |
Anna Bridge |
160:5571c4ff569f | 766 | } |
Anna Bridge |
160:5571c4ff569f | 767 | |
Anna Bridge |
160:5571c4ff569f | 768 | /** |
Anna Bridge |
160:5571c4ff569f | 769 | * @} |
Anna Bridge |
160:5571c4ff569f | 770 | */ |
Anna Bridge |
160:5571c4ff569f | 771 | |
Anna Bridge |
160:5571c4ff569f | 772 | /** @defgroup LPTIM_LL_EF_Clock_Configuration Clock Configuration |
Anna Bridge |
160:5571c4ff569f | 773 | * @{ |
Anna Bridge |
160:5571c4ff569f | 774 | */ |
Anna Bridge |
160:5571c4ff569f | 775 | |
Anna Bridge |
160:5571c4ff569f | 776 | /** |
Anna Bridge |
160:5571c4ff569f | 777 | * @brief Set the source of the clock used by the LPTIM instance. |
Anna Bridge |
160:5571c4ff569f | 778 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 779 | * @rmtoll CFGR CKSEL LL_LPTIM_SetClockSource |
Anna Bridge |
160:5571c4ff569f | 780 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 781 | * @param ClockSource This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 782 | * @arg @ref LL_LPTIM_CLK_SOURCE_INTERNAL |
Anna Bridge |
160:5571c4ff569f | 783 | * @arg @ref LL_LPTIM_CLK_SOURCE_EXTERNAL |
Anna Bridge |
160:5571c4ff569f | 784 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 785 | */ |
Anna Bridge |
160:5571c4ff569f | 786 | __STATIC_INLINE void LL_LPTIM_SetClockSource(LPTIM_TypeDef *LPTIMx, uint32_t ClockSource) |
Anna Bridge |
160:5571c4ff569f | 787 | { |
Anna Bridge |
160:5571c4ff569f | 788 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKSEL, ClockSource); |
Anna Bridge |
160:5571c4ff569f | 789 | } |
Anna Bridge |
160:5571c4ff569f | 790 | |
Anna Bridge |
160:5571c4ff569f | 791 | /** |
Anna Bridge |
160:5571c4ff569f | 792 | * @brief Get actual LPTIM instance clock source. |
Anna Bridge |
160:5571c4ff569f | 793 | * @rmtoll CFGR CKSEL LL_LPTIM_GetClockSource |
Anna Bridge |
160:5571c4ff569f | 794 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 795 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 796 | * @arg @ref LL_LPTIM_CLK_SOURCE_INTERNAL |
Anna Bridge |
160:5571c4ff569f | 797 | * @arg @ref LL_LPTIM_CLK_SOURCE_EXTERNAL |
Anna Bridge |
160:5571c4ff569f | 798 | */ |
Anna Bridge |
160:5571c4ff569f | 799 | __STATIC_INLINE uint32_t LL_LPTIM_GetClockSource(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 800 | { |
Anna Bridge |
160:5571c4ff569f | 801 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKSEL)); |
Anna Bridge |
160:5571c4ff569f | 802 | } |
Anna Bridge |
160:5571c4ff569f | 803 | |
Anna Bridge |
160:5571c4ff569f | 804 | /** |
Anna Bridge |
160:5571c4ff569f | 805 | * @brief Configure the active edge or edges used by the counter when the LPTIM is clocked by an external clock source. |
Anna Bridge |
160:5571c4ff569f | 806 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 807 | * @note When both external clock signal edges are considered active ones, |
Anna Bridge |
160:5571c4ff569f | 808 | * the LPTIM must also be clocked by an internal clock source with a |
Anna Bridge |
160:5571c4ff569f | 809 | * frequency equal to at least four times the external clock frequency. |
Anna Bridge |
160:5571c4ff569f | 810 | * @note An internal clock source must be present when a digital filter is |
Anna Bridge |
160:5571c4ff569f | 811 | * required for external clock. |
Anna Bridge |
160:5571c4ff569f | 812 | * @rmtoll CFGR CKFLT LL_LPTIM_ConfigClock\n |
Anna Bridge |
160:5571c4ff569f | 813 | * CFGR CKPOL LL_LPTIM_ConfigClock |
Anna Bridge |
160:5571c4ff569f | 814 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 815 | * @param ClockFilter This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 816 | * @arg @ref LL_LPTIM_CLK_FILTER_NONE |
Anna Bridge |
160:5571c4ff569f | 817 | * @arg @ref LL_LPTIM_CLK_FILTER_2 |
Anna Bridge |
160:5571c4ff569f | 818 | * @arg @ref LL_LPTIM_CLK_FILTER_4 |
Anna Bridge |
160:5571c4ff569f | 819 | * @arg @ref LL_LPTIM_CLK_FILTER_8 |
Anna Bridge |
160:5571c4ff569f | 820 | * @param ClockPolarity This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 821 | * @arg @ref LL_LPTIM_CLK_POLARITY_RISING |
Anna Bridge |
160:5571c4ff569f | 822 | * @arg @ref LL_LPTIM_CLK_POLARITY_FALLING |
Anna Bridge |
160:5571c4ff569f | 823 | * @arg @ref LL_LPTIM_CLK_POLARITY_RISING_FALLING |
Anna Bridge |
160:5571c4ff569f | 824 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 825 | */ |
Anna Bridge |
160:5571c4ff569f | 826 | __STATIC_INLINE void LL_LPTIM_ConfigClock(LPTIM_TypeDef *LPTIMx, uint32_t ClockFilter, uint32_t ClockPolarity) |
Anna Bridge |
160:5571c4ff569f | 827 | { |
Anna Bridge |
160:5571c4ff569f | 828 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKFLT | LPTIM_CFGR_CKPOL, ClockFilter | ClockPolarity); |
Anna Bridge |
160:5571c4ff569f | 829 | } |
Anna Bridge |
160:5571c4ff569f | 830 | |
Anna Bridge |
160:5571c4ff569f | 831 | /** |
Anna Bridge |
160:5571c4ff569f | 832 | * @brief Get actual clock polarity |
Anna Bridge |
160:5571c4ff569f | 833 | * @rmtoll CFGR CKPOL LL_LPTIM_GetClockPolarity |
Anna Bridge |
160:5571c4ff569f | 834 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 835 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 836 | * @arg @ref LL_LPTIM_CLK_POLARITY_RISING |
Anna Bridge |
160:5571c4ff569f | 837 | * @arg @ref LL_LPTIM_CLK_POLARITY_FALLING |
Anna Bridge |
160:5571c4ff569f | 838 | * @arg @ref LL_LPTIM_CLK_POLARITY_RISING_FALLING |
Anna Bridge |
160:5571c4ff569f | 839 | */ |
Anna Bridge |
160:5571c4ff569f | 840 | __STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 841 | { |
Anna Bridge |
160:5571c4ff569f | 842 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL)); |
Anna Bridge |
160:5571c4ff569f | 843 | } |
Anna Bridge |
160:5571c4ff569f | 844 | |
Anna Bridge |
160:5571c4ff569f | 845 | /** |
Anna Bridge |
160:5571c4ff569f | 846 | * @brief Get actual clock digital filter |
Anna Bridge |
160:5571c4ff569f | 847 | * @rmtoll CFGR CKFLT LL_LPTIM_GetClockFilter |
Anna Bridge |
160:5571c4ff569f | 848 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 849 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 850 | * @arg @ref LL_LPTIM_CLK_FILTER_NONE |
Anna Bridge |
160:5571c4ff569f | 851 | * @arg @ref LL_LPTIM_CLK_FILTER_2 |
Anna Bridge |
160:5571c4ff569f | 852 | * @arg @ref LL_LPTIM_CLK_FILTER_4 |
Anna Bridge |
160:5571c4ff569f | 853 | * @arg @ref LL_LPTIM_CLK_FILTER_8 |
Anna Bridge |
160:5571c4ff569f | 854 | */ |
Anna Bridge |
160:5571c4ff569f | 855 | __STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 856 | { |
Anna Bridge |
160:5571c4ff569f | 857 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKFLT)); |
Anna Bridge |
160:5571c4ff569f | 858 | } |
Anna Bridge |
160:5571c4ff569f | 859 | |
Anna Bridge |
160:5571c4ff569f | 860 | /** |
Anna Bridge |
160:5571c4ff569f | 861 | * @} |
Anna Bridge |
160:5571c4ff569f | 862 | */ |
Anna Bridge |
160:5571c4ff569f | 863 | |
Anna Bridge |
160:5571c4ff569f | 864 | /** @defgroup LPTIM_LL_EF_Encoder_Mode Encoder Mode |
Anna Bridge |
160:5571c4ff569f | 865 | * @{ |
Anna Bridge |
160:5571c4ff569f | 866 | */ |
Anna Bridge |
160:5571c4ff569f | 867 | |
Anna Bridge |
160:5571c4ff569f | 868 | /** |
Anna Bridge |
160:5571c4ff569f | 869 | * @brief Configure the encoder mode. |
Anna Bridge |
160:5571c4ff569f | 870 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 871 | * @rmtoll CFGR CKPOL LL_LPTIM_SetEncoderMode |
Anna Bridge |
160:5571c4ff569f | 872 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 873 | * @param EncoderMode This parameter can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 874 | * @arg @ref LL_LPTIM_ENCODER_MODE_RISING |
Anna Bridge |
160:5571c4ff569f | 875 | * @arg @ref LL_LPTIM_ENCODER_MODE_FALLING |
Anna Bridge |
160:5571c4ff569f | 876 | * @arg @ref LL_LPTIM_ENCODER_MODE_RISING_FALLING |
Anna Bridge |
160:5571c4ff569f | 877 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 878 | */ |
Anna Bridge |
160:5571c4ff569f | 879 | __STATIC_INLINE void LL_LPTIM_SetEncoderMode(LPTIM_TypeDef *LPTIMx, uint32_t EncoderMode) |
Anna Bridge |
160:5571c4ff569f | 880 | { |
Anna Bridge |
160:5571c4ff569f | 881 | MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKPOL, EncoderMode); |
Anna Bridge |
160:5571c4ff569f | 882 | } |
Anna Bridge |
160:5571c4ff569f | 883 | |
Anna Bridge |
160:5571c4ff569f | 884 | /** |
Anna Bridge |
160:5571c4ff569f | 885 | * @brief Get actual encoder mode. |
Anna Bridge |
160:5571c4ff569f | 886 | * @rmtoll CFGR CKPOL LL_LPTIM_GetEncoderMode |
Anna Bridge |
160:5571c4ff569f | 887 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 888 | * @retval Returned value can be one of the following values: |
Anna Bridge |
160:5571c4ff569f | 889 | * @arg @ref LL_LPTIM_ENCODER_MODE_RISING |
Anna Bridge |
160:5571c4ff569f | 890 | * @arg @ref LL_LPTIM_ENCODER_MODE_FALLING |
Anna Bridge |
160:5571c4ff569f | 891 | * @arg @ref LL_LPTIM_ENCODER_MODE_RISING_FALLING |
Anna Bridge |
160:5571c4ff569f | 892 | */ |
Anna Bridge |
160:5571c4ff569f | 893 | __STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 894 | { |
Anna Bridge |
160:5571c4ff569f | 895 | return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL)); |
Anna Bridge |
160:5571c4ff569f | 896 | } |
Anna Bridge |
160:5571c4ff569f | 897 | |
Anna Bridge |
160:5571c4ff569f | 898 | /** |
Anna Bridge |
160:5571c4ff569f | 899 | * @brief Enable the encoder mode |
Anna Bridge |
160:5571c4ff569f | 900 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 901 | * @note In this mode the LPTIM instance must be clocked by an internal clock |
Anna Bridge |
160:5571c4ff569f | 902 | * source. Also, the prescaler division ratio must be equal to 1. |
Anna Bridge |
160:5571c4ff569f | 903 | * @note LPTIM instance must be configured in continuous mode prior enabling |
Anna Bridge |
160:5571c4ff569f | 904 | * the encoder mode. |
Anna Bridge |
160:5571c4ff569f | 905 | * @rmtoll CFGR ENC LL_LPTIM_EnableEncoderMode |
Anna Bridge |
160:5571c4ff569f | 906 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 907 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 908 | */ |
Anna Bridge |
160:5571c4ff569f | 909 | __STATIC_INLINE void LL_LPTIM_EnableEncoderMode(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 910 | { |
Anna Bridge |
160:5571c4ff569f | 911 | SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC); |
Anna Bridge |
160:5571c4ff569f | 912 | } |
Anna Bridge |
160:5571c4ff569f | 913 | |
Anna Bridge |
160:5571c4ff569f | 914 | /** |
Anna Bridge |
160:5571c4ff569f | 915 | * @brief Disable the encoder mode |
Anna Bridge |
160:5571c4ff569f | 916 | * @note This function must be called when the LPTIM instance is disabled. |
Anna Bridge |
160:5571c4ff569f | 917 | * @rmtoll CFGR ENC LL_LPTIM_DisableEncoderMode |
Anna Bridge |
160:5571c4ff569f | 918 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 919 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 920 | */ |
Anna Bridge |
160:5571c4ff569f | 921 | __STATIC_INLINE void LL_LPTIM_DisableEncoderMode(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 922 | { |
Anna Bridge |
160:5571c4ff569f | 923 | CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC); |
Anna Bridge |
160:5571c4ff569f | 924 | } |
Anna Bridge |
160:5571c4ff569f | 925 | |
Anna Bridge |
160:5571c4ff569f | 926 | /** |
Anna Bridge |
160:5571c4ff569f | 927 | * @brief Indicates whether the LPTIM operates in encoder mode. |
Anna Bridge |
160:5571c4ff569f | 928 | * @rmtoll CFGR ENC LL_LPTIM_IsEnabledEncoderMode |
Anna Bridge |
160:5571c4ff569f | 929 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 930 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 931 | */ |
Anna Bridge |
160:5571c4ff569f | 932 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 933 | { |
Anna Bridge |
160:5571c4ff569f | 934 | return (READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC) == (LPTIM_CFGR_ENC)); |
Anna Bridge |
160:5571c4ff569f | 935 | } |
Anna Bridge |
160:5571c4ff569f | 936 | |
Anna Bridge |
160:5571c4ff569f | 937 | /** |
Anna Bridge |
160:5571c4ff569f | 938 | * @} |
Anna Bridge |
160:5571c4ff569f | 939 | */ |
Anna Bridge |
160:5571c4ff569f | 940 | |
Anna Bridge |
160:5571c4ff569f | 941 | /** @defgroup LPTIM_LL_EF_FLAG_Management FLAG Management |
Anna Bridge |
160:5571c4ff569f | 942 | * @{ |
Anna Bridge |
160:5571c4ff569f | 943 | */ |
Anna Bridge |
160:5571c4ff569f | 944 | |
Anna Bridge |
160:5571c4ff569f | 945 | /** |
Anna Bridge |
160:5571c4ff569f | 946 | * @brief Clear the compare match flag (CMPMCF) |
Anna Bridge |
160:5571c4ff569f | 947 | * @rmtoll ICR CMPMCF LL_LPTIM_ClearFLAG_CMPM |
Anna Bridge |
160:5571c4ff569f | 948 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 949 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 950 | */ |
Anna Bridge |
160:5571c4ff569f | 951 | __STATIC_INLINE void LL_LPTIM_ClearFLAG_CMPM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 952 | { |
Anna Bridge |
160:5571c4ff569f | 953 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPMCF); |
Anna Bridge |
160:5571c4ff569f | 954 | } |
Anna Bridge |
160:5571c4ff569f | 955 | |
Anna Bridge |
160:5571c4ff569f | 956 | /** |
Anna Bridge |
160:5571c4ff569f | 957 | * @brief Inform application whether a compare match interrupt has occurred. |
Anna Bridge |
160:5571c4ff569f | 958 | * @rmtoll ISR CMPM LL_LPTIM_IsActiveFlag_CMPM |
Anna Bridge |
160:5571c4ff569f | 959 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 960 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 961 | */ |
Anna Bridge |
160:5571c4ff569f | 962 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 963 | { |
Anna Bridge |
160:5571c4ff569f | 964 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPM) == (LPTIM_ISR_CMPM)); |
Anna Bridge |
160:5571c4ff569f | 965 | } |
Anna Bridge |
160:5571c4ff569f | 966 | |
Anna Bridge |
160:5571c4ff569f | 967 | /** |
Anna Bridge |
160:5571c4ff569f | 968 | * @brief Clear the autoreload match flag (ARRMCF) |
Anna Bridge |
160:5571c4ff569f | 969 | * @rmtoll ICR ARRMCF LL_LPTIM_ClearFLAG_ARRM |
Anna Bridge |
160:5571c4ff569f | 970 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 971 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 972 | */ |
Anna Bridge |
160:5571c4ff569f | 973 | __STATIC_INLINE void LL_LPTIM_ClearFLAG_ARRM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 974 | { |
Anna Bridge |
160:5571c4ff569f | 975 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARRMCF); |
Anna Bridge |
160:5571c4ff569f | 976 | } |
Anna Bridge |
160:5571c4ff569f | 977 | |
Anna Bridge |
160:5571c4ff569f | 978 | /** |
Anna Bridge |
160:5571c4ff569f | 979 | * @brief Inform application whether a autoreload match interrupt has occured. |
Anna Bridge |
160:5571c4ff569f | 980 | * @rmtoll ISR ARRM LL_LPTIM_IsActiveFlag_ARRM |
Anna Bridge |
160:5571c4ff569f | 981 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 982 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 983 | */ |
Anna Bridge |
160:5571c4ff569f | 984 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARRM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 985 | { |
Anna Bridge |
160:5571c4ff569f | 986 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARRM) == (LPTIM_ISR_ARRM)); |
Anna Bridge |
160:5571c4ff569f | 987 | } |
Anna Bridge |
160:5571c4ff569f | 988 | |
Anna Bridge |
160:5571c4ff569f | 989 | /** |
Anna Bridge |
160:5571c4ff569f | 990 | * @brief Clear the external trigger valid edge flag(EXTTRIGCF). |
Anna Bridge |
160:5571c4ff569f | 991 | * @rmtoll ICR EXTTRIGCF LL_LPTIM_ClearFlag_EXTTRIG |
Anna Bridge |
160:5571c4ff569f | 992 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 993 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 994 | */ |
Anna Bridge |
160:5571c4ff569f | 995 | __STATIC_INLINE void LL_LPTIM_ClearFlag_EXTTRIG(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 996 | { |
Anna Bridge |
160:5571c4ff569f | 997 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_EXTTRIGCF); |
Anna Bridge |
160:5571c4ff569f | 998 | } |
Anna Bridge |
160:5571c4ff569f | 999 | |
Anna Bridge |
160:5571c4ff569f | 1000 | /** |
Anna Bridge |
160:5571c4ff569f | 1001 | * @brief Inform application whether a valid edge on the selected external trigger input has occurred. |
Anna Bridge |
160:5571c4ff569f | 1002 | * @rmtoll ISR EXTTRIG LL_LPTIM_IsActiveFlag_EXTTRIG |
Anna Bridge |
160:5571c4ff569f | 1003 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1004 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1005 | */ |
Anna Bridge |
160:5571c4ff569f | 1006 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_EXTTRIG(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1007 | { |
Anna Bridge |
160:5571c4ff569f | 1008 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_EXTTRIG) == (LPTIM_ISR_EXTTRIG)); |
Anna Bridge |
160:5571c4ff569f | 1009 | } |
Anna Bridge |
160:5571c4ff569f | 1010 | |
Anna Bridge |
160:5571c4ff569f | 1011 | /** |
Anna Bridge |
160:5571c4ff569f | 1012 | * @brief Clear the compare register update interrupt flag (CMPOKCF). |
Anna Bridge |
160:5571c4ff569f | 1013 | * @rmtoll ICR CMPOKCF LL_LPTIM_ClearFlag_CMPOK |
Anna Bridge |
160:5571c4ff569f | 1014 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1015 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1016 | */ |
Anna Bridge |
160:5571c4ff569f | 1017 | __STATIC_INLINE void LL_LPTIM_ClearFlag_CMPOK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1018 | { |
Anna Bridge |
160:5571c4ff569f | 1019 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPOKCF); |
Anna Bridge |
160:5571c4ff569f | 1020 | } |
Anna Bridge |
160:5571c4ff569f | 1021 | |
Anna Bridge |
160:5571c4ff569f | 1022 | /** |
Anna Bridge |
160:5571c4ff569f | 1023 | * @brief Informs application whether the APB bus write operation to the LPTIMx_CMP register has been successfully completed; If so, a new one can be initiated. |
Anna Bridge |
160:5571c4ff569f | 1024 | * @rmtoll ISR CMPOK LL_LPTIM_IsActiveFlag_CMPOK |
Anna Bridge |
160:5571c4ff569f | 1025 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1026 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1027 | */ |
Anna Bridge |
160:5571c4ff569f | 1028 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPOK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1029 | { |
Anna Bridge |
160:5571c4ff569f | 1030 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPOK) == (LPTIM_ISR_CMPOK)); |
Anna Bridge |
160:5571c4ff569f | 1031 | } |
Anna Bridge |
160:5571c4ff569f | 1032 | |
Anna Bridge |
160:5571c4ff569f | 1033 | /** |
Anna Bridge |
160:5571c4ff569f | 1034 | * @brief Clear the autoreload register update interrupt flag (ARROKCF). |
Anna Bridge |
160:5571c4ff569f | 1035 | * @rmtoll ICR ARROKCF LL_LPTIM_ClearFlag_ARROK |
Anna Bridge |
160:5571c4ff569f | 1036 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1037 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1038 | */ |
Anna Bridge |
160:5571c4ff569f | 1039 | __STATIC_INLINE void LL_LPTIM_ClearFlag_ARROK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1040 | { |
Anna Bridge |
160:5571c4ff569f | 1041 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARROKCF); |
Anna Bridge |
160:5571c4ff569f | 1042 | } |
Anna Bridge |
160:5571c4ff569f | 1043 | |
Anna Bridge |
160:5571c4ff569f | 1044 | /** |
Anna Bridge |
160:5571c4ff569f | 1045 | * @brief Informs application whether the APB bus write operation to the LPTIMx_ARR register has been successfully completed; If so, a new one can be initiated. |
Anna Bridge |
160:5571c4ff569f | 1046 | * @rmtoll ISR ARROK LL_LPTIM_IsActiveFlag_ARROK |
Anna Bridge |
160:5571c4ff569f | 1047 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1048 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1049 | */ |
Anna Bridge |
160:5571c4ff569f | 1050 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARROK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1051 | { |
Anna Bridge |
160:5571c4ff569f | 1052 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARROK) == (LPTIM_ISR_ARROK)); |
Anna Bridge |
160:5571c4ff569f | 1053 | } |
Anna Bridge |
160:5571c4ff569f | 1054 | |
Anna Bridge |
160:5571c4ff569f | 1055 | /** |
Anna Bridge |
160:5571c4ff569f | 1056 | * @brief Clear the counter direction change to up interrupt flag (UPCF). |
Anna Bridge |
160:5571c4ff569f | 1057 | * @rmtoll ICR UPCF LL_LPTIM_ClearFlag_UP |
Anna Bridge |
160:5571c4ff569f | 1058 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1059 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1060 | */ |
Anna Bridge |
160:5571c4ff569f | 1061 | __STATIC_INLINE void LL_LPTIM_ClearFlag_UP(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1062 | { |
Anna Bridge |
160:5571c4ff569f | 1063 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_UPCF); |
Anna Bridge |
160:5571c4ff569f | 1064 | } |
Anna Bridge |
160:5571c4ff569f | 1065 | |
Anna Bridge |
160:5571c4ff569f | 1066 | /** |
Anna Bridge |
160:5571c4ff569f | 1067 | * @brief Informs the application whether the counter direction has changed from down to up (when the LPTIM instance operates in encoder mode). |
Anna Bridge |
160:5571c4ff569f | 1068 | * @rmtoll ISR UP LL_LPTIM_IsActiveFlag_UP |
Anna Bridge |
160:5571c4ff569f | 1069 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1070 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1071 | */ |
Anna Bridge |
160:5571c4ff569f | 1072 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_UP(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1073 | { |
Anna Bridge |
160:5571c4ff569f | 1074 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_UP) == (LPTIM_ISR_UP)); |
Anna Bridge |
160:5571c4ff569f | 1075 | } |
Anna Bridge |
160:5571c4ff569f | 1076 | |
Anna Bridge |
160:5571c4ff569f | 1077 | /** |
Anna Bridge |
160:5571c4ff569f | 1078 | * @brief Clear the counter direction change to down interrupt flag (DOWNCF). |
Anna Bridge |
160:5571c4ff569f | 1079 | * @rmtoll ICR DOWNCF LL_LPTIM_ClearFlag_DOWN |
Anna Bridge |
160:5571c4ff569f | 1080 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1081 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1082 | */ |
Anna Bridge |
160:5571c4ff569f | 1083 | __STATIC_INLINE void LL_LPTIM_ClearFlag_DOWN(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1084 | { |
Anna Bridge |
160:5571c4ff569f | 1085 | SET_BIT(LPTIMx->ICR, LPTIM_ICR_DOWNCF); |
Anna Bridge |
160:5571c4ff569f | 1086 | } |
Anna Bridge |
160:5571c4ff569f | 1087 | |
Anna Bridge |
160:5571c4ff569f | 1088 | /** |
Anna Bridge |
160:5571c4ff569f | 1089 | * @brief Informs the application whether the counter direction has changed from up to down (when the LPTIM instance operates in encoder mode). |
Anna Bridge |
160:5571c4ff569f | 1090 | * @rmtoll ISR DOWN LL_LPTIM_IsActiveFlag_DOWN |
Anna Bridge |
160:5571c4ff569f | 1091 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1092 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1093 | */ |
Anna Bridge |
160:5571c4ff569f | 1094 | __STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_DOWN(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1095 | { |
Anna Bridge |
160:5571c4ff569f | 1096 | return (READ_BIT(LPTIMx->ISR, LPTIM_ISR_DOWN) == (LPTIM_ISR_DOWN)); |
Anna Bridge |
160:5571c4ff569f | 1097 | } |
Anna Bridge |
160:5571c4ff569f | 1098 | |
Anna Bridge |
160:5571c4ff569f | 1099 | /** |
Anna Bridge |
160:5571c4ff569f | 1100 | * @} |
Anna Bridge |
160:5571c4ff569f | 1101 | */ |
Anna Bridge |
160:5571c4ff569f | 1102 | |
Anna Bridge |
160:5571c4ff569f | 1103 | /** @defgroup LPTIM_LL_EF_IT_Management Interrupt Management |
Anna Bridge |
160:5571c4ff569f | 1104 | * @{ |
Anna Bridge |
160:5571c4ff569f | 1105 | */ |
Anna Bridge |
160:5571c4ff569f | 1106 | |
Anna Bridge |
160:5571c4ff569f | 1107 | /** |
Anna Bridge |
160:5571c4ff569f | 1108 | * @brief Enable compare match interrupt (CMPMIE). |
Anna Bridge |
160:5571c4ff569f | 1109 | * @rmtoll IER CMPMIE LL_LPTIM_EnableIT_CMPM |
Anna Bridge |
160:5571c4ff569f | 1110 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1111 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1112 | */ |
Anna Bridge |
160:5571c4ff569f | 1113 | __STATIC_INLINE void LL_LPTIM_EnableIT_CMPM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1114 | { |
Anna Bridge |
160:5571c4ff569f | 1115 | SET_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE); |
Anna Bridge |
160:5571c4ff569f | 1116 | } |
Anna Bridge |
160:5571c4ff569f | 1117 | |
Anna Bridge |
160:5571c4ff569f | 1118 | /** |
Anna Bridge |
160:5571c4ff569f | 1119 | * @brief Disable compare match interrupt (CMPMIE). |
Anna Bridge |
160:5571c4ff569f | 1120 | * @rmtoll IER CMPMIE LL_LPTIM_DisableIT_CMPM |
Anna Bridge |
160:5571c4ff569f | 1121 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1122 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1123 | */ |
Anna Bridge |
160:5571c4ff569f | 1124 | __STATIC_INLINE void LL_LPTIM_DisableIT_CMPM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1125 | { |
Anna Bridge |
160:5571c4ff569f | 1126 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE); |
Anna Bridge |
160:5571c4ff569f | 1127 | } |
Anna Bridge |
160:5571c4ff569f | 1128 | |
Anna Bridge |
160:5571c4ff569f | 1129 | /** |
Anna Bridge |
160:5571c4ff569f | 1130 | * @brief Indicates whether the compare match interrupt (CMPMIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1131 | * @rmtoll IER CMPMIE LL_LPTIM_IsEnabledIT_CMPM |
Anna Bridge |
160:5571c4ff569f | 1132 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1133 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1134 | */ |
Anna Bridge |
160:5571c4ff569f | 1135 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1136 | { |
Anna Bridge |
160:5571c4ff569f | 1137 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE) == (LPTIM_IER_CMPMIE)); |
Anna Bridge |
160:5571c4ff569f | 1138 | } |
Anna Bridge |
160:5571c4ff569f | 1139 | |
Anna Bridge |
160:5571c4ff569f | 1140 | /** |
Anna Bridge |
160:5571c4ff569f | 1141 | * @brief Enable autoreload match interrupt (ARRMIE). |
Anna Bridge |
160:5571c4ff569f | 1142 | * @rmtoll IER ARRMIE LL_LPTIM_EnableIT_ARRM |
Anna Bridge |
160:5571c4ff569f | 1143 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1144 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1145 | */ |
Anna Bridge |
160:5571c4ff569f | 1146 | __STATIC_INLINE void LL_LPTIM_EnableIT_ARRM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1147 | { |
Anna Bridge |
160:5571c4ff569f | 1148 | SET_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE); |
Anna Bridge |
160:5571c4ff569f | 1149 | } |
Anna Bridge |
160:5571c4ff569f | 1150 | |
Anna Bridge |
160:5571c4ff569f | 1151 | /** |
Anna Bridge |
160:5571c4ff569f | 1152 | * @brief Disable autoreload match interrupt (ARRMIE). |
Anna Bridge |
160:5571c4ff569f | 1153 | * @rmtoll IER ARRMIE LL_LPTIM_DisableIT_ARRM |
Anna Bridge |
160:5571c4ff569f | 1154 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1155 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1156 | */ |
Anna Bridge |
160:5571c4ff569f | 1157 | __STATIC_INLINE void LL_LPTIM_DisableIT_ARRM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1158 | { |
Anna Bridge |
160:5571c4ff569f | 1159 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE); |
Anna Bridge |
160:5571c4ff569f | 1160 | } |
Anna Bridge |
160:5571c4ff569f | 1161 | |
Anna Bridge |
160:5571c4ff569f | 1162 | /** |
Anna Bridge |
160:5571c4ff569f | 1163 | * @brief Indicates whether the autoreload match interrupt (ARRMIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1164 | * @rmtoll IER ARRMIE LL_LPTIM_IsEnabledIT_ARRM |
Anna Bridge |
160:5571c4ff569f | 1165 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1166 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1167 | */ |
Anna Bridge |
160:5571c4ff569f | 1168 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARRM(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1169 | { |
Anna Bridge |
160:5571c4ff569f | 1170 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE) == (LPTIM_IER_ARRMIE)); |
Anna Bridge |
160:5571c4ff569f | 1171 | } |
Anna Bridge |
160:5571c4ff569f | 1172 | |
Anna Bridge |
160:5571c4ff569f | 1173 | /** |
Anna Bridge |
160:5571c4ff569f | 1174 | * @brief Enable external trigger valid edge interrupt (EXTTRIGIE). |
Anna Bridge |
160:5571c4ff569f | 1175 | * @rmtoll IER EXTTRIGIE LL_LPTIM_EnableIT_EXTTRIG |
Anna Bridge |
160:5571c4ff569f | 1176 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1177 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1178 | */ |
Anna Bridge |
160:5571c4ff569f | 1179 | __STATIC_INLINE void LL_LPTIM_EnableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1180 | { |
Anna Bridge |
160:5571c4ff569f | 1181 | SET_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE); |
Anna Bridge |
160:5571c4ff569f | 1182 | } |
Anna Bridge |
160:5571c4ff569f | 1183 | |
Anna Bridge |
160:5571c4ff569f | 1184 | /** |
Anna Bridge |
160:5571c4ff569f | 1185 | * @brief Disable external trigger valid edge interrupt (EXTTRIGIE). |
Anna Bridge |
160:5571c4ff569f | 1186 | * @rmtoll IER EXTTRIGIE LL_LPTIM_DisableIT_EXTTRIG |
Anna Bridge |
160:5571c4ff569f | 1187 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1188 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1189 | */ |
Anna Bridge |
160:5571c4ff569f | 1190 | __STATIC_INLINE void LL_LPTIM_DisableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1191 | { |
Anna Bridge |
160:5571c4ff569f | 1192 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE); |
Anna Bridge |
160:5571c4ff569f | 1193 | } |
Anna Bridge |
160:5571c4ff569f | 1194 | |
Anna Bridge |
160:5571c4ff569f | 1195 | /** |
Anna Bridge |
160:5571c4ff569f | 1196 | * @brief Indicates external trigger valid edge interrupt (EXTTRIGIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1197 | * @rmtoll IER EXTTRIGIE LL_LPTIM_IsEnabledIT_EXTTRIG |
Anna Bridge |
160:5571c4ff569f | 1198 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1199 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1200 | */ |
Anna Bridge |
160:5571c4ff569f | 1201 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_EXTTRIG(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1202 | { |
Anna Bridge |
160:5571c4ff569f | 1203 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE) == (LPTIM_IER_EXTTRIGIE)); |
Anna Bridge |
160:5571c4ff569f | 1204 | } |
Anna Bridge |
160:5571c4ff569f | 1205 | |
Anna Bridge |
160:5571c4ff569f | 1206 | /** |
Anna Bridge |
160:5571c4ff569f | 1207 | * @brief Enable compare register write completed interrupt (CMPOKIE). |
Anna Bridge |
160:5571c4ff569f | 1208 | * @rmtoll IER CMPOKIE LL_LPTIM_EnableIT_CMPOK |
Anna Bridge |
160:5571c4ff569f | 1209 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1210 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1211 | */ |
Anna Bridge |
160:5571c4ff569f | 1212 | __STATIC_INLINE void LL_LPTIM_EnableIT_CMPOK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1213 | { |
Anna Bridge |
160:5571c4ff569f | 1214 | SET_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE); |
Anna Bridge |
160:5571c4ff569f | 1215 | } |
Anna Bridge |
160:5571c4ff569f | 1216 | |
Anna Bridge |
160:5571c4ff569f | 1217 | /** |
Anna Bridge |
160:5571c4ff569f | 1218 | * @brief Disable compare register write completed interrupt (CMPOKIE). |
Anna Bridge |
160:5571c4ff569f | 1219 | * @rmtoll IER CMPOKIE LL_LPTIM_DisableIT_CMPOK |
Anna Bridge |
160:5571c4ff569f | 1220 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1221 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1222 | */ |
Anna Bridge |
160:5571c4ff569f | 1223 | __STATIC_INLINE void LL_LPTIM_DisableIT_CMPOK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1224 | { |
Anna Bridge |
160:5571c4ff569f | 1225 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE); |
Anna Bridge |
160:5571c4ff569f | 1226 | } |
Anna Bridge |
160:5571c4ff569f | 1227 | |
Anna Bridge |
160:5571c4ff569f | 1228 | /** |
Anna Bridge |
160:5571c4ff569f | 1229 | * @brief Indicates whether the compare register write completed interrupt (CMPOKIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1230 | * @rmtoll IER CMPOKIE LL_LPTIM_IsEnabledIT_CMPOK |
Anna Bridge |
160:5571c4ff569f | 1231 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1232 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1233 | */ |
Anna Bridge |
160:5571c4ff569f | 1234 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPOK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1235 | { |
Anna Bridge |
160:5571c4ff569f | 1236 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE) == (LPTIM_IER_CMPOKIE)); |
Anna Bridge |
160:5571c4ff569f | 1237 | } |
Anna Bridge |
160:5571c4ff569f | 1238 | |
Anna Bridge |
160:5571c4ff569f | 1239 | /** |
Anna Bridge |
160:5571c4ff569f | 1240 | * @brief Enable autoreload register write completed interrupt (ARROKIE). |
Anna Bridge |
160:5571c4ff569f | 1241 | * @rmtoll IER ARROKIE LL_LPTIM_EnableIT_ARROK |
Anna Bridge |
160:5571c4ff569f | 1242 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1243 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1244 | */ |
Anna Bridge |
160:5571c4ff569f | 1245 | __STATIC_INLINE void LL_LPTIM_EnableIT_ARROK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1246 | { |
Anna Bridge |
160:5571c4ff569f | 1247 | SET_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE); |
Anna Bridge |
160:5571c4ff569f | 1248 | } |
Anna Bridge |
160:5571c4ff569f | 1249 | |
Anna Bridge |
160:5571c4ff569f | 1250 | /** |
Anna Bridge |
160:5571c4ff569f | 1251 | * @brief Disable autoreload register write completed interrupt (ARROKIE). |
Anna Bridge |
160:5571c4ff569f | 1252 | * @rmtoll IER ARROKIE LL_LPTIM_DisableIT_ARROK |
Anna Bridge |
160:5571c4ff569f | 1253 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1254 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1255 | */ |
Anna Bridge |
160:5571c4ff569f | 1256 | __STATIC_INLINE void LL_LPTIM_DisableIT_ARROK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1257 | { |
Anna Bridge |
160:5571c4ff569f | 1258 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE); |
Anna Bridge |
160:5571c4ff569f | 1259 | } |
Anna Bridge |
160:5571c4ff569f | 1260 | |
Anna Bridge |
160:5571c4ff569f | 1261 | /** |
Anna Bridge |
160:5571c4ff569f | 1262 | * @brief Indicates whether the autoreload register write completed interrupt (ARROKIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1263 | * @rmtoll IER ARROKIE LL_LPTIM_IsEnabledIT_ARROK |
Anna Bridge |
160:5571c4ff569f | 1264 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1265 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1266 | */ |
Anna Bridge |
160:5571c4ff569f | 1267 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARROK(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1268 | { |
Anna Bridge |
160:5571c4ff569f | 1269 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE) == (LPTIM_IER_ARROKIE)); |
Anna Bridge |
160:5571c4ff569f | 1270 | } |
Anna Bridge |
160:5571c4ff569f | 1271 | |
Anna Bridge |
160:5571c4ff569f | 1272 | /** |
Anna Bridge |
160:5571c4ff569f | 1273 | * @brief Enable direction change to up interrupt (UPIE). |
Anna Bridge |
160:5571c4ff569f | 1274 | * @rmtoll IER UPIE LL_LPTIM_EnableIT_UP |
Anna Bridge |
160:5571c4ff569f | 1275 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1276 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1277 | */ |
Anna Bridge |
160:5571c4ff569f | 1278 | __STATIC_INLINE void LL_LPTIM_EnableIT_UP(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1279 | { |
Anna Bridge |
160:5571c4ff569f | 1280 | SET_BIT(LPTIMx->IER, LPTIM_IER_UPIE); |
Anna Bridge |
160:5571c4ff569f | 1281 | } |
Anna Bridge |
160:5571c4ff569f | 1282 | |
Anna Bridge |
160:5571c4ff569f | 1283 | /** |
Anna Bridge |
160:5571c4ff569f | 1284 | * @brief Disable direction change to up interrupt (UPIE). |
Anna Bridge |
160:5571c4ff569f | 1285 | * @rmtoll IER UPIE LL_LPTIM_DisableIT_UP |
Anna Bridge |
160:5571c4ff569f | 1286 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1287 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1288 | */ |
Anna Bridge |
160:5571c4ff569f | 1289 | __STATIC_INLINE void LL_LPTIM_DisableIT_UP(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1290 | { |
Anna Bridge |
160:5571c4ff569f | 1291 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_UPIE); |
Anna Bridge |
160:5571c4ff569f | 1292 | } |
Anna Bridge |
160:5571c4ff569f | 1293 | |
Anna Bridge |
160:5571c4ff569f | 1294 | /** |
Anna Bridge |
160:5571c4ff569f | 1295 | * @brief Indicates whether the direction change to up interrupt (UPIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1296 | * @rmtoll IER UPIE LL_LPTIM_IsEnabledIT_UP |
Anna Bridge |
160:5571c4ff569f | 1297 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1298 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1299 | */ |
Anna Bridge |
160:5571c4ff569f | 1300 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_UP(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1301 | { |
Anna Bridge |
160:5571c4ff569f | 1302 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_UPIE) == (LPTIM_IER_UPIE)); |
Anna Bridge |
160:5571c4ff569f | 1303 | } |
Anna Bridge |
160:5571c4ff569f | 1304 | |
Anna Bridge |
160:5571c4ff569f | 1305 | /** |
Anna Bridge |
160:5571c4ff569f | 1306 | * @brief Enable direction change to down interrupt (DOWNIE). |
Anna Bridge |
160:5571c4ff569f | 1307 | * @rmtoll IER DOWNIE LL_LPTIM_EnableIT_DOWN |
Anna Bridge |
160:5571c4ff569f | 1308 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1309 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1310 | */ |
Anna Bridge |
160:5571c4ff569f | 1311 | __STATIC_INLINE void LL_LPTIM_EnableIT_DOWN(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1312 | { |
Anna Bridge |
160:5571c4ff569f | 1313 | SET_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE); |
Anna Bridge |
160:5571c4ff569f | 1314 | } |
Anna Bridge |
160:5571c4ff569f | 1315 | |
Anna Bridge |
160:5571c4ff569f | 1316 | /** |
Anna Bridge |
160:5571c4ff569f | 1317 | * @brief Disable direction change to down interrupt (DOWNIE). |
Anna Bridge |
160:5571c4ff569f | 1318 | * @rmtoll IER DOWNIE LL_LPTIM_DisableIT_DOWN |
Anna Bridge |
160:5571c4ff569f | 1319 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1320 | * @retval None |
Anna Bridge |
160:5571c4ff569f | 1321 | */ |
Anna Bridge |
160:5571c4ff569f | 1322 | __STATIC_INLINE void LL_LPTIM_DisableIT_DOWN(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1323 | { |
Anna Bridge |
160:5571c4ff569f | 1324 | CLEAR_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE); |
Anna Bridge |
160:5571c4ff569f | 1325 | } |
Anna Bridge |
160:5571c4ff569f | 1326 | |
Anna Bridge |
160:5571c4ff569f | 1327 | /** |
Anna Bridge |
160:5571c4ff569f | 1328 | * @brief Indicates whether the direction change to down interrupt (DOWNIE) is enabled. |
Anna Bridge |
160:5571c4ff569f | 1329 | * @rmtoll IER DOWNIE LL_LPTIM_IsEnabledIT_DOWN |
Anna Bridge |
160:5571c4ff569f | 1330 | * @param LPTIMx Low-Power Timer instance |
Anna Bridge |
160:5571c4ff569f | 1331 | * @retval State of bit (1 or 0). |
Anna Bridge |
160:5571c4ff569f | 1332 | */ |
Anna Bridge |
160:5571c4ff569f | 1333 | __STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_DOWN(LPTIM_TypeDef *LPTIMx) |
Anna Bridge |
160:5571c4ff569f | 1334 | { |
Anna Bridge |
160:5571c4ff569f | 1335 | return (READ_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE) == (LPTIM_IER_DOWNIE)); |
Anna Bridge |
160:5571c4ff569f | 1336 | } |
Anna Bridge |
160:5571c4ff569f | 1337 | |
Anna Bridge |
160:5571c4ff569f | 1338 | /** |
Anna Bridge |
160:5571c4ff569f | 1339 | * @} |
Anna Bridge |
160:5571c4ff569f | 1340 | */ |
Anna Bridge |
160:5571c4ff569f | 1341 | |
Anna Bridge |
160:5571c4ff569f | 1342 | #if defined(USE_FULL_LL_DRIVER) |
Anna Bridge |
160:5571c4ff569f | 1343 | /** @defgroup LPTIM_LL_EF_Init Initialisation and deinitialisation functions |
Anna Bridge |
160:5571c4ff569f | 1344 | * @{ |
Anna Bridge |
160:5571c4ff569f | 1345 | */ |
Anna Bridge |
160:5571c4ff569f | 1346 | |
Anna Bridge |
160:5571c4ff569f | 1347 | ErrorStatus LL_LPTIM_DeInit(LPTIM_TypeDef *LPTIMx); |
Anna Bridge |
160:5571c4ff569f | 1348 | void LL_LPTIM_StructInit(LL_LPTIM_InitTypeDef *LPTIM_InitStruct); |
Anna Bridge |
160:5571c4ff569f | 1349 | ErrorStatus LL_LPTIM_Init(LPTIM_TypeDef *LPTIMx, LL_LPTIM_InitTypeDef *LPTIM_InitStruct); |
Anna Bridge |
160:5571c4ff569f | 1350 | /** |
Anna Bridge |
160:5571c4ff569f | 1351 | * @} |
Anna Bridge |
160:5571c4ff569f | 1352 | */ |
Anna Bridge |
160:5571c4ff569f | 1353 | #endif /* USE_FULL_LL_DRIVER */ |
Anna Bridge |
160:5571c4ff569f | 1354 | |
Anna Bridge |
160:5571c4ff569f | 1355 | /** |
Anna Bridge |
160:5571c4ff569f | 1356 | * @} |
Anna Bridge |
160:5571c4ff569f | 1357 | */ |
Anna Bridge |
160:5571c4ff569f | 1358 | |
Anna Bridge |
160:5571c4ff569f | 1359 | /** |
Anna Bridge |
160:5571c4ff569f | 1360 | * @} |
Anna Bridge |
160:5571c4ff569f | 1361 | */ |
Anna Bridge |
160:5571c4ff569f | 1362 | |
Anna Bridge |
160:5571c4ff569f | 1363 | #endif /* LPTIM1 */ |
Anna Bridge |
160:5571c4ff569f | 1364 | |
Anna Bridge |
160:5571c4ff569f | 1365 | /** |
Anna Bridge |
160:5571c4ff569f | 1366 | * @} |
Anna Bridge |
160:5571c4ff569f | 1367 | */ |
Anna Bridge |
160:5571c4ff569f | 1368 | |
Anna Bridge |
160:5571c4ff569f | 1369 | #ifdef __cplusplus |
Anna Bridge |
160:5571c4ff569f | 1370 | } |
Anna Bridge |
160:5571c4ff569f | 1371 | #endif |
Anna Bridge |
160:5571c4ff569f | 1372 | |
Anna Bridge |
160:5571c4ff569f | 1373 | #endif /* __STM32F4xx_LL_LPTIM_H */ |
Anna Bridge |
160:5571c4ff569f | 1374 | |
Anna Bridge |
160:5571c4ff569f | 1375 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |