1 |
578 |
jeremybenn |
/* Coldfire C Header File
|
2 |
|
|
* Copyright Freescale Semiconductor Inc
|
3 |
|
|
* All rights reserved.
|
4 |
|
|
*
|
5 |
|
|
* 2007/03/19 Revision: 0.9
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
#ifndef __MCF5282_EPORT_H__
|
9 |
|
|
#define __MCF5282_EPORT_H__
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/*********************************************************************
|
13 |
|
|
*
|
14 |
|
|
* Edge Port Module (EPORT)
|
15 |
|
|
*
|
16 |
|
|
*********************************************************************/
|
17 |
|
|
|
18 |
|
|
/* Register read/write macros */
|
19 |
|
|
#define MCF_EPORT_EPPAR (*(vuint16*)(&__IPSBAR[0x130000]))
|
20 |
|
|
#define MCF_EPORT_EPDDR (*(vuint8 *)(&__IPSBAR[0x130002]))
|
21 |
|
|
#define MCF_EPORT_EPIER (*(vuint8 *)(&__IPSBAR[0x130003]))
|
22 |
|
|
#define MCF_EPORT_EPDR (*(vuint8 *)(&__IPSBAR[0x130004]))
|
23 |
|
|
#define MCF_EPORT_EPPDR (*(vuint8 *)(&__IPSBAR[0x130005]))
|
24 |
|
|
#define MCF_EPORT_EPFR (*(vuint8 *)(&__IPSBAR[0x130006]))
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
/* Bit definitions and macros for MCF_EPORT_EPPAR */
|
29 |
|
|
#define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x3)<<0x2)
|
30 |
|
|
#define MCF_EPORT_EPPAR_EPPA1_LEVEL (0)
|
31 |
|
|
#define MCF_EPORT_EPPAR_EPPA1_RISING (0x4)
|
32 |
|
|
#define MCF_EPORT_EPPAR_EPPA1_FALLING (0x8)
|
33 |
|
|
#define MCF_EPORT_EPPAR_EPPA1_BOTH (0xC)
|
34 |
|
|
#define MCF_EPORT_EPPAR_EPPA2(x) (((x)&0x3)<<0x4)
|
35 |
|
|
#define MCF_EPORT_EPPAR_EPPA2_LEVEL (0)
|
36 |
|
|
#define MCF_EPORT_EPPAR_EPPA2_RISING (0x10)
|
37 |
|
|
#define MCF_EPORT_EPPAR_EPPA2_FALLING (0x20)
|
38 |
|
|
#define MCF_EPORT_EPPAR_EPPA2_BOTH (0x30)
|
39 |
|
|
#define MCF_EPORT_EPPAR_EPPA3(x) (((x)&0x3)<<0x6)
|
40 |
|
|
#define MCF_EPORT_EPPAR_EPPA3_LEVEL (0)
|
41 |
|
|
#define MCF_EPORT_EPPAR_EPPA3_RISING (0x40)
|
42 |
|
|
#define MCF_EPORT_EPPAR_EPPA3_FALLING (0x80)
|
43 |
|
|
#define MCF_EPORT_EPPAR_EPPA3_BOTH (0xC0)
|
44 |
|
|
#define MCF_EPORT_EPPAR_EPPA4(x) (((x)&0x3)<<0x8)
|
45 |
|
|
#define MCF_EPORT_EPPAR_EPPA4_LEVEL (0)
|
46 |
|
|
#define MCF_EPORT_EPPAR_EPPA4_RISING (0x100)
|
47 |
|
|
#define MCF_EPORT_EPPAR_EPPA4_FALLING (0x200)
|
48 |
|
|
#define MCF_EPORT_EPPAR_EPPA4_BOTH (0x300)
|
49 |
|
|
#define MCF_EPORT_EPPAR_EPPA5(x) (((x)&0x3)<<0xA)
|
50 |
|
|
#define MCF_EPORT_EPPAR_EPPA5_LEVEL (0)
|
51 |
|
|
#define MCF_EPORT_EPPAR_EPPA5_RISING (0x400)
|
52 |
|
|
#define MCF_EPORT_EPPAR_EPPA5_FALLING (0x800)
|
53 |
|
|
#define MCF_EPORT_EPPAR_EPPA5_BOTH (0xC00)
|
54 |
|
|
#define MCF_EPORT_EPPAR_EPPA6(x) (((x)&0x3)<<0xC)
|
55 |
|
|
#define MCF_EPORT_EPPAR_EPPA6_LEVEL (0)
|
56 |
|
|
#define MCF_EPORT_EPPAR_EPPA6_RISING (0x1000)
|
57 |
|
|
#define MCF_EPORT_EPPAR_EPPA6_FALLING (0x2000)
|
58 |
|
|
#define MCF_EPORT_EPPAR_EPPA6_BOTH (0x3000)
|
59 |
|
|
#define MCF_EPORT_EPPAR_EPPA7(x) (((x)&0x3)<<0xE)
|
60 |
|
|
#define MCF_EPORT_EPPAR_EPPA7_LEVEL (0)
|
61 |
|
|
#define MCF_EPORT_EPPAR_EPPA7_RISING (0x4000)
|
62 |
|
|
#define MCF_EPORT_EPPAR_EPPA7_FALLING (0x8000)
|
63 |
|
|
#define MCF_EPORT_EPPAR_EPPA7_BOTH (0xC000)
|
64 |
|
|
#define MCF_EPORT_EPPAR_LEVEL (0)
|
65 |
|
|
#define MCF_EPORT_EPPAR_RISING (0x1)
|
66 |
|
|
#define MCF_EPORT_EPPAR_FALLING (0x2)
|
67 |
|
|
#define MCF_EPORT_EPPAR_BOTH (0x3)
|
68 |
|
|
|
69 |
|
|
/* Bit definitions and macros for MCF_EPORT_EPDDR */
|
70 |
|
|
#define MCF_EPORT_EPDDR_EPDD1 (0x2)
|
71 |
|
|
#define MCF_EPORT_EPDDR_EPDD2 (0x4)
|
72 |
|
|
#define MCF_EPORT_EPDDR_EPDD3 (0x8)
|
73 |
|
|
#define MCF_EPORT_EPDDR_EPDD4 (0x10)
|
74 |
|
|
#define MCF_EPORT_EPDDR_EPDD5 (0x20)
|
75 |
|
|
#define MCF_EPORT_EPDDR_EPDD6 (0x40)
|
76 |
|
|
#define MCF_EPORT_EPDDR_EPDD7 (0x80)
|
77 |
|
|
|
78 |
|
|
/* Bit definitions and macros for MCF_EPORT_EPIER */
|
79 |
|
|
#define MCF_EPORT_EPIER_EPIE1 (0x2)
|
80 |
|
|
#define MCF_EPORT_EPIER_EPIE2 (0x4)
|
81 |
|
|
#define MCF_EPORT_EPIER_EPIE3 (0x8)
|
82 |
|
|
#define MCF_EPORT_EPIER_EPIE4 (0x10)
|
83 |
|
|
#define MCF_EPORT_EPIER_EPIE5 (0x20)
|
84 |
|
|
#define MCF_EPORT_EPIER_EPIE6 (0x40)
|
85 |
|
|
#define MCF_EPORT_EPIER_EPIE7 (0x80)
|
86 |
|
|
|
87 |
|
|
/* Bit definitions and macros for MCF_EPORT_EPDR */
|
88 |
|
|
#define MCF_EPORT_EPDR_EPD1 (0x2)
|
89 |
|
|
#define MCF_EPORT_EPDR_EPD2 (0x4)
|
90 |
|
|
#define MCF_EPORT_EPDR_EPD3 (0x8)
|
91 |
|
|
#define MCF_EPORT_EPDR_EPD4 (0x10)
|
92 |
|
|
#define MCF_EPORT_EPDR_EPD5 (0x20)
|
93 |
|
|
#define MCF_EPORT_EPDR_EPD6 (0x40)
|
94 |
|
|
#define MCF_EPORT_EPDR_EPD7 (0x80)
|
95 |
|
|
|
96 |
|
|
/* Bit definitions and macros for MCF_EPORT_EPPDR */
|
97 |
|
|
#define MCF_EPORT_EPPDR_EPPD1 (0x2)
|
98 |
|
|
#define MCF_EPORT_EPPDR_EPPD2 (0x4)
|
99 |
|
|
#define MCF_EPORT_EPPDR_EPPD3 (0x8)
|
100 |
|
|
#define MCF_EPORT_EPPDR_EPPD4 (0x10)
|
101 |
|
|
#define MCF_EPORT_EPPDR_EPPD5 (0x20)
|
102 |
|
|
#define MCF_EPORT_EPPDR_EPPD6 (0x40)
|
103 |
|
|
#define MCF_EPORT_EPPDR_EPPD7 (0x80)
|
104 |
|
|
|
105 |
|
|
/* Bit definitions and macros for MCF_EPORT_EPFR */
|
106 |
|
|
#define MCF_EPORT_EPFR_EPF1 (0x2)
|
107 |
|
|
#define MCF_EPORT_EPFR_EPF2 (0x4)
|
108 |
|
|
#define MCF_EPORT_EPFR_EPF3 (0x8)
|
109 |
|
|
#define MCF_EPORT_EPFR_EPF4 (0x10)
|
110 |
|
|
#define MCF_EPORT_EPFR_EPF5 (0x20)
|
111 |
|
|
#define MCF_EPORT_EPFR_EPF6 (0x40)
|
112 |
|
|
#define MCF_EPORT_EPFR_EPF7 (0x80)
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
#endif /* __MCF5282_EPORT_H__ */
|