ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | Protected Attributes | List of all members
TTimer_Base Class Referenceabstract

User timer base class. More...

#include <Timer_Base.h>

Inheritance diagram for TTimer_Base:
Inheritance graph
Collaboration diagram for TTimer_Base:
Collaboration graph

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...
 

Detailed Description

User timer base class.

Constructor & Destructor Documentation

◆ TTimer_Base()

TTimer_Base::TTimer_Base ( )

User timer class constructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.

◆ ~TTimer_Base()

TTimer_Base::~TTimer_Base ( )
virtual

User timer class destructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.

Member Function Documentation

◆ Configure_Clock()

BOOL TTimer_Base::Configure_Clock ( U32  u32_Clock)
virtual

Set user timer input clock frequency method.


Note
None
Parameters
[in]u32_Clock- Timer input clock in herz
Returns
BOOL - Execution status
Return values
false- Execution without errors
true- Execution without any errors
Override
Optional
Attention
None

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().

Here is the caller graph for this function:

◆ Done()

VOID TTimer_Base::Done ( )

User timer finalisation method.


Note
None
Returns
None
Override
Optional
Attention
None

References Interrupt_Disable().

Here is the call graph for this function:

◆ Get_Interrupt_Frequency()

F32 TTimer_Base::Get_Interrupt_Frequency ( )

Get Get interrupt frequency in herz.


Note
None
Returns
None
Override
Not allowed
Attention
None

References f32_Interrupt_Frequency.

◆ Get_Interrupt_Period()

F32 TTimer_Base::Get_Interrupt_Period ( )

Get interrupt period in seconds.


Note
None
Returns
None
Override
Not allowed
Attention
None

References f32_Interrupt_Period.

◆ Get_Resolution_ms()

F32 TTimer_Base::Get_Resolution_ms ( )

Get timer resolution in miliseconds.


Note
None
Returns
None
Override
Not allowed
Attention
None

References f32_Resolution_ms.

◆ Get_Resolution_ns()

F32 TTimer_Base::Get_Resolution_ns ( )

Get timer resolution in nanoseconds.


Note
None
Returns
None
Override
Not allowed
Attention
None

References f32_Resolution_ns.

◆ Get_Resolution_s()

F32 TTimer_Base::Get_Resolution_s ( )

◆ Get_Resolution_us()

F32 TTimer_Base::Get_Resolution_us ( )

Get timer resolution in microseconds.


Note
None
Returns
None
Override
Not allowed
Attention
None

References f32_Resolution_us.

◆ Init()

VOID TTimer_Base::Init ( )

User timer initialisation method.


Note
None
Returns
None
Override
Optional
Attention
None

◆ Interrupt()

VOID TTimer_Base::Interrupt ( )

User timer interrupt method.


Note
This method should be called from hardware interrupt service routine.
Returns
None
Override
Not allowed
Attention
None

◆ Interrupt_Disable()

virtual VOID TTimer_Base::Interrupt_Disable ( )
pure virtual

Disable interrupt method.


Note
None
Returns
None
Override
Required
Attention
None

Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.

Referenced by Done().

Here is the caller graph for this function:

◆ Interrupt_Enable()

virtual VOID TTimer_Base::Interrupt_Enable ( U32  u32_Interrupt_Priority)
pure virtual

Enable interrupt method.


Note
None
Parameters
[in]u32_Interrupt_Priority- Timer inperrupt priority
Returns
None
Override
Required
Attention
None

Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.

◆ Set_Interrupt_Frequency()

BOOL TTimer_Base::Set_Interrupt_Frequency ( F32  f32_Frequency)

Set user timer interrupt frequency method.


Note
None
Parameters
[in]f32_Frequency- Timer inperrupt frequency in herz
Returns
BOOL - Execution status
Return values
false- Execution without errors
true- Execution without any errors
Override
Optional
Attention
None
Todo:
ANVILEX KM: May be need add 1 to the value

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().

Here is the caller graph for this function:

◆ Start()

virtual VOID TTimer_Base::Start ( )
pure virtual

Start timer operation method.


Note
None
Returns
None
Override
Required
Attention
None

Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.

◆ Stop()

virtual VOID TTimer_Base::Stop ( )
pure virtual

Stop timer operation method.


Note
None
Returns
None
Override
Required
Attention
None

Implemented in TTIMER2_STM32F429, TSYSTICK_STM32F429, TTIMER5_STM32F410CBU6, and TSYSTICK_STM32F410CBU6.

◆ Time_To_Execution_Loops()

U32 TTimer_Base::Time_To_Execution_Loops ( F32  f32_Time_Span)

Convert time to interrupt loops method.


Note
None
Parameters
[in]f32_Time_Span- Time span value in seconds for convertion to interrupt loops.
Returns
U32 - Interrupt loop count
Override
Not allowed
Attention
None

References f32_Interrupt_Period.

Member Data Documentation

◆ bool_Initialisation_Error

BOOL TTimer_Base::bool_Initialisation_Error = (BOOL)false
protected

◆ f32_Input_Clock

F32 TTimer_Base::f32_Input_Clock = (F32)0.0f
protected

Timer input frequency in Hz.

Referenced by Configure_Clock(), and Set_Interrupt_Frequency().

◆ f32_Interrupt_Frequency

F32 TTimer_Base::f32_Interrupt_Frequency = (F32)0.0f
protected

◆ f32_Interrupt_Period

F32 TTimer_Base::f32_Interrupt_Period = (F32)0.0f
protected

Interrupt period in seconds.

Referenced by Get_Interrupt_Period(), Set_Interrupt_Frequency(), and Time_To_Execution_Loops().

◆ f32_Resolution_ms

F32 TTimer_Base::f32_Resolution_ms = (F32)0.0f
protected

Timer resolution in miliseconds.

Referenced by Configure_Clock(), and Get_Resolution_ms().

◆ f32_Resolution_ns

F32 TTimer_Base::f32_Resolution_ns = (F32)0.0f
protected

Timer resolution in nanoseconds.

Referenced by Configure_Clock(), and Get_Resolution_ns().

◆ f32_Resolution_s

F32 TTimer_Base::f32_Resolution_s = (F32)0.0f
protected

◆ f32_Resolution_us

F32 TTimer_Base::f32_Resolution_us = (F32)0.0f
protected

Timer resolution in microseconds.

Referenced by Configure_Clock(), and Get_Resolution_us().

◆ u32_Timer_Clock

U32 TTimer_Base::u32_Timer_Clock = (U32)0
protected

◆ u32_Timer_Counts

U32 TTimer_Base::u32_Timer_Counts = (U32)0
protected

Timer counter preset value.

Referenced by Set_Interrupt_Frequency().


The documentation for this class was generated from the following files: