Hierodule 1.6.2
Utility module set for STM32 MCUs
Loading...
Searching...
No Matches

Elements of the module that are not confined to the scope of the compilation unit. Perfectly corresponds to the module's header file, except the IRQ handlers. More...

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.
 
void TIM1_UP_IRQHandler (void)
 Timer 1 update interrupt IRQ implementation.
Requires the device specific macro __STM32F103xB_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1.
 
void TIM1_UP_TIM10_IRQHandler (void)
 Timer 1 update interrupt - timer 10 IRQ implementation.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1 or 10.
 
void TIM1_CC_IRQHandler (void)
 Timer 1 capture compare interrupt IRQ implementation.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1.
 
void TIM1_BRK_IRQHandler (void)
 Timer 1 break interrupt IRQ implementation.
Requires the device specific macro __STM32F103xB_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1.
 
void TIM1_BRK_TIM9_IRQHandler (void)
 Timer 1 break interrupt - timer 9 IRQ implementation.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1 or 9.
 
void TIM1_BRK_UP_TRG_COM_IRQHandler (void)
 Timer 1 break - update - trigger comm IRQ implementation.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1.
 
void TIM2_IRQHandler (void)
 Timer 2 IRQ implementation.
Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 2.
 
void TIM3_IRQHandler (void)
 Timer 3 IRQ implementation.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 3.
 
void TIM4_IRQHandler (void)
 Timer 4 IRQ implementation.
Requires the device specific macro __STM32F103xB_H or __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 4.
 
void TIM5_IRQHandler (void)
 Timer 5 IRQ implementation.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 5.
 
void TIM1_TRG_COM_TIM11_IRQHandler (void)
 Timer 1 trigger comm interrupt - timer 11 IRQ implementation.
Requires the device specific macro __STM32F401xC_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 1 or 11.
 
void TIM14_IRQHandler (void)
 Timer 14 IRQ implementation.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 14.
 
void TIM16_IRQHandler (void)
 Timer 16 IRQ implementation.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 16.
 
void TIM17_IRQHandler (void)
 Timer 17 IRQ implementation.
Requires the device specific macro __STM32F030x6_H to be defined.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.
Won't be compiled if HIERODULE_TIM_RESERVED equals 17.
 

Detailed Description

Consists of PWM output management and Timer interrupt handling routines, as well as a void function pointer alias typedef for convenience and a pair of precompiler constants to configure module behaviour.
Device-specific macro constants and type definitions are imported with an include directive to main.h, where the device driver headers are assumed to be included.
stdlib.h also included for abs.

Macro Definition Documentation

◆ HIERODULE_TIM_CONVENIENT_IRQ

#define HIERODULE_TIM_CONVENIENT_IRQ

When commented out, ISRs will be assigned per IRQ instead of per interrupt flag and the routine Check_IT will be omitted.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.

Definition at line 56 of file hierodule_tim.h.

◆ HIERODULE_TIM_HANDLE_IRQ

#define HIERODULE_TIM_HANDLE_IRQ

When commented out, IRQ handler routines won't be defined in the source file.

Definition at line 39 of file hierodule_tim.h.

◆ HIERODULE_TIM_RESERVED

#define HIERODULE_TIM_RESERVED   0

This is basically to reserve a timer for HAL timebase, when FreeRTOS uses SysTick.
When declared as 0, it will have no effect. When declared as n, TIMn IRQ won't be implemented.
Requires HIERODULE_TIM_HANDLE_IRQ to be defined.

Definition at line 48 of file hierodule_tim.h.

Typedef Documentation

◆ FUNC_POINTER

typedef void(* FUNC_POINTER) (void)

Used for convenience, really. It's used a lot, especially in the source file. It would be a clutter of asterisks and paranthesis otherwise.

Definition at line 66 of file hierodule_tim.h.

Function Documentation

◆ HIERODULE_TIM_Assign_ISR_BRK()

void HIERODULE_TIM_Assign_ISR_BRK ( TIM_TypeDef * Timer,
FUNC_POINTER ISR )
Parameters
TimerPointer to timer struct.
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Assigns the the ISR to the designated handler for Check_IT to use inside the IRQ if the selected timer indeed has the break interrupt flag, branches to InfiniteLoopOfError otherwise.

Definition at line 1337 of file hierodule_tim.c.

1338{
1339 uint32_t TimerAddress = (uint32_t)Timer;
1340
1341 switch(TimerAddress)
1342 {
1343 case ( (uint32_t)TIM1 ):
1344 BRK_Handler_TIM1 = ISR;
1345 break;
1347 #ifdef __STM32F030x6_H
1348 case ( (uint32_t)TIM17 ):
1349 BRK_Handler_TIM17 = ISR;
1350 break;
1352 #endif
1353 default:
1355 }
1356}
static void InfiniteLoopOfError(void)
Requires HIERODULE_TIM_HANDLE_IRQ to be defined. Requires HIERODULE_TIM_CONVENIENT_IRQ to be defined.
static FUNC_POINTER BRK_Handler_TIM17
ISR handler for break interrupt flag of timer 17 Requires the device specific macro __STM32F030x6_H t...
static FUNC_POINTER BRK_Handler_TIM1
ISR handler for break interrupt flag of timer 1 Requires HIERODULE_TIM_HANDLE_IRQ to be defined....

References BRK_Handler_TIM1, BRK_Handler_TIM17, and InfiniteLoopOfError().

◆ HIERODULE_TIM_Assign_ISR_CC1()

void HIERODULE_TIM_Assign_ISR_CC1 ( TIM_TypeDef * Timer,
FUNC_POINTER ISR )
Parameters
TimerPointer to timer struct.
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Assigns the the ISR to the designated handler for Check_IT to use inside the IRQ if the selected timer indeed has the capture compare channel 1 interrupt flag, branches to InfiniteLoopOfError otherwise.

Definition at line 1158 of file hierodule_tim.c.

1159{
1160 uint32_t TimerAddress = (uint32_t)Timer;
1161
1162 switch(TimerAddress)
1163 {
1164 case ( (uint32_t)TIM1 ):
1165 CC1_Handler_TIM1 = ISR;
1166 break;
1168 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1169 case ( (uint32_t)TIM2 ):
1170 CC1_Handler_TIM2 = ISR;
1171 break;
1173 #endif
1174 case ( (uint32_t)TIM3 ):
1175 CC1_Handler_TIM3 = ISR;
1176 break;
1178 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1179 case ( (uint32_t)TIM4 ):
1180 CC1_Handler_TIM4 = ISR;
1181 break;
1183 #endif
1184 #ifdef __STM32F401xC_H
1185 case ( (uint32_t)TIM5 ):
1186 CC1_Handler_TIM5 = ISR;
1187 break;
1188 case ( (uint32_t)TIM9 ):
1189 CC1_Handler_TIM9 = ISR;
1190 break;
1191 case ( (uint32_t)TIM10 ):
1192 CC1_Handler_TIM10 = ISR;
1193 break;
1194 case ( (uint32_t)TIM11 ):
1195 CC1_Handler_TIM11 = ISR;
1196 break;
1198 #elif defined __STM32F030x6_H
1199 case ( (uint32_t)TIM14 ):
1200 CC1_Handler_TIM14 = ISR;
1201 break;
1202 case ( (uint32_t)TIM16 ):
1203 CC1_Handler_TIM16 = ISR;
1204 break;
1205 case ( (uint32_t)TIM17 ):
1206 CC1_Handler_TIM17 = ISR;
1207 break;
1209 #endif
1210 default:
1212 }
1213}
static FUNC_POINTER CC1_Handler_TIM1
ISR handler for capture compare channel 1 interrupt flag of timer 1 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC1_Handler_TIM5
ISR handler for capture compare channel 1 interrupt flag of timer 5 Requires the device specific macr...
static FUNC_POINTER CC1_Handler_TIM9
ISR handler for capture compare channel 1 interrupt flag of timer 9 Requires the device specific macr...
static FUNC_POINTER CC1_Handler_TIM14
ISR handler for capture compare channel 1 interrupt flag of timer 14 Requires the device specific mac...
static FUNC_POINTER CC1_Handler_TIM11
ISR handler for capture compare channel 1 interrupt flag of timer 11 Requires the device specific mac...
static FUNC_POINTER CC1_Handler_TIM17
ISR handler for capture compare channel 1 interrupt flag of timer 17 Requires the device specific mac...
static FUNC_POINTER CC1_Handler_TIM3
ISR handler for capture compare channel 1 interrupt flag of timer 3 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC1_Handler_TIM2
ISR handler for capture compare channel 1 interrupt flag of timer 2 Requires the device specific macr...
static FUNC_POINTER CC1_Handler_TIM16
ISR handler for capture compare channel 1 interrupt flag of timer 16 Requires the device specific mac...
static FUNC_POINTER CC1_Handler_TIM10
ISR handler for capture compare channel 1 interrupt flag of timer 10 Requires the device specific mac...
static FUNC_POINTER CC1_Handler_TIM4
ISR handler for capture compare channel 1 interrupt flag of timer 4 Requires the device specific macr...

