Infineon MOTIX™ MCU TLE985x Device Family SDK
Macros | Enumerations | Functions
timer2x.h File Reference

Go to the source code of this file.

Detailed Description

Timer2/Timer21 low level access library.

Version
V0.2.4
Date
21. Jan 2022
Note
This file violates [MISRA 2012 Rule 11.1, required], [MISRA 2012 Rule 11.4, advisory], [MISRA 2012 Rule 11.6, required], [MISRA 2012 Rule 8.7, advisory]

Include Graph

Include dependency graph for timer2x.h:

Macros

#define MIN_TIMER_INTERVAL_US   1u
 

Enumerations

enum  TTIMER2_T2IN_Pxx { TIMER2_T2IN_P00 = 0u , TIMER2_T2IN_P27 = 1u , TIMER2_T2IN_P23 = 2u }
 This enum lists the T2IN Inputs. More...
 
enum  TTIMER2_T2EX_Pxx {
  TIMER2_T2EX_P22 = 0u , TIMER2_T2EX_P01 = 1u , TIMER2_T2EX_P23 = 2u , TIMER2_T2EX_P21 = 3u ,
  TIMER2_T2EX_MON1 = 4u , TIMER2_T2EX_MON2 = 5u , TIMER2_T2EX_MON3 = 6u , TIMER2_T2EX_MON4 = 7u ,
  TIMER2_T2EX_lin_rxd = 8u , TIMER2_T2EX_CC6_COUT60 = 10u , TIMER2_T2EX_CC6_COUT61 = 11u , TIMER2_T2EX_CC6_CH0 = 12u ,
  TIMER2_T2EX_CC6_CH1 = 13u , TIMER2_T2EX_CC6_CH2 = 14u , TIMER2_T2EX_CC6_CH3 = 15u
}
 This enum lists the T2EX Inputs. More...
 
enum  TTIMER21_T21IN_Pxx { TIMER21_T21IN_P01 = 0u , TIMER21_T21IN_P12 = 1u , TIMER21_T21IN_P04 = 2u }
 This enum lists the T21IN Inputs. More...
 
enum  TTIMER21_T21EX_Pxx {
  TIMER21_T21EX_P02 = 0u , TIMER21_T21EX_P14 = 1u , TIMER21_T21EX_P05 = 2u , TIMER21_T21EX_P11 = 3u ,
  TIMER21_T21EX_MON1 = 4u , TIMER21_T21EX_MON2 = 5u , TIMER21_T21EX_MON3 = 6u , TIMER21_T21EX_MON4 = 7u ,
  TIMER21_T21EX_lin_rxd = 8u , TIMER21_T21EX_CC6_CH0 = 10u , TIMER21_T21EX_CC6_CH1 = 11u , TIMER21_T21EX_CC6_COUT60 = 12u ,
  TIMER21_T21EX_CC6_COUT61 = 13u , TIMER21_T21EX_CC6_COUT62 = 14u , TIMER21_T21EX_CC6_COUT63 = 15u
}
 This enum lists the T21EX Inputs. More...
 
enum  TIMER2x_Clock_Prescaler {
  TIMER2x_Clk_Div_1 = 0u , TIMER2x_Clk_Div_2 = 1u , TIMER2x_Clk_Div_4 = 2u , TIMER2x_Clk_Div_8 = 3u ,
  TIMER2x_Clk_Div_16 = 4u , TIMER2x_Clk_Div_32 = 5u , TIMER2x_Clk_Div_64 = 6u , TIMER2x_Clk_Div_128 = 7u
}
 This enum lists TIMER2x Clock Prescaler Configuration. More...
 

Functions

void TIMER2_Init (void)
 Initializes the Timer2 module. More...
 
void TIMER21_Init (void)
 Initializes the Timer21 module. More...
 
bool TIMER2_Interval_Timer_Setup (uint32 timer_interval_us)
 Initializes the TIMER2 in Reload Mode. More...
 
bool TIMER21_Interval_Timer_Setup (uint32 timer_interval_us)
 Initializes the TIMER21 in Reload Mode. More...
 
INLINE void TIMER2_Clk_Prescaler_En (void)
 Enables TIMER2 clock prescaler. More...
 
INLINE void TIMER2_Clk_Prescaler_Dis (void)
 Disables TIMER2 clock prescaler. More...
 
INLINE void TIMER2_Clk_Prescaler_Sel (uint8 t2pre)
 Sets TIMER2 clock prescaler. More...
 
INLINE uint8 TIMER2_Clk_Prescaler_Get (void)
 Reads TIMER2 clock prescaler. More...
 
INLINE uint8 TIMER2_Overflow_Sts (void)
 Reads TIMER2 Overflow Status. More...
 
INLINE uint8 TIMER2_External_Sts (void)
 Reads TIMER2 External Status. More...
 
INLINE void TIMER2_ExternalCtrl_En (void)
 Enables TIMER2 External Control. More...
 
INLINE void TIMER2_ExternalCtrl_Dis (void)
 Disables TIMER2 External Control. More...
 
INLINE void TIMER2_Reload_Capture_RisingEdge_Set (void)
 Sets Rising Edge to Capture/Reload Mode for TIMER2. More...
 
INLINE void TIMER2_Reload_Capture_FallingEdge_Set (void)
 Sets Falling Edge to Capture/Reload Mode for TIMER2. More...
 
INLINE void TIMER2_ExtStart_RisingEdge_Set (void)
 Sets Rising Edge to External Start for TIMER2. More...
 
INLINE void TIMER2_ExtStart_FallingEdge_Set (void)
 Sets Falling Edge to External Start for TIMER2. More...
 
INLINE void TIMER2_UpDownCount_En (void)
 Enables Up/Down Counter for TIMER2. More...
 
