Hierodule 1.6.2
Utility module set for STM32 MCUs
Loading...
Searching...
No Matches
hierodule_tim.h File Reference

: Header file for the timer module. More...

Go to the source code of this file.

Macros

#define HIERODULE_TIM_HANDLE_IRQ
 Precompiler constant to toggle timer ISR management elements.
 
#define HIERODULE_TIM_RESERVED   0
 Precompiler constant to omit the IRQ implementation of a timer.
 
#define HIERODULE_TIM_CONVENIENT_IRQ
 Precompiler constant to select timer ISR assignment routines.
 

Typedefs

typedef void(* FUNC_POINTER) (void)
 Typedef as for an alias for the void function pointer.
 

Functions

void HIERODULE_TIM_SetPeriod (TIM_TypeDef *Timer, double DurationSec)
 Sets the period duration of a timer.
 
double HIERODULE_TIM_GetPeriod (TIM_TypeDef *Timer)
 Returns the period duration of a timer in seconds.
 
void HIERODULE_TIM_SetFrequency (TIM_TypeDef *Timer, double Frequency_Hz)
 Sets the frequency of a timer.
 
double HIERODULE_TIM_GetFrequency (TIM_TypeDef *Timer)
 Returns the frequency of a timer in Hertz.
 
void HIERODULE_TIM_ClearCounter (TIM_TypeDef *Timer)
 Clears the counter register of a timer.
 
void HIERODULE_TIM_SetRepetition (TIM_TypeDef *Timer, uint32_t Reps)
 Sets the additional period repetitions of a timer.
 
uint32_t HIERODULE_TIM_GetRepetition (TIM_TypeDef *Timer)
 Returns the number of additional period repetitions of a timer.
 
void HIERODULE_TIM_EnableChannel (TIM_TypeDef *Timer, int8_t Channel)
 Enables the PWM output channel of a timer.
 
void HIERODULE_TIM_DisableChannel (TIM_TypeDef *Timer, int8_t Channel)
 Disables the PWM output channel of a timer.
 
uint32_t HIERODULE_TIM_IsEnabledChannel (TIM_TypeDef *Timer, int8_t Channel)
 Checks the status of the PWM output channel of a timer.
 
void HIERODULE_TIM_EnableMainOutput (TIM_TypeDef *Timer)
 Sets the main output enable bit in the break and dead time register of the timer.
 
void HIERODULE_TIM_DisableMainOutput (TIM_TypeDef *Timer)
 Clears the main output enable bit in the break and dead time register of the timer.
 
void HIERODULE_TIM_SetDutyCycle (TIM_TypeDef *Timer, uint8_t Channel, double NormalizedDutyCycle)
 Sets the duty cycle of the specified PWM output channel of a timer.
 
double HIERODULE_TIM_GetDutyCycle (TIM_TypeDef *Timer, uint8_t Channel)
 Returns the duty cycle of the specified PWM output channel of a timer.
 
void HIERODULE_TIM_ClearFlag_UPD (TIM_TypeDef *Timer)
 Clears the update interrupt flag of the timer.
 
void HIERODULE_TIM_ClearFlag_CC1 (TIM_TypeDef *Timer)
 Clears the capture compare channel 1 interrupt flag of the timer.
 
void HIERODULE_TIM_ClearFlag_CC2 (TIM_TypeDef *Timer)
 Clears the capture compare channel 2 interrupt flag of the timer.
 
void HIERODULE_TIM_ClearFlag_CC3 (TIM_TypeDef *Timer)
 Clears the capture compare channel 3 interrupt flag of the timer.
 
void HIERODULE_TIM_ClearFlag_CC4 (TIM_TypeDef *Timer)
 Clears the capture compare channel 4 interrupt flag of the timer.
 
void HIERODULE_TIM_ClearFlag_BRK (TIM_TypeDef *Timer)
 Clears the break interrupt flag of the timer.
 
uint32_t HIERODULE_TIM_IsSetFlag_UPD (TIM_TypeDef *Timer)
 Checks the status of the update interrupt flag of the timer.
 
uint32_t HIERODULE_TIM_IsSetFlag_CC1 (TIM_TypeDef *Timer)
 Checks the status of the capture compare channel 1 interrupt flag of the timer.
 
uint32_t HIERODULE_TIM_IsSetFlag_CC2 (TIM_TypeDef *Timer)
 Checks the status of the capture compare channel 2 interrupt flag of the timer.
 
uint32_t HIERODULE_TIM_IsSetFlag_CC3 (TIM_TypeDef *Timer)
 Checks the status of the capture compare channel 3 interrupt flag of the timer.
 
uint32_t HIERODULE_TIM_IsSetFlag_CC4 (TIM_TypeDef *Timer)
 Checks the status of the capture compare channel 4 interrupt flag of the timer.
 
uint32_t HIERODULE_TIM_IsSetFlag_BRK (TIM_TypeDef *Timer)
 Checks the status of the break interrupt flag of the timer.
 
void HIERODULE_TIM_Enable_IT_UPD (TIM_TypeDef *Timer)
 Enables the update interrupt of the timer.
 
void HIERODULE_TIM_Enable_IT_CC1 (TIM_TypeDef *Timer)
 Enables the capture compare channel 1 interrupt of the timer.
 
void HIERODULE_TIM_Enable_IT_CC2 (TIM_TypeDef *Timer)
 Enables the capture compare channel 2 interrupt of the timer.
 
void HIERODULE_TIM_Enable_IT_CC3 (TIM_TypeDef *Timer)
 Enables the capture compare channel 3 interrupt of the timer.
 
