]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/headers/MCF52221_GPIO.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / ColdFire_MCF52221_CodeWarrior / headers / MCF52221_GPIO.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2008/05/23 Revision: 0.95\r
6  *\r
7  * (c) Copyright UNIS, a.s. 1997-2008\r
8  * UNIS, a.s.\r
9  * Jundrovska 33\r
10  * 624 00 Brno\r
11  * Czech Republic\r
12  * http      : www.processorexpert.com\r
13  * mail      : info@processorexpert.com\r
14  */\r
15 \r
16 #ifndef __MCF52221_GPIO_H__\r
17 #define __MCF52221_GPIO_H__\r
18 \r
19 \r
20 /*********************************************************************\r
21 *\r
22 * General Purpose I/O (GPIO)\r
23 *\r
24 *********************************************************************/\r
25 \r
26 /* Register read/write macros */\r
27 #define MCF_GPIO_PORTNQ                      (*(vuint8 *)(0x40100008))\r
28 #define MCF_GPIO_DDRNQ                       (*(vuint8 *)(0x40100020))\r
29 #define MCF_GPIO_SETNQ                       (*(vuint8 *)(0x40100038))\r
30 #define MCF_GPIO_CLRNQ                       (*(vuint8 *)(0x40100050))\r
31 #define MCF_GPIO_PNQPAR                      (*(vuint16*)(0x40100068))\r
32 \r
33 #define MCF_GPIO_PORTAN                      (*(vuint8 *)(0x4010000A))\r
34 #define MCF_GPIO_DDRAN                       (*(vuint8 *)(0x40100022))\r
35 #define MCF_GPIO_SETAN                       (*(vuint8 *)(0x4010003A))\r
36 #define MCF_GPIO_CLRAN                       (*(vuint8 *)(0x40100052))\r
37 #define MCF_GPIO_PANPAR                      (*(vuint8 *)(0x4010006A))\r
38 \r
39 #define MCF_GPIO_PORTAS                      (*(vuint8 *)(0x4010000B))\r
40 #define MCF_GPIO_DDRAS                       (*(vuint8 *)(0x40100023))\r
41 #define MCF_GPIO_SETAS                       (*(vuint8 *)(0x4010003B))\r
42 #define MCF_GPIO_CLRAS                       (*(vuint8 *)(0x40100053))\r
43 #define MCF_GPIO_PASPAR                      (*(vuint8 *)(0x4010006B))\r
44 \r
45 #define MCF_GPIO_PORTQS                      (*(vuint8 *)(0x4010000C))\r
46 #define MCF_GPIO_DDRQS                       (*(vuint8 *)(0x40100024))\r
47 #define MCF_GPIO_SETQS                       (*(vuint8 *)(0x4010003C))\r
48 #define MCF_GPIO_CLRQS                       (*(vuint8 *)(0x40100054))\r
49 #define MCF_GPIO_PQSPAR                      (*(vuint16*)(0x4010006C))\r
50 \r
51 #define MCF_GPIO_PORTTA                      (*(vuint8 *)(0x4010000E))\r
52 #define MCF_GPIO_DDRTA                       (*(vuint8 *)(0x40100026))\r
53 #define MCF_GPIO_SETTA                       (*(vuint8 *)(0x4010003E))\r
54 #define MCF_GPIO_CLRTA                       (*(vuint8 *)(0x40100056))\r
55 #define MCF_GPIO_PTAPAR                      (*(vuint8 *)(0x4010006E))\r
56 \r
57 #define MCF_GPIO_PORTTC                      (*(vuint8 *)(0x4010000F))\r
58 #define MCF_GPIO_DDRTC                       (*(vuint8 *)(0x40100027))\r
59 #define MCF_GPIO_SETTC                       (*(vuint8 *)(0x4010003F))\r
60 #define MCF_GPIO_CLRTC                       (*(vuint8 *)(0x40100057))\r
61 #define MCF_GPIO_PTCPAR                      (*(vuint8 *)(0x4010006F))\r
62 \r
63 #define MCF_GPIO_PORTUA                      (*(vuint8 *)(0x40100011))\r
64 #define MCF_GPIO_DDRUA                       (*(vuint8 *)(0x40100029))\r
65 #define MCF_GPIO_SETUA                       (*(vuint8 *)(0x40100041))\r
66 #define MCF_GPIO_CLRUA                       (*(vuint8 *)(0x40100059))\r
67 #define MCF_GPIO_PUAPAR                      (*(vuint8 *)(0x40100071))\r
68 \r
69 #define MCF_GPIO_PORTUB                      (*(vuint8 *)(0x40100012))\r
70 #define MCF_GPIO_DDRUB                       (*(vuint8 *)(0x4010002A))\r
71 #define MCF_GPIO_SETUB                       (*(vuint8 *)(0x40100042))\r
72 #define MCF_GPIO_CLRUB                       (*(vuint8 *)(0x4010005A))\r
73 #define MCF_GPIO_PUBPAR                      (*(vuint8 *)(0x40100072))\r
74 \r
75 \r
76 \r
77 /* Bit definitions and macros for MCF_GPIO_PORTNQ */\r
78 #define MCF_GPIO_PORTNQ_PORTNQ1              (0x2)\r
79 #define MCF_GPIO_PORTNQ_PORTNQ2              (0x4)\r
80 #define MCF_GPIO_PORTNQ_PORTNQ3              (0x8)\r
81 #define MCF_GPIO_PORTNQ_PORTNQ4              (0x10)\r
82 #define MCF_GPIO_PORTNQ_PORTNQ5              (0x20)\r
83 #define MCF_GPIO_PORTNQ_PORTNQ6              (0x40)\r
84 #define MCF_GPIO_PORTNQ_PORTNQ7              (0x80)\r
85 \r
86 /* Bit definitions and macros for MCF_GPIO_DDRNQ */\r
87 #define MCF_GPIO_DDRNQ_DDRNQ1                (0x2)\r
88 #define MCF_GPIO_DDRNQ_DDRNQ2                (0x4)\r
89 #define MCF_GPIO_DDRNQ_DDRNQ3                (0x8)\r
90 #define MCF_GPIO_DDRNQ_DDRNQ4                (0x10)\r
91 #define MCF_GPIO_DDRNQ_DDRNQ5                (0x20)\r
92 #define MCF_GPIO_DDRNQ_DDRNQ6                (0x40)\r
93 #define MCF_GPIO_DDRNQ_DDRNQ7                (0x80)\r
94 \r
95 /* Bit definitions and macros for MCF_GPIO_SETNQ */\r
96 #define MCF_GPIO_SETNQ_SETNQ1                (0x2)\r
97 #define MCF_GPIO_SETNQ_SETNQ2                (0x4)\r
98 #define MCF_GPIO_SETNQ_SETNQ3                (0x8)\r
99 #define MCF_GPIO_SETNQ_SETNQ4                (0x10)\r
100 #define MCF_GPIO_SETNQ_SETNQ5                (0x20)\r
101 #define MCF_GPIO_SETNQ_SETNQ6                (0x40)\r
102 #define MCF_GPIO_SETNQ_SETNQ7                (0x80)\r
103 \r
104 /* Bit definitions and macros for MCF_GPIO_CLRNQ */\r
105 #define MCF_GPIO_CLRNQ_CLRNQ1                (0x2)\r
106 #define MCF_GPIO_CLRNQ_CLRNQ2                (0x4)\r
107 #define MCF_GPIO_CLRNQ_CLRNQ3                (0x8)\r
108 #define MCF_GPIO_CLRNQ_CLRNQ4                (0x10)\r
109 #define MCF_GPIO_CLRNQ_CLRNQ5                (0x20)\r
110 #define MCF_GPIO_CLRNQ_CLRNQ6                (0x40)\r
111 #define MCF_GPIO_CLRNQ_CLRNQ7                (0x80)\r
112 \r
113 /* Bit definitions and macros for MCF_GPIO_PNQPAR */\r
114 #define MCF_GPIO_PNQPAR_PNQPAR1(x)           (((x)&0x3)<<0x2)\r
115 #define MCF_GPIO_PNQPAR_IRQ1_GPIO            (0)\r
116 #define MCF_GPIO_PNQPAR_IRQ1_IRQ1            (0x4)\r
117 #define MCF_GPIO_PNQPAR_IRQ1_SYNCA           (0x8)\r
118 #define MCF_GPIO_PNQPAR_IRQ1_USB_ALT_CLK     (0xC)\r
119 #define MCF_GPIO_PNQPAR_PNQPAR2(x)           (((x)&0x3)<<0x4)\r
120 #define MCF_GPIO_PNQPAR_IRQ2_GPIO            (0)\r
121 #define MCF_GPIO_PNQPAR_IRQ2_IRQ2            (0x10)\r
122 #define MCF_GPIO_PNQPAR_PNQPAR3(x)           (((x)&0x3)<<0x6)\r
123 #define MCF_GPIO_PNQPAR_IRQ3_GPIO            (0)\r
124 #define MCF_GPIO_PNQPAR_IRQ3_IRQ3            (0x40)\r
125 #define MCF_GPIO_PNQPAR_PNQPAR4(x)           (((x)&0x3)<<0x8)\r
126 #define MCF_GPIO_PNQPAR_IRQ4_GPIO            (0)\r
127 #define MCF_GPIO_PNQPAR_IRQ4_IRQ4            (0x100)\r
128 #define MCF_GPIO_PNQPAR_PNQPAR5(x)           (((x)&0x3)<<0xA)\r
129 #define MCF_GPIO_PNQPAR_IRQ5_GPIO            (0)\r
130 #define MCF_GPIO_PNQPAR_IRQ5_IRQ5            (0x400)\r
131 #define MCF_GPIO_PNQPAR_PNQPAR6(x)           (((x)&0x3)<<0xC)\r
132 #define MCF_GPIO_PNQPAR_IRQ6_GPIO            (0)\r
133 #define MCF_GPIO_PNQPAR_IRQ6_IRQ6            (0x1000)\r
134 #define MCF_GPIO_PNQPAR_PNQPAR7(x)           (((x)&0x3)<<0xE)\r
135 #define MCF_GPIO_PNQPAR_IRQ7_GPIO            (0)\r
136 #define MCF_GPIO_PNQPAR_IRQ7_IRQ7            (0x4000)\r
137 \r
138 /* Bit definitions and macros for MCF_GPIO_PORTAN */\r
139 #define MCF_GPIO_PORTAN_PORTAN0              (0x1)\r
140 #define MCF_GPIO_PORTAN_PORTAN1              (0x2)\r
141 #define MCF_GPIO_PORTAN_PORTAN2              (0x4)\r
142 #define MCF_GPIO_PORTAN_PORTAN3              (0x8)\r
143 #define MCF_GPIO_PORTAN_PORTAN4              (0x10)\r
144 #define MCF_GPIO_PORTAN_PORTAN5              (0x20)\r
145 #define MCF_GPIO_PORTAN_PORTAN6              (0x40)\r
146 #define MCF_GPIO_PORTAN_PORTAN7              (0x80)\r
147 \r
148 /* Bit definitions and macros for MCF_GPIO_DDRAN */\r
149 #define MCF_GPIO_DDRAN_DDRAN0                (0x1)\r
150 #define MCF_GPIO_DDRAN_DDRAN1                (0x2)\r
151 #define MCF_GPIO_DDRAN_DDRAN2                (0x4)\r
152 #define MCF_GPIO_DDRAN_DDRAN3                (0x8)\r
153 #define MCF_GPIO_DDRAN_DDRAN4                (0x10)\r
154 #define MCF_GPIO_DDRAN_DDRAN5                (0x20)\r
155 #define MCF_GPIO_DDRAN_DDRAN6                (0x40)\r
156 #define MCF_GPIO_DDRAN_DDRAN7                (0x80)\r
157 \r
158 /* Bit definitions and macros for MCF_GPIO_SETAN */\r
159 #define MCF_GPIO_SETAN_SETAN0                (0x1)\r
160 #define MCF_GPIO_SETAN_SETAN1                (0x2)\r
161 #define MCF_GPIO_SETAN_SETAN2                (0x4)\r
162 #define MCF_GPIO_SETAN_SETAN3                (0x8)\r
163 #define MCF_GPIO_SETAN_SETAN4                (0x10)\r
164 #define MCF_GPIO_SETAN_SETAN5                (0x20)\r
165 #define MCF_GPIO_SETAN_SETAN6                (0x40)\r
166 #define MCF_GPIO_SETAN_SETAN7                (0x80)\r
167 \r
168 /* Bit definitions and macros for MCF_GPIO_CLRAN */\r
169 #define MCF_GPIO_CLRAN_CLRAN0                (0x1)\r
170 #define MCF_GPIO_CLRAN_CLRAN1                (0x2)\r
171 #define MCF_GPIO_CLRAN_CLRAN2                (0x4)\r
172 #define MCF_GPIO_CLRAN_CLRAN3                (0x8)\r
173 #define MCF_GPIO_CLRAN_CLRAN4                (0x10)\r
174 #define MCF_GPIO_CLRAN_CLRAN5                (0x20)\r
175 #define MCF_GPIO_CLRAN_CLRAN6                (0x40)\r
176 #define MCF_GPIO_CLRAN_CLRAN7                (0x80)\r
177 \r
178 /* Bit definitions and macros for MCF_GPIO_PANPAR */\r
179 #define MCF_GPIO_PANPAR_PANPAR0              (0x1)\r
180 #define MCF_GPIO_PANPAR_AN0_GPIO             (0)\r
181 #define MCF_GPIO_PANPAR_AN0_AN0              (0x1)\r
182 #define MCF_GPIO_PANPAR_PANPAR1              (0x2)\r
183 #define MCF_GPIO_PANPAR_AN1_GPIO             (0)\r
184 #define MCF_GPIO_PANPAR_AN1_AN1              (0x2)\r
185 #define MCF_GPIO_PANPAR_PANPAR2              (0x4)\r
186 #define MCF_GPIO_PANPAR_AN2_GPIO             (0)\r
187 #define MCF_GPIO_PANPAR_AN2_AN2              (0x4)\r
188 #define MCF_GPIO_PANPAR_PANPAR3              (0x8)\r
189 #define MCF_GPIO_PANPAR_AN3_GPIO             (0)\r
190 #define MCF_GPIO_PANPAR_AN3_AN3              (0x8)\r
191 #define MCF_GPIO_PANPAR_PANPAR4              (0x10)\r
192 #define MCF_GPIO_PANPAR_AN4_GPIO             (0)\r
193 #define MCF_GPIO_PANPAR_AN4_AN4              (0x10)\r
194 #define MCF_GPIO_PANPAR_PANPAR5              (0x20)\r
195 #define MCF_GPIO_PANPAR_AN5_GPIO             (0)\r
196 #define MCF_GPIO_PANPAR_AN5_AN5              (0x20)\r
197 #define MCF_GPIO_PANPAR_PANPAR6              (0x40)\r
198 #define MCF_GPIO_PANPAR_AN6_GPIO             (0)\r
199 #define MCF_GPIO_PANPAR_AN6_AN6              (0x40)\r
200 #define MCF_GPIO_PANPAR_PANPAR7              (0x80)\r
201 #define MCF_GPIO_PANPAR_AN7_GPIO             (0)\r
202 #define MCF_GPIO_PANPAR_AN7_AN7              (0x80)\r
203 \r
204 /* Bit definitions and macros for MCF_GPIO_PORTAS */\r
205 #define MCF_GPIO_PORTAS_PORTAS0              (0x1)\r
206 #define MCF_GPIO_PORTAS_PORTAS1              (0x2)\r
207 \r
208 /* Bit definitions and macros for MCF_GPIO_DDRAS */\r
209 #define MCF_GPIO_DDRAS_DDRAS0                (0x1)\r
210 #define MCF_GPIO_DDRAS_DDRAS1                (0x2)\r
211 \r
212 /* Bit definitions and macros for MCF_GPIO_SETAS */\r
213 #define MCF_GPIO_SETAS_SETAS0                (0x1)\r
214 #define MCF_GPIO_SETAS_SETAS1                (0x2)\r
215 \r
216 /* Bit definitions and macros for MCF_GPIO_CLRAS */\r
217 #define MCF_GPIO_CLRAS_CLRAS0                (0x1)\r
218 #define MCF_GPIO_CLRAS_CLRAS1                (0x2)\r
219 \r
220 /* Bit definitions and macros for MCF_GPIO_PASPAR */\r
221 #define MCF_GPIO_PASPAR_PASPAR0(x)           (((x)&0x3)<<0)\r
222 #define MCF_GPIO_PASPAR_SCL_GPIO             (0)\r
223 #define MCF_GPIO_PASPAR_SCL_SCL              (0x1)\r
224 #define MCF_GPIO_PASPAR_SCL_USB_DMI          (0x2)\r
225 #define MCF_GPIO_PASPAR_SCL_UTXD2            (0x3)\r
226 #define MCF_GPIO_PASPAR_PASPAR1(x)           (((x)&0x3)<<0x2)\r
227 #define MCF_GPIO_PASPAR_SDA_GPIO             (0)\r
228 #define MCF_GPIO_PASPAR_SDA_SDA              (0x4)\r
229 #define MCF_GPIO_PASPAR_SDA_USB_DPI          (0x8)\r
230 #define MCF_GPIO_PASPAR_SDA_URXD2            (0xC)\r
231 \r
232 /* Bit definitions and macros for MCF_GPIO_PORTQS */\r
233 #define MCF_GPIO_PORTQS_PORTQS0              (0x1)\r
234 #define MCF_GPIO_PORTQS_PORTQS1              (0x2)\r
235 #define MCF_GPIO_PORTQS_PORTQS2              (0x4)\r
236 #define MCF_GPIO_PORTQS_PORTQS3              (0x8)\r
237 #define MCF_GPIO_PORTQS_PORTQS4              (0x10)\r
238 #define MCF_GPIO_PORTQS_PORTQS5              (0x20)\r
239 #define MCF_GPIO_PORTQS_PORTQS6              (0x40)\r
240 \r
241 /* Bit definitions and macros for MCF_GPIO_DDRQS */\r
242 #define MCF_GPIO_DDRQS_DDRQS0                (0x1)\r
243 #define MCF_GPIO_DDRQS_DDRQS1                (0x2)\r
244 #define MCF_GPIO_DDRQS_DDRQS2                (0x4)\r
245 #define MCF_GPIO_DDRQS_DDRQS3                (0x8)\r
246 #define MCF_GPIO_DDRQS_DDRQS4                (0x10)\r
247 #define MCF_GPIO_DDRQS_DDRQS5                (0x20)\r
248 #define MCF_GPIO_DDRQS_DDRQS6                (0x40)\r
249 \r
250 /* Bit definitions and macros for MCF_GPIO_SETQS */\r
251 #define MCF_GPIO_SETQS_SETQS0                (0x1)\r
252 #define MCF_GPIO_SETQS_SETQS1                (0x2)\r
253 #define MCF_GPIO_SETQS_SETQS2                (0x4)\r
254 #define MCF_GPIO_SETQS_SETQS3                (0x8)\r
255 #define MCF_GPIO_SETQS_SETQS4                (0x10)\r
256 #define MCF_GPIO_SETQS_SETQS5                (0x20)\r
257 #define MCF_GPIO_SETQS_SETQS6                (0x40)\r
258 \r
259 /* Bit definitions and macros for MCF_GPIO_CLRQS */\r
260 #define MCF_GPIO_CLRQS_CLRQS0                (0x1)\r
261 #define MCF_GPIO_CLRQS_CLRQS1                (0x2)\r
262 #define MCF_GPIO_CLRQS_CLRQS2                (0x4)\r
263 #define MCF_GPIO_CLRQS_CLRQS3                (0x8)\r
264 #define MCF_GPIO_CLRQS_CLRQS4                (0x10)\r
265 #define MCF_GPIO_CLRQS_CLRQS5                (0x20)\r
266 #define MCF_GPIO_CLRQS_CLRQS6                (0x40)\r
267 \r
268 /* Bit definitions and macros for MCF_GPIO_PQSPAR */\r
269 #define MCF_GPIO_PQSPAR_PQSPAR0(x)           (((x)&0x3)<<0)\r
270 #define MCF_GPIO_PQSPAR_QSPI_DOUT_GPIO       (0)\r
271 #define MCF_GPIO_PQSPAR_QSPI_DOUT_DOUT       (0x1)\r
272 #define MCF_GPIO_PQSPAR_QSPI_DOUT_UTXD1      (0x3)\r
273 #define MCF_GPIO_PQSPAR_PQSPAR1(x)           (((x)&0x3)<<0x2)\r
274 #define MCF_GPIO_PQSPAR_QSPI_DIN_GPIO        (0)\r
275 #define MCF_GPIO_PQSPAR_QSPI_DIN_DIN         (0x4)\r
276 #define MCF_GPIO_PQSPAR_QSPI_DIN_URXD1       (0xC)\r
277 #define MCF_GPIO_PQSPAR_PQSPAR2(x)           (((x)&0x3)<<0x4)\r
278 #define MCF_GPIO_PQSPAR_QSPI_CLK_GPIO        (0)\r
279 #define MCF_GPIO_PQSPAR_QSPI_CLK_CLK         (0x10)\r
280 #define MCF_GPIO_PQSPAR_QSPI_CLK_SCL         (0x20)\r
281 #define MCF_GPIO_PQSPAR_QSPI_CLK_URTS1       (0x30)\r
282 #define MCF_GPIO_PQSPAR_PQSPAR3(x)           (((x)&0x3)<<0x6)\r
283 #define MCF_GPIO_PQSPAR_QSPI_CS0_GPIO        (0)\r
284 #define MCF_GPIO_PQSPAR_QSPI_CS0_CS0         (0x40)\r
285 #define MCF_GPIO_PQSPAR_QSPI_CS0_UCTS1       (0xC0)\r
286 #define MCF_GPIO_PQSPAR_PQSPAR4(x)           (((x)&0x3)<<0x8)\r
287 #define MCF_GPIO_PQSPAR_QSPI_CS1_GPIO        (0)\r
288 #define MCF_GPIO_PQSPAR_QSPI_CS1_CS1         (0x100)\r
289 #define MCF_GPIO_PQSPAR_QSPI_CS1_USB_PULLUP  (0x300)\r
290 #define MCF_GPIO_PQSPAR_PQSPAR5(x)           (((x)&0x3)<<0xA)\r
291 #define MCF_GPIO_PQSPAR_QSPI_CS2_GPIO        (0)\r
292 #define MCF_GPIO_PQSPAR_QSPI_CS2_CS2         (0x400)\r
293 #define MCF_GPIO_PQSPAR_QSPI_CS2_USB_DM_PD   (0xC00)\r
294 #define MCF_GPIO_PQSPAR_PQSPAR6(x)           (((x)&0x3)<<0xC)\r
295 #define MCF_GPIO_PQSPAR_QSPI_CS3_GPIO        (0)\r
296 #define MCF_GPIO_PQSPAR_QSPI_CS3_CS3         (0x1000)\r
297 #define MCF_GPIO_PQSPAR_QSPI_CS3_SYNCA       (0x2000)\r
298 #define MCF_GPIO_PQSPAR_QSPI_CS3_USB_DP_PD   (0x3000)\r
299 \r
300 /* Bit definitions and macros for MCF_GPIO_PORTTA */\r
301 #define MCF_GPIO_PORTTA_PORTTA0              (0x1)\r
302 #define MCF_GPIO_PORTTA_PORTTA1              (0x2)\r
303 #define MCF_GPIO_PORTTA_PORTTA2              (0x4)\r
304 #define MCF_GPIO_PORTTA_PORTTA3              (0x8)\r
305 \r
306 /* Bit definitions and macros for MCF_GPIO_DDRTA */\r
307 #define MCF_GPIO_DDRTA_DDRTA0                (0x1)\r
308 #define MCF_GPIO_DDRTA_DDRTA1                (0x2)\r
309 #define MCF_GPIO_DDRTA_DDRTA2                (0x4)\r
310 #define MCF_GPIO_DDRTA_DDRTA3                (0x8)\r
311 \r
312 /* Bit definitions and macros for MCF_GPIO_SETTA */\r
313 #define MCF_GPIO_SETTA_SETTA0                (0x1)\r
314 #define MCF_GPIO_SETTA_SETTA1                (0x2)\r
315 #define MCF_GPIO_SETTA_SETTA2                (0x4)\r
316 #define MCF_GPIO_SETTA_SETTA3                (0x8)\r
317 \r
318 /* Bit definitions and macros for MCF_GPIO_CLRTA */\r
319 #define MCF_GPIO_CLRTA_CLRTA0                (0x1)\r
320 #define MCF_GPIO_CLRTA_CLRTA1                (0x2)\r
321 #define MCF_GPIO_CLRTA_CLRTA2                (0x4)\r
322 #define MCF_GPIO_CLRTA_CLRTA3                (0x8)\r
323 \r
324 /* Bit definitions and macros for MCF_GPIO_PTAPAR */\r
325 #define MCF_GPIO_PTAPAR_PTAPAR0(x)           (((x)&0x3)<<0)\r
326 #define MCF_GPIO_PTAPAR_GPT0_GPIO            (0)\r
327 #define MCF_GPIO_PTAPAR_GPT0_GPT0            (0x1)\r
328 #define MCF_GPIO_PTAPAR_GPT0_PWM1            (0x3)\r
329 #define MCF_GPIO_PTAPAR_PTAPAR1(x)           (((x)&0x3)<<0x2)\r
330 #define MCF_GPIO_PTAPAR_GPT1_GPIO            (0)\r
331 #define MCF_GPIO_PTAPAR_GPT1_GPT1            (0x4)\r
332 #define MCF_GPIO_PTAPAR_GPT1_PWM3            (0xC)\r
333 #define MCF_GPIO_PTAPAR_PTAPAR2(x)           (((x)&0x3)<<0x4)\r
334 #define MCF_GPIO_PTAPAR_GPT2_GPIO            (0)\r
335 #define MCF_GPIO_PTAPAR_GPT2_GPT2            (0x10)\r
336 #define MCF_GPIO_PTAPAR_GPT2_PWM5            (0x30)\r
337 #define MCF_GPIO_PTAPAR_PTAPAR3(x)           (((x)&0x3)<<0x6)\r
338 #define MCF_GPIO_PTAPAR_GPT3_GPIO            (0)\r
339 #define MCF_GPIO_PTAPAR_GPT3_GPT3            (0x40)\r
340 #define MCF_GPIO_PTAPAR_GPT3_PWM7            (0xC0)\r
341 \r
342 /* Bit definitions and macros for MCF_GPIO_PORTTC */\r
343 #define MCF_GPIO_PORTTC_PORTTC0              (0x1)\r
344 #define MCF_GPIO_PORTTC_PORTTC1              (0x2)\r
345 #define MCF_GPIO_PORTTC_PORTTC2              (0x4)\r
346 #define MCF_GPIO_PORTTC_PORTTC3              (0x8)\r
347 \r
348 /* Bit definitions and macros for MCF_GPIO_DDRTC */\r
349 #define MCF_GPIO_DDRTC_DDRTC0                (0x1)\r
350 #define MCF_GPIO_DDRTC_DDRTC1                (0x2)\r
351 #define MCF_GPIO_DDRTC_DDRTC2                (0x4)\r
352 #define MCF_GPIO_DDRTC_DDRTC3                (0x8)\r
353 \r
354 /* Bit definitions and macros for MCF_GPIO_SETTC */\r
355 #define MCF_GPIO_SETTC_SETTC0                (0x1)\r
356 #define MCF_GPIO_SETTC_SETTC1                (0x2)\r
357 #define MCF_GPIO_SETTC_SETTC2                (0x4)\r
358 #define MCF_GPIO_SETTC_SETTC3                (0x8)\r
359 \r
360 /* Bit definitions and macros for MCF_GPIO_CLRTC */\r
361 #define MCF_GPIO_CLRTC_CLRTC0                (0x1)\r
362 #define MCF_GPIO_CLRTC_CLRTC1                (0x2)\r
363 #define MCF_GPIO_CLRTC_CLRTC2                (0x4)\r
364 #define MCF_GPIO_CLRTC_CLRTC3                (0x8)\r
365 \r
366 /* Bit definitions and macros for MCF_GPIO_PTCPAR */\r
367 #define MCF_GPIO_PTCPAR_PTCPAR0(x)           (((x)&0x3)<<0)\r
368 #define MCF_GPIO_PTCPAR_DTIN0_GPIO           (0)\r
369 #define MCF_GPIO_PTCPAR_DTIN0_DTIN0          (0x1)\r
370 #define MCF_GPIO_PTCPAR_DTIN0_DTOUT0         (0x2)\r
371 #define MCF_GPIO_PTCPAR_DTIN0_PWM0           (0x3)\r
372 #define MCF_GPIO_PTCPAR_PTCPAR1(x)           (((x)&0x3)<<0x2)\r
373 #define MCF_GPIO_PTCPAR_DTIN1_GPIO           (0)\r
374 #define MCF_GPIO_PTCPAR_DTIN1_DTIN1          (0x4)\r
375 #define MCF_GPIO_PTCPAR_DTIN1_DTOUT1         (0x8)\r
376 #define MCF_GPIO_PTCPAR_DTIN1_PWM2           (0xC)\r
377 #define MCF_GPIO_PTCPAR_PTCPAR2(x)           (((x)&0x3)<<0x4)\r
378 #define MCF_GPIO_PTCPAR_DTIN2_GPIO           (0)\r
379 #define MCF_GPIO_PTCPAR_DTIN2_DTIN2          (0x10)\r
380 #define MCF_GPIO_PTCPAR_DTIN2_DTOUT2         (0x20)\r
381 #define MCF_GPIO_PTCPAR_DTIN2_PWM4           (0x30)\r
382 #define MCF_GPIO_PTCPAR_PTCPAR3(x)           (((x)&0x3)<<0x6)\r
383 #define MCF_GPIO_PTCPAR_DTIN3_GPIO           (0)\r
384 #define MCF_GPIO_PTCPAR_DTIN3_DTIN3          (0x40)\r
385 #define MCF_GPIO_PTCPAR_DTIN3_DTOUT3         (0x80)\r
386 #define MCF_GPIO_PTCPAR_DTIN3_PWM6           (0xC0)\r
387 \r
388 /* Bit definitions and macros for MCF_GPIO_PORTUA */\r
389 #define MCF_GPIO_PORTUA_PORTUA0              (0x1)\r
390 #define MCF_GPIO_PORTUA_PORTUA1              (0x2)\r
391 #define MCF_GPIO_PORTUA_PORTUA2              (0x4)\r
392 #define MCF_GPIO_PORTUA_PORTUA3              (0x8)\r
393 \r
394 /* Bit definitions and macros for MCF_GPIO_DDRUA */\r
395 #define MCF_GPIO_DDRUA_DDRUA0                (0x1)\r
396 #define MCF_GPIO_DDRUA_DDRUA1                (0x2)\r
397 #define MCF_GPIO_DDRUA_DDRUA2                (0x4)\r
398 #define MCF_GPIO_DDRUA_DDRUA3                (0x8)\r
399 \r
400 /* Bit definitions and macros for MCF_GPIO_SETUA */\r
401 #define MCF_GPIO_SETUA_SETUA0                (0x1)\r
402 #define MCF_GPIO_SETUA_SETUA1                (0x2)\r
403 #define MCF_GPIO_SETUA_SETUA2                (0x4)\r
404 #define MCF_GPIO_SETUA_SETUA3                (0x8)\r
405 \r
406 /* Bit definitions and macros for MCF_GPIO_CLRUA */\r
407 #define MCF_GPIO_CLRUA_CLRUA0                (0x1)\r
408 #define MCF_GPIO_CLRUA_CLRUA1                (0x2)\r
409 #define MCF_GPIO_CLRUA_CLRUA2                (0x4)\r
410 #define MCF_GPIO_CLRUA_CLRUA3                (0x8)\r
411 \r
412 /* Bit definitions and macros for MCF_GPIO_PUAPAR */\r
413 #define MCF_GPIO_PUAPAR_PUAPAR0(x)           (((x)&0x3)<<0)\r
414 #define MCF_GPIO_PUAPAR_UTXD0_GPIO           (0)\r
415 #define MCF_GPIO_PUAPAR_UTXD0_UTXD0          (0x1)\r
416 #define MCF_GPIO_PUAPAR_UTXD0_USB_SUSPEND    (0x3)\r
417 #define MCF_GPIO_PUAPAR_PUAPAR1(x)           (((x)&0x3)<<0x2)\r
418 #define MCF_GPIO_PUAPAR_URXD0_GPIO           (0)\r
419 #define MCF_GPIO_PUAPAR_URXD0_URXD0          (0x4)\r
420 #define MCF_GPIO_PUAPAR_URXD0_USB_RCV        (0xC)\r
421 #define MCF_GPIO_PUAPAR_PUAPAR2(x)           (((x)&0x3)<<0x4)\r
422 #define MCF_GPIO_PUAPAR_URTS0_GPIO           (0)\r
423 #define MCF_GPIO_PUAPAR_URTS0_URTS0          (0x10)\r
424 #define MCF_GPIO_PUAPAR_URTS0_USB_VBUSD      (0x30)\r
425 #define MCF_GPIO_PUAPAR_PUAPAR3(x)           (((x)&0x3)<<0x6)\r
426 #define MCF_GPIO_PUAPAR_UCTS0_GPIO           (0)\r
427 #define MCF_GPIO_PUAPAR_UCTS0_UCTS0          (0x40)\r
428 #define MCF_GPIO_PUAPAR_UCTS0_USB_VBUSE      (0xC0)\r
429 \r
430 /* Bit definitions and macros for MCF_GPIO_PORTUB */\r
431 #define MCF_GPIO_PORTUB_PORTUB0              (0x1)\r
432 #define MCF_GPIO_PORTUB_PORTUB1              (0x2)\r
433 #define MCF_GPIO_PORTUB_PORTUB2              (0x4)\r
434 #define MCF_GPIO_PORTUB_PORTUB3              (0x8)\r
435 \r
436 /* Bit definitions and macros for MCF_GPIO_DDRUB */\r
437 #define MCF_GPIO_DDRUB_DDRUB0                (0x1)\r
438 #define MCF_GPIO_DDRUB_DDRUB1                (0x2)\r
439 #define MCF_GPIO_DDRUB_DDRUB2                (0x4)\r
440 #define MCF_GPIO_DDRUB_DDRUB3                (0x8)\r
441 \r
442 /* Bit definitions and macros for MCF_GPIO_SETUB */\r
443 #define MCF_GPIO_SETUB_SETUB0                (0x1)\r
444 #define MCF_GPIO_SETUB_SETUB1                (0x2)\r
445 #define MCF_GPIO_SETUB_SETUB2                (0x4)\r
446 #define MCF_GPIO_SETUB_SETUB3                (0x8)\r
447 \r
448 /* Bit definitions and macros for MCF_GPIO_CLRUB */\r
449 #define MCF_GPIO_CLRUB_CLRUB0                (0x1)\r
450 #define MCF_GPIO_CLRUB_CLRUB1                (0x2)\r
451 #define MCF_GPIO_CLRUB_CLRUB2                (0x4)\r
452 #define MCF_GPIO_CLRUB_CLRUB3                (0x8)\r
453 \r
454 /* Bit definitions and macros for MCF_GPIO_PUBPAR */\r
455 #define MCF_GPIO_PUBPAR_PUBPAR0(x)           (((x)&0x3)<<0)\r
456 #define MCF_GPIO_PUBPAR_UTXD1_GPIO           (0)\r
457 #define MCF_GPIO_PUBPAR_UTXD1_UTXD1          (0x1)\r
458 #define MCF_GPIO_PUBPAR_UTXD1_USB_SPEED      (0x3)\r
459 #define MCF_GPIO_PUBPAR_PUBPAR1(x)           (((x)&0x3)<<0x2)\r
460 #define MCF_GPIO_PUBPAR_URXD1_GPIO           (0)\r
461 #define MCF_GPIO_PUBPAR_URXD1_URXD1          (0x4)\r
462 #define MCF_GPIO_PUBPAR_URXD1_USB_OE         (0xC)\r
463 #define MCF_GPIO_PUBPAR_PUBPAR2(x)           (((x)&0x3)<<0x4)\r
464 #define MCF_GPIO_PUBPAR_URTS1_GPIO           (0)\r
465 #define MCF_GPIO_PUBPAR_URTS1_URTS1          (0x10)\r
466 #define MCF_GPIO_PUBPAR_URTS1_SYNCB          (0x20)\r
467 #define MCF_GPIO_PUBPAR_URTS1_UTXD2          (0x30)\r
468 #define MCF_GPIO_PUBPAR_PUBPAR3(x)           (((x)&0x3)<<0x6)\r
469 #define MCF_GPIO_PUBPAR_UCTS1_GPIO           (0)\r
470 #define MCF_GPIO_PUBPAR_UCTS1_UCTS1          (0x40)\r
471 #define MCF_GPIO_PUBPAR_UCTS1_SYNCA          (0x80)\r
472 #define MCF_GPIO_PUBPAR_UCTS1_URXD2          (0xC0)\r
473 \r
474 \r
475 #endif /* __MCF52221_GPIO_H__ */\r