INLINE void TIMER2_UpDownCount_Dis (void)
 Disables Up/Down Counter for TIMER2. More...
 
INLINE void TIMER2_Mode_Capture_Set (void)
 Selects Capture Mode for TIMER2. More...
 
INLINE void TIMER2_Mode_Reload_Set (void)
 Selects Reload Mode for TIMER2. More...
 
INLINE void TIMER2_Mode_Counter_Set (void)
 Selects Mode Counter for TIMER2. More...
 
INLINE void TIMER2_Mode_Timer_Set (void)
 Selects Mode Timer for TIMER2. More...
 
INLINE void TIMER2_Value_Set (uint16 t2)
 Sets TIMER2 Value. More...
 
INLINE void TIMER2_Reload_Value_Set (uint16 t2)
 Sets TIMER2 Reload Value. More...
 
INLINE void TIMER2_Overflow_Int_Clr (void)
 Clears TIMER2 Overflow Interrupt flag. More...
 
INLINE void TIMER2_External_Int_Clr (void)
 Clears TIMER2 External Interrupt flag. More...
 
INLINE void TIMER2_Overflow_Int_En (void)
 Enables TIMER2 Overflow Interrupt. More...
 
INLINE void TIMER2_Overflow_Int_Dis (void)
 Disables TIMER2 Overflow Interrupt. More...
 
INLINE void TIMER2_External_Int_En (void)
 Enables TIMER2 External Interrupt. More...
 
INLINE void TIMER2_External_Int_Dis (void)
 Disables TIMER2 External Interrupt. More...
 
INLINE void TIMER21_Clk_Prescaler_En (void)
 Enables TIMER21 clock prescaler. More...
 
INLINE void TIMER21_Clk_Prescaler_Dis (void)
 Disables TIMER21 clock prescaler. More...
 
INLINE void TIMER21_Clk_Prescaler_Sel (uint8 t21pre)
 Sets TIMER21 clock prescaler. More...
 
INLINE uint8 TIMER21_Clk_Prescaler_Get (void)
 Reads TIMER21 clock prescaler. More...
 
INLINE uint8 TIMER21_Overflow_Sts (void)
 Reads TIMER21 Overflow Status. More...
 
INLINE uint8 TIMER21_External_Sts (void)
 Reads TIMER21 External Status. More...
 
INLINE void TIMER21_ExternalCtrl_En (void)
 Enables TIMER21 External Control. More...
 
INLINE void TIMER21_ExternalCtrl_Dis (void)
 Disables TIMER21 External Control. More...
 
INLINE void TIMER21_Reload_Capture_RisingEdge_Set (void)
 Sets Rising Edge to Capture/Reload Mode for TIMER21. More...
 
INLINE void TIMER21_Reload_Capture_FallingEdge_Set (void)
 Sets Falling Edge to Capture/Reload Mode for TIMER21. More...
 
INLINE void TIMER21_ExtStart_RisingEdge_Set (void)
 Sets Rising Edge to External Start for TIMER21. More...
 
INLINE void TIMER21_ExtStart_FallingEdge_Set (void)
 Sets Falling Edge to External Start for TIMER21. More...
 
INLINE void TIMER21_UpDownCount_En (void)
 Enables Up/Down Counter for TIMER21. More...
 
INLINE void TIMER21_UpDownCount_Dis (void)
 Disables Up/Down Counter for TIMER21. More...
 
INLINE void TIMER21_Mode_Capture_Set (void)
 Selects Capture Mode for TIMER21. More...
 
INLINE void TIMER21_Mode_Reload_Set (void)
 Selects Reload Mode for TIMER21. More...
 
INLINE void TIMER21_Mode_Counter_Set (void)
 Selects Mode Counter for TIMER21. More...
 
INLINE void TIMER21_Mode_Timer_Set (void)
 Selects Mode Timer for TIMER21. More...
 
INLINE void TIMER21_Value_Set (uint16 t21)
 Sets TIMER21 Value. More...
 
INLINE void TIMER21_Reload_Value_Set (uint16 t21)
 Sets TIMER21 Reload Value. More...
 
INLINE void TIMER21_Overflow_Int_Clr (void)
 Clears TIMER21 Overflow Interrupt. More...
 
INLINE void TIMER21_External_Int_Clr (void)
 Clears TIMER21 External Interrupt. More...
 
INLINE void TIMER21_Overflow_Int_En (void)
 Enables TIMER21 Overflow Interrupt. More...
 
INLINE void TIMER21_Overflow_Int_Dis (void)
 Disables TIMER21 Overflow Interrupt. More...
 
INLINE void TIMER21_External_Int_En (void)
 Enables TIMER21 External Interrupt. More...
 
INLINE void TIMER21_External_Int_Dis (void)
 Disables TIMER21 External Interrupt. More...
 
INLINE void TIMER2_Start (void)
 Starts the TIMER2 by software. More...
 
INLINE void TIMER2_Stop (void)
 Stops the TIMER2 by software. More...
 
INLINE void TIMER2_ExtStart (void)
 Prepares TIMER2 to be started externally. More...
 
INLINE void TIMER2_ExtStop (void)
 Disables TIMER2 to be started externally. More...
 
INLINE uint16 TIMER2_Get_Count (void)
 Reads the TIMER2 count value. More...
 
INLINE uint16 TIMER2_Get_Capture (void)
 Reads the TIMER2 capture value. More...
 
INLINE void TIMER2_Clear_Count (void)
 Clears the TIMER2 count value. More...
 
INLINE void TIMER2_Set_Reload (uint16 value)
 Sets TIMER2 reload value. More...
 
INLINE void TIMER2_Select_T2IN (TTIMER2_T2IN_Pxx pinsel)
 Sets TIMER2 T2IN Pin. More...
 