References CC1_Handler_TIM1, CC1_Handler_TIM10, CC1_Handler_TIM11, CC1_Handler_TIM14, CC1_Handler_TIM16, CC1_Handler_TIM17, CC1_Handler_TIM2, CC1_Handler_TIM3, CC1_Handler_TIM4, CC1_Handler_TIM5, CC1_Handler_TIM9, and InfiniteLoopOfError().

◆ HIERODULE_TIM_Assign_ISR_CC2()

void HIERODULE_TIM_Assign_ISR_CC2 ( TIM_TypeDef * Timer,
FUNC_POINTER ISR )
Parameters
TimerPointer to timer struct.
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Assigns the the ISR to the designated handler for Check_IT to use inside the IRQ if the selected timer indeed has the capture compare channel 2 interrupt flag, branches to InfiniteLoopOfError otherwise.

Definition at line 1217 of file hierodule_tim.c.

1218{
1219 uint32_t TimerAddress = (uint32_t)Timer;
1220
1221 switch(TimerAddress)
1222 {
1223 case ( (uint32_t)TIM1 ):
1224 CC2_Handler_TIM1 = ISR;
1225 break;
1227 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1228 case ( (uint32_t)TIM2 ):
1229 CC2_Handler_TIM2 = ISR;
1230 break;
1232 #endif
1233 case ( (uint32_t)TIM3 ):
1234 CC2_Handler_TIM3 = ISR;
1235 break;
1237 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1238 case ( (uint32_t)TIM4 ):
1239 CC2_Handler_TIM4 = ISR;
1240 break;
1242 #endif
1243 #ifdef __STM32F401xC_H
1244 case ( (uint32_t)TIM5 ):
1245 CC2_Handler_TIM5 = ISR;
1246 break;
1247 case ( (uint32_t)TIM9 ):
1248 CC2_Handler_TIM9 = ISR;
1249 break;
1251 #endif
1252 default:
1254 }
1255}
static FUNC_POINTER CC2_Handler_TIM9
ISR handler for capture compare channel 2 interrupt flag of timer 9 Requires the device specific macr...
static FUNC_POINTER CC2_Handler_TIM3
ISR handler for capture compare channel 2 interrupt flag of timer 3 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC2_Handler_TIM2
ISR handler for capture compare channel 2 interrupt flag of timer 2 Requires the device specific macr...
static FUNC_POINTER CC2_Handler_TIM4
ISR handler for capture compare channel 2 interrupt flag of timer 4 Requires the device specific macr...
static FUNC_POINTER CC2_Handler_TIM5
ISR handler for capture compare channel 2 interrupt flag of timer 5 Requires the device specific macr...
static FUNC_POINTER CC2_Handler_TIM1
ISR handler for capture compare channel 2 interrupt flag of timer 1 Requires HIERODULE_TIM_HANDLE_IRQ...

References CC2_Handler_TIM1, CC2_Handler_TIM2, CC2_Handler_TIM3, CC2_Handler_TIM4, CC2_Handler_TIM5, CC2_Handler_TIM9, and InfiniteLoopOfError().

◆ HIERODULE_TIM_Assign_ISR_CC3()

void HIERODULE_TIM_Assign_ISR_CC3 ( TIM_TypeDef * Timer,
FUNC_POINTER ISR )
Parameters
TimerPointer to timer struct.
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Assigns the the ISR to the designated handler for Check_IT to use inside the IRQ if the selected timer indeed has the capture compare channel 3 interrupt flag, branches to InfiniteLoopOfError otherwise.

Definition at line 1259 of file hierodule_tim.c.

1260{
1261 uint32_t TimerAddress = (uint32_t)Timer;
1262
1263 switch(TimerAddress)
1264 {
1265 case ( (uint32_t)TIM1 ):
1266 CC3_Handler_TIM1 = ISR;
1267 break;
1269 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1270 case ( (uint32_t)TIM2 ):
1271 CC3_Handler_TIM2 = ISR;
1272 break;
1274 #endif
1275 case ( (uint32_t)TIM3 ):
1276 CC3_Handler_TIM3 = ISR;
1277 break;
1279 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1280 case ( (uint32_t)TIM4 ):
1281 CC3_Handler_TIM4 = ISR;
1282 break;
1284 #endif
1285 #ifdef __STM32F401xC_H
1286 case ( (uint32_t)TIM5 ):
1287 CC3_Handler_TIM5 = ISR;
1288 break;
1290 #endif
1291 default:
1293 }
1294}
static FUNC_POINTER CC3_Handler_TIM3
ISR handler for capture compare channel 3 interrupt flag of timer 3 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC3_Handler_TIM5
ISR handler for capture compare channel 3 interrupt flag of timer 5 Requires the device specific macr...
static FUNC_POINTER CC3_Handler_TIM1
ISR handler for capture compare channel 3 interrupt flag of timer 1 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC3_Handler_TIM4
ISR handler for capture compare channel 3 interrupt flag of timer 4 Requires the device specific macr...
static FUNC_POINTER CC3_Handler_TIM2
ISR handler for capture compare channel 3 interrupt flag of timer 2 Requires the device specific macr...

References CC3_Handler_TIM1, CC3_Handler_TIM2, CC3_Handler_TIM3, CC3_Handler_TIM4, CC3_Handler_TIM5, and InfiniteLoopOfError().

◆ HIERODULE_TIM_Assign_ISR_CC4()

void HIERODULE_TIM_Assign_ISR_CC4 ( TIM_TypeDef * Timer,
FUNC_POINTER ISR )
Parameters
TimerPointer to timer struct.
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Assigns the the ISR to the designated handler for Check_IT to use inside the IRQ if the selected timer indeed has the capture compare channel 4 interrupt flag, branches to InfiniteLoopOfError otherwise.

Definition at line 1298 of file hierodule_tim.c.

1299{
1300 uint32_t TimerAddress = (uint32_t)Timer;
1301
1302 switch(TimerAddress)
1303 {
1304 case ( (uint32_t)TIM1 ):
1305 CC4_Handler_TIM1 = ISR;
1306 break;
1308 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1309 case ( (uint32_t)TIM2 ):
1310 CC4_Handler_TIM2 = ISR;
1311 break;
1313 #endif
1314 case ( (uint32_t)TIM3 ):
1315 CC4_Handler_TIM3 = ISR;
1316 break;
1318 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1319 case ( (uint32_t)TIM4 ):
1320 CC4_Handler_TIM4 = ISR;
1321 break;
1323 #endif
1324 #ifdef __STM32F401xC_H
1325 case ( (uint32_t)TIM5 ):
1326 CC4_Handler_TIM5 = ISR;
1327 break;
1329 #endif
1330 default:
1332 }
1333}
static FUNC_POINTER CC4_Handler_TIM3
ISR handler for capture compare channel 4 interrupt flag of timer 3 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC4_Handler_TIM5
ISR handler for capture compare channel 4 interrupt flag of timer 5 Requires the device specific macr...
static FUNC_POINTER CC4_Handler_TIM1
ISR handler for capture compare channel 4 interrupt flag of timer 1 Requires HIERODULE_TIM_HANDLE_IRQ...
static FUNC_POINTER CC4_Handler_TIM2
ISR handler for capture compare channel 4 interrupt flag of timer 2 Requires the device specific macr...
static FUNC_POINTER CC4_Handler_TIM4
ISR handler for capture compare channel 4 interrupt flag of timer 4 Requires the device specific macr...

References CC4_Handler_TIM1, CC4_Handler_TIM2, CC4_Handler_TIM3, CC4_Handler_TIM4, CC4_Handler_TIM5, and InfiniteLoopOfError().

◆ HIERODULE_TIM_Assign_ISR_UPD()

void HIERODULE_TIM_Assign_ISR_UPD ( TIM_TypeDef * Timer,
FUNC_POINTER ISR )
Parameters
TimerPointer to timer struct.
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Assigns the the ISR to the designated handler for Check_IT to use inside the IRQ if the selected timer indeed has the update interrupt flag, branches to InfiniteLoopOfError otherwise.

Definition at line 1099 of file hierodule_tim.c.

1100{
1101 uint32_t TimerAddress = (uint32_t)Timer;
1102
1103 switch(TimerAddress)
1104 {
1105 case ( (uint32_t)TIM1 ):
1106 UPD_Handler_TIM1 = ISR;
1107 break;
1109 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1110 case ( (uint32_t)TIM2 ):
1111 UPD_Handler_TIM2 = ISR;
1112 break;
1114 #endif
1115 case ( (uint32_t)TIM3 ):
1116 UPD_Handler_TIM3 = ISR;
1117 break;
1119 #if ( (defined __STM32F103xB_H) || (defined __STM32F401xC_H) )
1120 case ( (uint32_t)TIM4 ):
1121 UPD_Handler_TIM4 = ISR;
1122 break;
1124 #endif
1125 #ifdef __STM32F401xC_H
1126 case ( (uint32_t)TIM5 ):
1127 UPD_Handler_TIM5 = ISR;
1128 break;
1129 case ( (uint32_t)TIM9 ):
1130 UPD_Handler_TIM9 = ISR;
1131 break;
1132 case ( (uint32_t)TIM10 ):
1133 UPD_Handler_TIM10 = ISR;
1134 break;
1135 case ( (uint32_t)TIM11 ):
1136 UPD_Handler_TIM11 = ISR;
1137 break;
1139 #elif defined __STM32F030x6_H
1140 case ( (uint32_t)TIM14 ):
1141 UPD_Handler_TIM14 = ISR;
1142 break;
1143 case ( (uint32_t)TIM16 ):
1144 UPD_Handler_TIM16 = ISR;
1145 break;
1146 case ( (uint32_t)TIM17 ):
1147 UPD_Handler_TIM17 = ISR;
1148 break;
1150 #endif
1151 default:
1153 }
1154}
static FUNC_POINTER UPD_Handler_TIM10
ISR handler for update interrupt flag of timer 10 Requires the device specific macro __STM32F401xC_H ...
static FUNC_POINTER UPD_Handler_TIM16
ISR handler for update interrupt flag of timer 16 Requires the device specific macro __STM32F030x6_H ...
static FUNC_POINTER UPD_Handler_TIM9
ISR handler for update interrupt flag of timer 9 Requires the device specific macro __STM32F401xC_H t...
static FUNC_POINTER UPD_Handler_TIM4
ISR handler for update interrupt flag of timer 4 Requires the device specific macro __STM32F103xB_H o...
static FUNC_POINTER UPD_Handler_TIM5
ISR handler for update interrupt flag of timer 5 Requires the device specific macro __STM32F401xC_H t...
static FUNC_POINTER UPD_Handler_TIM3
ISR handler for update interrupt flag of timer 3 Requires HIERODULE_TIM_HANDLE_IRQ to be defined....
static FUNC_POINTER UPD_Handler_TIM14
ISR handler for update interrupt flag of timer 14 Requires the device specific macro __STM32F030x6_H ...
static FUNC_POINTER UPD_Handler_TIM17
ISR handler for update interrupt flag of timer 17 Requires the device specific macro __STM32F030x6_H ...
static FUNC_POINTER UPD_Handler_TIM2
ISR handler for update interrupt flag of timer 2 Requires the device specific macro __STM32F103xB_H o...
static FUNC_POINTER UPD_Handler_TIM11
ISR handler for update interrupt flag of timer 11 Requires the device specific macro __STM32F401xC_H ...
static FUNC_POINTER UPD_Handler_TIM1
ISR handler for update interrupt flag of timer 1 Requires HIERODULE_TIM_HANDLE_IRQ to be defined....

References InfiniteLoopOfError(), UPD_Handler_TIM1, UPD_Handler_TIM10, UPD_Handler_TIM11, UPD_Handler_TIM14, UPD_Handler_TIM16, UPD_Handler_TIM17, UPD_Handler_TIM2, UPD_Handler_TIM3, UPD_Handler_TIM4, UPD_Handler_TIM5, and UPD_Handler_TIM9.

◆ HIERODULE_TIM_Assign_TIM14_ISR()

void HIERODULE_TIM_Assign_TIM14_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1452 of file hierodule_tim.c.

1453 {
1454 TIM14_ISR = ISR;
1455 }
static FUNC_POINTER TIM14_ISR
Pointer to the Timer 14 IRQ routine. Requires the device specific macro __STM32F030x6_H to be defined...

References TIM14_ISR.

◆ HIERODULE_TIM_Assign_TIM16_ISR()

void HIERODULE_TIM_Assign_TIM16_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1459 of file hierodule_tim.c.

1460 {
1461 TIM16_ISR = ISR;
1462 }
static FUNC_POINTER TIM16_ISR
Pointer to the Timer 16 IRQ routine. Requires the device specific macro __STM32F030x6_H to be defined...

References TIM16_ISR.

◆ HIERODULE_TIM_Assign_TIM17_ISR()

void HIERODULE_TIM_Assign_TIM17_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1466 of file hierodule_tim.c.

1467 {
1468 TIM17_ISR = ISR;
1469 }
static FUNC_POINTER TIM17_ISR
Pointer to the Timer 17 IRQ routine. Requires the device specific macro __STM32F030x6_H to be defined...

References TIM17_ISR.

◆ HIERODULE_TIM_Assign_TIM1_BRK_ISR()

void HIERODULE_TIM_Assign_TIM1_BRK_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1405 of file hierodule_tim.c.

1406 {
1407 TIM1_BRK_ISR = ISR;
1408 }
static FUNC_POINTER TIM1_BRK_ISR
Pointer to the Timer 1 break IRQ routine. Requires the device specific macro __STM32F103xB_H to be de...

References TIM1_BRK_ISR.

◆ HIERODULE_TIM_Assign_TIM1_BRK_TIM9_ISR()

void HIERODULE_TIM_Assign_TIM1_BRK_TIM9_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1421 of file hierodule_tim.c.

1422 {
1423 TIM1_BRK_TIM9_ISR = ISR;
1424 }
static FUNC_POINTER TIM1_BRK_TIM9_ISR
Pointer to the Timer 1 break - timer 9 IRQ routine. Requires the device specific macro __STM32F401xC_...

References TIM1_BRK_TIM9_ISR.

◆ HIERODULE_TIM_Assign_TIM1_BRK_UP_TRG_COM_ISR()

void HIERODULE_TIM_Assign_TIM1_BRK_UP_TRG_COM_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1445 of file hierodule_tim.c.

1446 {
1448 }
static FUNC_POINTER TIM1_BRK_UP_TRG_COM_ISR
Pointer to the Timer 1 break - update - trigger - comm IRQ routine. Requires the device specific macr...

References TIM1_BRK_UP_TRG_COM_ISR.

◆ HIERODULE_TIM_Assign_TIM1_CC_ISR()

void HIERODULE_TIM_Assign_TIM1_CC_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1361 of file hierodule_tim.c.

1362 {
1363 TIM1_CC_ISR = ISR;
1364 }
static FUNC_POINTER TIM1_CC_ISR
Pointer to the Timer 1 Capture Compare IRQ routine. Requires HIERODULE_TIM_HANDLE_IRQ to be defined....

References TIM1_CC_ISR.

◆ HIERODULE_TIM_Assign_TIM1_TRG_COM_TIM11_ISR()

void HIERODULE_TIM_Assign_TIM1_TRG_COM_TIM11_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1435 of file hierodule_tim.c.

1436 {
1438 }
static FUNC_POINTER TIM1_TRG_COM_TIM11_ISR
Pointer to the Timer 1 trigger comm - timer 11 IRQ routine. Requires the device specific macro __STM3...

