Infineon MOTIX™ MCU TLE987x Device Family SDK
timer2x.h
Go to the documentation of this file.
1 /*
2  ***********************************************************************************************************************
3  *
4  * Copyright (c) Infineon Technologies AG
5  * All rights reserved.
6  *
7  * The applicable license agreement can be found at this pack's installation directory in the file
8  * license/IFX_SW_Licence_MOTIX_LITIX.txt
9  *
10  **********************************************************************************************************************/
20 /*******************************************************************************
21 ** Author(s) Identity **
22 ********************************************************************************
23 ** Initials Name **
24 ** ---------------------------------------------------------------------------**
25 ** DM Daniel Mysliwitz **
26 ** DCM Dragos C. Molocea **
27 ** BG Blandine Guillot **
28 ** JO Julia Ott **
29 ** TA Thomas Albersinger **
30 ** VO Vanessa Ongaro **
31 *******************************************************************************/
32 
33 /*******************************************************************************
34 ** Revision Control History **
35 ********************************************************************************
36 ** V0.1.0: 2014-05-13, TA: Initial version **
37 ** V0.1.1: 2014-11-02, DM: Timer values init added **
38 ** V0.1.2: 2015-02-10, DM: Individual header file added **
39 ** V0.1.3: 2017-02-16, DM: Timer2/Timer21 prefix changed to capital letters **
40 ** Macros for Timer2x bit accesses added **
41 ** Set_Reload function added **
42 ** V0.1.4: 2017-05-26, DM: API extended **
43 ** V0.1.5: 2017-10-19, DM: MISRA 2012 compliance, the following PC-Lint **
44 ** rules are globally deactivated: **
45 ** - Info 793: ANSI/ISO limit of 6 'significant **
46 ** characters in an external identifier **
47 ** - Info 835: A zero has been given as right **
48 ** argument to operator **
49 ** - Info 845: The left argument to operator '&' **
50 ** is certain to be 0 **
51 ** Replaced macros by INLINE functions **
52 ** Replaced register accesses within functions by **
53 ** function calls **
54 ** Replaced __STATIC_INLINE by INLINE **
55 ** V0.1.6: 2018-06-27, DCM: Added handling in case of timer_interval_us value**
56 ** in invalid range **
57 ** V0.1.7: 2018-12-03, JO: Doxygen update **
58 ** Move revision history from timer2x.c to timer2x.h**
59 ** Replaced __STATIC_INLINE by INLINE **
60 ** V0.1.8: 2020-04-15, BG: Updated revision history format **
61 ** V0.1.9: 2020-07-13, JO: EP-431: remove ARMCC v6 Compiler warnings **
62 ** - Added typecasts to remove 'implicit typecast' **
63 ** warning **
64 ** V0.2.0: 2020-07-21, BG: EP-439: Formatted .h/.c files **
65 ** V0.2.1: 2021-04-23, BG: EP-726: Corrected MISRA 2012 violations **
66 ** V0.2.2: 2022-02-28, JO: EP-936: Updated copyright and branding **
67 ** V0.2.3: 2022-10-18, VO: EP-1252: Removed ARMCC V6.18 warnings **
68 ** V0.2.4: 2025-01-02, JO: EP-1493: Updated license **
69 *******************************************************************************/
70 
71 #ifndef TIMER2X_H
72 #define TIMER2X_H
73 
74 /*******************************************************************************
75 ** Includes **
76 *******************************************************************************/
77 #include "tle987x.h"
78 #include "types.h"
79 #include "sfr_access.h"
80 
81 /*******************************************************************************
82 ** Global Type Definitions **
83 *******************************************************************************/
87 typedef enum TIMER2_T2IN_Pxx
88 {
90  TIMER2_T2IN_P25 = 1u
92 
96 typedef enum TIMER2_T2EX_Pxx
97 {
102 
106 typedef enum TIMER21_T2IN_Pxx
107 {
110  TIMER21_T2IN_P04 = 2u
112 
116 typedef enum TIMER21_T2EX_Pxx
117 {
124 
129 {
137  TIMER2x_Clk_Div_128 = 7u
139 
140 /*******************************************************************************
141 ** Global Macro Definitions **
142 *******************************************************************************/
143 #define MIN_TIMER_INTERVAL_US 1u
144 #define T2_REG_MAX_UPCOUNT_TICKS 0u
145 #define T2_REG_MIN_UPCOUNT_TICKS 0xFFFFu
146 
147 
148 /*******************************************************************************
149 ** Global Inline Function Definitions **
150 *******************************************************************************/
151 /* TIMER2 */
165 {
167 }
168 
182 {
184 }
185 
200 {
202 }
203 
222 {
224 }
225 
247 {
249 }
250 
271 {
273 }
274 
296 {
298 }
299 
317 {
319 }
320 
334 {
336 }
337 
351 {
353 }
354 
370 {
372 }
373 
389 {
391 }
392 
406 {
408 }
409 
425 {
427 }
428 
443 {
445 }
446 
460 {
462 }
463 
477 {
479 }
480 
494 {
496 }
497 
517 {
519 }
520 
540 {
542 }
543 
563 {
565 }
566 
586 {
588 }
589 
609 {
611 }
612 
632 {
634 }
635 
649 {
651 }
652 
666 {
668 }
669 
686 {
688 }
689 
708 {
710 }
711 
733 {
735 }
736 
757 {
759 }
760 
782 {
784 }
785 
803 {
805 }
806 
820 {
822 }
823 
837 {
839 }
840 
854 {
856 }
857 
871 {
873 }
874 
888 {
890 }
891 
907 {
909 }
910 
925 {
927 }
928 
942 {
944 }
945 
959 {
961 }
962 
976 {
978 }
979 
999 {
1001 }
1002 
1022 {
1024 }
1025 
1045 {
1047 }
1048 
1068 {
1070 }
1071 
1091 {
1093 }
1094 
1095 
1115 {
1117 }
1118 
1119 /*******************************************************************************
1120 ** Global Function Declarations **
1121 *******************************************************************************/
1126 void TIMER2_Init(void);
1127 
1132 void TIMER21_Init(void);
1133 
1150 bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us);
1151 
1168 bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us);
1169 
1170 /*******************************************************************************
1171 ** Global Inline Function Declarations **
1172 *******************************************************************************/
1173 INLINE void TIMER2_Start(void);
1174 INLINE void TIMER2_Stop(void);
1175 INLINE void TIMER2_ExtStart(void);
1176 INLINE void TIMER2_ExtStop(void);
1181 INLINE void TIMER2_Clear_Count(void);
1182 INLINE void TIMER2_Set_Reload(uint16 value);
1185 INLINE void TIMER21_Start(void);
1186 INLINE void TIMER21_Stop(void);
1187 INLINE void TIMER21_ExtStart(void);
1188 INLINE void TIMER21_ExtStop(void);
1193 INLINE void TIMER21_Clear_Count(void);
1194 INLINE void TIMER21_Set_Reload(uint16 value);
1197 
1198 /*******************************************************************************
1199 ** Global Inline Function Definitions **
1200 *******************************************************************************/
1214 {
1216 }
1217 
1232 {
1234 }
1235 
1251 {
1253 }
1254 
1270 {
1272 }
1273 
1290 {
1291  uint16 res;
1294  return (res);
1295 }
1296 
1314 {
1315  uint16 res;
1318  return (res);
1319 }
1320 
1338 {
1339  uint16 res;
1342  return (res);
1343 }
1344 
1362 {
1363  uint16 res;
1366  return (res);
1367 }
1368 
1383 {
1386 }
1387 
1404 {
1405  Field_Wrt8(&TIMER2->RC2H.reg, (uint8)TIMER2_RC2H_RC2_Pos, (uint8)TIMER2_RC2H_RC2_Msk, (uint8)(value >> 8u));
1406  Field_Wrt8(&TIMER2->RC2L.reg, (uint8)TIMER2_RC2L_RC2_Pos, (uint8)TIMER2_RC2L_RC2_Msk, (uint8)(value & (uint16)0xFFu));
1407 }
1408 
1424 {
1426 }
1427 
1443 {
1444  if (pinsel < TIMER2_T2EX_CCU6_CC60)
1445  {
1448  }
1449  else
1450  {
1452  }
1453 }
1454 
1468 {
1470 }
1471 
1486 {
1488 }
1489 
1505 {
1507 }
1508 
1524 {
1526 }
1527 
1545 {
1546  uint16 res;
1549  return (res);
1550 }
1551 
1569 {
1570  uint16 res;
1573  return (res);
1574 }
1575 
1593 {
1594  uint16 res;
1597  return (res);
1598 }
1599 
1617 {
1618  uint16 res;
1621  return (res);
1622 }
1623 
1638 {
1641 }
1642 
1659 {
1662 }
1663 
1679 {
1681 }
1682 
1698 {
1699  if (pinsel < TIMER21_T2EX_CCU6_COUT60)
1700  {
1703  }
1704  else
1705  {
1707  }
1708 }
1709 
1725 {
1728 }
1729 
1746 {
1749 }
1750 
1766 {
1769 }
1770 
1787 {
1790 }
1791 
1792 #endif
#define TIMER21
Definition: tle987x.h:6076
#define TIMER2
Definition: tle987x.h:6075
#define SCU
Definition: tle987x.h:6071
#define TIMER2_T2H_T2H_Pos
Definition: tle987x.h:9937
#define TIMER21_T2CON1_EXF2EN_Msk
Definition: tle987x.h:9987
#define SCU_MODPISEL2_T21EXIS_Msk
Definition: tle987x.h:9160
#define SCU_MODPISEL2_T2IS_Pos
Definition: tle987x.h:9165
#define TIMER21_T2L_T2L_Msk
Definition: tle987x.h:10000
#define TIMER21_T2CON_TF2_Msk
Definition: tle987x.h:9984
#define TIMER2_T2MOD_PREN_Pos
Definition: tle987x.h:9952
#define TIMER2_T2ICLR_EXF2CLR_Pos
Definition: tle987x.h:9940
#define TIMER21_T2MOD_T2RHEN_Pos
Definition: tle987x.h:10010
#define TIMER2_RC2L_RC2_Pos
Definition: tle987x.h:9916
#define TIMER21_T2MOD_PREN_Msk
Definition: tle987x.h:10007
#define TIMER21_RC2L_RC2_Msk
Definition: tle987x.h:9971
#define TIMER2_RC2L_RC2_Msk
Definition: tle987x.h:9917
#define TIMER2_T2CON_TF2_Msk
Definition: tle987x.h:9930
#define TIMER21_T2CON_EXF2_Msk
Definition: tle987x.h:9982
#define TIMER2_RC2H_RC2_Pos
Definition: tle987x.h:9913
#define TIMER21_T2ICLR_TF2CLR_Pos
Definition: tle987x.h:9996
#define TIMER2_T2CON1_EXF2EN_Pos
Definition: tle987x.h:9932
#define TIMER2_T2MOD_T2PRE_Pos
Definition: tle987x.h:9950
#define TIMER21_T2CON_EXEN2_Pos
Definition: tle987x.h:9979
#define TIMER2_T2MOD_EDGESEL_Pos
Definition: tle987x.h:9954
#define TIMER2_T2MOD_DCEN_Msk
Definition: tle987x.h:9949
#define TIMER2_RC2H_RC2_Msk
Definition: tle987x.h:9914
#define SCU_MODPISEL1_T21EXCON_Pos
Definition: tle987x.h:9152
#define TIMER2_T2CON_EXF2_Pos
Definition: tle987x.h:9927
#define TIMER21_T2ICLR_EXF2CLR_Pos
Definition: tle987x.h:9994
#define TIMER2_T2MOD_T2REGS_Msk
Definition: tle987x.h:9959
#define TIMER21_T2CON_TR2_Pos
Definition: tle987x.h:9977
#define TIMER21_T2CON1_TF2EN_Msk
Definition: tle987x.h:9989
#define TIMER21_T2MOD_EDGESEL_Pos
Definition: tle987x.h:10008
#define TIMER21_T2MOD_DCEN_Pos
Definition: tle987x.h:10002
#define TIMER2_T2CON1_TF2EN_Msk
Definition: tle987x.h:9935
#define TIMER2_T2CON_CP_RL2_Msk
Definition: tle987x.h:9920
#define TIMER2_T2CON_C_T2_Pos
Definition: tle987x.h:9921
#define TIMER2_T2H_T2H_Msk
Definition: tle987x.h:9938
#define TIMER2_T2CON_EXF2_Msk
Definition: tle987x.h:9928
#define TIMER2_T2ICLR_EXF2CLR_Msk
Definition: tle987x.h:9941
#define SCU_MODPISEL1_T2EXCON_Msk
Definition: tle987x.h:9155
#define TIMER21_T2CON_EXF2_Pos
Definition: tle987x.h:9981
#define TIMER21_T2MOD_DCEN_Msk
Definition: tle987x.h:10003
#define SCU_MODPISEL1_T2EXCON_Pos
Definition: tle987x.h:9154
#define TIMER2_T2CON_TF2_Pos
Definition: tle987x.h:9929
#define TIMER2_T2ICLR_TF2CLR_Msk
Definition: tle987x.h:9943
#define TIMER2_T2MOD_DCEN_Pos
Definition: tle987x.h:9948
#define TIMER21_T2CON_C_T2_Pos
Definition: tle987x.h:9975
#define TIMER2_T2MOD_T2RHEN_Pos
Definition: tle987x.h:9956
#define TIMER2_T2CON1_EXF2EN_Msk
Definition: tle987x.h:9933
#define SCU_MODPISEL1_T21EXCON_Msk
Definition: tle987x.h:9153
#define TIMER2_T2ICLR_TF2CLR_Pos
Definition: tle987x.h:9942
#define TIMER21_T2MOD_PREN_Pos
Definition: tle987x.h:10006
#define SCU_MODPISEL2_T2IS_Msk
Definition: tle987x.h:9166
#define TIMER21_T2H_T2H_Pos
Definition: tle987x.h:9991
#define TIMER2_T2MOD_T2RHEN_Msk
Definition: tle987x.h:9957
#define TIMER21_T2L_T2L_Pos
Definition: tle987x.h:9999
#define TIMER21_T2MOD_T2REGS_Pos
Definition: tle987x.h:10012
#define TIMER21_T2CON_C_T2_Msk
Definition: tle987x.h:9976
#define TIMER21_T2CON1_TF2EN_Pos
Definition: tle987x.h:9988
#define SCU_MODPISEL2_T2EXIS_Msk
Definition: tle987x.h:9162
#define SCU_MODPISEL2_T21IS_Pos
Definition: tle987x.h:9163
#define TIMER2_T2MOD_PREN_Msk
Definition: tle987x.h:9953
#define TIMER21_T2MOD_T2PRE_Pos
Definition: tle987x.h:10004
#define TIMER21_T2MOD_T2PRE_Msk
Definition: tle987x.h:10005
#define TIMER21_RC2H_RC2_Msk
Definition: tle987x.h:9968
#define TIMER21_T2MOD_T2RHEN_Msk
Definition: tle987x.h:10011
#define TIMER21_RC2L_RC2_Pos
Definition: tle987x.h:9970
#define TIMER21_T2CON_CP_RL2_Pos
Definition: tle987x.h:9973
#define TIMER21_T2MOD_EDGESEL_Msk
Definition: tle987x.h:10009
#define TIMER21_T2MOD_T2REGS_Msk
Definition: tle987x.h:10013
#define TIMER21_T2CON1_EXF2EN_Pos
Definition: tle987x.h:9986
#define TIMER2_T2MOD_EDGESEL_Msk
Definition: tle987x.h:9955
#define TIMER2_T2CON_EXEN2_Msk
Definition: tle987x.h:9926
#define TIMER2_T2CON_TR2_Pos
Definition: tle987x.h:9923
#define TIMER21_T2ICLR_EXF2CLR_Msk
Definition: tle987x.h:9995
#define SCU_MODPISEL2_T21EXIS_Pos
Definition: tle987x.h:9159
#define TIMER21_T2CON_TR2_Msk
Definition: tle987x.h:9978
#define TIMER2_T2L_T2L_Pos
Definition: tle987x.h:9945
#define TIMER2_T2CON1_TF2EN_Pos
Definition: tle987x.h:9934
#define TIMER21_T2CON_TF2_Pos
Definition: tle987x.h:9983
#define TIMER2_T2MOD_T2PRE_Msk
Definition: tle987x.h:9951
#define TIMER2_T2CON_EXEN2_Pos
Definition: tle987x.h:9925
#define TIMER21_T2ICLR_TF2CLR_Msk
Definition: tle987x.h:9997
#define SCU_MODPISEL2_T2EXIS_Pos
Definition: tle987x.h:9161
#define TIMER2_T2MOD_T2REGS_Pos
Definition: tle987x.h:9958
#define SCU_MODPISEL2_T21IS_Msk
Definition: tle987x.h:9164
#define TIMER2_T2CON_C_T2_Msk
Definition: tle987x.h:9922
#define TIMER21_T2CON_EXEN2_Msk
Definition: tle987x.h:9980
#define TIMER21_RC2H_RC2_Pos
Definition: tle987x.h:9967
#define TIMER21_T2CON_CP_RL2_Msk
Definition: tle987x.h:9974
#define TIMER21_T2H_T2H_Msk
Definition: tle987x.h:9992
#define TIMER2_T2L_T2L_Msk
Definition: tle987x.h:9946
#define TIMER2_T2CON_TR2_Msk
Definition: tle987x.h:9924
#define TIMER2_T2CON_CP_RL2_Pos
Definition: tle987x.h:9919
SFR low level access library.
INLINE void Field_Wrt8(volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
This function writes a bit field in a 8-bit register.
Definition: sfr_access.h:322
INLINE uint8 u8_Field_Rd8(const volatile uint8 *reg, uint8 pos, uint8 msk)
This function reads a 8-bit field of a 8-bit register.
Definition: sfr_access.h:397
INLINE uint8 u1_Field_Rd8(const volatile uint8 *reg, uint8 pos, uint8 msk)
This function reads a 1-bit field of a 8-bit register.
Definition: sfr_access.h:382
INLINE void Field_Mod8(volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
This function writes a bit field in a 8-bit register.
Definition: sfr_access.h:337
INLINE void TIMER21_External_Int_Dis(void)
Disables TIMER21 External Interrupt.
Definition: timer2x.h:1114
INLINE void TIMER2_Clear_Count(void)
clears the TIMER2 count value
Definition: timer2x.h:1382
enum TIMER2_T2IN_Pxx TTIMER2_T2IN_Pxx
enum TIMER21_T2IN_Pxx TTIMER21_T2IN_Pxx
INLINE void TIMER21_Value_Set(uint16 t21)
Sets TIMER21 Value.
Definition: timer2x.h:1765
INLINE void TIMER21_ExtStart_FallingEdge_Set(void)
sets Falling Edge to External Start for TIMER21.
Definition: timer2x.h:870
INLINE void TIMER2_Mode_Timer_Set(void)
Selects Mode Timer for TIMER2.
Definition: timer2x.h:493
TIMER2_T2EX_Pxx
Definition: timer2x.h:97
@ TIMER2_T2EX_LIN
Definition: timer2x.h:98
@ TIMER2_T2EX_P12
Definition: timer2x.h:99
@ TIMER2_T2EX_CCU6_CC60
Definition: timer2x.h:100
void TIMER2_Init(void)
Initializes the Timer2 module based on the Config Wizard for MOTIX MCU configuration.
enum TIMER21_T2EX_Pxx TTIMER21_T2EX_Pxx
INLINE void TIMER21_Mode_Capture_Set(void)
Selects Capture Mode for TIMER21.
Definition: timer2x.h:924
INLINE void TIMER21_Clk_Prescaler_En(void)
enables TIMER21 clock prescaler.
Definition: timer2x.h:648
INLINE void TIMER21_External_Int_Clr(void)
Clears TIMER21 External Interrupt status.
Definition: timer2x.h:1021
INLINE void TIMER2_Clk_Prescaler_En(void)
enables TIMER2 clock prescaler.
Definition: timer2x.h:164
INLINE void TIMER2_ExtStart_FallingEdge_Set(void)
sets Falling Edge to External Start for TIMER2.
Definition: timer2x.h:388
INLINE uint16 TIMER21_Capture_Value_Get(void)
reads the TIMER21 capture value
Definition: timer2x.h:1616
IMER2x_Clock_Prescaler
Definition: timer2x.h:129
@ TIMER2x_Clk_Div_2
Definition: timer2x.h:131
@ TIMER2x_Clk_Div_64
Definition: timer2x.h:136
@ TIMER2x_Clk_Div_32
Definition: timer2x.h:135
@ TIMER2x_Clk_Div_128
Definition: timer2x.h:137
@ TIMER2x_Clk_Div_16
Definition: timer2x.h:134
@ TIMER2x_Clk_Div_8
Definition: timer2x.h:133
@ TIMER2x_Clk_Div_4
Definition: timer2x.h:132
@ TIMER2x_Clk_Div_1
Definition: timer2x.h:130
INLINE void TIMER21_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER21.
Definition: timer2x.h:906
INLINE void TIMER2_Overflow_Int_Dis(void)
Disables TIMER2 Overflow Interrupt.
Definition: timer2x.h:585
INLINE void TIMER2_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER2.
Definition: timer2x.h:424
INLINE uint16 TIMER2_Capture_Value_Get(void)
reads the TIMER2 capture value
Definition: timer2x.h:1361
enum TIMER2_T2EX_Pxx TTIMER2_T2EX_Pxx
INLINE void TIMER21_External_Int_En(void)
Enables TIMER21 External Interrupt.
Definition: timer2x.h:1090
INLINE void TIMER2_Clk_Prescaler_Sel(uint8 t2pre)
sets TIMER2 clock prescaler.
Definition: timer2x.h:199
INLINE uint8 TIMER21_Clk_Prescaler_Get(void)
reads TIMER21 clock prescaler.
Definition: timer2x.h:707
INLINE void TIMER2_Stop(void)
stops the TIMER2 by software
Definition: timer2x.h:1231
INLINE void TIMER2_Reload_Capture_RisingEdge_Set(void)
sets Rising Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:333
INLINE void TIMER21_Clear_Count(void)
clears the TIMER21 count value
Definition: timer2x.h:1637
INLINE void TIMER2_Reload_Value_Set(uint16 t2)
Sets TIMER2 Reload Value.
Definition: timer2x.h:1745
INLINE void TIMER21_Start(void)
starts the TIMER21 by software
Definition: timer2x.h:1467
INLINE void TIMER2_ExternalCtrl_Dis(void)
disables TIMER2 External Control.
Definition: timer2x.h:316
INLINE uint16 TIMER21_Get_Count(void)
reads the TIMER21 count value
Definition: timer2x.h:1544
INLINE void TIMER2_ExtStart_RisingEdge_Set(void)
sets Rising Edge to External Start for TIMER2.
Definition: timer2x.h:369
INLINE void TIMER2_Set_Reload(uint16 value)
sets TIMER2 reload value
Definition: timer2x.h:1403
INLINE void TIMER2_ExternalCtrl_En(void)
enables TIMER2 External Control.
Definition: timer2x.h:295
INLINE uint8 TIMER2_External_Sts(void)
reads TIMER2 External Status.
Definition: timer2x.h:270
TIMER2_T2IN_Pxx
Definition: timer2x.h:88
@ TIMER2_T2IN_P00
Definition: timer2x.h:89
@ TIMER2_T2IN_P25
Definition: timer2x.h:90
bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER21 in Reload Mode.
INLINE uint16 TIMER2_Value_Get(void)
reads the TIMER2 count value
Definition: timer2x.h:1313
INLINE uint8 TIMER21_Overflow_Sts(void)
reads TIMER21 Overflow Status.
Definition: timer2x.h:732
INLINE void TIMER21_Reload_Capture_RisingEdge_Set(void)
sets Rising Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:819
INLINE void TIMER21_Select_T2EX(TTIMER21_T2EX_Pxx pinsel)
sets TIMER21 T2EX Pin
Definition: timer2x.h:1697
INLINE void TIMER21_ExtStop(void)
disable TIMER21 to be started externally
Definition: timer2x.h:1523
void TIMER21_Init(void)
Initializes the Timer21 module based on the Config Wizard for MOTIX MCU configuration.
INLINE void TIMER2_External_Int_En(void)
Enables TIMER2 External Interrupt.
Definition: timer2x.h:608
INLINE uint16 TIMER21_Get_Capture(void)
reads the TIMER21 capture value
Definition: timer2x.h:1592
INLINE void TIMER2_Clk_Prescaler_Dis(void)
disables TIMER2 clock prescaler.
Definition: timer2x.h:181
INLINE void TIMER2_ExtStop(void)
disable TIMER2 to be started externally
Definition: timer2x.h:1269
INLINE uint16 TIMER2_Get_Capture(void)
reads the TIMER2 capture value
Definition: timer2x.h:1337
INLINE void TIMER2_External_Int_Clr(void)
Clears TIMER2 External Interrupt flag.
Definition: timer2x.h:539
INLINE void TIMER21_ExternalCtrl_En(void)
enables TIMER21 External Control.
Definition: timer2x.h:781
INLINE uint8 TIMER2_Clk_Prescaler_Get(void)
reads TIMER2 clock prescaler.
Definition: timer2x.h:221
INLINE uint16 TIMER2_Get_Count(void)
reads the TIMER2 count value
Definition: timer2x.h:1289
INLINE void TIMER2_Value_Set(uint16 t2)
Sets TIMER2 Value.
Definition: timer2x.h:1724
INLINE void TIMER2_Start(void)
starts the TIMER2 by software
Definition: timer2x.h:1213
INLINE void TIMER2_Select_T2EX(TTIMER2_T2EX_Pxx pinsel)
sets TIMER2 T2EX Pin
Definition: timer2x.h:1442
bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER2 in Reload Mode.
INLINE void TIMER2_Select_T2IN(TTIMER2_T2IN_Pxx pinsel)
sets TIMER2 T2IN Pin
Definition: timer2x.h:1423
INLINE void TIMER21_ExternalCtrl_Dis(void)
disables TIMER21 External Control.
Definition: timer2x.h:802
INLINE void TIMER21_Mode_Counter_Set(void)
Selects Mode Counter for TIMER21.
Definition: timer2x.h:958
INLINE void TIMER2_Mode_Counter_Set(void)
Selects Mode Counter for TIMER2.
Definition: timer2x.h:476
INLINE void TIMER2_Mode_Capture_Set(void)
Selects Capture Mode for TIMER2.
Definition: timer2x.h:442
INLINE void TIMER21_UpDownCount_En(void)
enables Up/Down Counter for TIMER21.
Definition: timer2x.h:887
INLINE uint8 TIMER21_External_Sts(void)
reads TIMER21 External Status.
Definition: timer2x.h:756
INLINE void TIMER2_Overflow_Int_Clr(void)
Clears TIMER2 Overflow Interrupt flag.
Definition: timer2x.h:516
INLINE void TIMER21_ExtStart_RisingEdge_Set(void)
sets Rising Edge to External Start for TIMER21.
Definition: timer2x.h:853
INLINE void TIMER21_Select_T2IN(TTIMER21_T2IN_Pxx pinsel)
sets TIMER21 T2IN Pin
Definition: timer2x.h:1678
INLINE void TIMER2_Overflow_Int_En(void)
Enables TIMER2 Overflow Interrupt.
Definition: timer2x.h:562
INLINE void TIMER21_Clk_Prescaler_Dis(void)
disables TIMER21 clock prescaler.
Definition: timer2x.h:665
INLINE void TIMER21_Clk_Prescaler_Sel(uint8 t2pre)
sets TIMER21 clock prescaler.
Definition: timer2x.h:685
INLINE void TIMER21_Set_Reload(uint16 value)
sets TIMER21 reload value
Definition: timer2x.h:1658
INLINE void TIMER21_Overflow_Int_Clr(void)
Clears TIMER21 Overflow Interrupt status.
Definition: timer2x.h:998
INLINE void TIMER21_Overflow_Int_En(void)
Enables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1044
INLINE uint16 TIMER21_Value_Get(void)
reads the TIMER21 count value
Definition: timer2x.h:1568
INLINE void TIMER2_ExtStart(void)
prepares TIMER2 to be started externally
Definition: timer2x.h:1250
INLINE void TIMER21_ExtStart(void)
prepares TIMER21 to be started externally
Definition: timer2x.h:1504
INLINE void TIMER2_Mode_Reload_Set(void)
Selects Reload Mode for TIMER2.
Definition: timer2x.h:459
INLINE void TIMER2_External_Int_Dis(void)
Disables TIMER2 External Interrupt.
Definition: timer2x.h:631
TIMER21_T2IN_Pxx
Definition: timer2x.h:107
@ TIMER21_T2IN_P04
Definition: timer2x.h:110
@ TIMER21_T2IN_P11
Definition: timer2x.h:109
@ TIMER21_T2IN_P01
Definition: timer2x.h:108
enum IMER2x_Clock_Prescaler TIMER2x_Clock_Prescaler
INLINE void TIMER21_Mode_Timer_Set(void)
Selects Mode Timer for TIMER21.
Definition: timer2x.h:975
INLINE uint8 TIMER2_Overflow_Sts(void)
reads TIMER2 Overflow Status.
Definition: timer2x.h:246
INLINE void TIMER21_Reload_Value_Set(uint16 t21)
Sets TIMER21 Reload Value.
Definition: timer2x.h:1786
INLINE void TIMER21_Overflow_Int_Dis(void)
Disables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1067
INLINE void TIMER2_UpDownCount_En(void)
enables Up/Down Counter for TIMER2.
Definition: timer2x.h:405
INLINE void TIMER21_Mode_Reload_Set(void)
Selects Reload Mode for TIMER21.
Definition: timer2x.h:941
INLINE void TIMER21_Reload_Capture_FallingEdge_Set(void)
sets Falling Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:836
TIMER21_T2EX_Pxx
Definition: timer2x.h:117
@ TIMER21_T2EX_P02
Definition: timer2x.h:118
@ TIMER21_T2EX_P14
Definition: timer2x.h:119
@ TIMER21_T2EX_CCU6_COUT60
Definition: timer2x.h:122
@ TIMER21_T2EX_P12
Definition: timer2x.h:121
@ TIMER21_T2EX_P23
Definition: timer2x.h:120
INLINE void TIMER2_Reload_Capture_FallingEdge_Set(void)
sets Falling Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:350
INLINE void TIMER21_Stop(void)
stops the TIMER21 by software
Definition: timer2x.h:1485
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:132
uint8_t uint8
8 bit unsigned value
Definition: types.h:137
uint16_t uint16
16 bit unsigned value
Definition: types.h:138
uint32_t uint32
32 bit unsigned value
Definition: types.h:139