iLLD_TC27xD
1.0
IfxGtm_Tbu.c
Go to the documentation of this file.
1
/**
2
* \file IfxGtm_Tbu.c
3
* \brief GTM basic functionality
4
*
5
* \version iLLD_1_0_0_11_0
6
* \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
7
*
8
*
9
* IMPORTANT NOTICE
10
*
11
*
12
* Infineon Technologies AG (Infineon) is supplying this file for use
13
* exclusively with Infineon's microcontroller products. This file can be freely
14
* distributed within development tools that are supporting such microcontroller
15
* products.
16
*
17
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
18
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
19
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
20
* INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
21
* OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
22
*
23
*/
24
25
/******************************************************************************/
26
/*----------------------------------Includes----------------------------------*/
27
/******************************************************************************/
28
29
#include "
IfxGtm_Tbu.h
"
30
#include "
IfxGtm_Cmu.h
"
31
32
/******************************************************************************/
33
/*-------------------------Function Implementations---------------------------*/
34
/******************************************************************************/
35
36
float32
IfxGtm_Tbu_getClockFrequency
(Ifx_GTM *gtm,
IfxGtm_Tbu_Ts
channel)
37
{
38
float32
result = 0.0F;
39
40
if
(channel ==
IfxGtm_Tbu_Ts_0
)
41
{
42
result =
IfxGtm_Cmu_getClkFrequency
(gtm, gtm->TBU.CH0_CTRL.B.CH_CLK_SRC,
TRUE
);
43
}
44
else
if
(channel ==
IfxGtm_Tbu_Ts_1
)
45
{
46
result =
IfxGtm_Cmu_getClkFrequency
(gtm, gtm->TBU.CH1_CTRL.B.CH_CLK_SRC,
TRUE
);
47
}
48
else
if
(channel ==
IfxGtm_Tbu_Ts_2
)
49
{
50
result =
IfxGtm_Cmu_getClkFrequency
(gtm, gtm->TBU.CH2_CTRL.B.CH_CLK_SRC,
TRUE
);
51
}
52
53
return
result;
54
}
home
mclld
Libraries
release
iLLD_1_0_0_11_0
src
ifx
TC27xD
Gtm
Std
IfxGtm_Tbu.c
Generated by
1.8.4