Rev 196 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | /******************** (C) COPYRIGHT 2006 STMicroelectronics ******************** |
2 | * File Name : 91x_lib.c |
||
3 | * Author : MCD Application Team |
||
4 | * Date First Issued : 05/18/2006 : Version 1.0 |
||
5 | * Description : This file provides all peripherals pointers |
||
6 | : initialization. |
||
7 | ******************************************************************************** |
||
8 | * History: |
||
9 | * 05/22/2007 : Version 1.2 |
||
10 | * 05/24/2006 : Version 1.1 |
||
11 | * 05/18/2006 : Version 1.0 |
||
12 | ******************************************************************************** |
||
13 | * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH |
||
14 | * CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS |
||
15 | * A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT |
||
16 | * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT |
||
17 | * OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION |
||
18 | * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
||
19 | *******************************************************************************/ |
||
20 | #define EXT |
||
21 | |||
22 | /* Standard include ----------------------------------------------------------*/ |
||
23 | #include "91x_lib.h" |
||
24 | |||
25 | /* Include of other module interface headers ---------------------------------*/ |
||
26 | /* Local includes ------------------------------------------------------------*/ |
||
27 | /* Private typedef -----------------------------------------------------------*/ |
||
28 | /* Private define ------------------------------------------------------------*/ |
||
29 | /* Private macro -------------------------------------------------------------*/ |
||
30 | /* Private variables ---------------------------------------------------------*/ |
||
31 | /* Private function prototypes -----------------------------------------------*/ |
||
32 | /* Interface functions -------------------------------------------------------*/ |
||
33 | /* Private functions ---------------------------------------------------------*/ |
||
34 | #ifdef LIBDEBUG |
||
35 | |||
36 | /******************************************************************************* |
||
37 | * Function Name : debug |
||
38 | * Description : this function initialize peripherals pointers |
||
39 | * Input : no one |
||
40 | * Output : no one |
||
41 | * Return : no one |
||
42 | *******************************************************************************/ |
||
43 | void libdebug(void) |
||
44 | { |
||
45 | |||
46 | |||
47 | /************************* DMA *************************/ |
||
48 | |||
49 | #ifdef _DMA |
||
50 | DMA = (DMA_TypeDef *)DMA_BASE; |
||
51 | #endif /* _DMA */ |
||
52 | |||
53 | /************************* DMA *************************/ |
||
54 | |||
55 | |||
56 | #ifdef _DMA_Channel0 |
||
57 | DMA_Channel0= (DMA_Channel_TypeDef *)DMA_Channel0_BASE; |
||
58 | #endif /* _DMA_Channel0 */ |
||
59 | |||
60 | #ifdef _DMA_Channel1 |
||
61 | DMA_Channel1= (DMA_Channel_TypeDef *)DMA_Channel1_BASE; |
||
62 | #endif /* _DMA_Channel1 */ |
||
63 | |||
64 | #ifdef _DMA_Channel2 |
||
65 | DMA_Channel2 = (DMA_Channel_TypeDef *)DMA_Channel2_BASE; |
||
66 | #endif /* _DMA_Channel2 */ |
||
67 | |||
68 | #ifdef _DMA_Channel3 |
||
69 | DMA_Channel3 = (DMA_Channel_TypeDef *)DMA_Channel3_BASE; |
||
70 | #endif /* _DMA_Channel3 */ |
||
71 | |||
72 | #ifdef _DMA_Channel4 |
||
73 | DMA_Channel4 = (DMA_Channel_TypeDef *)DMA_Channel4_BASE; |
||
74 | #endif /* _DMA_Channel4 */ |
||
75 | |||
76 | #ifdef _DMA_Channel5 |
||
77 | DMA_Channel5= (DMA_Channel_TypeDef *)DMA_Channel5_BASE; |
||
78 | #endif /* _DMA_Channel5*/ |
||
79 | |||
80 | |||
81 | #ifdef _DMA_Channel6 |
||
82 | DMA_Channel6 = (DMA_Channel_TypeDef *)DMA_Channel6_BASE; |
||
83 | #endif /* _DMA_Channel6 */ |
||
84 | |||
85 | #ifdef _DMA_Channel7 |
||
86 | DMA_Channel7 = (DMA_Channel_TypeDef *)DMA_Channel7_BASE; |
||
87 | #endif /* _DMA_Channel7 */ |
||
88 | |||
89 | |||
90 | |||
91 | /************************* EMI *************************/ |
||
92 | |||
93 | #ifdef _EMI_Bank0 |
||
94 | EMI_Bank0= (EMI_Bank_TypeDef *)EMI_Bank0_BASE; |
||
95 | #endif /* _EMI_Bank0 */ |
||
96 | |||
97 | #ifdef _EMI_Bank1 |
||
98 | EMI_Bank1= (EMI_Bank_TypeDef *)EMI_Bank1_BASE; |
||
99 | #endif /* _EMI_Bank1 */ |
||
100 | |||
101 | #ifdef _EMI_Bank2 |
||
102 | EMI_Bank2 = (EMI_Bank_TypeDef *)EMI_Bank2_BASE; |
||
103 | #endif /* _EMI_Bank2 */ |
||
104 | |||
105 | #ifdef _EMI_Bank3 |
||
106 | EMI_Bank3 = (EMI_Bank_TypeDef *)EMI_Bank3_BASE; |
||
107 | #endif /* _EMI_Bank3 */ |
||
108 | |||
109 | |||
110 | |||
111 | /************************* AHBAPB *************************/ |
||
112 | |||
113 | #ifdef _AHBAPB0 |
||
114 | AHBAPB0 = (AHBAPB_TypeDef *)AHBAPB0_BASE; |
||
115 | #endif /* _AHBAPB0 */ |
||
116 | |||
117 | #ifdef _AHBAPB1 |
||
118 | AHBAPB1 = (AHBAPB_TypeDef *)AHBAPB1_BASE; |
||
119 | #endif /*_AHBAPB1 */ |
||
120 | |||
121 | |||
122 | |||
123 | /************************* FMI *************************/ |
||
124 | |||
125 | #ifdef _FMI |
||
126 | FMI = (FMI_TypeDef *)FMI_BASE; |
||
127 | #endif /* _FMI */ |
||
128 | |||
129 | /************************* VIC *************************/ |
||
130 | |||
131 | #ifdef _VIC0 |
||
132 | VIC0 = (VIC_TypeDef *)VIC0_BASE; |
||
133 | #endif /* _VIC0 */ |
||
134 | |||
135 | #ifdef _VIC1 |
||
136 | VIC1 = (VIC_TypeDef *)VIC1_BASE; |
||
137 | #endif /* _VIC1 */ |
||
138 | |||
139 | /************************* WIU *************************/ |
||
140 | |||
141 | #ifdef _WIU |
||
142 | WIU = (WIU_TypeDef *)WIU_BASE; |
||
143 | #endif /* _WIU */ |
||
144 | |||
145 | /************************* TIM *************************/ |
||
146 | |||
147 | #ifdef _TIM0 |
||
148 | TIM0 = (TIM_TypeDef *)TIM0_BASE; |
||
149 | #endif /* _TIM0 */ |
||
150 | |||
151 | #ifdef _TIM1 |
||
152 | TIM1 = (TIM_TypeDef *)TIM1_BASE; |
||
153 | #endif /* _TIM1 */ |
||
154 | |||
155 | #ifdef _TIM2 |
||
156 | TIM2 = (TIM_TypeDef *)TIM2_BASE; |
||
157 | #endif /* _TIM2 */ |
||
158 | |||
159 | #ifdef _TIM3 |
||
160 | TIM3 = (TIM_TypeDef *)TIM3_BASE; |
||
161 | #endif /* _TIM3 */ |
||
162 | |||
163 | /************************* GPIO ************************/ |
||
164 | |||
165 | #ifdef _GPIO0 |
||
166 | GPIO0 = (GPIO_TypeDef *)GPIO0_BASE; |
||
167 | #endif /* _GPIO0 */ |
||
168 | |||
169 | #ifdef _GPIO1 |
||
170 | GPIO1 = (GPIO_TypeDef *)GPIO1_BASE; |
||
171 | #endif /* _GPIO1 */ |
||
172 | |||
173 | #ifdef _GPIO2 |
||
174 | GPIO2 = (GPIO_TypeDef *)GPIO2_BASE; |
||
175 | #endif /* _GPIO2 */ |
||
176 | |||
177 | #ifdef _GPIO3 |
||
178 | GPIO3 = (GPIO_TypeDef *)GPIO3_BASE; |
||
179 | #endif /* _GPIO3 */ |
||
180 | |||
181 | #ifdef _GPIO4 |
||
182 | GPIO4 = (GPIO_TypeDef *)GPIO4_BASE; |
||
183 | #endif /* _GPIO4 */ |
||
184 | |||
185 | #ifdef _GPIO5 |
||
186 | GPIO5 = (GPIO_TypeDef *)GPIO5_BASE; |
||
187 | #endif /* _GPIO5 */ |
||
188 | |||
189 | #ifdef _GPIO6 |
||
190 | GPIO6 = (GPIO_TypeDef *)GPIO6_BASE; |
||
191 | #endif /* _GPIO6 */ |
||
192 | |||
193 | #ifdef _GPIO7 |
||
194 | GPIO7 = (GPIO_TypeDef *)GPIO7_BASE; |
||
195 | #endif /* _GPIO7 */ |
||
196 | |||
197 | #ifdef _GPIO8 |
||
198 | GPIO8 = (GPIO_TypeDef *)GPIO8_BASE; |
||
199 | #endif /* _GPIO8 */ |
||
200 | |||
201 | #ifdef _GPIO9 |
||
202 | GPIO9 = (GPIO_TypeDef *)GPIO9_BASE; |
||
203 | #endif /* _GPIO9 */ |
||
204 | |||
205 | /************************* RTC *************************/ |
||
206 | |||
207 | #ifdef _RTC |
||
208 | RTC = (RTC_TypeDef *)RTC_BASE; |
||
209 | #endif /* _RTC */ |
||
210 | |||
211 | /************************* SCU ***********************/ |
||
212 | |||
213 | #ifdef _SCU |
||
214 | SCU = (SCU_TypeDef *)SCU_BASE; |
||
215 | #endif /* _SCU */ |
||
216 | |||
217 | /************************** MC *************************/ |
||
218 | |||
219 | #ifdef _MC |
||
220 | MC = (MC_TypeDef *)MC_BASE; |
||
221 | #endif /* _MC */ |
||
222 | |||
223 | /************************* UART ************************/ |
||
224 | |||
225 | #ifdef _UART0 |
||
226 | UART0 = (UART_TypeDef *)UART0_BASE; |
||
227 | #endif /* _UART0 */ |
||
228 | |||
229 | #ifdef _UART1 |
||
230 | UART1 = (UART_TypeDef *)UART1_BASE; |
||
231 | #endif /* _UART1 */ |
||
232 | |||
233 | #ifdef _UART2 |
||
234 | UART2 = (UART_TypeDef *)UART2_BASE; |
||
235 | #endif /* _UART2 */ |
||
236 | |||
237 | /************************* SSP *************************/ |
||
238 | |||
239 | #ifdef _SSP0 |
||
240 | SSP0 = (SSP_TypeDef *)SSP0_BASE; |
||
241 | #endif /* _SSP0 */ |
||
242 | |||
243 | #ifdef _SSP1 |
||
244 | SSP1 = (SSP_TypeDef *)SSP1_BASE; |
||
245 | #endif /* _SSP1 */ |
||
246 | |||
247 | /************************* CAN *************************/ |
||
248 | |||
249 | #ifdef _CAN |
||
250 | CAN = (CAN_TypeDef *)CAN_BASE; |
||
251 | #endif /* _CAN */ |
||
252 | |||
253 | /************************* ADC *************************/ |
||
254 | |||
255 | #ifdef _ADC |
||
256 | ADC = (ADC_TypeDef *)ADC_BASE; |
||
257 | #endif /* _ADC */ |
||
258 | |||
259 | /************************* WDG *************************/ |
||
260 | |||
261 | #ifdef _WDG |
||
262 | WDG = (WDG_TypeDef *)WDG_BASE; |
||
263 | #endif /* _WDG */ |
||
264 | |||
265 | /************************* I2C *************************/ |
||
266 | |||
267 | #ifdef _I2C0 |
||
268 | I2C0 = (I2C_TypeDef *)I2C0_BASE; |
||
269 | #endif /* _I2C0 */ |
||
270 | |||
271 | #ifdef _I2C1 |
||
272 | I2C1 = (I2C_TypeDef *)I2C1_BASE; |
||
273 | #endif /* _I2C1 */ |
||
274 | /********************** ENET **************************/ |
||
275 | #ifdef _ENET |
||
276 | ENET_MAC = (ENET_MAC_TypeDef *)ENET_MAC_BASE; |
||
277 | ENET_DMA = (ENET_DMA_TypeDef *)ENET_DMA_BASE; |
||
278 | #endif /* _ENET */ |
||
279 | } |
||
280 | #endif /* LIBDEBUG */ |
||
281 | |||
282 | /******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/ |