INLINE void TIMER2_Select_T2EX (TTIMER2_T2EX_Pxx pinsel)
 Sets TIMER2 T2EX Pin. More...
 
INLINE void TIMER21_Start (void)
 Starts the TIMER21 by software. More...
 
INLINE void TIMER21_Stop (void)
 Stops the TIMER21 by software. More...
 
INLINE void TIMER21_ExtStart (void)
 Prepares TIMER21 to be started externally. More...
 
INLINE void TIMER21_ExtStop (void)
 Disables TIMER21 to be started externally. More...
 
INLINE uint16 TIMER21_Get_Count (void)
 Reads the TIMER21 count value. More...
 
INLINE uint16 TIMER21_Get_Capture (void)
 Reads the TIMER21 capture value. More...
 
INLINE void TIMER21_Clear_Count (void)
 Clears the TIMER21 count value. More...
 
INLINE void TIMER21_Set_Reload (uint16 value)
 Sets TIMER21 reload value. More...
 
INLINE void TIMER21_Select_T21IN (TTIMER21_T21IN_Pxx pinsel)
 Sets TIMER21 T21IN Pin. More...
 
INLINE void TIMER21_Select_T21EX (TTIMER21_T21EX_Pxx pinsel)
 Sets TIMER21 T21EX Pin. More...
 

Macro Definition Documentation

◆ MIN_TIMER_INTERVAL_US

#define MIN_TIMER_INTERVAL_US   1u

Enumeration Type Documentation

◆ TIMER2x_Clock_Prescaler

This enum lists TIMER2x Clock Prescaler Configuration.

Enumerator
TIMER2x_Clk_Div_1 

Timer2x Input Clock Select: fsys

TIMER2x_Clk_Div_2 

Timer2x Input Clock Select: fsys/2

TIMER2x_Clk_Div_4 

Timer2x Input Clock Select: fsys/4

TIMER2x_Clk_Div_8 

Timer2x Input Clock Select: fsys/8

TIMER2x_Clk_Div_16 

Timer2x Input Clock Select: fsys/16

TIMER2x_Clk_Div_32 

Timer2x Input Clock Select: fsys/32

TIMER2x_Clk_Div_64 

Timer2x Input Clock Select: fsys/64

TIMER2x_Clk_Div_128 

Timer2x Input Clock Select: fsys/128

◆ TTIMER21_T21EX_Pxx

This enum lists the T21EX Inputs.

Enumerator
TIMER21_T21EX_P02 

The input pin for T21EX_0

TIMER21_T21EX_P14 

The input pin for T21EX_1

TIMER21_T21EX_P05 

The input pin for T21EX_2

TIMER21_T21EX_P11 

The input pin for T21EX_3

TIMER21_T21EX_MON1 

The input pin for MON1

TIMER21_T21EX_MON2 

The input pin for MON2

TIMER21_T21EX_MON3 

The input pin for MON3

TIMER21_T21EX_MON4 

The input pin for MON4

TIMER21_T21EX_lin_rxd 

The input pin for lin_rxd_i

TIMER21_T21EX_CC6_CH0 

The input pin for cc6_ch0

TIMER21_T21EX_CC6_CH1 

The input pin for cc6_ch1

TIMER21_T21EX_CC6_COUT60 

The input pin for cc6_cout60

TIMER21_T21EX_CC6_COUT61 

The input pin for cc6_cout61

TIMER21_T21EX_CC6_COUT62 

The input pin for cc6_cout62

TIMER21_T21EX_CC6_COUT63 

The input pin for cc6_cout63

◆ TTIMER21_T21IN_Pxx

This enum lists the T21IN Inputs.

Enumerator
TIMER21_T21IN_P01 

The input pin for T21_0

TIMER21_T21IN_P12 

The input pin for T21_1

TIMER21_T21IN_P04 

The input pin for T21_2

◆ TTIMER2_T2EX_Pxx

This enum lists the T2EX Inputs.

Enumerator
TIMER2_T2EX_P22 

The input pin for T2EX_0

TIMER2_T2EX_P01 

The input pin for T2EX_1

TIMER2_T2EX_P23 

The input pin for T2EX_2

TIMER2_T2EX_P21 

The input pin for T2EX_3

TIMER2_T2EX_MON1 

The input pin for MON1

TIMER2_T2EX_MON2 

The input pin for MON2

TIMER2_T2EX_MON3 

The input pin for MON3

TIMER2_T2EX_MON4 

The input pin for MON4

TIMER2_T2EX_lin_rxd 

The input pin for lin_rxd_i

TIMER2_T2EX_CC6_COUT60 

The input pin for cc6_cout60

TIMER2_T2EX_CC6_COUT61 

The input pin for cc6_cout61

TIMER2_T2EX_CC6_CH0 

The input pin for cc6_ch0

TIMER2_T2EX_CC6_CH1 

The input pin for cc6_ch1

TIMER2_T2EX_CC6_CH2 

The input pin for cc6_ch2

TIMER2_T2EX_CC6_CH3 

The input pin for cc6_ch3

◆ TTIMER2_T2IN_Pxx

This enum lists the T2IN Inputs.

Enumerator
TIMER2_T2IN_P00 

The input pin for T2_0

TIMER2_T2IN_P27 

The input pin for T2_1

TIMER2_T2IN_P23 

The input pin for T2_2

Function Documentation

◆ TIMER21_Clear_Count()

INLINE void TIMER21_Clear_Count ( void  )

Clears the TIMER21 count value.

Example

This example stops and reset TIMER21 by software.

void Example_Function(void)
{
}
INLINE void TIMER21_Clear_Count(void)
Clears the TIMER21 count value.
Definition: timer2x.h:1778
INLINE void TIMER21_Stop(void)
Stops the TIMER21 by software.
Definition: timer2x.h:1753