References TIM1_TRG_COM_TIM11_ISR.

◆ HIERODULE_TIM_Assign_TIM1_UP_ISR()

void HIERODULE_TIM_Assign_TIM1_UP_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1398 of file hierodule_tim.c.

1399 {
1400 TIM1_UP_ISR = ISR;
1401 }
static FUNC_POINTER TIM1_UP_ISR
Pointer to the Timer 1 update IRQ routine. Requires the device specific macro __STM32F103xB_H to be d...

References TIM1_UP_ISR.

◆ HIERODULE_TIM_Assign_TIM1_UP_TIM10_ISR()

void HIERODULE_TIM_Assign_TIM1_UP_TIM10_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1414 of file hierodule_tim.c.

1415 {
1416 TIM1_UP_TIM10_ISR = ISR;
1417 }
static FUNC_POINTER TIM1_UP_TIM10_ISR
Pointer to the Timer 1 update - timer 10 IRQ routine. Requires the device specific macro __STM32F401x...

References TIM1_UP_TIM10_ISR.

◆ HIERODULE_TIM_Assign_TIM2_ISR()

void HIERODULE_TIM_Assign_TIM2_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1370 of file hierodule_tim.c.

1371 {
1372 TIM2_ISR = ISR;
1373 }
static FUNC_POINTER TIM2_ISR
Pointer to the Timer 2 IRQ routine. Requires the device specific macro __STM32F103xB_H or __STM32F401...

References TIM2_ISR.

◆ HIERODULE_TIM_Assign_TIM3_ISR()

void HIERODULE_TIM_Assign_TIM3_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1379 of file hierodule_tim.c.

1380 {
1381 TIM3_ISR = ISR;
1382 }
static FUNC_POINTER TIM3_ISR
Pointer to the Timer 3 IRQ routine. Requires HIERODULE_TIM_HANDLE_IRQ to be defined....

References TIM3_ISR.

◆ HIERODULE_TIM_Assign_TIM4_ISR()

void HIERODULE_TIM_Assign_TIM4_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1388 of file hierodule_tim.c.

1389 {
1390 TIM4_ISR = ISR;
1391 }
static FUNC_POINTER TIM4_ISR
Pointer to the Timer 4 IRQ routine. Requires the device specific macro __STM32F103xB_H or __STM32F401...

References TIM4_ISR.

◆ HIERODULE_TIM_Assign_TIM5_ISR()

void HIERODULE_TIM_Assign_TIM5_ISR ( FUNC_POINTER ISR)
Parameters
ISRPointer to ISR, a void-parameter void-return function.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1428 of file hierodule_tim.c.

1429 {
1430 TIM5_ISR = ISR;
1431 }
static FUNC_POINTER TIM5_ISR
Pointer to the Timer 5 IRQ routine. Requires the device specific macro __STM32F401xC_H to be defined....

References TIM5_ISR.

◆ HIERODULE_TIM_ClearCounter()

void HIERODULE_TIM_ClearCounter ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 693 of file hierodule_tim.c.

694{
695 Timer->CNT = 0U;
696}

◆ HIERODULE_TIM_ClearFlag_BRK()

void HIERODULE_TIM_ClearFlag_BRK ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Break interrupt flag is cleared software-wise with the logical NOT of the flag's timer status register bitmask.

Definition at line 873 of file hierodule_tim.c.

874{
875 WRITE_REG(Timer->SR, ~(TIM_SR_BIF));
876}

Referenced by HIERODULE_TIM_Enable_IT_BRK(), TIM17_IRQHandler(), TIM1_BRK_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), and TIM1_BRK_UP_TRG_COM_IRQHandler().

◆ HIERODULE_TIM_ClearFlag_CC1()

void HIERODULE_TIM_ClearFlag_CC1 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Capture compare channel 1 interrupt flag is cleared software-wise with the logical NOT of the flag's timer status register bitmask.

Definition at line 845 of file hierodule_tim.c.

846{
847 WRITE_REG(Timer->SR, ~(TIM_SR_CC1IF));
848}

Referenced by HIERODULE_TIM_Enable_IT_CC1(), TIM14_IRQHandler(), TIM16_IRQHandler(), TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), TIM1_CC_IRQHandler(), TIM1_TRG_COM_TIM11_IRQHandler(), TIM1_UP_TIM10_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_ClearFlag_CC2()

void HIERODULE_TIM_ClearFlag_CC2 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Capture compare channel 2 interrupt flag is cleared software-wise with the logical NOT of the flag's timer status register bitmask.

Definition at line 852 of file hierodule_tim.c.

853{
854 WRITE_REG(Timer->SR, ~(TIM_SR_CC2IF));
855}

Referenced by HIERODULE_TIM_Enable_IT_CC2(), TIM1_BRK_TIM9_IRQHandler(), TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_ClearFlag_CC3()

void HIERODULE_TIM_ClearFlag_CC3 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Capture compare channel 3 interrupt flag is cleared software-wise with the logical NOT of the flag's timer status register bitmask.

Definition at line 859 of file hierodule_tim.c.

860{
861 WRITE_REG(Timer->SR, ~(TIM_SR_CC3IF));
862}

Referenced by HIERODULE_TIM_Enable_IT_CC3(), TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_ClearFlag_CC4()

void HIERODULE_TIM_ClearFlag_CC4 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Capture compare channel 4 interrupt flag is cleared software-wise with the logical NOT of the flag's timer status register bitmask.

Definition at line 866 of file hierodule_tim.c.

867{
868 WRITE_REG(Timer->SR, ~(TIM_SR_CC4IF));
869}

Referenced by HIERODULE_TIM_Enable_IT_CC4(), TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_ClearFlag_UPD()

void HIERODULE_TIM_ClearFlag_UPD ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Update interrupt flag is cleared software-wise with the logical NOT of the flag's timer status register bitmask.

Definition at line 838 of file hierodule_tim.c.

839{
840 WRITE_REG(Timer->SR, ~(TIM_SR_UIF));
841}

Referenced by HIERODULE_TIM_Enable_IT_UPD(), TIM14_IRQHandler(), TIM16_IRQHandler(), TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), TIM1_BRK_UP_TRG_COM_IRQHandler(), TIM1_TRG_COM_TIM11_IRQHandler(), TIM1_UP_IRQHandler(), TIM1_UP_TIM10_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_Disable_IT_BRK()

void HIERODULE_TIM_Disable_IT_BRK ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The break interrupt is disabled by clearing the enable bit in the timer control register.

Definition at line 1005 of file hierodule_tim.c.

1006{
1007 CLEAR_BIT(Timer->DIER, TIM_DIER_BIE);
1008}

◆ HIERODULE_TIM_Disable_IT_CC1()

void HIERODULE_TIM_Disable_IT_CC1 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The capture compare channel 1 interrupt is disabled by clearing the enable bit in the timer control register.

Definition at line 977 of file hierodule_tim.c.

978{
979 CLEAR_BIT(Timer->DIER, TIM_DIER_CC1IE);
980}

◆ HIERODULE_TIM_Disable_IT_CC2()

void HIERODULE_TIM_Disable_IT_CC2 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The capture compare channel 2 interrupt is disabled by clearing the enable bit in the timer control register.

Definition at line 984 of file hierodule_tim.c.

985{
986 CLEAR_BIT(Timer->DIER, TIM_DIER_CC2IE);
987}

◆ HIERODULE_TIM_Disable_IT_CC3()

void HIERODULE_TIM_Disable_IT_CC3 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The capture compare channel 3 interrupt is disabled by clearing the enable bit in the timer control register.

Definition at line 991 of file hierodule_tim.c.

992{
993 CLEAR_BIT(Timer->DIER, TIM_DIER_CC3IE);
994}

◆ HIERODULE_TIM_Disable_IT_CC4()

void HIERODULE_TIM_Disable_IT_CC4 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The capture compare channel 4 interrupt is disabled by clearing the enable bit in the timer control register.

Definition at line 998 of file hierodule_tim.c.

999{
1000 CLEAR_BIT(Timer->DIER, TIM_DIER_CC4IE);
1001}

◆ HIERODULE_TIM_Disable_IT_UPD()

