TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
tm_stm32f4_timer_properties.h
1 
30 #ifndef TM_TIMER_PROPERTIES_H
31 #define TM_TIMER_PROPERTIES_H 110
32 
33 /* C++ detection */
34 #ifdef __cplusplus
35 extern C {
36 #endif
37 
74 #include "stm32f4xx.h"
75 #include "stm32f4xx_rcc.h"
76 #include "stm32f4xx_tim.h"
77 #include "defines.h"
78 
88 typedef enum {
95 
99 typedef struct {
100  uint32_t TimerFrequency;
101  uint32_t MaxPeriod;
102  uint32_t MaxPrescaler;
103  uint32_t Period;
104  uint32_t Prescaler;
105  uint32_t Frequency;
107 
125 
133 
140 
147 
160 /* C++ detection */
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif
166 
uint32_t MaxPrescaler
Definition: tm_stm32f4_timer_properties.h:102
Definition: tm_stm32f4_timer_properties.h:89
uint32_t TimerFrequency
Definition: tm_stm32f4_timer_properties.h:100
Definition: tm_stm32f4_timer_properties.h:92
uint32_t Frequency
Definition: tm_stm32f4_timer_properties.h:105
Structure for timer data.
Definition: tm_stm32f4_timer_properties.h:99
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_EnableClock(TIM_TypeDef *TIMx)
Enables timer clock.
uint32_t Prescaler
Definition: tm_stm32f4_timer_properties.h:104
Definition: tm_stm32f4_timer_properties.h:90
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_GetTimerProperties(TIM_TypeDef *TIMx, TM_TIMER_PROPERTIES_t *Timer_Data)
Gets timer properties.
uint32_t MaxPeriod
Definition: tm_stm32f4_timer_properties.h:101
TM_TIMER_PROPERTIES_Result_t
Timer result enumeration.
Definition: tm_stm32f4_timer_properties.h:88
Definition: tm_stm32f4_timer_properties.h:93
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_DisableClock(TIM_TypeDef *TIMx)
Disables timer clock.
uint32_t Period
Definition: tm_stm32f4_timer_properties.h:103
Definition: tm_stm32f4_timer_properties.h:91
TM_TIMER_PROPERTIES_Result_t TM_TIMER_PROPERTIES_GenerateDataForWorkingFrequency(TM_TIMER_PROPERTIES_t *Timer_Data, double frequency)
Generates period and prescaler for given timer frequency.