void HIERODULE_TIM_Enable_IT_CC4 (TIM_TypeDef *Timer)
 Enables the capture compare channel 4 interrupt of the timer.
 
void HIERODULE_TIM_Enable_IT_BRK (TIM_TypeDef *Timer)
 Enables the break interrupt of the timer.
 
void HIERODULE_TIM_Disable_IT_UPD (TIM_TypeDef *Timer)
 Disables the update interrupt of the timer.
 
void HIERODULE_TIM_Disable_IT_CC1 (TIM_TypeDef *Timer)
 Disables the capture compare channel 1 interrupt of the timer.
 
void HIERODULE_TIM_Disable_IT_CC2 (TIM_TypeDef *Timer)
 Disables the capture compare channel 2 interrupt of the timer.
 
void HIERODULE_TIM_Disable_IT_CC3 (TIM_TypeDef *Timer)
 Disables the capture compare channel 3 interrupt of the timer.
 
void HIERODULE_TIM_Disable_IT_CC4 (TIM_TypeDef *Timer)
 Disables the capture compare channel 4 interrupt of the timer.
 
void HIERODULE_TIM_Disable_IT_BRK (TIM_TypeDef *Timer)
 Disables the break interrupt of the timer.
 
uint32_t HIERODULE_TIM_IsEnabled_IT_UPD (TIM_TypeDef *Timer)
 Checks the update interrupt of the timer.
 
uint32_t HIERODULE_TIM_IsEnabled_IT_CC1 (TIM_TypeDef *Timer)
 Checks the capture compare channel 1 interrupt of the timer.
 
uint32_t HIERODULE_TIM_IsEnabled_IT_CC2 (TIM_TypeDef *Timer)
 Checks the capture compare channel 2 interrupt of the timer.
 
uint32_t HIERODULE_TIM_IsEnabled_IT_CC3 (TIM_TypeDef *Timer)
 Checks the capture compare channel 3 interrupt of the timer.
 
uint32_t HIERODULE_TIM_IsEnabled_IT_CC4 (TIM_TypeDef *Timer)
 Checks the capture compare channel 4 interrupt of the timer.
 
uint32_t HIERODULE_TIM_IsEnabled_IT_BRK (TIM_TypeDef *Timer)
 Checks the break interrupt of the timer.
 
void HIERODULE_TIM_EnableAutomaticOutput (TIM_TypeDef *Timer)
 Sets the automatic output enable bit in the break and dead time register of the timer.
 
void HIERODULE_TIM_DisableAutomaticOutput (TIM_TypeDef *Timer)
 Clears the automatic output enable bit in the break and dead time register of the timer.
 
void HIERODULE_TIM_EnableCounter (TIM_TypeDef *Timer)
 Enables the counter of a timer.
 
void HIERODULE_TIM_DisableCounter (TIM_TypeDef *Timer)
 Disables the counter of a timer.
 
uint32_t HIERODULE_TIM_IsEnabledCounter (TIM_TypeDef *Timer)
 Checks the status of the counter of a timer.
 
void HIERODULE_TIM_Assign_ISR_UPD (TIM_TypeDef *Timer, FUNC_POINTER ISR)
 Assigns a function to the designated flag handler for the update interrupt of a timer.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
 
void HIERODULE_TIM_Assign_ISR_CC1 (TIM_TypeDef *Timer, FUNC_POINTER ISR)
 Assigns a function to the designated flag handler for the capture compare channel 1 interrupt of a timer.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
 
void HIERODULE_TIM_Assign_ISR_CC2 (TIM_TypeDef *Timer, FUNC_POINTER ISR)
 Assigns a function to the designated flag handler for the capture compare channel 2 interrupt of a timer.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
 
void HIERODULE_TIM_Assign_ISR_CC3 (TIM_TypeDef *Timer, FUNC_POINTER ISR)
 Assigns a function to the designated flag handler for the capture compare channel 3 interrupt of a timer.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
 
void HIERODULE_TIM_Assign_ISR_CC4 (TIM_TypeDef *Timer, FUNC_POINTER ISR)
 Assigns a function to the designated flag handler for the capture compare channel 4 interrupt of a timer.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
 
void HIERODULE_TIM_Assign_ISR_BRK (TIM_TypeDef *Timer, FUNC_POINTER ISR)
 Assigns a function to the designated flag handler for the break interrupt of a timer.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
 
void HIERODULE_TIM_Assign_TIM1_CC_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 capture compare IRQ handler.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM2_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 2 IRQ handler.
Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM3_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 3 IRQ handler.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM4_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 4 IRQ handler.
Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM1_UP_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 update IRQ handler.
Requires the device specific macro __STM32F103xB_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM1_BRK_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 break IRQ handler.
Requires the device specific macro __STM32F103xB_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM1_UP_TIM10_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 update - timer 10 IRQ handler.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM1_BRK_TIM9_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 break - timer 9 IRQ handler.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM5_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 5 IRQ handler.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM1_TRG_COM_TIM11_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 trigger comm - timer 11 IRQ handler.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM1_BRK_UP_TRG_COM_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 1 break - update - trigger comm IRQ handler.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM14_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 14 IRQ handler.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM16_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 16 IRQ handler.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 
void HIERODULE_TIM_Assign_TIM17_ISR (FUNC_POINTER ISR)
 Assigns a function to the timer 17 IRQ handler.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Requires HIERODULE_TIM_CONVENIENT_IRQ to be NOT defined.
 

Detailed Description

Author
: ushumgigal
Attention
: Copyrighted (2024) by ushumgigal under MIT License, a copy of which may be found in the root folder of the repository.

Definition in file hierodule_tim.h.