◆ TIMER21_Clk_Prescaler_Dis()

INLINE void TIMER21_Clk_Prescaler_Dis ( void  )

Disables TIMER21 clock prescaler.

Example

This example disables TIMER21 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER21_Clk_Prescaler_Dis(void)
Disables TIMER21 clock prescaler.
Definition: timer2x.h:1572

◆ TIMER21_Clk_Prescaler_En()

INLINE void TIMER21_Clk_Prescaler_En ( void  )

Enables TIMER21 clock prescaler.

Example

This example enables TIMER21 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER21_Clk_Prescaler_En(void)
Enables TIMER21 clock prescaler.
Definition: timer2x.h:1567

◆ TIMER21_Clk_Prescaler_Get()

INLINE uint8 TIMER21_Clk_Prescaler_Get ( void  )

Reads TIMER21 clock prescaler.

Returns
TIMER21 clock prescaler

Example

This example reads TIMER21 clock prescaler.

void Example_Function(void)
{
uint8 pre;
}
INLINE uint8 TIMER21_Clk_Prescaler_Get(void)
Reads TIMER21 clock prescaler.
Definition: timer2x.h:1582
uint8_t uint8
8 bit unsigned value
Definition: types.h:153

◆ TIMER21_Clk_Prescaler_Sel()

INLINE void TIMER21_Clk_Prescaler_Sel ( uint8  t21pre)

Sets TIMER21 clock prescaler.

Parameters
t21preTIMER21 clock prescaler, see TIMER2x_Clock_Prescaler

Example

This example sets TIMER21 clock prescaler to DIV2.

void Example_Function(void)
{
}
INLINE void TIMER21_Clk_Prescaler_Sel(uint8 t21pre)
Sets TIMER21 clock prescaler.
Definition: timer2x.h:1577
@ TIMER2x_Clk_Div_2
Definition: timer2x.h:148

◆ TIMER21_External_Int_Clr()

INLINE void TIMER21_External_Int_Clr ( void  )

Clears TIMER21 External Interrupt.

Example

This example treats the TIMER21 External Interrupt.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}
INLINE void TIMER21_External_Int_Dis(void)
Disables TIMER21 External Interrupt.
Definition: timer2x.h:1692
INLINE void TIMER21_External_Int_Clr(void)
Clears TIMER21 External Interrupt.
Definition: timer2x.h:1672
INLINE void TIMER21_External_Int_En(void)
Enables TIMER21 External Interrupt.
Definition: timer2x.h:1687
INLINE uint8 TIMER21_External_Sts(void)
Reads TIMER21 External Status.
Definition: timer2x.h:1592

◆ TIMER21_External_Int_Dis()

INLINE void TIMER21_External_Int_Dis ( void  )

Disables TIMER21 External Interrupt.

Example

This example treats the TIMER21 External Interrupt.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}

◆ TIMER21_External_Int_En()

INLINE void TIMER21_External_Int_En ( void  )

Enables TIMER21 External Interrupt.

Example

This example treats the TIMER21 External Interrupt.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}

◆ TIMER21_External_Sts()

INLINE uint8 TIMER21_External_Sts ( void  )

Reads TIMER21 External Status.

Returns
TIMER21 External Status

Example

This example checks the TIMER21 External Status.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}
INLINE void TIMER21_ExternalCtrl_En(void)
Enables TIMER21 External Control.
Definition: timer2x.h:1597
INLINE void TIMER21_ExternalCtrl_Dis(void)
Disables TIMER21 External Control.
Definition: timer2x.h:1602

◆ TIMER21_ExternalCtrl_Dis()

INLINE void TIMER21_ExternalCtrl_Dis ( void  )

Disables TIMER21 External Control.

Example

This example reads TIMER21 External Status.

◆ TIMER21_ExternalCtrl_En()

INLINE void TIMER21_ExternalCtrl_En ( void  )

Enables TIMER21 External Control.

Example

This example checks the TIMER21 External Status.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}

◆ TIMER21_ExtStart()

INLINE void TIMER21_ExtStart ( void  )

Prepares TIMER21 to be started externally.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER21_ExtStop(void)
Disables TIMER21 to be started externally.
Definition: timer2x.h:1763
INLINE void TIMER21_ExtStart_RisingEdge_Set(void)
Sets Rising Edge to External Start for TIMER21.
Definition: timer2x.h:1617
INLINE void TIMER21_ExtStart(void)
Prepares TIMER21 to be started externally.
Definition: timer2x.h:1758

◆ TIMER21_ExtStart_FallingEdge_Set()

INLINE void TIMER21_ExtStart_FallingEdge_Set ( void  )

Sets Falling Edge to External Start for TIMER21.

Example

This example sets Falling Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER21_ExtStart_FallingEdge_Set(void)
Sets Falling Edge to External Start for TIMER21.
Definition: timer2x.h:1622

◆ TIMER21_ExtStart_RisingEdge_Set()

INLINE void TIMER21_ExtStart_RisingEdge_Set ( void  )

Sets Rising Edge to External Start for TIMER21.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER21_ExtStop()

INLINE void TIMER21_ExtStop ( void  )

Disables TIMER21 to be started externally.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER21_Get_Capture()

INLINE uint16 TIMER21_Get_Capture ( void  )

Reads the TIMER21 capture value.

Returns
TIMER21 capture value

Example

This example reads the TIMER21 capture value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER21_Get_Capture();
}
INLINE uint16 TIMER21_Get_Capture(void)
Reads the TIMER21 capture value.
Definition: timer2x.h:1773
uint16_t uint16
16 bit unsigned value
Definition: types.h:154

