summaryrefslogtreecommitdiffstats
path: root/uc_str912/prj_test_lcd/str91x_lib/91x_lib.c
blob: c0eadbb94413be188693bd686487fbed00d2ae91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
* File Name          : 91x_lib.c
* Author             : MCD Application Team
* Date First Issued  : 05/18/2006 : Version 1.0
* Description        : This file provides all peripherals pointers
                     : initialization.
********************************************************************************
* History:
* 05/24/2006 : Version 1.1
* 05/18/2006 : Version 1.0
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS
* A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/
#define EXT

/* Standard include ----------------------------------------------------------*/
#include "91x_map.h"

/* Include of other module interface headers ---------------------------------*/
/* Local includes ------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Interface functions -------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
#ifdef DEBUG

/*******************************************************************************
* Function Name  : debug
* Description    : this function initialize peripherals pointers
* Input          : no one
* Output         : no one
* Return         : no one
*******************************************************************************/
void debug(void)
{


/************************* DMA *************************/

#ifdef _DMA
  DMA = (DMA_TypeDef *)DMA_BASE;
#endif /* _DMA */

/************************* DMA *************************/


#ifdef _DMA_Channel0
  DMA_Channel0= (DMA_Channel_TypeDef *)DMA_Channel0_BASE;
#endif /* _DMA_Channel0 */

#ifdef _DMA_Channel1
  DMA_Channel1=       (DMA_Channel_TypeDef *)DMA_Channel1_BASE;
#endif /* _DMA_Channel1 */

#ifdef _DMA_Channel2
  DMA_Channel2 =      (DMA_Channel_TypeDef *)DMA_Channel2_BASE;
#endif /* _DMA_Channel2 */

#ifdef _DMA_Channel3
  DMA_Channel3 =       (DMA_Channel_TypeDef *)DMA_Channel3_BASE;
#endif /* _DMA_Channel3 */

#ifdef _DMA_Channel4
 DMA_Channel4 =      (DMA_Channel_TypeDef *)DMA_Channel4_BASE;
#endif /* _DMA_Channel4 */

#ifdef _DMA_Channel5
 DMA_Channel5=       (DMA_Channel_TypeDef *)DMA_Channel5_BASE;
#endif /* _DMA_Channel5*/


#ifdef _DMA_Channel6
 DMA_Channel6 =      (DMA_Channel_TypeDef *)DMA_Channel6_BASE;
#endif /* _DMA_Channel6 */

#ifdef _DMA_Channel7
 DMA_Channel7 =      (DMA_Channel_TypeDef *)DMA_Channel7_BASE;
#endif /* _DMA_Channel7 */
 


 /************************* EMI *************************/

#ifdef _EMI_Bank0
  EMI_Bank0= (EMI_Bank_TypeDef *)EMI_Bank0_BASE;
#endif /* _EMI_Bank0 */

#ifdef _EMI_Bank1
  EMI_Bank1=       (EMI_Bank_TypeDef *)EMI_Bank1_BASE;
#endif /* _EMI_Bank1 */

#ifdef _EMI_Bank2
  EMI_Bank2 =      (EMI_Bank_TypeDef *)EMI_Bank2_BASE;
#endif /* _EMI_Bank2 */

#ifdef _EMI_Bank3
 EMI_Bank3 =      (EMI_Bank_TypeDef *)EMI_Bank3_BASE;
 #endif /* _EMI_Bank3 */



/************************* AHBAPB *************************/

#ifdef _AHBAPB0
  AHBAPB0 = (AHBAPB_TypeDef *)AHBAPB0_BASE;
#endif /* _AHBAPB0 */

#ifdef _AHBAPB1
  AHBAPB1 = (AHBAPB_TypeDef *)AHBAPB1_BASE;
#endif /*_AHBAPB1 */



/************************* FMI *************************/

#ifdef _FMI
  FMI = (FMI_TypeDef *)FMI_BASE;
#endif /* _FMI */

/************************* VIC *************************/

#ifdef _VIC0
  VIC0 = (VIC_TypeDef *)VIC0_BASE;
#endif /* _VIC0 */

#ifdef _VIC1
  VIC1 = (VIC_TypeDef *)VIC1_BASE;
#endif /* _VIC1 */

/************************* WIU *************************/

#ifdef _WIU
  WIU  = (WIU_TypeDef *)WIU_BASE;
#endif /* _WIU */

/************************* TIM *************************/

#ifdef _TIM0
  TIM0 = (TIM_TypeDef *)TIM0_BASE;
#endif /* _TIM0 */

#ifdef _TIM1
  TIM1 = (TIM_TypeDef *)TIM1_BASE;
#endif /* _TIM1 */

#ifdef _TIM2
  TIM2 = (TIM_TypeDef *)TIM2_BASE;
#endif /* _TIM2 */

#ifdef _TIM3
  TIM3 = (TIM_TypeDef *)TIM3_BASE;
#endif /* _TIM3 */

/************************* GPIO ************************/

#ifdef _GPIO0
  GPIO0 = (GPIO_TypeDef *)GPIO0_BASE;
#endif /* _GPIO0 */

#ifdef _GPIO1
  GPIO1 = (GPIO_TypeDef *)GPIO1_BASE;
#endif /* _GPIO1 */

#ifdef _GPIO2
  GPIO2 = (GPIO_TypeDef *)GPIO2_BASE;
#endif /* _GPIO2 */

#ifdef _GPIO3
  GPIO3 = (GPIO_TypeDef *)GPIO3_BASE;
#endif /* _GPIO3 */

#ifdef _GPIO4
  GPIO4 = (GPIO_TypeDef *)GPIO4_BASE;
#endif /* _GPIO4 */

#ifdef _GPIO5
  GPIO5 = (GPIO_TypeDef *)GPIO5_BASE;
#endif /* _GPIO5 */

#ifdef _GPIO6
  GPIO6 = (GPIO_TypeDef *)GPIO6_BASE;
#endif /* _GPIO6 */

#ifdef _GPIO7
  GPIO7 = (GPIO_TypeDef *)GPIO7_BASE;
#endif /* _GPIO7 */

#ifdef _GPIO8
  GPIO8 = (GPIO_TypeDef *)GPIO8_BASE;
#endif /* _GPIO8 */

#ifdef _GPIO9
  GPIO9 = (GPIO_TypeDef *)GPIO9_BASE;
#endif /* _GPIO9 */

/************************* RTC *************************/

#ifdef _RTC
  RTC = (RTC_TypeDef *)RTC_BASE;
#endif /* _RTC */

/************************* PRCCU ***********************/

#ifdef _SCU
  SCU = (SCU_TypeDef *)SCU_BASE;
#endif /* _PRCCU */

/************************** MC *************************/

#ifdef _MC
  MC = (MC_TypeDef *)MC_BASE;
#endif /* _MC */

/************************* UART ************************/

#ifdef _UART0
  UART0 = (UART_TypeDef *)UART0_BASE;
#endif /* _UART0 */

#ifdef _UART1
  UART1 = (UART_TypeDef *)UART1_BASE;
#endif /* _UART1 */

#ifdef _UART2
  UART2 = (UART_TypeDef *)UART2_BASE;
#endif /* _UART2 */

/************************* SSP *************************/

#ifdef _SSP0
  SSP0 = (SSP_TypeDef *)SSP0_BASE;
#endif /* _SSP0 */

#ifdef _SSP1
  SSP1 = (SSP_TypeDef *)SSP1_BASE;
#endif /* _SSP1 */

/************************* CAN *************************/

#ifdef _CAN
  CAN = (CAN_TypeDef *)CAN_BASE;
#endif /* _CAN */

/************************* ADC *************************/

#ifdef _ADC
  ADC = (ADC_TypeDef *)ADC_BASE;
#endif /* _ADC */

/************************* WDG *************************/

#ifdef _WDG
  WDG = (WDG_TypeDef *)WDG_BASE;
#endif /* _WDG */

/************************* I2C *************************/

#ifdef _I2C0
  I2C0 = (I2C_TypeDef *)I2C0_BASE;
#endif /* _I2C0 */

#ifdef _I2C1
  I2C1 = (I2C_TypeDef *)I2C1_BASE;
#endif /* _I2C1 */
/********************** ENET **************************/
#ifdef _ENET
  ENET_MAC = (ENET_MAC_TypeDef *)ENET_MAC_BASE;
  ENET_DMA = (ENET_DMA_TypeDef *)ENET_DMA_BASE;
#endif /* _ENET */
}
#endif  /* DEBUG */

/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
OpenPOWER on IntegriCloud