void HIERODULE_TIM_Disable_IT_UPD ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The update interrupt is disabled by clearing the enable bit in the timer control register.

Definition at line 970 of file hierodule_tim.c.

971{
972 CLEAR_BIT(Timer->DIER, TIM_DIER_UIE);
973}

◆ HIERODULE_TIM_DisableAutomaticOutput()

void HIERODULE_TIM_DisableAutomaticOutput ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Note that this will only work if the timer has the automatic output enable bit in a break and dead time register.

Definition at line 1067 of file hierodule_tim.c.

1068{
1069 CLEAR_BIT(Timer->BDTR, TIM_BDTR_AOE);
1070}

◆ HIERODULE_TIM_DisableChannel()

void HIERODULE_TIM_DisableChannel ( TIM_TypeDef * Timer,
int8_t Channel )
Parameters
TimerPointer to timer struct.
ChannelInteger to specify the channel, 1 to 4, negative for complimentary output channels.
Returns
None

Fetches the bit mask of the selected channel from the array TimerChannel_EN and uses that to clear the designated CCER register bit.
Channel parameter is ensured to be a valid integer value beforehand to avoid failure.

Definition at line 737 of file hierodule_tim.c.

738{
739 if( (Channel > 0) && (Channel < 5) )
740 {
741 CLEAR_BIT(Timer->CCER, TimerChannel_EN[Channel-1]);
742 }
743 else if( (Channel < 0) && (Channel > -4) )
744 {
745 CLEAR_BIT(Timer->CCER, TimerChannel_EN[abs(Channel)+3]);
746 }
747}
static const uint32_t TimerChannel_EN[7]
The array the timer PWM output channel enable bitmasks are kept.

References TimerChannel_EN.

◆ HIERODULE_TIM_DisableCounter()

void HIERODULE_TIM_DisableCounter ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1081 of file hierodule_tim.c.

1082{
1083 CLEAR_BIT(Timer->CR1, TIM_CR1_CEN);
1084}

◆ HIERODULE_TIM_DisableMainOutput()

void HIERODULE_TIM_DisableMainOutput ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Note that this will only work if the timer has the main output enable bit in a break and dead time register.

Definition at line 794 of file hierodule_tim.c.

795{
796 CLEAR_BIT(Timer->BDTR, TIM_BDTR_MOE);
797}

◆ HIERODULE_TIM_Enable_IT_BRK()

void HIERODULE_TIM_Enable_IT_BRK ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The enable bit in the timer control register is set after clearing the break interrupt flag.

Definition at line 962 of file hierodule_tim.c.

963{
965 SET_BIT(Timer->DIER, TIM_DIER_BIE);
966}
void HIERODULE_TIM_ClearFlag_BRK(TIM_TypeDef *Timer)
Clears the break interrupt flag of the timer.

References HIERODULE_TIM_ClearFlag_BRK().

◆ HIERODULE_TIM_Enable_IT_CC1()

void HIERODULE_TIM_Enable_IT_CC1 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The enable bit in the timer control register is set after clearing the capture compare channel 1 interrupt flag.

Definition at line 930 of file hierodule_tim.c.

931{
933 SET_BIT(Timer->DIER, TIM_DIER_CC1IE);
934}
void HIERODULE_TIM_ClearFlag_CC1(TIM_TypeDef *Timer)
Clears the capture compare channel 1 interrupt flag of the timer.

References HIERODULE_TIM_ClearFlag_CC1().

◆ HIERODULE_TIM_Enable_IT_CC2()

void HIERODULE_TIM_Enable_IT_CC2 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The enable bit in the timer control register is set after clearing the capture compare channel 2 interrupt flag.

Definition at line 938 of file hierodule_tim.c.

939{
941 SET_BIT(Timer->DIER, TIM_DIER_CC2IE);
942}
void HIERODULE_TIM_ClearFlag_CC2(TIM_TypeDef *Timer)
Clears the capture compare channel 2 interrupt flag of the timer.

References HIERODULE_TIM_ClearFlag_CC2().

◆ HIERODULE_TIM_Enable_IT_CC3()

void HIERODULE_TIM_Enable_IT_CC3 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The enable bit in the timer control register is set after clearing the capture compare channel 3 interrupt flag.

Definition at line 946 of file hierodule_tim.c.

947{
949 SET_BIT(Timer->DIER, TIM_DIER_CC3IE);
950}
void HIERODULE_TIM_ClearFlag_CC3(TIM_TypeDef *Timer)
Clears the capture compare channel 3 interrupt flag of the timer.

References HIERODULE_TIM_ClearFlag_CC3().

◆ HIERODULE_TIM_Enable_IT_CC4()

void HIERODULE_TIM_Enable_IT_CC4 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The enable bit in the timer control register is set after clearing the capture compare channel 4 interrupt flag.

Definition at line 954 of file hierodule_tim.c.

955{
957 SET_BIT(Timer->DIER, TIM_DIER_CC4IE);
958}
void HIERODULE_TIM_ClearFlag_CC4(TIM_TypeDef *Timer)
Clears the capture compare channel 4 interrupt flag of the timer.

References HIERODULE_TIM_ClearFlag_CC4().

◆ HIERODULE_TIM_Enable_IT_UPD()

void HIERODULE_TIM_Enable_IT_UPD ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

The enable bit in the timer control register is set after clearing the update interrupt flag.

Definition at line 922 of file hierodule_tim.c.

923{
925 SET_BIT(Timer->DIER, TIM_DIER_UIE);
926}
void HIERODULE_TIM_ClearFlag_UPD(TIM_TypeDef *Timer)
Clears the update interrupt flag of the timer.

References HIERODULE_TIM_ClearFlag_UPD().

◆ HIERODULE_TIM_EnableAutomaticOutput()

void HIERODULE_TIM_EnableAutomaticOutput ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Note that this will only work if the timer has the automatic output enable bit in a break and dead time register.

Definition at line 1060 of file hierodule_tim.c.

1061{
1062 SET_BIT(Timer->BDTR, TIM_BDTR_AOE);
1063}

◆ HIERODULE_TIM_EnableChannel()

void HIERODULE_TIM_EnableChannel ( TIM_TypeDef * Timer,
int8_t Channel )
Parameters
TimerPointer to timer struct.
ChannelInteger to specify the channel, 1 to 4, negative for complimentary output channels.
Returns
None

Fetches the bit mask of the selected channel from the array TimerChannel_EN and uses that to set the designated CCER register bit.
Channel parameter is ensured to be a valid integer value beforehand to avoid failure.

Definition at line 722 of file hierodule_tim.c.

723{
724 if( (Channel > 0) && (Channel < 5) )
725 {
726 SET_BIT(Timer->CCER, TimerChannel_EN[Channel-1]);
727 }
728 else if( (Channel < 0) && (Channel > -4) )
729 {
730 SET_BIT(Timer->CCER, TimerChannel_EN[abs(Channel)+3]);
731 }
732}

References TimerChannel_EN.

◆ HIERODULE_TIM_EnableCounter()

void HIERODULE_TIM_EnableCounter ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Self-explanatory code, nothing to elaborate.

Definition at line 1074 of file hierodule_tim.c.

1075{
1076 SET_BIT(Timer->CR1, TIM_CR1_CEN);
1077}

◆ HIERODULE_TIM_EnableMainOutput()

void HIERODULE_TIM_EnableMainOutput ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
None

Note that this will only work if the timer has the main output enable bit in a break and dead time register.

Definition at line 787 of file hierodule_tim.c.

788{
789 SET_BIT(Timer->BDTR, TIM_BDTR_MOE);
790}

◆ HIERODULE_TIM_GetDutyCycle()

double HIERODULE_TIM_GetDutyCycle ( TIM_TypeDef * Timer,
uint8_t Channel )
Parameters
TimerPointer to timer struct.
ChannelInteger to specify the channel, 1 to 4, negative for complimentary output channels.
Returns
Duty cycle percentage, normalized.

The duty cycle is simply calculated dividing ARR by CCR, the pointer to which is acquired with a call to ChannelSelector with the timer struct pointer and the corresponding element of the CCR variable offset array TimerChannel_CCR.
Channel parameter is ensured to be a valid integer value beforehand to avoid failure. In case of an invalid input, -1.0 is returned.