◆ TIMER21_Get_Count()

INLINE uint16 TIMER21_Get_Count ( void  )

Reads the TIMER21 count value.

Returns
TIMER21 count value

Example

This example reads the TIMER21 count value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER21_Get_Count();
}
INLINE uint16 TIMER21_Get_Count(void)
Reads the TIMER21 count value.
Definition: timer2x.h:1768

◆ TIMER21_Init()

void TIMER21_Init ( void  )

Initializes the Timer21 module.

◆ TIMER21_Interval_Timer_Setup()

bool TIMER21_Interval_Timer_Setup ( uint32  timer_interval_us)

Initializes the TIMER21 in Reload Mode.

Parameters
timer_interval_ustimer interval in microseconds
Returns
true = setup done, false = setup failed

Example

This example Initializes the TIMER21 in Reload Mode with timer equals to 5000 us.

void Example_Function(void)
{
bool sts;
}
bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER21 in Reload Mode.

◆ TIMER21_Mode_Capture_Set()

INLINE void TIMER21_Mode_Capture_Set ( void  )

Selects Capture Mode for TIMER21.

Example

This example enters 16-bit Capture Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Capture_Set(void)
Selects Capture Mode for TIMER21.
Definition: timer2x.h:1637

◆ TIMER21_Mode_Counter_Set()

INLINE void TIMER21_Mode_Counter_Set ( void  )

Selects Mode Counter for TIMER21.

Example

This example sets the Mode Counter.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Counter_Set(void)
Selects Mode Counter for TIMER21.
Definition: timer2x.h:1647

◆ TIMER21_Mode_Reload_Set()

INLINE void TIMER21_Mode_Reload_Set ( void  )

Selects Reload Mode for TIMER21.

Example

This example enters Auto-Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Reload_Set(void)
Selects Reload Mode for TIMER21.
Definition: timer2x.h:1642

◆ TIMER21_Mode_Timer_Set()

INLINE void TIMER21_Mode_Timer_Set ( void  )

Selects Mode Timer for TIMER21.

Example

This example sets the Mode Timer.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Timer_Set(void)
Selects Mode Timer for TIMER21.
Definition: timer2x.h:1652

◆ TIMER21_Overflow_Int_Clr()

INLINE void TIMER21_Overflow_Int_Clr ( void  )

Clears TIMER21 Overflow Interrupt.

Example

This example treats the TIMER21 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}
INLINE uint8 TIMER21_Overflow_Sts(void)
Reads TIMER21 Overflow Status.
Definition: timer2x.h:1587
INLINE void TIMER21_Overflow_Int_Clr(void)
Clears TIMER21 Overflow Interrupt.
Definition: timer2x.h:1667
INLINE void TIMER21_Overflow_Int_En(void)
Enables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1677
INLINE void TIMER21_Overflow_Int_Dis(void)
Disables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1682

◆ TIMER21_Overflow_Int_Dis()

INLINE void TIMER21_Overflow_Int_Dis ( void  )

Disables TIMER21 Overflow Interrupt.

Example

This example treats the TIMER21 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}

◆ TIMER21_Overflow_Int_En()

INLINE void TIMER21_Overflow_Int_En ( void  )

Enables TIMER21 Overflow Interrupt.

Example

This example treats the TIMER21 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}

◆ TIMER21_Overflow_Sts()

INLINE uint8 TIMER21_Overflow_Sts ( void  )

Reads TIMER21 Overflow Status.

Returns
TIMER21 Overflow Status

Example

This example checks the TIMER21 Overflow Status.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}

◆ TIMER21_Reload_Capture_FallingEdge_Set()

INLINE void TIMER21_Reload_Capture_FallingEdge_Set ( void  )

Sets Falling Edge to Capture/Reload Mode for TIMER21.

Example

This example sets Falling Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Reload_Capture_FallingEdge_Set(void)
Sets Falling Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:1612

◆ TIMER21_Reload_Capture_RisingEdge_Set()

INLINE void TIMER21_Reload_Capture_RisingEdge_Set ( void  )

Sets Rising Edge to Capture/Reload Mode for TIMER21.

Example

This example sets Rising Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Reload_Capture_RisingEdge_Set(void)
Sets Rising Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:1607

◆ TIMER21_Reload_Value_Set()

INLINE void TIMER21_Reload_Value_Set ( uint16  t21)

Sets TIMER21 Reload Value.

Parameters
t21TIMER21 Reload Value

Example

This example sets TIMER21 Reload Value to 5000.

void Example_Function(void)
{
}
INLINE void TIMER21_Reload_Value_Set(uint16 t21)
Sets TIMER21 Reload Value.
Definition: timer2x.h:1662

◆ TIMER21_Select_T21EX()

INLINE void TIMER21_Select_T21EX ( TTIMER21_T21EX_Pxx  pinsel)

Sets TIMER21 T21EX Pin.

Parameters
pinselT21EX Pin select, see TTIMER21_T21EX_Pxx

Example

This example sets TIMER2 External Input to T21EX_0(P0.2).

void Example_Function(void)
{
}
INLINE void TIMER21_Select_T21EX(TTIMER21_T21EX_Pxx pinsel)
Sets TIMER21 T21EX Pin.
Definition: timer2x.h:1793
@ TIMER21_T21EX_P02
Definition: timer2x.h:125

◆ TIMER21_Select_T21IN()

INLINE void TIMER21_Select_T21IN ( TTIMER21_T21IN_Pxx  pinsel)

Sets TIMER21 T21IN Pin.

Parameters
pinselT21IN Pin select, see TTIMER21_T21IN_Pxx

Example

This example sets TIMER2 Input to T21_1(P1.2).

