OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF52259_CodeWarrior/] [Freescale_Headers/] [MCF52259_ADC.h] - Blame information for rev 595

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 jeremybenn
/* Coldfire C Header File
2
 * Copyright Freescale Semiconductor Inc
3
 * All rights reserved.
4
 *
5
 * 2008/04/17 Revision: 0.2
6
 *
7
 * (c) Copyright UNIS, spol. s r.o. 1997-2008
8
 * UNIS, spol. s r.o.
9
 * Jundrovska 33
10
 * 624 00 Brno
11
 * Czech Republic
12
 * http      : www.processorexpert.com
13
 * mail      : info@processorexpert.com
14
 */
15
 
16
#ifndef __MCF52259_ADC_H__
17
#define __MCF52259_ADC_H__
18
 
19
 
20
/*********************************************************************
21
*
22
* Analog-to-Digital Converter (ADC)
23
*
24
*********************************************************************/
25
 
26
/* Register read/write macros */
27
#define MCF_ADC_CTRL1                        (*(vuint16*)(0x40190000))
28
#define MCF_ADC_CTRL2                        (*(vuint16*)(0x40190002))
29
#define MCF_ADC_ADZCC                        (*(vuint16*)(0x40190004))
30
#define MCF_ADC_ADLST1                       (*(vuint16*)(0x40190006))
31
#define MCF_ADC_ADLST2                       (*(vuint16*)(0x40190008))
32
#define MCF_ADC_ADSDIS                       (*(vuint16*)(0x4019000A))
33
#define MCF_ADC_ADSTAT                       (*(vuint16*)(0x4019000C))
34
#define MCF_ADC_ADLSTAT                      (*(vuint16*)(0x4019000E))
35
#define MCF_ADC_ADZCSTAT                     (*(vuint16*)(0x40190010))
36
#define MCF_ADC_ADRSLT0                      (*(vuint16*)(0x40190012))
37
#define MCF_ADC_ADRSLT1                      (*(vuint16*)(0x40190014))
38
#define MCF_ADC_ADRSLT2                      (*(vuint16*)(0x40190016))
39
#define MCF_ADC_ADRSLT3                      (*(vuint16*)(0x40190018))
40
#define MCF_ADC_ADRSLT4                      (*(vuint16*)(0x4019001A))
41
#define MCF_ADC_ADRSLT5                      (*(vuint16*)(0x4019001C))
42
#define MCF_ADC_ADRSLT6                      (*(vuint16*)(0x4019001E))
43
#define MCF_ADC_ADRSLT7                      (*(vuint16*)(0x40190020))
44
#define MCF_ADC_ADLLMT0                      (*(vuint16*)(0x40190022))
45
#define MCF_ADC_ADLLMT1                      (*(vuint16*)(0x40190024))
46
#define MCF_ADC_ADLLMT2                      (*(vuint16*)(0x40190026))
47
#define MCF_ADC_ADLLMT3                      (*(vuint16*)(0x40190028))
48
#define MCF_ADC_ADLLMT4                      (*(vuint16*)(0x4019002A))
49
#define MCF_ADC_ADLLMT5                      (*(vuint16*)(0x4019002C))
50
#define MCF_ADC_ADLLMT6                      (*(vuint16*)(0x4019002E))
51
#define MCF_ADC_ADLLMT7                      (*(vuint16*)(0x40190030))
52
#define MCF_ADC_ADHLMT0                      (*(vuint16*)(0x40190032))
53
#define MCF_ADC_ADHLMT1                      (*(vuint16*)(0x40190034))
54
#define MCF_ADC_ADHLMT2                      (*(vuint16*)(0x40190036))
55
#define MCF_ADC_ADHLMT3                      (*(vuint16*)(0x40190038))
56
#define MCF_ADC_ADHLMT4                      (*(vuint16*)(0x4019003A))
57
#define MCF_ADC_ADHLMT5                      (*(vuint16*)(0x4019003C))
58
#define MCF_ADC_ADHLMT6                      (*(vuint16*)(0x4019003E))
59
#define MCF_ADC_ADHLMT7                      (*(vuint16*)(0x40190040))
60
#define MCF_ADC_ADOFS0                       (*(vuint16*)(0x40190042))
61
#define MCF_ADC_ADOFS1                       (*(vuint16*)(0x40190044))
62
#define MCF_ADC_ADOFS2                       (*(vuint16*)(0x40190046))
63
#define MCF_ADC_ADOFS3                       (*(vuint16*)(0x40190048))
64
#define MCF_ADC_ADOFS4                       (*(vuint16*)(0x4019004A))
65
#define MCF_ADC_ADOFS5                       (*(vuint16*)(0x4019004C))
66
#define MCF_ADC_ADOFS6                       (*(vuint16*)(0x4019004E))
67
#define MCF_ADC_ADOFS7                       (*(vuint16*)(0x40190050))
68
#define MCF_ADC_POWER                        (*(vuint16*)(0x40190052))
69
#define MCF_ADC_CAL                          (*(vuint16*)(0x40190054))
70
#define MCF_ADC_ADRSLT(x)                    (*(vuint16*)(0x40190012 + ((x)*0x2)))
71
#define MCF_ADC_ADLLMT(x)                    (*(vuint16*)(0x40190022 + ((x)*0x2)))
72
#define MCF_ADC_ADHLMT(x)                    (*(vuint16*)(0x40190032 + ((x)*0x2)))
73
#define MCF_ADC_ADOFS(x)                     (*(vuint16*)(0x40190042 + ((x)*0x2)))
74
 
