ConOpSys V2970
P004.07
ANVILEX control operating system
|
User timer base class. More...
#include <Timer_Base.h>
Public Member Functions | |
TTimer_Base () | |
User timer class constructor method. More... | |
virtual | ~TTimer_Base () |
User timer class destructor method. More... | |
VOID | Interrupt () |
User timer interrupt method. More... | |
virtual BOOL | Configure_Clock (U32 u32_Clock) |
Set user timer input clock frequency method. More... | |
BOOL | Set_Interrupt_Frequency (F32 f32_Frequency) |
Set user timer interrupt frequency method. More... | |
virtual VOID | Interrupt_Enable (U32 u32_Interrupt_Priority)=0 |
Enable interrupt method. More... | |
virtual VOID | Interrupt_Disable ()=0 |
Disable interrupt method. More... | |
virtual VOID | Start ()=0 |
Start timer operation method. More... | |
virtual VOID | Stop ()=0 |
Stop timer operation method. More... | |
F32 | Get_Resolution_s () |
Get timer resolution in seconds. More... | |
F32 | Get_Resolution_ms () |
Get timer resolution in miliseconds. More... | |
F32 | Get_Resolution_us () |
Get timer resolution in microseconds. More... | |
F32 | Get_Resolution_ns () |
Get timer resolution in nanoseconds. More... | |
F32 | Get_Interrupt_Frequency () |
Get Get interrupt frequency in herz. More... | |
F32 | Get_Interrupt_Period () |
Get interrupt period in seconds. More... | |
U32 | Time_To_Execution_Loops (F32 f32_Time_Span) |
Convert time to interrupt loops method. More... | |
VOID | Init () |
User timer initialisation method. More... | |
VOID | Done () |
User timer finalisation method. More... | |
Protected Attributes | |
BOOL | bool_Initialisation_Error = (BOOL)false |
Initialisation error. More... | |
F32 | f32_Input_Clock = (F32)0.0f |
Timer input frequency in Hz. More... | |
U32 | u32_Timer_Clock = (U32)0 |
Timer clock in herz. More... | |
U32 | u32_Timer_Counts = (U32)0 |
Timer counter preset value. More... | |
F32 | f32_Resolution_s = (F32)0.0f |
Timer resolution in seconds. More... | |
F32 | f32_Resolution_ms = (F32)0.0f |
Timer resolution in miliseconds. More... | |
F32 | f32_Resolution_us = (F32)0.0f |
Timer resolution in microseconds. More... | |
F32 | f32_Resolution_ns = (F32)0.0f |
Timer resolution in nanoseconds. More... | |
F32 | f32_Interrupt_Frequency = (F32)0.0f |
Interrupt frequency in herz. More... | |
F32 | f32_Interrupt_Period = (F32)0.0f |
Interrupt period in seconds. More... | |
User timer base class.
TTimer_Base::TTimer_Base | ( | ) |
User timer class constructor method.
|
virtual |
User timer class destructor method.
Set user timer input clock frequency method.
[in] | u32_Clock | - Timer input clock in herz |
false | - Execution without errors |
true | - Execution without any errors |
Reimplemented in TTIMER2_STM32F429, and TTIMER5_STM32F410CBU6.
References bool_Initialisation_Error, f32_Input_Clock, f32_Resolution_ms, f32_Resolution_ns, f32_Resolution_s, f32_Resolution_us, and u32_Timer_Clock.
Referenced by TTIMER5_STM32F410CBU6::Configure_Clock(), TTIMER2_STM32F429::Configure_Clock(), TApplication_Base::Init(), and TBootloader_Base::Init().
VOID TTimer_Base::Done | ( | ) |
User timer finalisation method.
References Interrupt_Disable().
F32 TTimer_Base::Get_Interrupt_Frequency | ( | ) |
Get Get interrupt frequency in herz.
References f32_Interrupt_Frequency.
F32 TTimer_Base::Get_Interrupt_Period | ( | ) |
Get interrupt period in seconds.
References f32_Interrupt_Period.
F32 TTimer_Base::Get_Resolution_ms | ( | ) |
Get timer resolution in miliseconds.
References f32_Resolution_ms.
F32 TTimer_Base::Get_Resolution_ns | ( | ) |
Get timer resolution in nanoseconds.
References f32_Resolution_ns.
F32 TTimer_Base::Get_Resolution_s | ( | ) |
Get timer resolution in seconds.
References f32_Resolution_s.
Referenced by TApplication_Base::Get_Background_Task_Actual_Execution_Time_s(), TApplication_Base::Get_Background_Task_Maximal_Execution_Time_s(), TApplication_Base::Get_Control_Task_Actual_Cycle_Time_s(), TApplication_Base::Get_Control_Task_Actual_Execution_Time_s(), TApplication_Base::Get_Control_Task_Maximal_Execution_Time_s(), TApplication_Base::Get_System_Task_Actual_Cycle_Time_s(), TApplication_Base::Get_System_Task_Application_Actual_Execution_Time_s(), TApplication_Base::Get_System_Task_Application_Maximal_Execution_Time_s(), TApplication_Base::Get_System_Task_Core_Actual_Execution_Time_s(), and TApplication_Base::Get_System_Task_Core_Maximal_Execution_Time_s().
F32 TTimer_Base::Get_Resolution_us | ( | ) |
Get timer resolution in microseconds.
References f32_Resolution_us.
VOID TTimer_Base::Init | ( | ) |
User timer initialisation method.
VOID TTimer_Base::Interrupt | ( | ) |
User timer interrupt method.
|
pure virtual |
Disable interrupt method.
Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.
Referenced by Done().
Enable interrupt method.
[in] | u32_Interrupt_Priority | - Timer inperrupt priority |
Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.
Set user timer interrupt frequency method.
[in] | f32_Frequency | - Timer inperrupt frequency in herz |
false | - Execution without errors |
true | - Execution without any errors |
References f32_Input_Clock, f32_Interrupt_Frequency, f32_Interrupt_Period, and u32_Timer_Counts.
Referenced by TSYSTICK_STM32F410CBU6::Set_Interrupt_Frequency(), and TSYSTICK_STM32F429::Set_Interrupt_Frequency().
|
pure virtual |
Start timer operation method.
Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.
|
pure virtual |
Stop timer operation method.
Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.
Convert time to interrupt loops method.
[in] | f32_Time_Span | - Time span value in seconds for convertion to interrupt loops. |
References f32_Interrupt_Period.
Initialisation error.
Referenced by Configure_Clock(), TSYSTICK_STM32F410CBU6::Set_Interrupt_Frequency(), and TSYSTICK_STM32F429::Set_Interrupt_Frequency().
Timer input frequency in Hz.
Referenced by Configure_Clock(), and Set_Interrupt_Frequency().
Interrupt frequency in herz.
Referenced by Get_Interrupt_Frequency(), Set_Interrupt_Frequency(), TSYSTICK_STM32F410CBU6::Set_Interrupt_Frequency(), and TSYSTICK_STM32F429::Set_Interrupt_Frequency().
Interrupt period in seconds.
Referenced by Get_Interrupt_Period(), Set_Interrupt_Frequency(), and Time_To_Execution_Loops().
Timer resolution in miliseconds.
Referenced by Configure_Clock(), and Get_Resolution_ms().
Timer resolution in nanoseconds.
Referenced by Configure_Clock(), and Get_Resolution_ns().
Timer resolution in seconds.
Referenced by Configure_Clock(), THigh_Precision_Timer_Base::Delay(), TSystem_Timer_Base::Get_Delta_Time(), THigh_Precision_Timer_Base::Get_Delta_Time(), and Get_Resolution_s().
Timer resolution in microseconds.
Referenced by Configure_Clock(), and Get_Resolution_us().
Timer clock in herz.
Referenced by Configure_Clock(), TSYSTICK_STM32F410CBU6::Set_Interrupt_Frequency(), and TSYSTICK_STM32F429::Set_Interrupt_Frequency().
Timer counter preset value.
Referenced by Set_Interrupt_Frequency().