Definition at line 822 of file hierodule_tim.c.

823{
824 if( (Channel < 1) && (Channel > 4) )
825 {
826 return -1.0;
827 }
828 else
829 {
830 return
831 ((double)(*(ChannelSelector(Timer, TimerChannel_CCR[Channel-1]))))
832 / ((double)(READ_REG(Timer->ARR)));
833 }
834}
static uint32_t * ChannelSelector(TIM_TypeDef *Timer, uint32_t ChannelOffset)
Returns the pointer to the target channel's capture compare register.
static const uint32_t TimerChannel_CCR[4]
Keeps the offsets to capture compare registers within a TIM_Typedef for all four channels.

References ChannelSelector(), and TimerChannel_CCR.

◆ HIERODULE_TIM_GetFrequency()

double HIERODULE_TIM_GetFrequency ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
Frequency in Hertz.

The frequency is calculated on the fly using the ARR and base frequency. See GetBaseFreq for further info.

\(Frequency = Base Frequency / (ARR+1) \)

Definition at line 686 of file hierodule_tim.c.

687{
688 return ((double)GetBaseFreq(Timer))/((double)(READ_REG(Timer->ARR)+1.0));
689}
static uint32_t GetBaseFreq(TIM_TypeDef *Timer)
Returns the base frequency of a timer.

References GetBaseFreq().

◆ HIERODULE_TIM_GetPeriod()

double HIERODULE_TIM_GetPeriod ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
Period duration in seconds.

The period is calculated on the fly using the ARR and base frequency. See GetBaseFreq for further info.

\(Period = (ARR+1) / Base Frequency \)

Definition at line 669 of file hierodule_tim.c.

670{
671 return ((double)READ_REG(Timer->ARR)+1.0)/((double)GetBaseFreq(Timer));
672}

References GetBaseFreq().

◆ HIERODULE_TIM_GetRepetition()

uint32_t HIERODULE_TIM_GetRepetition ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
Number of repetitions.

Basically reads from the repetition counter register and returns the value.
Note that this will only work if the timer has the repetition counter register.

Definition at line 714 of file hierodule_tim.c.

715{
716 return READ_REG(Timer->RCR);
717}

◆ HIERODULE_TIM_IsEnabled_IT_BRK()

uint32_t HIERODULE_TIM_IsEnabled_IT_BRK ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the break interrupt is enabled, 0 otherwise.

TIM_DIER_BIE bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1052 of file hierodule_tim.c.

1053{
1054 return ((READ_BIT(Timer->DIER, TIM_DIER_BIE) == (TIM_DIER_BIE))
1055 ? 1UL : 0UL);
1056}

Referenced by TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), and TIM1_BRK_UP_TRG_COM_IRQHandler().

◆ HIERODULE_TIM_IsEnabled_IT_CC1()

uint32_t HIERODULE_TIM_IsEnabled_IT_CC1 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the capture compare channel 1 interrupt is enabled, 0 otherwise.

TIM_DIER_CC1IE bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1020 of file hierodule_tim.c.

1021{
1022 return ((READ_BIT(Timer->DIER, TIM_DIER_CC1IE) == (TIM_DIER_CC1IE))
1023 ? 1UL : 0UL);
1024}

Referenced by TIM14_IRQHandler(), TIM16_IRQHandler(), TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), TIM1_CC_IRQHandler(), TIM1_TRG_COM_TIM11_IRQHandler(), TIM1_UP_TIM10_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsEnabled_IT_CC2()

uint32_t HIERODULE_TIM_IsEnabled_IT_CC2 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the capture compare channel 2 interrupt is enabled, 0 otherwise.

TIM_DIER_CC2IE bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1028 of file hierodule_tim.c.

1029{
1030 return ((READ_BIT(Timer->DIER, TIM_DIER_CC2IE) == (TIM_DIER_CC2IE))
1031 ? 1UL : 0UL);
1032}

Referenced by TIM1_BRK_TIM9_IRQHandler(), TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsEnabled_IT_CC3()

uint32_t HIERODULE_TIM_IsEnabled_IT_CC3 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the capture compare channel 3 interrupt is enabled, 0 otherwise.

TIM_DIER_CC3IE bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1036 of file hierodule_tim.c.

1037{
1038 return ((READ_BIT(Timer->DIER, TIM_DIER_CC3IE) == (TIM_DIER_CC3IE))
1039 ? 1UL : 0UL);
1040}

Referenced by TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsEnabled_IT_CC4()

uint32_t HIERODULE_TIM_IsEnabled_IT_CC4 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the capture compare channel 4 interrupt is enabled, 0 otherwise.

TIM_DIER_CC4IE bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1044 of file hierodule_tim.c.

1045{
1046 return ((READ_BIT(Timer->DIER, TIM_DIER_CC4IE) == (TIM_DIER_CC4IE))
1047 ? 1UL : 0UL);
1048}

Referenced by TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsEnabled_IT_UPD()

uint32_t HIERODULE_TIM_IsEnabled_IT_UPD ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the update interrupt is enabled, 0 otherwise.

UIE bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1012 of file hierodule_tim.c.

1013{
1014 return ((READ_BIT(Timer->DIER, TIM_DIER_UIE) == (TIM_DIER_UIE))
1015 ? 1UL : 0UL);
1016}

Referenced by TIM14_IRQHandler(), TIM16_IRQHandler(), TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), TIM1_BRK_UP_TRG_COM_IRQHandler(), TIM1_TRG_COM_TIM11_IRQHandler(), TIM1_UP_TIM10_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsEnabledChannel()

uint32_t HIERODULE_TIM_IsEnabledChannel ( TIM_TypeDef * Timer,
int8_t Channel )
Parameters
TimerPointer to timer struct.
ChannelInteger to specify the channel, 1 to 4, negative for complimentary output channels.
Returns
1 if the channel is enabled, 0 otherwise.

Fetches the bit mask of the selected channel from the array TimerChannel_EN and uses that to check the designated CCER register bit. Returns 1 if so and 0 otherwise.
Channel parameter is ensured to be a valid integer value beforehand to avoid failure.

Definition at line 753 of file hierodule_tim.c.

754{
755 if( (Channel > 0) && (Channel < 5) )
756 {
757 if( (READ_BIT(Timer->CCER, TimerChannel_EN[Channel-1]))
758 == (TimerChannel_EN[Channel-1]))
759 {
760 return 1UL;
761 }
762 else
763 {
764 return 0UL;
765 }
766 }
767 else if( (Channel < 0) && (Channel > -4) )
768 {
769 if( (READ_BIT(Timer->CCER, TimerChannel_EN[abs(Channel)+3]))
770 == (TimerChannel_EN[abs(Channel)+3]))
771 {
772 return 1UL;
773 }
774 else
775 {
776 return 0UL;
777 }
778 }
779 else
780 {
781 return 0UL;
782 }
783}

References TimerChannel_EN.

◆ HIERODULE_TIM_IsEnabledCounter()

uint32_t HIERODULE_TIM_IsEnabledCounter ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the counter is enabled, 0 otherwise.

CEN bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 1088 of file hierodule_tim.c.

1089{
1090 return ((READ_BIT(Timer->CR1, TIM_CR1_CEN) == (TIM_CR1_CEN)) ? 1UL : 0UL);
1091}

◆ HIERODULE_TIM_IsSetFlag_BRK()

uint32_t HIERODULE_TIM_IsSetFlag_BRK ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the interrupt flag is set. Returns 0 otherwise.

BIF bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 915 of file hierodule_tim.c.

916{
917 return ((READ_BIT(Timer->SR, TIM_SR_BIF) == (TIM_SR_BIF)) ? 1UL : 0UL);
918}

Referenced by TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), and TIM1_BRK_UP_TRG_COM_IRQHandler().

◆ HIERODULE_TIM_IsSetFlag_CC1()

uint32_t HIERODULE_TIM_IsSetFlag_CC1 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the interrupt flag is set. Returns 0 otherwise.

CC1IF bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 887 of file hierodule_tim.c.

888{
889 return ((READ_BIT(Timer->SR, TIM_SR_CC1IF) == (TIM_SR_CC1IF)) ? 1UL : 0UL);
890}