void Example_Function(void)
{
}
INLINE void TIMER21_Select_T21IN(TTIMER21_T21IN_Pxx pinsel)
Sets TIMER21 T21IN Pin.
Definition: timer2x.h:1788
@ TIMER21_T21IN_P12
Definition: timer2x.h:116

◆ TIMER21_Set_Reload()

INLINE void TIMER21_Set_Reload ( uint16  value)

Sets TIMER21 reload value.

Parameters
valuereload value in ticks

Example

This example sets TIMER21 Reload Value to 5000 ticks.

void Example_Function(void)
{
}
INLINE void TIMER21_Set_Reload(uint16 value)
Sets TIMER21 reload value.
Definition: timer2x.h:1783

◆ TIMER21_Start()

INLINE void TIMER21_Start ( void  )

Starts the TIMER21 by software.

Example

This example starts the TIMER21 by software.

void Example_Function(void)
{
}
INLINE void TIMER21_Start(void)
Starts the TIMER21 by software.
Definition: timer2x.h:1748

◆ TIMER21_Stop()

INLINE void TIMER21_Stop ( void  )

Stops the TIMER21 by software.

Example

This example stops and reset TIMER21 by software.

void Example_Function(void)
{
}

◆ TIMER21_UpDownCount_Dis()

INLINE void TIMER21_UpDownCount_Dis ( void  )

Disables Up/Down Counter for TIMER21.

Example

This example starts Up Counter once TR2 is set and External Control was disabled.

void Example_Function(void)
{
}
INLINE void TIMER21_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER21.
Definition: timer2x.h:1632

◆ TIMER21_UpDownCount_En()

INLINE void TIMER21_UpDownCount_En ( void  )

Enables Up/Down Counter for TIMER21.

Example

This example starts Up Counter once there is a logic 1 at pin T21EX which is configured to P0.2 .

void Example_Function(void)
{
while(TIMER21_External_Sts() == (uint8)0)
{
}
}
INLINE void TIMER21_UpDownCount_En(void)
Enables Up/Down Counter for TIMER21.
Definition: timer2x.h:1627

◆ TIMER21_Value_Set()

INLINE void TIMER21_Value_Set ( uint16  t21)

Sets TIMER21 Value.

Parameters
t21TIMER21 Value

Example

This example sets TIMER21 Value to 5000.

void Example_Function(void)
{
}
INLINE void TIMER21_Value_Set(uint16 t21)
Sets TIMER21 Value.
Definition: timer2x.h:1657

◆ TIMER2_Clear_Count()

INLINE void TIMER2_Clear_Count ( void  )

Clears the TIMER2 count value.

Example

This example stops and reset TIMER2 by software.

void Example_Function(void)
{
}
INLINE void TIMER2_Clear_Count(void)
Clears the TIMER2 count value.
Definition: timer2x.h:1727
INLINE void TIMER2_Stop(void)
Stops the TIMER2 by software.
Definition: timer2x.h:1702

◆ TIMER2_Clk_Prescaler_Dis()

INLINE void TIMER2_Clk_Prescaler_Dis ( void  )

Disables TIMER2 clock prescaler.

Example

This example disables TIMER2 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER2_Clk_Prescaler_Dis(void)
Disables TIMER2 clock prescaler.
Definition: timer2x.h:1442

◆ TIMER2_Clk_Prescaler_En()

INLINE void TIMER2_Clk_Prescaler_En ( void  )

Enables TIMER2 clock prescaler.

Example

This example enables TIMER2 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER2_Clk_Prescaler_En(void)
Enables TIMER2 clock prescaler.
Definition: timer2x.h:1437

◆ TIMER2_Clk_Prescaler_Get()

INLINE uint8 TIMER2_Clk_Prescaler_Get ( void  )

Reads TIMER2 clock prescaler.

Returns
TIMER2 clock prescaler

Example

This example reads TIMER2 clock prescaler.

void Example_Function(void)
{
uint8 pre;
}
INLINE uint8 TIMER2_Clk_Prescaler_Get(void)
Reads TIMER2 clock prescaler.
Definition: timer2x.h:1452

◆ TIMER2_Clk_Prescaler_Sel()

INLINE void TIMER2_Clk_Prescaler_Sel ( uint8  t2pre)

Sets TIMER2 clock prescaler.

Parameters
t2preTIMER2 clock prescaler, see TIMER2x_Clock_Prescaler

Example

This example sets TIMER2 clock prescaler to DIV2.

void Example_Function(void)
{
}
INLINE void TIMER2_Clk_Prescaler_Sel(uint8 t2pre)
Sets TIMER2 clock prescaler.
Definition: timer2x.h:1447

◆ TIMER2_External_Int_Clr()

INLINE void TIMER2_External_Int_Clr ( void  )

Clears TIMER2 External Interrupt flag.

Example

This example treats the TIMER2 External Interrupt.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}
INLINE uint8 TIMER2_External_Sts(void)
Reads TIMER2 External Status.
Definition: timer2x.h:1462
INLINE void TIMER2_External_Int_En(void)
Enables TIMER2 External Interrupt.
Definition: timer2x.h:1557
INLINE void TIMER2_External_Int_Clr(void)
Clears TIMER2 External Interrupt flag.
Definition: timer2x.h:1542
INLINE void TIMER2_External_Int_Dis(void)
Disables TIMER2 External Interrupt.
Definition: timer2x.h:1562

◆ TIMER2_External_Int_Dis()

INLINE void TIMER2_External_Int_Dis ( void  )

Disables TIMER2 External Interrupt.

Example

This example treats the TIMER2 External Interrupt.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}

◆ TIMER2_External_Int_En()

INLINE void TIMER2_External_Int_En ( void  )

Enables TIMER2 External Interrupt.

Example

This example treats the TIMER2 External Interrupt.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}

