iLLD_TC27xD
1.0
IfxEmem.h
Go to the documentation of this file.
1
/**
2
* \file IfxEmem.h
3
* \brief EMEM basic functionality
4
* \ingroup IfxLld_Emem
5
*
6
* \version iLLD_1_0_0_11_0
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_Emem_Std_Enumerations Enumerations
25
* \ingroup IfxLld_Emem_Std
26
* \defgroup IfxLld_Emem_Std_Module Module Functions
27
* \ingroup IfxLld_Emem_Std
28
*/
29
30
#ifndef IFXEMEM_H
31
#define IFXEMEM_H 1
32
33
/******************************************************************************/
34
/*----------------------------------Includes----------------------------------*/
35
/******************************************************************************/
36
37
#include "
_Impl/IfxEmem_cfg.h
"
38
#include "IfxEmem_reg.h"
39
40
/******************************************************************************/
41
/*--------------------------------Enumerations--------------------------------*/
42
/******************************************************************************/
43
44
/** \addtogroup IfxLld_Emem_Std_Enumerations
45
* \{ */
46
/** \brief EMEM lock state defined in MODULE_EMEM.SBRCTR.B.STBLOCK.
47
*/
48
typedef
enum
49
{
50
IfxEmem_LockedState_locked
= 0,
/**< \brief EMEM locked state. */
51
IfxEmem_LockedState_unlocked
= 1
/**< \brief EMEM unlocked state. */
52
}
IfxEmem_LockedState
;
53
54
/** \brief EMEM module clock enabled or disabled state defined in MODULE_EMEM.CLC.B.DISR.
55
*/
56
typedef
enum
57
{
58
IfxEmem_State_disabled
= 0,
/**< \brief EMEM module clock disabled state. */
59
IfxEmem_State_enabled
= 1
/**< \brief EMEM module clock enabled state. */
60
}
IfxEmem_State
;
61
62
/** \brief EMEM tile configuration mode defined in MODULE_EMEM.TILECONFIG.B.Tx( x = 0,1,..).
63
*/
64
typedef
enum
65
{
66
IfxEmem_TileConfigMode_calibMode
= 0
/**< \brief EMEM tile mode to calibration memory. */
67
}
IfxEmem_TileConfigMode
;
68
69
/** \brief Tile Number
70
*/
71
typedef
enum
72
{
73
IfxEmem_TileNumber_0
= 0,
/**< \brief Tile Number0 */
74
IfxEmem_TileNumber_1
,
/**< \brief Tile Number1 */
75
IfxEmem_TileNumber_2
,
/**< \brief Tile Number2 */
76
IfxEmem_TileNumber_3
,
/**< \brief Tile Number3 */
77
IfxEmem_TileNumber_4
,
/**< \brief Tile Number4 */
78
IfxEmem_TileNumber_5
,
/**< \brief Tile Number5 */
79
IfxEmem_TileNumber_6
,
/**< \brief Tile Number6 */
80
IfxEmem_TileNumber_7
,
/**< \brief Tile Number7 */
81
IfxEmem_TileNumber_8
,
/**< \brief Tile Number8 */
82
IfxEmem_TileNumber_9
,
/**< \brief Tile Number9 */
83
IfxEmem_TileNumber_10
,
/**< \brief Tile Number10 */
84
IfxEmem_TileNumber_11
,
/**< \brief Tile Number11 */
85
IfxEmem_TileNumber_12
,
/**< \brief Tile Number12 */
86
IfxEmem_TileNumber_13
,
/**< \brief Tile Number13 */
87
IfxEmem_TileNumber_14
,
/**< \brief Tile Number14 */
88
IfxEmem_TileNumber_15
/**< \brief Tile Number15 */
89
}
IfxEmem_TileNumber
;
90
91
/** \} */
92
93
/** \addtogroup IfxLld_Emem_Std_Module
94
* \{ */
95
96
/******************************************************************************/
97
/*-------------------------Inline Function Prototypes-------------------------*/
98
/******************************************************************************/
99
100
/** \brief Returns the status of module enabled or disabled
101
* \return Status (TRUE / FALSE)
102
*/
103
IFX_INLINE
boolean
IfxEmem_isModuleEnabled
(
void
);
104
105
/** \brief Sets all EMEM tiles to calibration memory mode.
106
* \param mode EMEM tile configuration mode.
107
* \param tile tile number
108
* \return None
109
*/
110
IFX_INLINE
void
IfxEmem_setTileConfigMode
(
const
IfxEmem_TileConfigMode
mode,
IfxEmem_TileNumber
tile);
111
112
/** \brief Sets Unlock standby lock flag.
113
* \param flag Unlock standby lock flag value.
114
* \return None
115
*/
116
IFX_INLINE
void
IfxEmem_setUnlockStandbyLockFlag
(
const
uint8
flag);
117
118
/******************************************************************************/
119
/*-------------------------Global Function Prototypes-------------------------*/
120
/******************************************************************************/
121
122
/** \brief Gets the EMEM stand RAM lock state.
123
* \return EMEM stand RAM lock state.
124
*/
125
IFX_EXTERN
IfxEmem_LockedState
IfxEmem_getLockedState
(
void
);
126
127
/** \brief Enable or disable state of the EMEM module clock.
128
* \param state EMEM module clock enabled or disabled state.
129
* \return None
130
*/
131
IFX_EXTERN
void
IfxEmem_setClockEnableState
(
const
IfxEmem_State
state);
132
133
/** \} */
134
135
/******************************************************************************/
136
/*---------------------Inline Function Implementations------------------------*/
137
/******************************************************************************/
138
139
IFX_INLINE
boolean
IfxEmem_isModuleEnabled
(
void
)
140
{
141
return
(MODULE_EMEM.CLC.B.DISS == 0) ?
TRUE
:
FALSE
;
142
}
143
144
145
IFX_INLINE
void
IfxEmem_setTileConfigMode
(
const
IfxEmem_TileConfigMode
mode,
IfxEmem_TileNumber
tile)
146
{
147
MODULE_EMEM.TILECONFIG.U = (mode << tile);
148
}
149
150
151
IFX_INLINE
void
IfxEmem_setUnlockStandbyLockFlag
(
const
uint8
flag)
152
{
153
if
(8 > flag)
154
{
155
MODULE_EMEM.SBRCTR.B.STBULK = flag;
156
}
157
}
158
159
160
#endif
/* IFXEMEM_H */
home
mclld
Libraries
release
iLLD_1_0_0_11_0
src
ifx
TC27xD
Emem
Std
IfxEmem.h
Generated by
1.8.4