Referenced by TIM14_IRQHandler(), TIM16_IRQHandler(), TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), TIM1_CC_IRQHandler(), TIM1_TRG_COM_TIM11_IRQHandler(), TIM1_UP_TIM10_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsSetFlag_CC2()

uint32_t HIERODULE_TIM_IsSetFlag_CC2 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the interrupt flag is set. Returns 0 otherwise.

CC2IF bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 894 of file hierodule_tim.c.

895{
896 return ((READ_BIT(Timer->SR, TIM_SR_CC2IF) == (TIM_SR_CC2IF)) ? 1UL : 0UL);
897}

Referenced by TIM1_BRK_TIM9_IRQHandler(), TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsSetFlag_CC3()

uint32_t HIERODULE_TIM_IsSetFlag_CC3 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the interrupt flag is set. Returns 0 otherwise.

CC3IF bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 901 of file hierodule_tim.c.

902{
903 return ((READ_BIT(Timer->SR, TIM_SR_CC3IF) == (TIM_SR_CC3IF)) ? 1UL : 0UL);
904}

Referenced by TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsSetFlag_CC4()

uint32_t HIERODULE_TIM_IsSetFlag_CC4 ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the interrupt flag is set. Returns 0 otherwise.

CC4IF bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 908 of file hierodule_tim.c.

909{
910 return ((READ_BIT(Timer->SR, TIM_SR_CC4IF) == (TIM_SR_CC4IF)) ? 1UL : 0UL);
911}

Referenced by TIM1_CC_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_IsSetFlag_UPD()

uint32_t HIERODULE_TIM_IsSetFlag_UPD ( TIM_TypeDef * Timer)
Parameters
TimerPointer to timer struct.
Returns
1 if the interrupt flag is set. Returns 0 otherwise.

UIF bit is isolated from the register with its bitmask and compared to the same bitmask instead of shifting since the amount of shift would depend on the bitmask.

Definition at line 880 of file hierodule_tim.c.

881{
882 return ((READ_BIT(Timer->SR, TIM_SR_UIF) == (TIM_SR_UIF)) ? 1UL : 0UL);
883}

Referenced by TIM14_IRQHandler(), TIM16_IRQHandler(), TIM17_IRQHandler(), TIM1_BRK_TIM9_IRQHandler(), TIM1_BRK_UP_TRG_COM_IRQHandler(), TIM1_TRG_COM_TIM11_IRQHandler(), TIM1_UP_TIM10_IRQHandler(), TIM2_IRQHandler(), TIM3_IRQHandler(), TIM4_IRQHandler(), and TIM5_IRQHandler().

◆ HIERODULE_TIM_SetDutyCycle()

void HIERODULE_TIM_SetDutyCycle ( TIM_TypeDef * Timer,
uint8_t Channel,
double NormalizedDutyCycle )
Parameters
TimerPointer to timer struct.
ChannelInteger to specify the channel, 1 to 4, negative for complimentary output channels.
NormalizedDutyCycleDuty cycle percentage, normalized.
Returns
None

Scaling ARR with the normalized duty cycle yields the value meant to be loaded to the designated CCR, the pointer to which is acquired with a call to ChannelSelector with the timer struct pointer and the corresponding element of the CCR variable offset array TimerChannel_CCR.
Channel parameter is ensured to be a valid integer value beforehand to avoid failure.

Definition at line 803 of file hierodule_tim.c.

809{
810 if( (Channel > 0) && (Channel < 5) )
811 {
812 (*(ChannelSelector(Timer, TimerChannel_CCR[Channel-1]))) =
813 ((uint32_t)(READ_REG(Timer->ARR)))*NormalizedDutyCycle;
814 }
815}

References ChannelSelector(), and TimerChannel_CCR.

◆ HIERODULE_TIM_SetFrequency()

void HIERODULE_TIM_SetFrequency ( TIM_TypeDef * Timer,
double Frequency_Hz )
Parameters
TimerPointer to timer struct.
Frequency_HzFrequency in Hertz.
Returns
None

This is performed by updating ARR value while keeping PSC constant. PSC value and peripheral bus clock determine the base frequency. See GetBaseFreq for further info.

\(Frequency = Base Frequency / (ARR+1) \)
\(ARR = Base Frequency * Period - 1\)

Definition at line 678 of file hierodule_tim.c.

679{
680 WRITE_REG(Timer->ARR, GetBaseFreq(Timer)/Frequency_Hz-1.0);
681}

References GetBaseFreq().

◆ HIERODULE_TIM_SetPeriod()

void HIERODULE_TIM_SetPeriod ( TIM_TypeDef * Timer,
double DurationSec )
Parameters
TimerPointer to timer struct.
DurationSecDuration of period in seconds.
Returns
None

This is performed by updating ARR value while keeping PSC constant. PSC value and peripheral bus clock determine the base frequency. See GetBaseFreq for further info.

\(Period = (ARR+1) / Base Frequency \)
\(ARR = Base Frequency * Period - 1\)

Definition at line 661 of file hierodule_tim.c.

662{
663 WRITE_REG(Timer->ARR, GetBaseFreq(Timer)*DurationSec-1.0);
664}

References GetBaseFreq().

◆ HIERODULE_TIM_SetRepetition()

void HIERODULE_TIM_SetRepetition ( TIM_TypeDef * Timer,
uint32_t Reps )
Parameters
TimerPointer to timer struct.
RepsNumber of repetitions.
Returns
None

Timer's RCR value is set to the input parameter. The UPD interrupt of the timer will get triggered after 0+Reps periods.
Keep in mind repetition value the hardware supports may not be as high as 65535, even though it's a 32 bit register. See the device manual to verify the maximum amount of repetitions allowed.
Note that this will only work if the timer has the repetition counter register.

Definition at line 705 of file hierodule_tim.c.

706{
707 WRITE_REG(Timer->RCR, Reps);
708}

◆ TIM14_IRQHandler()

void TIM14_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1885 of file hierodule_tim.c.

1886{
1888 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1890 {
1892 }
1894 {
1896 }
1898 #else
1899 TIM14_ISR();
1901 #endif
1902}
static void Check_IT(TIM_TypeDef *Timer, FUNC_POINTER Handler, T2V_Function_Pointer ClearFlag)
Performs a routine if it's not NULL, and clears the flag of a timer as specified with the clear-flag ...
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_UPD(TIM_TypeDef *Timer)
Checks the status of the update interrupt flag 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.

References CC1_Handler_TIM14, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_UPD(), TIM14_ISR, and UPD_Handler_TIM14.

◆ TIM16_IRQHandler()

void TIM16_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1915 of file hierodule_tim.c.

1916{
1918 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1920 {
1922 }
1924 {
1926 }
1928 #else
1929 TIM16_ISR();
1931 #endif
1932}

References CC1_Handler_TIM16, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_UPD(), TIM16_ISR, and UPD_Handler_TIM16.

◆ TIM17_IRQHandler()

void TIM17_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1945 of file hierodule_tim.c.

1946{
1948 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1950 {
1952 }
1954 {
1956 }
1958 {
1960 }
1962 #else
1963 TIM17_ISR();
1965 #endif
1966}
uint32_t HIERODULE_TIM_IsSetFlag_BRK(TIM_TypeDef *Timer)
Checks the status of the break interrupt flag of the timer.
uint32_t HIERODULE_TIM_IsEnabled_IT_BRK(TIM_TypeDef *Timer)
Checks the break interrupt of the timer.