◆ TIMER2_External_Sts()

INLINE uint8 TIMER2_External_Sts ( void  )

Reads TIMER2 External Status.

Returns
TIMER2 External Status

Example

This example checks the TIMER2 External Status.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}
INLINE void TIMER2_ExternalCtrl_Dis(void)
Disables TIMER2 External Control.
Definition: timer2x.h:1472
INLINE void TIMER2_ExternalCtrl_En(void)
Enables TIMER2 External Control.
Definition: timer2x.h:1467

◆ TIMER2_ExternalCtrl_Dis()

INLINE void TIMER2_ExternalCtrl_Dis ( void  )

Disables TIMER2 External Control.

Example

This example reads TIMER2 External Status.

void Example_Function(void)
{
}

◆ TIMER2_ExternalCtrl_En()

INLINE void TIMER2_ExternalCtrl_En ( void  )

Enables TIMER2 External Control.

Example

This example checks the TIMER2 External Status.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}

◆ TIMER2_ExtStart()

INLINE void TIMER2_ExtStart ( void  )

Prepares TIMER2 to be started externally.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER2_ExtStart_RisingEdge_Set(void)
Sets Rising Edge to External Start for TIMER2.
Definition: timer2x.h:1487
INLINE void TIMER2_ExtStop(void)
Disables TIMER2 to be started externally.
Definition: timer2x.h:1712
INLINE void TIMER2_ExtStart(void)
Prepares TIMER2 to be started externally.
Definition: timer2x.h:1707

◆ TIMER2_ExtStart_FallingEdge_Set()

INLINE void TIMER2_ExtStart_FallingEdge_Set ( void  )

Sets Falling Edge to External Start for TIMER2.

Example

This example sets Falling Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER2_ExtStart_FallingEdge_Set(void)
Sets Falling Edge to External Start for TIMER2.
Definition: timer2x.h:1492

◆ TIMER2_ExtStart_RisingEdge_Set()

INLINE void TIMER2_ExtStart_RisingEdge_Set ( void  )

Sets Rising Edge to External Start for TIMER2.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER2_ExtStop()

INLINE void TIMER2_ExtStop ( void  )

Disables TIMER2 to be started externally.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER2_Get_Capture()

INLINE uint16 TIMER2_Get_Capture ( void  )

Reads the TIMER2 capture value.

Returns
TIMER2 capture value

Example

This example reads the TIMER2 capture value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER2_Get_Capture();
}
INLINE uint16 TIMER2_Get_Capture(void)
Reads the TIMER2 capture value.
Definition: timer2x.h:1722

◆ TIMER2_Get_Count()

INLINE uint16 TIMER2_Get_Count ( void  )

Reads the TIMER2 count value.

Returns
TIMER2 count value

Example

This example reads the TIMER2 count value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER2_Get_Count();
}
INLINE uint16 TIMER2_Get_Count(void)
Reads the TIMER2 count value.
Definition: timer2x.h:1717

◆ TIMER2_Init()

void TIMER2_Init ( void  )

Initializes the Timer2 module.

◆ TIMER2_Interval_Timer_Setup()

bool TIMER2_Interval_Timer_Setup ( uint32  timer_interval_us)

Initializes the TIMER2 in Reload Mode.

Parameters
timer_interval_ustimer interval in microseconds
Returns
true = setup done, false = setup failed

Example

This example Initializes the TIMER2 in Reload Mode with timer equals to 5000 us.

void Example_Function(void)
{
bool sts;
}
bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER2 in Reload Mode.

◆ TIMER2_Mode_Capture_Set()

INLINE void TIMER2_Mode_Capture_Set ( void  )

Selects Capture Mode for TIMER2.

Example

This example enters 16-bit Capture Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Capture_Set(void)
Selects Capture Mode for TIMER2.
Definition: timer2x.h:1507

◆ TIMER2_Mode_Counter_Set()

INLINE void TIMER2_Mode_Counter_Set ( void  )

Selects Mode Counter for TIMER2.

Example

This example sets the Mode Counter.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Counter_Set(void)
Selects Mode Counter for TIMER2.
Definition: timer2x.h:1517

◆ TIMER2_Mode_Reload_Set()

INLINE void TIMER2_Mode_Reload_Set ( void  )

Selects Reload Mode for TIMER2.

Example

This example enters Auto-Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Reload_Set(void)
Selects Reload Mode for TIMER2.
Definition: timer2x.h:1512

◆ TIMER2_Mode_Timer_Set()

INLINE void TIMER2_Mode_Timer_Set ( void  )

Selects Mode Timer for TIMER2.

Example

This example sets the Mode Timer.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Timer_Set(void)
Selects Mode Timer for TIMER2.
Definition: timer2x.h:1522

◆ TIMER2_Overflow_Int_Clr()

INLINE void TIMER2_Overflow_Int_Clr ( void  )

Clears TIMER2 Overflow Interrupt flag.

Example

This example treats the TIMER2 Overflow Interrupt.

void Example_Function(void)
{
if (TIMER2_Overflow_Sts() == 1)
{
TIMER2_TF2_CALLBACK();
}
}
INLINE void TIMER2_Overflow_Int_Dis(void)
Disables TIMER2 Overflow Interrupt.
Definition: timer2x.h:1552
INLINE void TIMER2_Overflow_Int_Clr(void)
Clears TIMER2 Overflow Interrupt flag.
Definition: timer2x.h:1537
INLINE void TIMER2_Overflow_Int_En(void)
Enables TIMER2 Overflow Interrupt.
Definition: timer2x.h:1547
INLINE uint8 TIMER2_Overflow_Sts(void)
Reads TIMER2 Overflow Status.
Definition: timer2x.h:1457

◆ TIMER2_Overflow_Int_Dis()