75
 
76
/* Bit definitions and macros for MCF_ADC_CTRL1 */
77
#define MCF_ADC_CTRL1_SMODE(x)               (((x)&0x7)<<0)
78
#define MCF_ADC_CTRL1_CHNCFG(x)              (((x)&0xF)<<0x4)
79
#define MCF_ADC_CTRL1_HLMTIE                 (0x100)
80
#define MCF_ADC_CTRL1_LLMTIE                 (0x200)
81
#define MCF_ADC_CTRL1_ZCIE                   (0x400)
82
#define MCF_ADC_CTRL1_EOSIE0                 (0x800)
83
#define MCF_ADC_CTRL1_SYNC0                  (0x1000)
84
#define MCF_ADC_CTRL1_START0                 (0x2000)
85
#define MCF_ADC_CTRL1_STOP0                  (0x4000)
86
 
87
/* Bit definitions and macros for MCF_ADC_CTRL2 */
88
#define MCF_ADC_CTRL2_DIV(x)                 (((x)&0x1F)<<0)
89
#define MCF_ADC_CTRL2_SIMULT                 (0x20)
90
#define MCF_ADC_CTRL2_EOSIE1                 (0x800)
91
#define MCF_ADC_CTRL2_SYNC1                  (0x1000)
92
#define MCF_ADC_CTRL2_START1                 (0x2000)
93
#define MCF_ADC_CTRL2_STOP1                  (0x4000)
94
 
95
/* Bit definitions and macros for MCF_ADC_ADZCC */
96
#define MCF_ADC_ADZCC_ZCE0(x)                (((x)&0x3)<<0)
97
#define MCF_ADC_ADZCC_ZCE1(x)                (((x)&0x3)<<0x2)
98
#define MCF_ADC_ADZCC_ZCE2(x)                (((x)&0x3)<<0x4)
99
#define MCF_ADC_ADZCC_ZCE3(x)                (((x)&0x3)<<0x6)
100
#define MCF_ADC_ADZCC_ZCE4(x)                (((x)&0x3)<<0x8)
101
#define MCF_ADC_ADZCC_ZCE5(x)                (((x)&0x3)<<0xA)
102
#define MCF_ADC_ADZCC_ZCE6(x)                (((x)&0x3)<<0xC)
103
#define MCF_ADC_ADZCC_ZCE7(x)                (((x)&0x3)<<0xE)
104
 
105
/* Bit definitions and macros for MCF_ADC_ADLST1 */
106
#define MCF_ADC_ADLST1_SAMPLE0(x)            (((x)&0x7)<<0)
107
#define MCF_ADC_ADLST1_SAMPLE1(x)            (((x)&0x7)<<0x4)
108
#define MCF_ADC_ADLST1_SAMPLE2(x)            (((x)&0x7)<<0x8)
109
#define MCF_ADC_ADLST1_SAMPLE3(x)            (((x)&0x7)<<0xC)
110
 
111
/* Bit definitions and macros for MCF_ADC_ADLST2 */
112
#define MCF_ADC_ADLST2_SAMPLE4(x)            (((x)&0x7)<<0)
113
#define MCF_ADC_ADLST2_SAMPLE5(x)            (((x)&0x7)<<0x4)
114
#define MCF_ADC_ADLST2_SAMPLE6(x)            (((x)&0x7)<<0x8)
115
#define MCF_ADC_ADLST2_SAMPLE7(x)            (((x)&0x7)<<0xC)
116
 
117
/* Bit definitions and macros for MCF_ADC_ADSDIS */
118
#define MCF_ADC_ADSDIS_DS0                   (0x1)
119
#define MCF_ADC_ADSDIS_DS1                   (0x2)
120
#define MCF_ADC_ADSDIS_DS2                   (0x4)
121
#define MCF_ADC_ADSDIS_DS3                   (0x8)
122
#define MCF_ADC_ADSDIS_DS4                   (0x10)
123
#define MCF_ADC_ADSDIS_DS5                   (0x20)
124
#define MCF_ADC_ADSDIS_DS6                   (0x40)
125
#define MCF_ADC_ADSDIS_DS7                   (0x80)
126
 