References BRK_Handler_TIM17, CC1_Handler_TIM17, Check_IT(), HIERODULE_TIM_ClearFlag_BRK(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_BRK(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_BRK(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_UPD(), TIM17_ISR, and UPD_Handler_TIM17.

◆ TIM1_BRK_IRQHandler()

void TIM1_BRK_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for the break interrupt if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1585 of file hierodule_tim.c.

1586{
1588 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1591 #else
1592 TIM1_BRK_ISR();
1594 #endif
1595}

References BRK_Handler_TIM1, Check_IT(), HIERODULE_TIM_ClearFlag_BRK(), and TIM1_BRK_ISR.

◆ TIM1_BRK_TIM9_IRQHandler()

void TIM1_BRK_TIM9_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1608 of file hierodule_tim.c.

1609{
1611 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1613 {
1615 }
1617 {
1619 }
1621 {
1623 }
1625 {
1627 }
1629 #else
1632 #endif
1633}
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_IsEnabled_IT_CC2(TIM_TypeDef *Timer)
Checks the capture compare channel 2 interrupt of the timer.

References BRK_Handler_TIM1, CC1_Handler_TIM9, CC2_Handler_TIM9, Check_IT(), HIERODULE_TIM_ClearFlag_BRK(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_CC2(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_BRK(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_CC2(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_BRK(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_CC2(), HIERODULE_TIM_IsSetFlag_UPD(), TIM1_BRK_TIM9_ISR, and UPD_Handler_TIM9.

◆ TIM1_BRK_UP_TRG_COM_IRQHandler()

void TIM1_BRK_UP_TRG_COM_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1647 of file hierodule_tim.c.

1648{
1650 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1652 {
1654 }
1656 {
1658 }
1660 #else
1663 #endif
1664}

References BRK_Handler_TIM1, Check_IT(), HIERODULE_TIM_ClearFlag_BRK(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_BRK(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_BRK(), HIERODULE_TIM_IsSetFlag_UPD(), TIM1_BRK_UP_TRG_COM_ISR, and UPD_Handler_TIM1.

◆ TIM1_CC_IRQHandler()

void TIM1_CC_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1545 of file hierodule_tim.c.

1546{
1548 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1550 {
1552 }
1554 {
1556 }
1558 {
1560 }
1562 {
1564 }
1566 #else
1567 TIM1_CC_ISR();
1569 #endif
1570}
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_CC3(TIM_TypeDef *Timer)
Checks the status of the capture compare channel 3 interrupt flag 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_CC3(TIM_TypeDef *Timer)
Checks the capture compare channel 3 interrupt of the timer.

References CC1_Handler_TIM1, CC2_Handler_TIM1, CC3_Handler_TIM1, CC4_Handler_TIM1, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_CC2(), HIERODULE_TIM_ClearFlag_CC3(), HIERODULE_TIM_ClearFlag_CC4(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_CC2(), HIERODULE_TIM_IsEnabled_IT_CC3(), HIERODULE_TIM_IsEnabled_IT_CC4(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_CC2(), HIERODULE_TIM_IsSetFlag_CC3(), HIERODULE_TIM_IsSetFlag_CC4(), and TIM1_CC_ISR.

◆ TIM1_TRG_COM_TIM11_IRQHandler()

void TIM1_TRG_COM_TIM11_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1853 of file hierodule_tim.c.

1854{
1856 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1858 {
1860 }
1862 {
1864 }
1866 #else
1869 #endif
1870}

References CC1_Handler_TIM11, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_UPD(), TIM1_TRG_COM_TIM11_ISR, and UPD_Handler_TIM11.

◆ TIM1_UP_IRQHandler()

void TIM1_UP_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for the update interrupt if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1486 of file hierodule_tim.c.

1487{
1489 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1492 #else
1493 TIM1_UP_ISR();
1495 #endif
1496}

References Check_IT(), HIERODULE_TIM_ClearFlag_UPD(), TIM1_UP_ISR, and UPD_Handler_TIM1.

◆ TIM1_UP_TIM10_IRQHandler()

void TIM1_UP_TIM10_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1510 of file hierodule_tim.c.

1511{
1513 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1515 {
1517 }
1519 {
1521 }
1523 {
1525 }
1527 #else
1530 #endif
1531}

References CC1_Handler_TIM10, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_UPD(), TIM1_UP_TIM10_ISR, UPD_Handler_TIM1, and UPD_Handler_TIM10.

◆ TIM2_IRQHandler()

void TIM2_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1680 of file hierodule_tim.c.

1681{
1683 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1685 {
1687 }
1689 {
1691 }
1693 {
1695 }
1697 {
1699 }
1701 {
1703 }
1705 #else
1706 TIM2_ISR();
1708 #endif
1709}

References CC1_Handler_TIM2, CC2_Handler_TIM2, CC3_Handler_TIM2, CC4_Handler_TIM2, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_CC2(), HIERODULE_TIM_ClearFlag_CC3(), HIERODULE_TIM_ClearFlag_CC4(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_CC2(), HIERODULE_TIM_IsEnabled_IT_CC3(), HIERODULE_TIM_IsEnabled_IT_CC4(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_CC2(), HIERODULE_TIM_IsSetFlag_CC3(), HIERODULE_TIM_IsSetFlag_CC4(), HIERODULE_TIM_IsSetFlag_UPD(), TIM2_ISR, and UPD_Handler_TIM2.

◆ TIM3_IRQHandler()

void TIM3_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1722 of file hierodule_tim.c.

1723{
1725 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1727 {
1729 }
1731 {
1733 }
1735 {
1737 }
1739 {
1741 }
1743 {
1745 }
1747 #else
1748 TIM3_ISR();
1750 #endif
1751}

References CC1_Handler_TIM3, CC2_Handler_TIM3, CC3_Handler_TIM3, CC4_Handler_TIM3, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_CC2(), HIERODULE_TIM_ClearFlag_CC3(), HIERODULE_TIM_ClearFlag_CC4(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_CC2(), HIERODULE_TIM_IsEnabled_IT_CC3(), HIERODULE_TIM_IsEnabled_IT_CC4(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_CC2(), HIERODULE_TIM_IsSetFlag_CC3(), HIERODULE_TIM_IsSetFlag_CC4(), HIERODULE_TIM_IsSetFlag_UPD(), TIM3_ISR, and UPD_Handler_TIM3.

◆ TIM4_IRQHandler()

void TIM4_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1766 of file hierodule_tim.c.

1767{
1769 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1771 {
1773 }
1775 {
1777 }
1779 {
1781 }
1783 {
1785 }
1787 {
1789 }
1791 #else
1792 TIM4_ISR();
1794 #endif
1795}

References CC1_Handler_TIM4, CC2_Handler_TIM4, CC3_Handler_TIM4, CC4_Handler_TIM4, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_CC2(), HIERODULE_TIM_ClearFlag_CC3(), HIERODULE_TIM_ClearFlag_CC4(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_CC2(), HIERODULE_TIM_IsEnabled_IT_CC3(), HIERODULE_TIM_IsEnabled_IT_CC4(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_CC2(), HIERODULE_TIM_IsSetFlag_CC3(), HIERODULE_TIM_IsSetFlag_CC4(), HIERODULE_TIM_IsSetFlag_UPD(), TIM4_ISR, and UPD_Handler_TIM4.

◆ TIM5_IRQHandler()

void TIM5_IRQHandler ( void )
extern
Returns
None

Performs a call to Check_IT for each flag set with its interrupt enabled if HIERODULE_TIM_CONVENIENT_IRQ is enabled, uses the plain ISR handler implemented by the user otherwise.

Definition at line 1811 of file hierodule_tim.c.

1812{
1814 #ifdef HIERODULE_TIM_CONVENIENT_IRQ
1816 {
1818 }
1820 {
1822 }
1824 {
1826 }
1828 {
1830 }
1832 {
1834 }
1836 #else
1837 TIM5_ISR();
1839 #endif
1840}

References CC1_Handler_TIM5, CC2_Handler_TIM5, CC3_Handler_TIM5, CC4_Handler_TIM5, Check_IT(), HIERODULE_TIM_ClearFlag_CC1(), HIERODULE_TIM_ClearFlag_CC2(), HIERODULE_TIM_ClearFlag_CC3(), HIERODULE_TIM_ClearFlag_CC4(), HIERODULE_TIM_ClearFlag_UPD(), HIERODULE_TIM_IsEnabled_IT_CC1(), HIERODULE_TIM_IsEnabled_IT_CC2(), HIERODULE_TIM_IsEnabled_IT_CC3(), HIERODULE_TIM_IsEnabled_IT_CC4(), HIERODULE_TIM_IsEnabled_IT_UPD(), HIERODULE_TIM_IsSetFlag_CC1(), HIERODULE_TIM_IsSetFlag_CC2(), HIERODULE_TIM_IsSetFlag_CC3(), HIERODULE_TIM_IsSetFlag_CC4(), HIERODULE_TIM_IsSetFlag_UPD(), TIM5_ISR, and UPD_Handler_TIM5.