struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18fam.h
blobcb6d9c3981b97c6faea7a90d8081475664835048
1 /*
2 * pic18fam.h - PIC16 families
4 * This file is has been generated using ./pic18fam-h-gen.pl .
5 */
6 #ifndef __SDCC_PIC18FAM_H__
7 #define __SDCC_PIC18FAM_H__ 1
9 /*
10 * Define device families.
12 #undef __SDCC_PIC16_FAMILY
14 #if defined(__SDCC_PIC18F242) \
15 || defined(__SDCC_PIC18F252) \
16 || defined(__SDCC_PIC18F442) \
17 || defined(__SDCC_PIC18F452) \
18 || defined(__SDCC_PIC18LF242) \
19 || defined(__SDCC_PIC18LF252) \
20 || defined(__SDCC_PIC18LF442) \
21 || defined(__SDCC_PIC18LF452)
22 #define __SDCC_PIC16_FAMILY 1802420
24 #elif defined(__SDCC_PIC18F248) \
25 || defined(__SDCC_PIC18F258) \
26 || defined(__SDCC_PIC18F448) \
27 || defined(__SDCC_PIC18F458) \
28 || defined(__SDCC_PIC18LF248) \
29 || defined(__SDCC_PIC18LF258) \
30 || defined(__SDCC_PIC18LF448) \
31 || defined(__SDCC_PIC18LF458)
32 #define __SDCC_PIC16_FAMILY 1802480
34 #elif defined(__SDCC_PIC18F1220) \
35 || defined(__SDCC_PIC18F1320) \
36 || defined(__SDCC_PIC18LF1220) \
37 || defined(__SDCC_PIC18LF1320)
38 #define __SDCC_PIC16_FAMILY 1812200
40 #elif defined(__SDCC_PIC18F1230) \
41 || defined(__SDCC_PIC18F1330) \
42 || defined(__SDCC_PIC18LF1230) \
43 || defined(__SDCC_PIC18LF1330)
44 #define __SDCC_PIC16_FAMILY 1812300
46 #elif defined(__SDCC_PIC18F13K50) \
47 || defined(__SDCC_PIC18F14K50) \
48 || defined(__SDCC_PIC18LF13K50) \
49 || defined(__SDCC_PIC18LF14K50)
50 #define __SDCC_PIC16_FAMILY 1813502
52 #elif defined(__SDCC_PIC18F2220) \
53 || defined(__SDCC_PIC18F2320) \
54 || defined(__SDCC_PIC18F4220) \
55 || defined(__SDCC_PIC18F4320) \
56 || defined(__SDCC_PIC18LF2220) \
57 || defined(__SDCC_PIC18LF2320) \
58 || defined(__SDCC_PIC18LF4220) \
59 || defined(__SDCC_PIC18LF4320)
60 #define __SDCC_PIC16_FAMILY 1822200
62 #elif defined(__SDCC_PIC18F2221) \
63 || defined(__SDCC_PIC18F2321) \
64 || defined(__SDCC_PIC18F4221) \
65 || defined(__SDCC_PIC18F4321) \
66 || defined(__SDCC_PIC18LF2221) \
67 || defined(__SDCC_PIC18LF2321) \
68 || defined(__SDCC_PIC18LF4221) \
69 || defined(__SDCC_PIC18LF4321)
70 #define __SDCC_PIC16_FAMILY 1822210
72 #elif defined(__SDCC_PIC18F23K20) \
73 || defined(__SDCC_PIC18F24K20) \
74 || defined(__SDCC_PIC18F25K20) \
75 || defined(__SDCC_PIC18F26K20) \
76 || defined(__SDCC_PIC18F43K20) \
77 || defined(__SDCC_PIC18F44K20) \
78 || defined(__SDCC_PIC18F45K20) \
79 || defined(__SDCC_PIC18F46K20)
80 #define __SDCC_PIC16_FAMILY 1823202
82 #elif defined(__SDCC_PIC18F23K22) \
83 || defined(__SDCC_PIC18F24K22) \
84 || defined(__SDCC_PIC18F25K22) \
85 || defined(__SDCC_PIC18F26K22) \
86 || defined(__SDCC_PIC18F43K22) \
87 || defined(__SDCC_PIC18F44K22) \
88 || defined(__SDCC_PIC18F45K22) \
89 || defined(__SDCC_PIC18F46K22) \
90 || defined(__SDCC_PIC18LF23K22) \
91 || defined(__SDCC_PIC18LF24K22) \
92 || defined(__SDCC_PIC18LF25K22) \
93 || defined(__SDCC_PIC18LF26K22) \
94 || defined(__SDCC_PIC18LF43K22) \
95 || defined(__SDCC_PIC18LF44K22) \
96 || defined(__SDCC_PIC18LF45K22) \
97 || defined(__SDCC_PIC18LF46K22)
98 #define __SDCC_PIC16_FAMILY 1823222
100 #elif defined(__SDCC_PIC18F2331) \
101 || defined(__SDCC_PIC18F2431) \
102 || defined(__SDCC_PIC18F4331) \
103 || defined(__SDCC_PIC18F4431) \
104 || defined(__SDCC_PIC18LF2331) \
105 || defined(__SDCC_PIC18LF2431) \
106 || defined(__SDCC_PIC18LF4331) \
107 || defined(__SDCC_PIC18LF4431)
108 #define __SDCC_PIC16_FAMILY 1823310
110 #elif defined(__SDCC_PIC18F2410) \
111 || defined(__SDCC_PIC18F2510) \
112 || defined(__SDCC_PIC18F2515) \
113 || defined(__SDCC_PIC18F2610) \
114 || defined(__SDCC_PIC18F4410) \
115 || defined(__SDCC_PIC18F4510) \
116 || defined(__SDCC_PIC18F4515) \
117 || defined(__SDCC_PIC18F4610) \
118 || defined(__SDCC_PIC18LF2410) \
119 || defined(__SDCC_PIC18LF2510) \
120 || defined(__SDCC_PIC18LF2515) \
121 || defined(__SDCC_PIC18LF2610) \
122 || defined(__SDCC_PIC18LF4410) \
123 || defined(__SDCC_PIC18LF4510) \
124 || defined(__SDCC_PIC18LF4515) \
125 || defined(__SDCC_PIC18LF4610)
126 #define __SDCC_PIC16_FAMILY 1824100
128 #elif defined(__SDCC_PIC18F24J10) \
129 || defined(__SDCC_PIC18F25J10) \
130 || defined(__SDCC_PIC18F44J10) \
131 || defined(__SDCC_PIC18F45J10) \
132 || defined(__SDCC_PIC18LF24J10) \
133 || defined(__SDCC_PIC18LF25J10) \
134 || defined(__SDCC_PIC18LF44J10) \
135 || defined(__SDCC_PIC18LF45J10)
136 #define __SDCC_PIC16_FAMILY 1824101
138 #elif defined(__SDCC_PIC18F2420) \
139 || defined(__SDCC_PIC18F2520) \
140 || defined(__SDCC_PIC18F4420) \
141 || defined(__SDCC_PIC18F4520) \
142 || defined(__SDCC_PIC18LF2420) \
143 || defined(__SDCC_PIC18LF2520) \
144 || defined(__SDCC_PIC18LF4420) \
145 || defined(__SDCC_PIC18LF4520)
146 #define __SDCC_PIC16_FAMILY 1824200
148 #elif defined(__SDCC_PIC18F2423) \
149 || defined(__SDCC_PIC18F2523) \
150 || defined(__SDCC_PIC18F4423) \
151 || defined(__SDCC_PIC18F4523) \
152 || defined(__SDCC_PIC18LF2423) \
153 || defined(__SDCC_PIC18LF2523) \
154 || defined(__SDCC_PIC18LF4423) \
155 || defined(__SDCC_PIC18LF4523)
156 #define __SDCC_PIC16_FAMILY 1824230
158 #elif defined(__SDCC_PIC18F2450) \
159 || defined(__SDCC_PIC18F4450) \
160 || defined(__SDCC_PIC18LF2450) \
161 || defined(__SDCC_PIC18LF4450)
162 #define __SDCC_PIC16_FAMILY 1824500
164 #elif defined(__SDCC_PIC18F24J50) \
165 || defined(__SDCC_PIC18F25J50) \
166 || defined(__SDCC_PIC18F26J50) \
167 || defined(__SDCC_PIC18F44J50) \
168 || defined(__SDCC_PIC18F45J50) \
169 || defined(__SDCC_PIC18F46J50) \
170 || defined(__SDCC_PIC18LF24J50) \
171 || defined(__SDCC_PIC18LF25J50) \
172 || defined(__SDCC_PIC18LF26J50) \
173 || defined(__SDCC_PIC18LF44J50) \
174 || defined(__SDCC_PIC18LF45J50) \
175 || defined(__SDCC_PIC18LF46J50)
176 #define __SDCC_PIC16_FAMILY 1824501
178 #elif defined(__SDCC_PIC18F2455) \
179 || defined(__SDCC_PIC18F2458) \
180 || defined(__SDCC_PIC18F2550) \
181 || defined(__SDCC_PIC18F2553) \
182 || defined(__SDCC_PIC18F4455) \
183 || defined(__SDCC_PIC18F4458) \
184 || defined(__SDCC_PIC18F4550) \
185 || defined(__SDCC_PIC18F4553) \
186 || defined(__SDCC_PIC18LF2455) \
187 || defined(__SDCC_PIC18LF2458) \
188 || defined(__SDCC_PIC18LF2550) \
189 || defined(__SDCC_PIC18LF2553) \
190 || defined(__SDCC_PIC18LF4455) \
191 || defined(__SDCC_PIC18LF4458) \
192 || defined(__SDCC_PIC18LF4550) \
193 || defined(__SDCC_PIC18LF4553)
194 #define __SDCC_PIC16_FAMILY 1824550
196 #elif defined(__SDCC_PIC18F2480) \
197 || defined(__SDCC_PIC18F2580) \
198 || defined(__SDCC_PIC18F4480) \
199 || defined(__SDCC_PIC18F4580) \
200 || defined(__SDCC_PIC18LF2480) \
201 || defined(__SDCC_PIC18LF2580) \
202 || defined(__SDCC_PIC18LF4480) \
203 || defined(__SDCC_PIC18LF4580)
204 #define __SDCC_PIC16_FAMILY 1824800
206 #elif defined(__SDCC_PIC18F2525) \
207 || defined(__SDCC_PIC18F2620) \
208 || defined(__SDCC_PIC18F4525) \
209 || defined(__SDCC_PIC18F4620) \
210 || defined(__SDCC_PIC18LF2525) \
211 || defined(__SDCC_PIC18LF2620) \
212 || defined(__SDCC_PIC18LF4525) \
213 || defined(__SDCC_PIC18LF4620)
214 #define __SDCC_PIC16_FAMILY 1825250
216 #elif defined(__SDCC_PIC18F2585) \
217 || defined(__SDCC_PIC18F2680) \
218 || defined(__SDCC_PIC18F4585) \
219 || defined(__SDCC_PIC18F4680) \
220 || defined(__SDCC_PIC18LF2585) \
221 || defined(__SDCC_PIC18LF2680) \
222 || defined(__SDCC_PIC18LF4585) \
223 || defined(__SDCC_PIC18LF4680)
224 #define __SDCC_PIC16_FAMILY 1825850
226 #elif defined(__SDCC_PIC18F2682) \
227 || defined(__SDCC_PIC18F2685) \
228 || defined(__SDCC_PIC18F4682) \
229 || defined(__SDCC_PIC18F4685) \
230 || defined(__SDCC_PIC18LF2682) \
231 || defined(__SDCC_PIC18LF2685) \
232 || defined(__SDCC_PIC18LF4682) \
233 || defined(__SDCC_PIC18LF4685)
234 #define __SDCC_PIC16_FAMILY 1826820
236 #elif defined(__SDCC_PIC18F6520) \
237 || defined(__SDCC_PIC18F6620) \
238 || defined(__SDCC_PIC18F6720) \
239 || defined(__SDCC_PIC18F8520) \
240 || defined(__SDCC_PIC18F8620) \
241 || defined(__SDCC_PIC18F8720) \
242 || defined(__SDCC_PIC18LF6520) \
243 || defined(__SDCC_PIC18LF6620) \
244 || defined(__SDCC_PIC18LF6720) \
245 || defined(__SDCC_PIC18LF8520) \
246 || defined(__SDCC_PIC18LF8620) \
247 || defined(__SDCC_PIC18LF8720)
248 #define __SDCC_PIC16_FAMILY 1865200
250 #elif defined(__SDCC_PIC18F6527) \
251 || defined(__SDCC_PIC18F6622) \
252 || defined(__SDCC_PIC18F6627) \
253 || defined(__SDCC_PIC18F6722) \
254 || defined(__SDCC_PIC18F8527) \
255 || defined(__SDCC_PIC18F8622) \
256 || defined(__SDCC_PIC18F8627) \
257 || defined(__SDCC_PIC18F8722) \
258 || defined(__SDCC_PIC18LF6527) \
259 || defined(__SDCC_PIC18LF6622) \
260 || defined(__SDCC_PIC18LF6627) \
261 || defined(__SDCC_PIC18LF6722) \
262 || defined(__SDCC_PIC18LF8527) \
263 || defined(__SDCC_PIC18LF8622) \
264 || defined(__SDCC_PIC18LF8627) \
265 || defined(__SDCC_PIC18LF8722)
266 #define __SDCC_PIC16_FAMILY 1865270
268 #elif defined(__SDCC_PIC18F65J50) \
269 || defined(__SDCC_PIC18F66J50) \
270 || defined(__SDCC_PIC18F66J55) \
271 || defined(__SDCC_PIC18F67J50) \
272 || defined(__SDCC_PIC18F85J50) \
273 || defined(__SDCC_PIC18F86J50) \
274 || defined(__SDCC_PIC18F86J55) \
275 || defined(__SDCC_PIC18F87J50)
276 #define __SDCC_PIC16_FAMILY 1865501
278 #elif defined(__SDCC_PIC18F6585) \
279 || defined(__SDCC_PIC18F6680) \
280 || defined(__SDCC_PIC18F8585) \
281 || defined(__SDCC_PIC18F8680) \
282 || defined(__SDCC_PIC18LF6585) \
283 || defined(__SDCC_PIC18LF6680) \
284 || defined(__SDCC_PIC18LF8585) \
285 || defined(__SDCC_PIC18LF8680)
286 #define __SDCC_PIC16_FAMILY 1865850
288 #elif defined(__SDCC_PIC18F66J60) \
289 || defined(__SDCC_PIC18F66J65) \
290 || defined(__SDCC_PIC18F67J60) \
291 || defined(__SDCC_PIC18F86J60) \
292 || defined(__SDCC_PIC18F86J65) \
293 || defined(__SDCC_PIC18F87J60) \
294 || defined(__SDCC_PIC18F96J60) \
295 || defined(__SDCC_PIC18F96J65) \
296 || defined(__SDCC_PIC18F97J60)
297 #define __SDCC_PIC16_FAMILY 1866601
299 #else
300 #warning No family associated with the target device. Please update your pic16/pic18fam.h manually and/or inform the maintainer.
301 #endif
304 * Define ADC style per device family.
306 #undef __SDCC_ADC_STYLE
308 #if (__SDCC_PIC16_FAMILY == 1823310)
309 #define __SDCC_ADC_STYLE 0
311 #elif (__SDCC_PIC16_FAMILY == 1802420) \
312 || (__SDCC_PIC16_FAMILY == 1802480)
313 #define __SDCC_ADC_STYLE 1802420
315 #elif (__SDCC_PIC16_FAMILY == 1812200)
316 #define __SDCC_ADC_STYLE 1812200
318 #elif (__SDCC_PIC16_FAMILY == 1812300)
319 #define __SDCC_ADC_STYLE 1812300
321 #elif (__SDCC_PIC16_FAMILY == 1813502)
322 #define __SDCC_ADC_STYLE 1813502
324 #elif (__SDCC_PIC16_FAMILY == 1822200) \
325 || (__SDCC_PIC16_FAMILY == 1822210) \
326 || (__SDCC_PIC16_FAMILY == 1823202) \
327 || (__SDCC_PIC16_FAMILY == 1824100) \
328 || (__SDCC_PIC16_FAMILY == 1824101) \
329 || (__SDCC_PIC16_FAMILY == 1824200) \
330 || (__SDCC_PIC16_FAMILY == 1824230) \
331 || (__SDCC_PIC16_FAMILY == 1824500) \
332 || (__SDCC_PIC16_FAMILY == 1824550) \
333 || (__SDCC_PIC16_FAMILY == 1824800) \
334 || (__SDCC_PIC16_FAMILY == 1825250) \
335 || (__SDCC_PIC16_FAMILY == 1825850) \
336 || (__SDCC_PIC16_FAMILY == 1826820) \
337 || (__SDCC_PIC16_FAMILY == 1865200) \
338 || (__SDCC_PIC16_FAMILY == 1865270) \
339 || (__SDCC_PIC16_FAMILY == 1865850) \
340 || (__SDCC_PIC16_FAMILY == 1866601)
341 #define __SDCC_ADC_STYLE 1822200
343 #elif (__SDCC_PIC16_FAMILY == 1823222)
344 #define __SDCC_ADC_STYLE 1823222
346 #elif (__SDCC_PIC16_FAMILY == 1824501)
347 #define __SDCC_ADC_STYLE 1824501
349 #elif (__SDCC_PIC16_FAMILY == 1865501)
350 #define __SDCC_ADC_STYLE 1865501
352 #else
353 #warning No ADC style associated with the target device. Please update your pic16/pic18fam.h manually and/or inform the maintainer.
354 #endif
357 * Define (E)USART style per device family.
359 #undef __SDCC_USART_STYLE
361 #if (__SDCC_PIC16_FAMILY == 1812200)
362 #define __SDCC_USART_STYLE 1812200
364 #elif (__SDCC_PIC16_FAMILY == 1812300)
365 #define __SDCC_USART_STYLE 1812300
367 #elif (__SDCC_PIC16_FAMILY == 1813502)
368 #define __SDCC_USART_STYLE 1813502
370 #elif (__SDCC_PIC16_FAMILY == 1802420) \
371 || (__SDCC_PIC16_FAMILY == 1802480) \
372 || (__SDCC_PIC16_FAMILY == 1822200)
373 #define __SDCC_USART_STYLE 1822200
375 #elif (__SDCC_PIC16_FAMILY == 1822210) \
376 || (__SDCC_PIC16_FAMILY == 1823202) \
377 || (__SDCC_PIC16_FAMILY == 1823222) \
378 || (__SDCC_PIC16_FAMILY == 1823310) \
379 || (__SDCC_PIC16_FAMILY == 1824100) \
380 || (__SDCC_PIC16_FAMILY == 1824101) \
381 || (__SDCC_PIC16_FAMILY == 1824200) \
382 || (__SDCC_PIC16_FAMILY == 1824230) \
383 || (__SDCC_PIC16_FAMILY == 1824550) \
384 || (__SDCC_PIC16_FAMILY == 1825250)
385 #define __SDCC_USART_STYLE 1822210
387 #elif (__SDCC_PIC16_FAMILY == 1824500) \
388 || (__SDCC_PIC16_FAMILY == 1824800) \
389 || (__SDCC_PIC16_FAMILY == 1825850) \
390 || (__SDCC_PIC16_FAMILY == 1826820)
391 #define __SDCC_USART_STYLE 1824500
393 #elif (__SDCC_PIC16_FAMILY == 1824501) \
394 || (__SDCC_PIC16_FAMILY == 1865270) \
395 || (__SDCC_PIC16_FAMILY == 1865501) \
396 || (__SDCC_PIC16_FAMILY == 1866601)
397 #define __SDCC_USART_STYLE 1824501
399 #elif (__SDCC_PIC16_FAMILY == 1865200)
400 #define __SDCC_USART_STYLE 1865200
402 #elif (__SDCC_PIC16_FAMILY == 1865850)
403 #define __SDCC_USART_STYLE 1865850
405 #else
406 #warning No (E)USART style associated with the target device. Please update your pic16/pic18fam.h manually and/or inform the maintainer.
407 #endif
409 #endif /* !__SDCC_PIC18FAM_H__ */