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_QADC_H__
|
9 |
|
|
#define __MCF5282_QADC_H__
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/*********************************************************************
|
13 |
|
|
*
|
14 |
|
|
* Queued Analog-to-Digital Converter (QADC)
|
15 |
|
|
*
|
16 |
|
|
*********************************************************************/
|
17 |
|
|
|
18 |
|
|
/* Register read/write macros */
|
19 |
|
|
#define MCF_QADC_QADCMCR (*(vuint16*)(&__IPSBAR[0x190000]))
|
20 |
|
|
#define MCF_QADC_PORTQA (*(vuint8 *)(&__IPSBAR[0x190006]))
|
21 |
|
|
#define MCF_QADC_PORTQB (*(vuint8 *)(&__IPSBAR[0x190007]))
|
22 |
|
|
#define MCF_QADC_DDRQA (*(vuint8 *)(&__IPSBAR[0x190008]))
|
23 |
|
|
#define MCF_QADC_DDRQB (*(vuint8 *)(&__IPSBAR[0x190009]))
|
24 |
|
|
#define MCF_QADC_QACR0 (*(vuint16*)(&__IPSBAR[0x19000A]))
|
25 |
|
|
#define MCF_QADC_QACR1 (*(vuint16*)(&__IPSBAR[0x19000C]))
|
26 |
|
|
#define MCF_QADC_QACR2 (*(vuint16*)(&__IPSBAR[0x19000E]))
|
27 |
|
|
#define MCF_QADC_QASR0 (*(vuint16*)(&__IPSBAR[0x190010]))
|
28 |
|
|
#define MCF_QADC_QASR1 (*(vuint16*)(&__IPSBAR[0x190012]))
|
29 |
|
|
|
30 |
|
|
/* Other macros */
|
31 |
|
|
#define MCF_QADC_CCW(x) (*(vuint16*)(&__IPSBAR[0x190200 + (x*2)]))
|
32 |
|
|
#define MCF_QADC_CCW_CHAN(x) (((x)&0x3F)<<0)
|
33 |
|
|
#define MCF_QADC_CCW_IST(x) (((x)&0x3)<<0x6)
|
34 |
|
|
#define MCF_QADC_CCW_IST_QCLK2 (0)
|
35 |
|
|
#define MCF_QADC_CCW_IST_QCLK4 (0x40)
|
36 |
|
|
#define MCF_QADC_CCW_IST_QCLK8 (0x80)
|
37 |
|
|
#define MCF_QADC_CCW_IST_QCLK16 (0xC0)
|
38 |
|
|
#define MCF_QADC_CCW_BYP (0x100)
|
39 |
|
|
#define MCF_QADC_CCW_P (0x200)
|
40 |
|
|
#define MCF_QADC_RJURR(x) (*(vuint16*)(&__IPSBAR[0x190280 + (x*2)]))
|
41 |
|
|
#define MCF_QADC_LJSRR(x) (*(vuint16*)(&__IPSBAR[0x190300 + (x*2)]))
|
42 |
|
|
#define MCF_QADC_LJURR(x) (*(vuint16*)(&__IPSBAR[0x190380 + (x*2)]))
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
/* Bit definitions and macros for MCF_QADC_QADCMCR */
|
46 |
|
|
#define MCF_QADC_QADCMCR_SUPV (0x80)
|
47 |
|
|
#define MCF_QADC_QADCMCR_QDBG (0x4000)
|
48 |
|
|
#define MCF_QADC_QADCMCR_QSTOP (0x8000)
|
49 |
|
|
|
50 |
|
|
/* Bit definitions and macros for MCF_QADC_PORTQA */
|
51 |
|
|
#define MCF_QADC_PORTQA_PQA0 (0x1)
|
52 |
|
|
#define MCF_QADC_PORTQA_PQA1 (0x2)
|
53 |
|
|
#define MCF_QADC_PORTQA_PQA2 (0x8)
|
54 |
|
|
#define MCF_QADC_PORTQA_PQA3 (0x10)
|
55 |
|
|
|
56 |
|
|
/* Bit definitions and macros for MCF_QADC_PORTQB */
|
57 |
|
|
#define MCF_QADC_PORTQB_PQB0 (0x1)
|
58 |
|
|
#define MCF_QADC_PORTQB_PQB1 (0x2)
|
59 |
|
|
#define MCF_QADC_PORTQB_PQB2 (0x4)
|
60 |
|
|
#define MCF_QADC_PORTQB_PQB3 (0x8)
|
61 |
|
|
|
62 |
|
|
/* Bit definitions and macros for MCF_QADC_DDRQA */
|
63 |
|
|
#define MCF_QADC_DDRQA_DDQA0 (0x1)
|
64 |
|
|
#define MCF_QADC_DDRQA_DDQA1 (0x2)
|
65 |
|
|
#define MCF_QADC_DDRQA_DDQA2 (0x8)
|
66 |
|
|
#define MCF_QADC_DDRQA_DDQA3 (0x10)
|
67 |
|
|
|
68 |
|
|
/* Bit definitions and macros for MCF_QADC_DDRQB */
|
69 |
|
|
#define MCF_QADC_DDRQB_DDQB0 (0x1)
|
70 |
|
|
#define MCF_QADC_DDRQB_DDQB1 (0x2)
|
71 |
|
|
#define MCF_QADC_DDRQB_DDQB2 (0x4)
|
72 |
|
|
#define MCF_QADC_DDRQB_DDQB3 (0x8)
|
73 |
|
|
|
74 |
|
|
/* Bit definitions and macros for MCF_QADC_QACR0 */
|
75 |
|
|
#define MCF_QADC_QACR0_QPR(x) (((x)&0x7F)<<0)
|
76 |
|
|
#define MCF_QADC_QACR0_TRG (0x1000)
|
77 |
|
|
#define MCF_QADC_QACR0_MUX (0x8000)
|
78 |
|
|
|
79 |
|
|
/* Bit definitions and macros for MCF_QADC_QACR1 */
|
80 |
|
|
#define MCF_QADC_QACR1_MQ1(x) (((x)&0x1F)<<0x8)
|
81 |
|
|
#define MCF_QADC_QACR1_SSE1 (0x2000)
|
82 |
|
|
#define MCF_QADC_QACR1_PIE1 (0x4000)
|
83 |
|
|
#define MCF_QADC_QACR1_CIE1 (0x8000)
|
84 |
|
|
|
85 |
|
|
/* Bit definitions and macros for MCF_QADC_QACR2 */
|
86 |
|
|
#define MCF_QADC_QACR2_BQ2(x) (((x)&0x7F)<<0)
|
87 |
|
|
#define MCF_QADC_QACR2_RESUME (0x80)
|
88 |
|
|
#define MCF_QADC_QACR2_MQ2(x) (((x)&0x1F)<<0x8)
|
89 |
|
|
#define MCF_QADC_QACR2_SSE2 (0x2000)
|
90 |
|
|
#define MCF_QADC_QACR2_PIE2 (0x4000)
|
91 |
|
|
#define MCF_QADC_QACR2_CIE2 (0x8000)
|
92 |
|
|
|
93 |
|
|
/* Bit definitions and macros for MCF_QADC_QASR0 */
|
94 |
|
|
#define MCF_QADC_QASR0_CWP(x) (((x)&0x3F)<<0)
|
95 |
|
|
#define MCF_QADC_QASR0_QS(x) (((x)&0xF)<<0x6)
|
96 |
|
|
#define MCF_QADC_QASR0_TOR2 (0x400)
|
97 |
|
|
#define MCF_QADC_QASR0_TOR1 (0x800)
|
98 |
|
|
#define MCF_QADC_QASR0_PF2 (0x1000)
|
99 |
|
|
#define MCF_QADC_QASR0_CF2 (0x2000)
|
100 |
|
|
#define MCF_QADC_QASR0_PF1 (0x4000)
|
101 |
|
|
#define MCF_QADC_QASR0_CF1 (0x8000)
|
102 |
|
|
|
103 |
|
|
/* Bit definitions and macros for MCF_QADC_QASR1 */
|
104 |
|
|
#define MCF_QADC_QASR1_CWPQ2(x) (((x)&0x3F)<<0)
|
105 |
|
|
#define MCF_QADC_QASR1_CWPQ1(x) (((x)&0x3F)<<0x8)
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
#endif /* __MCF5282_QADC_H__ */
|