INLINE void TIMER2_Overflow_Int_Dis ( void  )

Disables TIMER2 Overflow Interrupt.

Example

This example treats the TIMER2 Overflow Interrupt.

void Example_Function(void)
{
if (TIMER2_Overflow_Sts() == 1)
{
TIMER2_TF2_CALLBACK();
}
}

◆ TIMER2_Overflow_Int_En()

INLINE void TIMER2_Overflow_Int_En ( void  )

Enables TIMER2 Overflow Interrupt.

Example

This example treats the TIMER2 Overflow Interrupt.

void Example_Function(void)
{
if (TIMER2_Overflow_Sts() == 1)
{
TIMER2_TF2_CALLBACK();
}
}

◆ TIMER2_Overflow_Sts()

INLINE uint8 TIMER2_Overflow_Sts ( void  )

Reads TIMER2 Overflow Status.

Returns
TIMER2 Overflow Status

Example

This example checks the TIMER2 Overflow Status.

void Example_Function(void)
{
if (TIMER2_Overflow_Sts() == 1)
{
TIMER2_TF2_CALLBACK();
}
}

◆ TIMER2_Reload_Capture_FallingEdge_Set()

INLINE void TIMER2_Reload_Capture_FallingEdge_Set ( void  )

Sets Falling Edge to Capture/Reload Mode for TIMER2.

Example

This example sets Falling Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Reload_Capture_FallingEdge_Set(void)
Sets Falling Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:1482

◆ TIMER2_Reload_Capture_RisingEdge_Set()

INLINE void TIMER2_Reload_Capture_RisingEdge_Set ( void  )

Sets Rising Edge to Capture/Reload Mode for TIMER2.

Example

This example sets Rising Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Reload_Capture_RisingEdge_Set(void)
Sets Rising Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:1477

◆ TIMER2_Reload_Value_Set()

INLINE void TIMER2_Reload_Value_Set ( uint16  t2)

Sets TIMER2 Reload Value.

Parameters
t2TIMER2 Reload Value

Example

This example sets TIMER2 Reload Value to 5000.

void Example_Function(void)
{
}
INLINE void TIMER2_Reload_Value_Set(uint16 t2)
Sets TIMER2 Reload Value.
Definition: timer2x.h:1532

◆ TIMER2_Select_T2EX()

INLINE void TIMER2_Select_T2EX ( TTIMER2_T2EX_Pxx  pinsel)

Sets TIMER2 T2EX Pin.

Parameters
pinselT2EX Pin select, see TTIMER2_T2EX_Pxx

Example

This example sets TIMER2 External Input to T2EX_0(P2.2).

void Example_Function(void)
{
}
INLINE void TIMER2_Select_T2EX(TTIMER2_T2EX_Pxx pinsel)
Sets TIMER2 T2EX Pin.
Definition: timer2x.h:1742
@ TIMER2_T2EX_P22
Definition: timer2x.h:93

◆ TIMER2_Select_T2IN()

INLINE void TIMER2_Select_T2IN ( TTIMER2_T2IN_Pxx  pinsel)

Sets TIMER2 T2IN Pin.

Parameters
pinselT2IN Pin select, see TTIMER2_T2IN_Pxx

Example

This example sets TIMER2 Input to T2_1(P2.7).

void Example_Function(void)
{
}
@ TIMER2_T2IN_P27
Definition: timer2x.h:84
INLINE void TIMER2_Select_T2IN(TTIMER2_T2IN_Pxx pinsel)
Sets TIMER2 T2IN Pin.
Definition: timer2x.h:1737

◆ TIMER2_Set_Reload()

INLINE void TIMER2_Set_Reload ( uint16  value)

Sets TIMER2 reload value.

Parameters
valuereload value in ticks

Example

This example sets TIMER2 Reload Value to 5000 ticks.

void Example_Function(void)
{
}
INLINE void TIMER2_Set_Reload(uint16 value)
Sets TIMER2 reload value.
Definition: timer2x.h:1732

◆ TIMER2_Start()

INLINE void TIMER2_Start ( void  )

Starts the TIMER2 by software.

Example

This example starts the TIMER2 by software.

void Example_Function(void)
{
}
INLINE void TIMER2_Start(void)
Starts the TIMER2 by software.
Definition: timer2x.h:1697

◆ TIMER2_Stop()

INLINE void TIMER2_Stop ( void  )

Stops the TIMER2 by software.

Example

This example stops and reset TIMER2 by software.

void Example_Function(void)
{
}

◆ TIMER2_UpDownCount_Dis()

INLINE void TIMER2_UpDownCount_Dis ( void  )

Disables Up/Down Counter for TIMER2.

Example

This example starts Up Counter once TR2 is set and External Control was disabled.

void Example_Function(void)
{
}
INLINE void TIMER2_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER2.
Definition: timer2x.h:1502

◆ TIMER2_UpDownCount_En()

INLINE void TIMER2_UpDownCount_En ( void  )

Enables Up/Down Counter for TIMER2.

Example

This example starts Up Counter once there is a logic 1 at pin T2EX which is configured to P2.2 .

void Example_Function(void)
{
while(TIMER2_External_Sts() == (uint8)0)
{
}
}
INLINE void TIMER2_UpDownCount_En(void)
Enables Up/Down Counter for TIMER2.
Definition: timer2x.h:1497

◆ TIMER2_Value_Set()

INLINE void TIMER2_Value_Set ( uint16  t2)

Sets TIMER2 Value.

Parameters
t2TIMER2 Value

Example

This example sets TIMER2 Value to 5000 ticks.

void Example_Function(void)
{
}
INLINE void TIMER2_Value_Set(uint16 t2)
Sets TIMER2 Value.
Definition: timer2x.h:1527