127
/* Bit definitions and macros for MCF_ADC_ADSTAT */
128
#define MCF_ADC_ADSTAT_RDY0                  (0x1)
129
#define MCF_ADC_ADSTAT_RDY1                  (0x2)
130
#define MCF_ADC_ADSTAT_RDY2                  (0x4)
131
#define MCF_ADC_ADSTAT_RDY3                  (0x8)
132
#define MCF_ADC_ADSTAT_RDY4                  (0x10)
133
#define MCF_ADC_ADSTAT_RDY5                  (0x20)
134
#define MCF_ADC_ADSTAT_RDY6                  (0x40)
135
#define MCF_ADC_ADSTAT_RDY7                  (0x80)
136
#define MCF_ADC_ADSTAT_HLMTI                 (0x100)
137
#define MCF_ADC_ADSTAT_LLMTI                 (0x200)
138
#define MCF_ADC_ADSTAT_ZCI                   (0x400)
139
#define MCF_ADC_ADSTAT_EOSI0                 (0x800)
140
#define MCF_ADC_ADSTAT_EOSI1                 (0x1000)
141
#define MCF_ADC_ADSTAT_CIP1                  (0x4000)
142
#define MCF_ADC_ADSTAT_CIP0                  (0x8000)
143
 
144
/* Bit definitions and macros for MCF_ADC_ADLSTAT */
145
#define MCF_ADC_ADLSTAT_LLS0                 (0x1)
146
#define MCF_ADC_ADLSTAT_LLS1                 (0x2)
147
#define MCF_ADC_ADLSTAT_LLS2                 (0x4)
148
#define MCF_ADC_ADLSTAT_LLS3                 (0x8)
149
#define MCF_ADC_ADLSTAT_LLS4                 (0x10)
150
#define MCF_ADC_ADLSTAT_LLS5                 (0x20)
151
#define MCF_ADC_ADLSTAT_LLS6                 (0x40)
152
#define MCF_ADC_ADLSTAT_LLS7                 (0x80)
153
#define MCF_ADC_ADLSTAT_HLS0                 (0x100)
154
#define MCF_ADC_ADLSTAT_HLS1                 (0x200)
155
#define MCF_ADC_ADLSTAT_HLS2                 (0x400)
156
#define MCF_ADC_ADLSTAT_HLS3                 (0x800)
157
#define MCF_ADC_ADLSTAT_HLS4                 (0x1000)
158
#define MCF_ADC_ADLSTAT_HLS5                 (0x2000)
159
#define MCF_ADC_ADLSTAT_HLS6                 (0x4000)
160
#define MCF_ADC_ADLSTAT_HLS7                 (0x8000)
161
 
162
/* Bit definitions and macros for MCF_ADC_ADZCSTAT */
163
#define MCF_ADC_ADZCSTAT_ZCS0                (0x1)
164
#define MCF_ADC_ADZCSTAT_ZCS1                (0x2)
165
#define MCF_ADC_ADZCSTAT_ZCS2                (0x4)
166
#define MCF_ADC_ADZCSTAT_ZCS3                (0x8)
167
#define MCF_ADC_ADZCSTAT_ZCS4                (0x10)
168
#define MCF_ADC_ADZCSTAT_ZCS5                (0x20)
169
#define MCF_ADC_ADZCSTAT_ZCS6                (0x40)
170
#define MCF_ADC_ADZCSTAT_ZCS7                (0x80)
171
 
172
/* Bit definitions and macros for MCF_ADC_ADRSLT */
173
#define MCF_ADC_ADRSLT_RSLT(x)               (((x)&0xFFF)<<0x3)
174
#define MCF_ADC_ADRSLT_SEXT                  (0x8000)
175
 
176
/* Bit definitions and macros for MCF_ADC_ADLLMT */
177
#define MCF_ADC_ADLLMT_LLMT(x)               (((x)&0xFFF)<<0x3)
178
 
179
/* Bit definitions and macros for MCF_ADC_ADHLMT */
180
#define MCF_ADC_ADHLMT_HLMT(x)               (((x)&0xFFF)<<0x3)
181
 
182
/* Bit definitions and macros for MCF_ADC_ADOFS */
183
#define MCF_ADC_ADOFS_OFFSET(x)              (((x)&0xFFF)<<0x3)
184
 
185
/* Bit definitions and macros for MCF_ADC_POWER */
186
#define MCF_ADC_POWER_PD0                    (0x1)
187
#define MCF_ADC_POWER_PD1                    (0x2)
188
#define MCF_ADC_POWER_PD2                    (0x4)
189
#define MCF_ADC_POWER_APD                    (0x8)
190
#define MCF_ADC_POWER_PUDELAY(x)             (((x)&0x3F)<<0x4)
191
#define MCF_ADC_POWER_PSTS0                  (0x400)
192
#define MCF_ADC_POWER_PSTS1                  (0x800)
193
#define MCF_ADC_POWER_PSTS2                  (0x1000)
194
#define MCF_ADC_POWER_ASB                    (0x8000)
195
 
196
/* Bit definitions and macros for MCF_ADC_CAL */
197
#define MCF_ADC_CAL_SEL_VREFL                (0x4000)
198
#define MCF_ADC_CAL_SEL_VREFH                (0x8000)
199
 
200
 
201
#endif /* __MCF52259_ADC_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.