RTEMS 6.1-rc5
Loading...
Searching...
No Matches
stm32h7xx_ll_lptim.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_LL_LPTIM_H
21#define STM32H7xx_LL_LPTIM_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx.h"
29
34#if defined (LPTIM1) || defined (LPTIM2) || defined (LPTIM3) || defined (LPTIM4) || defined (LPTIM5)
35
41/* Private types -------------------------------------------------------------*/
42/* Private variables ---------------------------------------------------------*/
43
44/* Private constants ---------------------------------------------------------*/
45
46/* Private macros ------------------------------------------------------------*/
47#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
55#endif /*USE_FULL_LL_DRIVER*/
56
57/* Exported types ------------------------------------------------------------*/
58#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
67typedef struct
68{
69 uint32_t ClockSource;
75 uint32_t Prescaler;
81 uint32_t Waveform;
87 uint32_t Polarity;
92} LL_LPTIM_InitTypeDef;
93
97#endif /* USE_FULL_LL_DRIVER */
98
99/* Exported constants --------------------------------------------------------*/
110#define LL_LPTIM_ISR_CMPM LPTIM_ISR_CMPM
111#define LL_LPTIM_ISR_CMPOK LPTIM_ISR_CMPOK
112#define LL_LPTIM_ISR_ARRM LPTIM_ISR_ARRM
113#define LL_LPTIM_ISR_EXTTRIG LPTIM_ISR_EXTTRIG
114#define LL_LPTIM_ISR_ARROK LPTIM_ISR_ARROK
115#define LL_LPTIM_ISR_UP LPTIM_ISR_UP
116#define LL_LPTIM_ISR_DOWN LPTIM_ISR_DOWN
126#define LL_LPTIM_IER_CMPMIE LPTIM_IER_CMPMIE
127#define LL_LPTIM_IER_CMPOKIE LPTIM_IER_CMPOKIE
128#define LL_LPTIM_IER_ARRMIE LPTIM_IER_ARRMIE
129#define LL_LPTIM_IER_EXTTRIGIE LPTIM_IER_EXTTRIGIE
130#define LL_LPTIM_IER_ARROKIE LPTIM_IER_ARROKIE
131#define LL_LPTIM_IER_UPIE LPTIM_IER_UPIE
132#define LL_LPTIM_IER_DOWNIE LPTIM_IER_DOWNIE
141#define LL_LPTIM_OPERATING_MODE_CONTINUOUS LPTIM_CR_CNTSTRT
142#define LL_LPTIM_OPERATING_MODE_ONESHOT LPTIM_CR_SNGSTRT
151#define LL_LPTIM_UPDATE_MODE_IMMEDIATE 0x00000000U
152#define LL_LPTIM_UPDATE_MODE_ENDOFPERIOD LPTIM_CFGR_PRELOAD
161#define LL_LPTIM_COUNTER_MODE_INTERNAL 0x00000000U
162#define LL_LPTIM_COUNTER_MODE_EXTERNAL LPTIM_CFGR_COUNTMODE
171#define LL_LPTIM_OUTPUT_WAVEFORM_PWM 0x00000000U
172#define LL_LPTIM_OUTPUT_WAVEFORM_SETONCE LPTIM_CFGR_WAVE
181#define LL_LPTIM_OUTPUT_POLARITY_REGULAR 0x00000000U
182#define LL_LPTIM_OUTPUT_POLARITY_INVERSE LPTIM_CFGR_WAVPOL
191#define LL_LPTIM_PRESCALER_DIV1 0x00000000U
192#define LL_LPTIM_PRESCALER_DIV2 LPTIM_CFGR_PRESC_0
193#define LL_LPTIM_PRESCALER_DIV4 LPTIM_CFGR_PRESC_1
194#define LL_LPTIM_PRESCALER_DIV8 (LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_0)
195#define LL_LPTIM_PRESCALER_DIV16 LPTIM_CFGR_PRESC_2
196#define LL_LPTIM_PRESCALER_DIV32 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_0)
197#define LL_LPTIM_PRESCALER_DIV64 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_1)
198#define LL_LPTIM_PRESCALER_DIV128 LPTIM_CFGR_PRESC
207#define LL_LPTIM_TRIG_SOURCE_GPIO 0x00000000U
208#define LL_LPTIM_TRIG_SOURCE_RTCALARMA LPTIM_CFGR_TRIGSEL_0
209#define LL_LPTIM_TRIG_SOURCE_RTCALARMB LPTIM_CFGR_TRIGSEL_1
210#define LL_LPTIM_TRIG_SOURCE_RTCTAMP1 (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0)
211#define LL_LPTIM_TRIG_SOURCE_RTCTAMP2 LPTIM_CFGR_TRIGSEL_2
212#define LL_LPTIM_TRIG_SOURCE_RTCTAMP3 (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0)
213#define LL_LPTIM_TRIG_SOURCE_COMP1 (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_1)
214#define LL_LPTIM_TRIG_SOURCE_COMP2 LPTIM_CFGR_TRIGSEL
215#define LL_LPTIM_TRIG_SOURCE_LPTIM2 0x00000000U
216#define LL_LPTIM_TRIG_SOURCE_LPTIM3 LPTIM_CFGR_TRIGSEL_0
217#define LL_LPTIM_TRIG_SOURCE_LPTIM4 LPTIM_CFGR_TRIGSEL_1
218#define LL_LPTIM_TRIG_SOURCE_LPTIM5 (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0)
219#define LL_LPTIM_TRIG_SOURCE_SAI1_FS_A LPTIM_CFGR_TRIGSEL_2
220#define LL_LPTIM_TRIG_SOURCE_SAI1_FS_B (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0)
221#define LL_LPTIM_TRIG_SOURCE_SAI2_FS_A LPTIM_CFGR_TRIGSEL_2
222#define LL_LPTIM_TRIG_SOURCE_SAI2_FS_B (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0)
223#define LL_LPTIM_TRIG_SOURCE_SAI4_FS_A (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0)
224#define LL_LPTIM_TRIG_SOURCE_SAI4_FS_B LPTIM_CFGR_TRIGSEL_2
225#define LL_LPTIM_TRIG_SOURCE_DFSDM2_BRK (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_1)
234#define LL_LPTIM_TRIG_FILTER_NONE 0x00000000U
235#define LL_LPTIM_TRIG_FILTER_2 LPTIM_CFGR_TRGFLT_0
236#define LL_LPTIM_TRIG_FILTER_4 LPTIM_CFGR_TRGFLT_1
237#define LL_LPTIM_TRIG_FILTER_8 LPTIM_CFGR_TRGFLT
246#define LL_LPTIM_TRIG_POLARITY_RISING LPTIM_CFGR_TRIGEN_0
247#define LL_LPTIM_TRIG_POLARITY_FALLING LPTIM_CFGR_TRIGEN_1
248#define LL_LPTIM_TRIG_POLARITY_RISING_FALLING LPTIM_CFGR_TRIGEN
257#define LL_LPTIM_CLK_SOURCE_INTERNAL 0x00000000U
258#define LL_LPTIM_CLK_SOURCE_EXTERNAL LPTIM_CFGR_CKSEL
267#define LL_LPTIM_CLK_FILTER_NONE 0x00000000U
268#define LL_LPTIM_CLK_FILTER_2 LPTIM_CFGR_CKFLT_0
269#define LL_LPTIM_CLK_FILTER_4 LPTIM_CFGR_CKFLT_1
270#define LL_LPTIM_CLK_FILTER_8 LPTIM_CFGR_CKFLT
279#define LL_LPTIM_CLK_POLARITY_RISING 0x00000000U
280#define LL_LPTIM_CLK_POLARITY_FALLING LPTIM_CFGR_CKPOL_0
281#define LL_LPTIM_CLK_POLARITY_RISING_FALLING LPTIM_CFGR_CKPOL_1
290#define LL_LPTIM_ENCODER_MODE_RISING 0x00000000U
291#define LL_LPTIM_ENCODER_MODE_FALLING LPTIM_CFGR_CKPOL_0
292#define LL_LPTIM_ENCODER_MODE_RISING_FALLING LPTIM_CFGR_CKPOL_1
301#define LL_LPTIM_INPUT1_SRC_GPIO 0x00000000U
302#define LL_LPTIM_INPUT1_SRC_COMP1 LPTIM_CFGR2_IN1SEL_0
303#define LL_LPTIM_INPUT1_SRC_COMP2 LPTIM_CFGR2_IN1SEL_1
304#define LL_LPTIM_INPUT1_SRC_COMP1_COMP2 (LPTIM_CFGR2_IN1SEL_1 | LPTIM_CFGR2_IN1SEL_0)
305#define LL_LPTIM_INPUT1_SRC_SAI4_FS_A LPTIM_CFGR2_IN1SEL_0
306#define LL_LPTIM_INPUT1_SRC_SAI4_FS_B LPTIM_CFGR2_IN1SEL_1
315#define LL_LPTIM_INPUT2_SRC_GPIO 0x00000000U
316#define LL_LPTIM_INPUT2_SRC_COMP2 LPTIM_CFGR2_IN2SEL_0
325/* Exported macro ------------------------------------------------------------*/
343#define LL_LPTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
344
351#define LL_LPTIM_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__)
360/* Exported functions --------------------------------------------------------*/
369#define LL_LPTIM_ClearFLAG_CMPM LL_LPTIM_ClearFlag_CMPM
370#define LL_LPTIM_ClearFLAG_CC1 LL_LPTIM_ClearFlag_CC1
371#define LL_LPTIM_ClearFLAG_CC2 LL_LPTIM_ClearFlag_CC2
372#define LL_LPTIM_ClearFLAG_CC1O LL_LPTIM_ClearFlag_CC1O
373#define LL_LPTIM_ClearFLAG_CC2O LL_LPTIM_ClearFlag_CC2O
374#define LL_LPTIM_ClearFLAG_ARRM LL_LPTIM_ClearFlag_ARRM
379#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
385ErrorStatus LL_LPTIM_DeInit(const LPTIM_TypeDef *LPTIMx);
386void LL_LPTIM_StructInit(LL_LPTIM_InitTypeDef *LPTIM_InitStruct);
387ErrorStatus LL_LPTIM_Init(LPTIM_TypeDef *LPTIMx, const LL_LPTIM_InitTypeDef *LPTIM_InitStruct);
388void LL_LPTIM_Disable(LPTIM_TypeDef *LPTIMx);
392#endif /* USE_FULL_LL_DRIVER */
393
407__STATIC_INLINE void LL_LPTIM_Enable(LPTIM_TypeDef *LPTIMx)
408{
409 SET_BIT(LPTIMx->CR, LPTIM_CR_ENABLE);
410}
411
418__STATIC_INLINE uint32_t LL_LPTIM_IsEnabled(const LPTIM_TypeDef *LPTIMx)
419{
420 return (((READ_BIT(LPTIMx->CR, LPTIM_CR_ENABLE) == LPTIM_CR_ENABLE) ? 1UL : 0UL));
421}
422
436__STATIC_INLINE void LL_LPTIM_StartCounter(LPTIM_TypeDef *LPTIMx, uint32_t OperatingMode)
437{
438 MODIFY_REG(LPTIMx->CR, LPTIM_CR_CNTSTRT | LPTIM_CR_SNGSTRT, OperatingMode);
439}
440
449__STATIC_INLINE void LL_LPTIM_EnableResetAfterRead(LPTIM_TypeDef *LPTIMx)
450{
451 SET_BIT(LPTIMx->CR, LPTIM_CR_RSTARE);
452}
453
460__STATIC_INLINE void LL_LPTIM_DisableResetAfterRead(LPTIM_TypeDef *LPTIMx)
461{
462 CLEAR_BIT(LPTIMx->CR, LPTIM_CR_RSTARE);
463}
464
471__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledResetAfterRead(const LPTIM_TypeDef *LPTIMx)
472{
473 return (((READ_BIT(LPTIMx->CR, LPTIM_CR_RSTARE) == LPTIM_CR_RSTARE) ? 1UL : 0UL));
474}
475
486__STATIC_INLINE void LL_LPTIM_ResetCounter(LPTIM_TypeDef *LPTIMx)
487{
488 SET_BIT(LPTIMx->CR, LPTIM_CR_COUNTRST);
489}
490
501__STATIC_INLINE void LL_LPTIM_SetUpdateMode(LPTIM_TypeDef *LPTIMx, uint32_t UpdateMode)
502{
503 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD, UpdateMode);
504}
505
514__STATIC_INLINE uint32_t LL_LPTIM_GetUpdateMode(const LPTIM_TypeDef *LPTIMx)
515{
516 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD));
517}
518
532__STATIC_INLINE void LL_LPTIM_SetAutoReload(LPTIM_TypeDef *LPTIMx, uint32_t AutoReload)
533{
534 MODIFY_REG(LPTIMx->ARR, LPTIM_ARR_ARR, AutoReload);
535}
536
543__STATIC_INLINE uint32_t LL_LPTIM_GetAutoReload(const LPTIM_TypeDef *LPTIMx)
544{
545 return (uint32_t)(READ_BIT(LPTIMx->ARR, LPTIM_ARR_ARR));
546}
547
559__STATIC_INLINE void LL_LPTIM_SetCompare(LPTIM_TypeDef *LPTIMx, uint32_t CompareValue)
560{
561 MODIFY_REG(LPTIMx->CMP, LPTIM_CMP_CMP, CompareValue);
562}
563
570__STATIC_INLINE uint32_t LL_LPTIM_GetCompare(const LPTIM_TypeDef *LPTIMx)
571{
572 return (uint32_t)(READ_BIT(LPTIMx->CMP, LPTIM_CMP_CMP));
573}
574
585__STATIC_INLINE uint32_t LL_LPTIM_GetCounter(const LPTIM_TypeDef *LPTIMx)
586{
587 return (uint32_t)(READ_BIT(LPTIMx->CNT, LPTIM_CNT_CNT));
588}
589
600__STATIC_INLINE void LL_LPTIM_SetCounterMode(LPTIM_TypeDef *LPTIMx, uint32_t CounterMode)
601{
602 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE, CounterMode);
603}
604
613__STATIC_INLINE uint32_t LL_LPTIM_GetCounterMode(const LPTIM_TypeDef *LPTIMx)
614{
615 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE));
616}
617
635__STATIC_INLINE void LL_LPTIM_ConfigOutput(LPTIM_TypeDef *LPTIMx, uint32_t Waveform, uint32_t Polarity)
636{
637 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE | LPTIM_CFGR_WAVPOL, Waveform | Polarity);
638}
639
649__STATIC_INLINE void LL_LPTIM_SetWaveform(LPTIM_TypeDef *LPTIMx, uint32_t Waveform)
650{
651 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE, Waveform);
652}
653
662__STATIC_INLINE uint32_t LL_LPTIM_GetWaveform(const LPTIM_TypeDef *LPTIMx)
663{
664 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVE));
665}
666
676__STATIC_INLINE void LL_LPTIM_SetPolarity(LPTIM_TypeDef *LPTIMx, uint32_t Polarity)
677{
678 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL, Polarity);
679}
680
689__STATIC_INLINE uint32_t LL_LPTIM_GetPolarity(const LPTIM_TypeDef *LPTIMx)
690{
691 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL));
692}
693
714__STATIC_INLINE void LL_LPTIM_SetPrescaler(LPTIM_TypeDef *LPTIMx, uint32_t Prescaler)
715{
716 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRESC, Prescaler);
717}
718
733__STATIC_INLINE uint32_t LL_LPTIM_GetPrescaler(const LPTIM_TypeDef *LPTIMx)
734{
735 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRESC));
736}
737
751__STATIC_INLINE void LL_LPTIM_SetInput1Src(LPTIM_TypeDef *LPTIMx, uint32_t Src)
752{
753 MODIFY_REG(LPTIMx->CFGR2, LPTIM_CFGR2_IN1SEL, Src);
754}
755
765__STATIC_INLINE void LL_LPTIM_SetInput2Src(LPTIM_TypeDef *LPTIMx, uint32_t Src)
766{
767 MODIFY_REG(LPTIMx->CFGR2, LPTIM_CFGR2_IN2SEL, Src);
768}
769
791__STATIC_INLINE void LL_LPTIM_EnableTimeout(LPTIM_TypeDef *LPTIMx)
792{
793 SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT);
794}
795
805__STATIC_INLINE void LL_LPTIM_DisableTimeout(LPTIM_TypeDef *LPTIMx)
806{
807 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT);
808}
809
816__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledTimeout(const LPTIM_TypeDef *LPTIMx)
817{
818 return (((READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT) == LPTIM_CFGR_TIMOUT) ? 1UL : 0UL));
819}
820
828__STATIC_INLINE void LL_LPTIM_TrigSw(LPTIM_TypeDef *LPTIMx)
829{
830 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN);
831}
832
876__STATIC_INLINE void LL_LPTIM_ConfigTrigger(LPTIM_TypeDef *LPTIMx, uint32_t Source, uint32_t Filter, uint32_t Polarity)
877{
878 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL | LPTIM_CFGR_TRGFLT | LPTIM_CFGR_TRIGEN, Source | Filter | Polarity);
879}
880
909__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerSource(const LPTIM_TypeDef *LPTIMx)
910{
911 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL));
912}
913
924__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerFilter(const LPTIM_TypeDef *LPTIMx)
925{
926 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRGFLT));
927}
928
938__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerPolarity(const LPTIM_TypeDef *LPTIMx)
939{
940 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN));
941}
942
962__STATIC_INLINE void LL_LPTIM_SetClockSource(LPTIM_TypeDef *LPTIMx, uint32_t ClockSource)
963{
964 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKSEL, ClockSource);
965}
966
975__STATIC_INLINE uint32_t LL_LPTIM_GetClockSource(const LPTIM_TypeDef *LPTIMx)
976{
977 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKSEL));
978}
979
1003__STATIC_INLINE void LL_LPTIM_ConfigClock(LPTIM_TypeDef *LPTIMx, uint32_t ClockFilter, uint32_t ClockPolarity)
1004{
1005 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKFLT | LPTIM_CFGR_CKPOL, ClockFilter | ClockPolarity);
1006}
1007
1017__STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity(const LPTIM_TypeDef *LPTIMx)
1018{
1019 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL));
1020}
1021
1032__STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter(const LPTIM_TypeDef *LPTIMx)
1033{
1034 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKFLT));
1035}
1036
1057__STATIC_INLINE void LL_LPTIM_SetEncoderMode(LPTIM_TypeDef *LPTIMx, uint32_t EncoderMode)
1058{
1059 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKPOL, EncoderMode);
1060}
1061
1071__STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode(const LPTIM_TypeDef *LPTIMx)
1072{
1073 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL));
1074}
1075
1087__STATIC_INLINE void LL_LPTIM_EnableEncoderMode(LPTIM_TypeDef *LPTIMx)
1088{
1089 SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC);
1090}
1091
1099__STATIC_INLINE void LL_LPTIM_DisableEncoderMode(LPTIM_TypeDef *LPTIMx)
1100{
1101 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC);
1102}
1103
1110__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode(const LPTIM_TypeDef *LPTIMx)
1111{
1112 return (((READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC) == LPTIM_CFGR_ENC) ? 1UL : 0UL));
1113}
1114
1131__STATIC_INLINE void LL_LPTIM_ClearFlag_CMPM(LPTIM_TypeDef *LPTIMx)
1132{
1133 SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPMCF);
1134}
1135
1142__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPM(const LPTIM_TypeDef *LPTIMx)
1143{
1144 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPM) == LPTIM_ISR_CMPM) ? 1UL : 0UL));
1145}
1146
1153__STATIC_INLINE void LL_LPTIM_ClearFlag_ARRM(LPTIM_TypeDef *LPTIMx)
1154{
1155 SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARRMCF);
1156}
1157
1164__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARRM(const LPTIM_TypeDef *LPTIMx)
1165{
1166 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARRM) == LPTIM_ISR_ARRM) ? 1UL : 0UL));
1167}
1168
1175__STATIC_INLINE void LL_LPTIM_ClearFlag_EXTTRIG(LPTIM_TypeDef *LPTIMx)
1176{
1177 SET_BIT(LPTIMx->ICR, LPTIM_ICR_EXTTRIGCF);
1178}
1179
1186__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_EXTTRIG(const LPTIM_TypeDef *LPTIMx)
1187{
1188 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_EXTTRIG) == LPTIM_ISR_EXTTRIG) ? 1UL : 0UL));
1189}
1190
1197__STATIC_INLINE void LL_LPTIM_ClearFlag_CMPOK(LPTIM_TypeDef *LPTIMx)
1198{
1199 SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPOKCF);
1200}
1201
1209__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPOK(const LPTIM_TypeDef *LPTIMx)
1210{
1211 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPOK) == LPTIM_ISR_CMPOK) ? 1UL : 0UL));
1212}
1213
1220__STATIC_INLINE void LL_LPTIM_ClearFlag_ARROK(LPTIM_TypeDef *LPTIMx)
1221{
1222 SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARROKCF);
1223}
1224
1232__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARROK(const LPTIM_TypeDef *LPTIMx)
1233{
1234 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARROK) == LPTIM_ISR_ARROK) ? 1UL : 0UL));
1235}
1236
1243__STATIC_INLINE void LL_LPTIM_ClearFlag_UP(LPTIM_TypeDef *LPTIMx)
1244{
1245 SET_BIT(LPTIMx->ICR, LPTIM_ICR_UPCF);
1246}
1247
1255__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_UP(const LPTIM_TypeDef *LPTIMx)
1256{
1257 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_UP) == LPTIM_ISR_UP) ? 1UL : 0UL));
1258}
1259
1266__STATIC_INLINE void LL_LPTIM_ClearFlag_DOWN(LPTIM_TypeDef *LPTIMx)
1267{
1268 SET_BIT(LPTIMx->ICR, LPTIM_ICR_DOWNCF);
1269}
1270
1278__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_DOWN(const LPTIM_TypeDef *LPTIMx)
1279{
1280 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_DOWN) == LPTIM_ISR_DOWN) ? 1UL : 0UL));
1281}
1282
1298__STATIC_INLINE void LL_LPTIM_EnableIT_CMPM(LPTIM_TypeDef *LPTIMx)
1299{
1300 SET_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE);
1301}
1302
1309__STATIC_INLINE void LL_LPTIM_DisableIT_CMPM(LPTIM_TypeDef *LPTIMx)
1310{
1311 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE);
1312}
1313
1320__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPM(const LPTIM_TypeDef *LPTIMx)
1321{
1322 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE) == LPTIM_IER_CMPMIE) ? 1UL : 0UL));
1323}
1324
1331__STATIC_INLINE void LL_LPTIM_EnableIT_ARRM(LPTIM_TypeDef *LPTIMx)
1332{
1333 SET_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE);
1334}
1335
1342__STATIC_INLINE void LL_LPTIM_DisableIT_ARRM(LPTIM_TypeDef *LPTIMx)
1343{
1344 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE);
1345}
1346
1353__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARRM(const LPTIM_TypeDef *LPTIMx)
1354{
1355 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE) == LPTIM_IER_ARRMIE) ? 1UL : 0UL));
1356}
1357
1364__STATIC_INLINE void LL_LPTIM_EnableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx)
1365{
1366 SET_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE);
1367}
1368
1375__STATIC_INLINE void LL_LPTIM_DisableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx)
1376{
1377 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE);
1378}
1379
1386__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_EXTTRIG(const LPTIM_TypeDef *LPTIMx)
1387{
1388 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE) == LPTIM_IER_EXTTRIGIE) ? 1UL : 0UL));
1389}
1390
1397__STATIC_INLINE void LL_LPTIM_EnableIT_CMPOK(LPTIM_TypeDef *LPTIMx)
1398{
1399 SET_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE);
1400}
1401
1408__STATIC_INLINE void LL_LPTIM_DisableIT_CMPOK(LPTIM_TypeDef *LPTIMx)
1409{
1410 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE);
1411}
1412
1419__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPOK(const LPTIM_TypeDef *LPTIMx)
1420{
1421 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE) == LPTIM_IER_CMPOKIE) ? 1UL : 0UL));
1422}
1423
1430__STATIC_INLINE void LL_LPTIM_EnableIT_ARROK(LPTIM_TypeDef *LPTIMx)
1431{
1432 SET_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE);
1433}
1434
1441__STATIC_INLINE void LL_LPTIM_DisableIT_ARROK(LPTIM_TypeDef *LPTIMx)
1442{
1443 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE);
1444}
1445
1452__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARROK(const LPTIM_TypeDef *LPTIMx)
1453{
1454 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE) == LPTIM_IER_ARROKIE) ? 1UL : 0UL));
1455}
1456
1463__STATIC_INLINE void LL_LPTIM_EnableIT_UP(LPTIM_TypeDef *LPTIMx)
1464{
1465 SET_BIT(LPTIMx->IER, LPTIM_IER_UPIE);
1466}
1467
1474__STATIC_INLINE void LL_LPTIM_DisableIT_UP(LPTIM_TypeDef *LPTIMx)
1475{
1476 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_UPIE);
1477}
1478
1485__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_UP(const LPTIM_TypeDef *LPTIMx)
1486{
1487 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_UPIE) == LPTIM_IER_UPIE) ? 1UL : 0UL));
1488}
1489
1496__STATIC_INLINE void LL_LPTIM_EnableIT_DOWN(LPTIM_TypeDef *LPTIMx)
1497{
1498 SET_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE);
1499}
1500
1507__STATIC_INLINE void LL_LPTIM_DisableIT_DOWN(LPTIM_TypeDef *LPTIMx)
1508{
1509 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE);
1510}
1511
1518__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_DOWN(const LPTIM_TypeDef *LPTIMx)
1519{
1520 return ((READ_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE) == LPTIM_IER_DOWNIE) ? 1UL : 0UL);
1521}
1522
1535#endif /* LPTIM1 || LPTIM2 || LPTIM3 || LPTIM4 || LPTIM5 */
1536
1541#ifdef __cplusplus
1542}
1543#endif
1544
1545#endif /* STM32H7xx_LL_LPTIM_H */
#define LPTIM_CFGR_CKPOL
Definition: stm32h723xx.h:20199
#define LPTIM_ICR_EXTTRIGCF
Definition: stm32h723xx.h:20155
#define LPTIM_CFGR2_IN1SEL
Definition: stm32h723xx.h:20290
#define LPTIM_CR_RSTARE
Definition: stm32h723xx.h:20269
#define LPTIM_CFGR_TRGFLT
Definition: stm32h723xx.h:20211
#define LPTIM_CFGR_WAVE
Definition: stm32h723xx.h:20240
#define LPTIM_CFGR_TIMOUT
Definition: stm32h723xx.h:20237
#define LPTIM_IER_DOWNIE
Definition: stm32h723xx.h:20190
#define LPTIM_CFGR_COUNTMODE
Definition: stm32h723xx.h:20249
#define LPTIM_ISR_CMPOK
Definition: stm32h723xx.h:20135
#define LPTIM_ICR_ARROKCF
Definition: stm32h723xx.h:20161
#define LPTIM_ICR_CMPOKCF
Definition: stm32h723xx.h:20158
#define LPTIM_CR_COUNTRST
Definition: stm32h723xx.h:20266
#define LPTIM_CFGR_TRIGSEL
Definition: stm32h723xx.h:20224
#define LPTIM_ISR_EXTTRIG
Definition: stm32h723xx.h:20132
#define LPTIM_IER_UPIE
Definition: stm32h723xx.h:20187
#define LPTIM_CFGR2_IN2SEL
Definition: stm32h723xx.h:20295
#define LPTIM_CR_CNTSTRT
Definition: stm32h723xx.h:20263
#define LPTIM_IER_CMPMIE
Definition: stm32h723xx.h:20172
#define LPTIM_CR_ENABLE
Definition: stm32h723xx.h:20257
#define LPTIM_ISR_ARRM
Definition: stm32h723xx.h:20129
#define LPTIM_CMP_CMP
Definition: stm32h723xx.h:20275
#define LPTIM_IER_ARROKIE
Definition: stm32h723xx.h:20184
#define LPTIM_IER_EXTTRIGIE
Definition: stm32h723xx.h:20178
#define LPTIM_ICR_UPCF
Definition: stm32h723xx.h:20164
#define LPTIM_CFGR_CKFLT
Definition: stm32h723xx.h:20205
#define LPTIM_CR_SNGSTRT
Definition: stm32h723xx.h:20260
#define LPTIM_ISR_UP
Definition: stm32h723xx.h:20141
#define LPTIM_ISR_CMPM
Definition: stm32h723xx.h:20126
#define LPTIM_ICR_ARRMCF
Definition: stm32h723xx.h:20152
#define LPTIM_ISR_ARROK
Definition: stm32h723xx.h:20138
#define LPTIM_IER_ARRMIE
Definition: stm32h723xx.h:20175
#define LPTIM_IER_CMPOKIE
Definition: stm32h723xx.h:20181
#define LPTIM_ICR_CMPMCF
Definition: stm32h723xx.h:20149
#define LPTIM_ARR_ARR
Definition: stm32h723xx.h:20280
#define LPTIM_CFGR_ENC
Definition: stm32h723xx.h:20252
#define LPTIM_CFGR_PRELOAD
Definition: stm32h723xx.h:20246
#define LPTIM_ICR_DOWNCF
Definition: stm32h723xx.h:20167
#define LPTIM_CFGR_TRIGEN
Definition: stm32h723xx.h:20231
#define LPTIM_CFGR_PRESC
Definition: stm32h723xx.h:20217
#define LPTIM_ISR_DOWN
Definition: stm32h723xx.h:20144
#define LPTIM_CFGR_CKSEL
Definition: stm32h723xx.h:20195
#define LPTIM_CNT_CNT
Definition: stm32h723xx.h:20285
#define LPTIM_CFGR_WAVPOL
Definition: stm32h723xx.h:20243
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
LPTIMIMER.
Definition: stm32h723xx.h:1559
__IO uint32_t ICR
Definition: stm32h723xx.h:1561
__IO uint32_t ARR
Definition: stm32h723xx.h:1566
__IO uint32_t CMP
Definition: stm32h723xx.h:1565
__IO uint32_t CFGR
Definition: stm32h723xx.h:1563
__IO uint32_t IER
Definition: stm32h723xx.h:1562
__IO uint32_t ISR
Definition: stm32h723xx.h:1560
__IO uint32_t CFGR2
Definition: stm32h723xx.h:1569
__IO uint32_t CNT
Definition: stm32h723xx.h:1567
__IO uint32_t CR
Definition: stm32h723xx.h:1564