iLLD_TC29x
1.0
IfxEbu.c
Go to the documentation of this file.
1
/**
2
* \file IfxEbu.c
3
* \brief EBU 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 "
IfxEbu.h
"
30
31
/******************************************************************************/
32
/*-------------------------Function Implementations---------------------------*/
33
/******************************************************************************/
34
35
void
IfxEbu_setExternalClockRatio
(Ifx_EBU *ebu,
IfxEbu_ExternalClockRatio
ratio)
36
{
37
Ifx_EBU_CLC clc;
38
clc.U = ebu->CLC.U;
39
40
switch
(ratio)
41
{
42
case
IfxEbu_ExternalClockRatio_1
:
43
clc.B.EBUDIV = 0;
44
clc.B.DIV2 = 0;
45
break
;
46
case
IfxEbu_ExternalClockRatio_2
:
47
clc.B.EBUDIV = 1;
48
clc.B.DIV2 = 0;
49
break
;
50
case
IfxEbu_ExternalClockRatio_3
:
51
clc.B.EBUDIV = 2;
52
clc.B.DIV2 = 0;
53
break
;
54
case
IfxEbu_ExternalClockRatio_4
:
55
clc.B.EBUDIV = 3;
56
clc.B.DIV2 = 0;
57
break
;
58
case
IfxEbu_ExternalClockRatio_6
:
59
clc.B.EBUDIV = 2;
60
clc.B.DIV2 = 1;
61
break
;
62
case
IfxEbu_ExternalClockRatio_8
:
63
clc.B.EBUDIV = 3;
64
clc.B.DIV2 = 1;
65
break
;
66
}
67
68
ebu->CLC.U = clc.U;
69
}
70
71
72
void
IfxEbu_setByteControlEnable
(Ifx_EBU *ebu,
IfxEbu_ByteControlEnable
byteControlEnable)
73
{
74
ebu->USERCON.B.RES = byteControlEnable;
75
}
home
mclld
Libraries
release
iLLD_1_0_0_11_0
src
ifx
TC29x
Ebu
Std
IfxEbu.c
Generated by
1.8.4