iLLD_TC29x
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 tile configuration mode defined in MODULE_EMEM.TILECONFIGXM.B.Tx( x = 0,1,..).
47
*/
48
typedef
enum
49
{
50
IfxEmem_ExtendMemoryConfigMode_calibMode
= 0
/**< \brief EMEM tile mode to calibration memory. */
51
}
IfxEmem_ExtendMemoryConfigMode
;
52
53
/** \brief EMEM lock state defined in MODULE_EMEM.SBRCTR.B.STBLOCK.
54
*/
55
typedef
enum
56
{
57
IfxEmem_LockedState_locked
= 0,
/**< \brief EMEM locked state. */
58
IfxEmem_LockedState_unlocked
= 1
/**< \brief EMEM unlocked state. */
59
}
IfxEmem_LockedState
;
60
61
/** \brief EMEM module clock enabled or disabled state defined in MODULE_EMEM.CLC.B.DISR.
62
*/
63
typedef
enum
64
{
65
IfxEmem_State_disabled
= 0,
/**< \brief EMEM module clock disabled state. */
66
IfxEmem_State_enabled
= 1
/**< \brief EMEM module clock enabled state. */
67
}
IfxEmem_State
;
68
69
/** \brief EMEM tile configuration mode defined in MODULE_EMEM.TILECONFIG.B.Tx( x = 0,1,..).
70
*/
71
typedef
enum
72
{
73
IfxEmem_TileConfigMode_calibMode
= 0
/**< \brief EMEM tile mode to calibration memory. */
74
}
IfxEmem_TileConfigMode
;
75
76
/** \brief Tile Number
77
*/
78
typedef
enum
79
{
80
IfxEmem_TileNumber_0
= 0,
/**< \brief Tile Number0 */
81
IfxEmem_TileNumber_1
,
/**< \brief Tile Number1 */
82
IfxEmem_TileNumber_2
,
/**< \brief Tile Number2 */
83
IfxEmem_TileNumber_3
,
/**< \brief Tile Number3 */
84
IfxEmem_TileNumber_4
,
/**< \brief Tile Number4 */
85
IfxEmem_TileNumber_5
,
/**< \brief Tile Number5 */
86
IfxEmem_TileNumber_6
,
/**< \brief Tile Number6 */
87
IfxEmem_TileNumber_7
,
/**< \brief Tile Number7 */
88
IfxEmem_TileNumber_8
,
/**< \brief Tile Number8 */
89
IfxEmem_TileNumber_9
,
/**< \brief Tile Number9 */
90
IfxEmem_TileNumber_10
,
/**< \brief Tile Number10 */
91
IfxEmem_TileNumber_11
,
/**< \brief Tile Number11 */
92
IfxEmem_TileNumber_12
,
/**< \brief Tile Number12 */
93
IfxEmem_TileNumber_13
,
/**< \brief Tile Number13 */
94
IfxEmem_TileNumber_14
,
/**< \brief Tile Number14 */
95
IfxEmem_TileNumber_15
/**< \brief Tile Number15 */
96
}
IfxEmem_TileNumber
;
97
98
/** \} */
99
100
/** \addtogroup IfxLld_Emem_Std_Module
101
* \{ */
102
103
/******************************************************************************/
104
/*-------------------------Inline Function Prototypes-------------------------*/
105
/******************************************************************************/
106
107
/** \brief Returns the status of module enabled or disabled
108
* \return Status (TRUE / FALSE)
109
*/
110
IFX_INLINE
boolean
IfxEmem_isModuleEnabled
(
void
);
111
112
/** \brief Tile allocation Assignment
113
* \param mode set the memory mode
114
* \param tile tile number
115
* \return None
116
*/
117
IFX_INLINE
void
IfxEmem_setExtendMemoryTileConfigMode
(
IfxEmem_ExtendMemoryConfigMode
mode,
IfxEmem_TileNumber
tile);
118
119
/** \brief Sets all EMEM tiles to calibration memory mode.
120
* \param mode EMEM tile configuration mode.
121
* \param tile tile number
122
* \return None
123
*/
124
IFX_INLINE
void
IfxEmem_setTileConfigMode
(
const
IfxEmem_TileConfigMode
mode,
IfxEmem_TileNumber
tile);
125
126
/** \brief Sets Unlock standby lock flag.
127
* \param flag Unlock standby lock flag value.
128
* \return None
129
*/
130
IFX_INLINE
void
IfxEmem_setUnlockStandbyLockFlag
(
const
uint8
flag);
131
132
/******************************************************************************/
133
/*-------------------------Global Function Prototypes-------------------------*/
134
/******************************************************************************/
135
136
/** \brief Gets the EMEM stand RAM lock state.
137
* \return EMEM stand RAM lock state.
138
*/
139
IFX_EXTERN
IfxEmem_LockedState
IfxEmem_getLockedState
(
void
);
140
141
/** \brief Enable or disable state of the EMEM module clock.
142
* \param state EMEM module clock enabled or disabled state.
143
* \return None
144
*/
145
IFX_EXTERN
void
IfxEmem_setClockEnableState
(
const
IfxEmem_State
state);
146
147
/** \} */
148
149
/******************************************************************************/
150
/*---------------------Inline Function Implementations------------------------*/
151
/******************************************************************************/
152
153
IFX_INLINE
boolean
IfxEmem_isModuleEnabled
(
void
)
154
{
155
return
(MODULE_EMEM.CLC.B.DISS == 0) ?
TRUE
:
FALSE
;
156
}
157
158
159
IFX_INLINE
void
IfxEmem_setExtendMemoryTileConfigMode
(
IfxEmem_ExtendMemoryConfigMode
mode,
IfxEmem_TileNumber
tile)
160
{
161
MODULE_EMEM.TILECONFIGXM.U = (mode << tile);
162
}
163
164
165
IFX_INLINE
void
IfxEmem_setTileConfigMode
(
const
IfxEmem_TileConfigMode
mode,
IfxEmem_TileNumber
tile)
166
{
167
MODULE_EMEM.TILECONFIG.U = (mode << tile);
168
}
169
170
171
IFX_INLINE
void
IfxEmem_setUnlockStandbyLockFlag
(
const
uint8
flag)
172
{
173
if
(8 > flag)
174
{
175
MODULE_EMEM.SBRCTR.B.STBULK = flag;
176
}
177
}
178
179
180
#endif
/* IFXEMEM_H */
home
mclld
Libraries
release
iLLD_1_0_0_11_0
src
ifx
TC29x
Emem
Std
IfxEmem.h
Generated by
1.8.4