iLLD_TC27xC
1.0
IfxEmem.c
Go to the documentation of this file.
1
/**
2
* \file IfxEmem.c
3
* \brief EMEM basic functionality
4
*
5
* \version iLLD_0_1_0_10
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 "
IfxEmem.h
"
30
#include "
Cpu/Std/IfxCpu_Intrinsics.h
"
31
32
/******************************************************************************/
33
/*-------------------------Function Implementations---------------------------*/
34
/******************************************************************************/
35
36
IfxEmem_LockedState
IfxEmem_getLockedState
(
void
)
37
{
38
return
(
IfxEmem_LockedState
)MODULE_EMEM.SBRCTR.B.STBLOCK;
39
}
40
41
42
void
IfxEmem_setClockEnableState
(
const
IfxEmem_State
state)
43
{
44
/* bit is inverted */
45
if
(
IfxEmem_State_enabled
== state)
46
{
47
MODULE_EMEM.CLC.B.DISR = 0;
48
}
49
else
50
{
51
MODULE_EMEM.CLC.B.DISR = 1;
52
}
53
54
/* wait one cycle for module to be enabled */
55
__nop
();
56
}
57
58
59
void
IfxEmem_setTileConfigMode
(
const
IfxEmem_TileConfigMode
mode)
60
{
61
MODULE_EMEM.TILECONFIG.U = mode;
62
}
63
64
65
void
IfxEmem_setUnlockStandbyLockFlag
(
const
uint8
flag)
66
{
67
if
(8 > flag)
68
{
69
MODULE_EMEM.SBRCTR.B.STBULK = flag;
70
}
71
}
home
mclld
Libraries
release
iLLD_0_1_0_10
src
ifx
TC27xC
Emem
Std
IfxEmem.c
Generated by
1.8.4