iLLD_TC27xC  1.0
IfxGtm_Tbu.h
Go to the documentation of this file.
1 /**
2  * \file IfxGtm_Tbu.h
3  * \brief GTM basic functionality
4  * \ingroup IfxLld_Gtm
5  *
6  * \version iLLD_0_1_0_10
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  * \defgroup IfxLld_Gtm_Std_Tbu TBU Basic Functionality
25  * \ingroup IfxLld_Gtm_Std
26  * \defgroup IfxLld_Gtm_Std_Tbu_Enumerations TBU Enumerations
27  * \ingroup IfxLld_Gtm_Std_Tbu
28  * \defgroup IfxLld_Gtm_Std_Tbu_Basic_Functions TBU Basic Functions
29  * \ingroup IfxLld_Gtm_Std_Tbu
30  */
31 
32 #ifndef IFXGTM_TBU_H
33 #define IFXGTM_TBU_H 1
34 
35 /******************************************************************************/
36 /*----------------------------------Includes----------------------------------*/
37 /******************************************************************************/
38 
39 #include "_Impl/IfxGtm_cfg.h"
40 
41 /******************************************************************************/
42 /*--------------------------------Enumerations--------------------------------*/
43 /******************************************************************************/
44 
45 /** \addtogroup IfxLld_Gtm_Std_Tbu_Enumerations
46  * \{ */
47 /** \brief GTM TOM TBU Time stamps
48  */
49 typedef enum
50 {
55 
56 /** \} */
57 
58 /** \addtogroup IfxLld_Gtm_Std_Tbu_Basic_Functions
59  * \{ */
60 
61 /******************************************************************************/
62 /*-------------------------Inline Function Prototypes-------------------------*/
63 /******************************************************************************/
64 
65 /** \brief Enables the channel
66  * \param gtm Pointer to GTM module
67  * \param channel TBU Time stamps
68  * \return None
69  */
70 IFX_INLINE void IfxGtm_Tbu_enableChannel(Ifx_GTM *gtm, IfxGtm_Tbu_Ts channel);
71 
72 /******************************************************************************/
73 /*-------------------------Global Function Prototypes-------------------------*/
74 /******************************************************************************/
75 
76 /** \brief Returns the clock frequency
77  * \param gtm Pointer to GTM module
78  * \param channel TBU Time stamps
79  * \return frequency
80  */
82 
83 /** \} */
84 
85 /******************************************************************************/
86 /*---------------------Inline Function Implementations------------------------*/
87 /******************************************************************************/
88 
90 {
91  uint32 shift = channel * 2;
92 
93  __ldmst_c(&gtm->TBU.CHEN.U, (3U << shift), (IfxGtm_FeatureControl_enable << shift));
94 }
95 
96 
97 #endif /* IFXGTM_TBU_H */