source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/hardware/tools/avr/avr/include/avr/iom32hvb.h @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 21.8 KB
Line 
1/* Copyright (c) 2011 Atmel Corporation
2   All rights reserved.
3
4   Redistribution and use in source and binary forms, with or without
5   modification, are permitted provided that the following conditions are met:
6
7   * Redistributions of source code must retain the above copyright
8     notice, this list of conditions and the following disclaimer.
9
10   * Redistributions in binary form must reproduce the above copyright
11     notice, this list of conditions and the following disclaimer in
12     the documentation and/or other materials provided with the
13     distribution.
14
15   * Neither the name of the copyright holders nor the names of
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  POSSIBILITY OF SUCH DAMAGE. */
30
31/* $Id: iom32hvb.h 2211 2011-02-14 14:04:25Z aboyapati $ */
32
33/* avr/iom32hvb.h - definitions for ATmega32HVB */
34
35/* This file should only be included from <avr/io.h>, never directly. */
36
37#ifndef _AVR_IO_H_
38#  error "Include <avr/io.h> instead of this file."
39#endif
40
41#ifndef _AVR_IOXXX_H_
42#  define _AVR_IOXXX_H_ "iom32hvb.h"
43#else
44#  error "Attempt to include more than one <avr/ioXXX.h> file."
45#endif
46
47
48#ifndef _AVR_ATmega32HVB_H_
49#define _AVR_ATmega32HVB_H_ 1
50
51
52/* Registers and associated bit numbers. */
53
54#define PINA _SFR_IO8(0x00)
55#define PINA0 0
56#define PINA1 1
57#define PINA2 2
58#define PINA3 3
59
60#define DDRA _SFR_IO8(0x01)
61#define DDA0 0
62#define DDA1 1
63#define DDA2 2
64#define DDA3 3
65
66#define PORTA _SFR_IO8(0x02)
67#define PORTA0 0
68#define PORTA1 1
69#define PORTA2 2
70#define PORTA3 3
71
72#define PINB _SFR_IO8(0x03)
73#define PINB0 0
74#define PINB1 1
75#define PINB2 2
76#define PINB3 3
77#define PINB4 4
78#define PINB5 5
79#define PINB6 6
80#define PINB7 7
81
82#define DDRB _SFR_IO8(0x04)
83#define DDB0 0
84#define DDB1 1
85#define DDB2 2
86#define DDB3 3
87#define DDB4 4
88#define DDB5 5
89#define DDB6 6
90#define DDB7 7
91
92#define PORTB _SFR_IO8(0x05)
93#define PORTB0 0
94#define PORTB1 1
95#define PORTB2 2
96#define PORTB3 3
97#define PORTB4 4
98#define PORTB5 5
99#define PORTB6 6
100#define PORTB7 7
101
102#define PINC _SFR_IO8(0x06)
103#define PINC0 0
104#define PINC1 1
105#define PINC2 2
106#define PINC3 3
107#define PINC4 4
108
109#define PORTC _SFR_IO8(0x08)
110#define PORTC0 0
111#define PORTC1 1
112#define PORTC2 2
113#define PORTC3 3
114#define PORTC4 4
115#define PORTC5 5
116
117#define TIFR0 _SFR_IO8(0x15)
118#define TOV0 0
119#define OCF0A 1
120#define OCF0B 2
121#define ICF0 3
122
123#define TIFR1 _SFR_IO8(0x16)
124#define TOV1 0
125#define OCF1A 1
126#define OCF1B 2
127#define ICF1 3
128
129#define OSICSR _SFR_IO8(0x17)
130#define OSIEN 0
131#define OSIST 1
132#define OSISEL0 4
133
134#define PCIFR _SFR_IO8(0x1B)
135#define PCIF0 0
136#define PCIF1 1
137
138#define EIFR _SFR_IO8(0x1C)
139#define INTF0 0
140#define INTF1 1
141#define INTF2 2
142#define INTF3 3
143
144#define EIMSK _SFR_IO8(0x1D)
145#define INT0 0
146#define INT1 1
147#define INT2 2
148#define INT3 3
149
150#define GPIOR0 _SFR_IO8(0x1E)
151#define GPIOR00 0
152#define GPIOR01 1
153#define GPIOR02 2
154#define GPIOR03 3
155#define GPIOR04 4
156#define GPIOR05 5
157#define GPIOR06 6
158#define GPIOR07 7
159
160#define EECR _SFR_IO8(0x1F)
161#define EERE 0
162#define EEPE 1
163#define EEMPE 2
164#define EERIE 3
165#define EEPM0 4
166#define EEPM1 5
167
168#define EEDR _SFR_IO8(0x20)
169#define EEDR0 0
170#define EEDR1 1
171#define EEDR2 2
172#define EEDR3 3
173#define EEDR4 4
174#define EEDR5 5
175#define EEDR6 6
176#define EEDR7 7
177
178#define EEAR _SFR_IO16(0x21)
179
180#define EEARL _SFR_IO8(0x21)
181#define EEAR0 0
182#define EEAR1 1
183#define EEAR2 2
184#define EEAR3 3
185#define EEAR4 4
186#define EEAR5 5
187#define EEAR6 6
188#define EEAR7 7
189
190#define EEARH _SFR_IO8(0x22)
191#define EEAR8 0
192#define EEAR9 1
193
194#define GTCCR _SFR_IO8(0x23)
195#define PSRSYNC 0
196#define TSM 7
197
198#define TCCR0A _SFR_IO8(0x24)
199#define WGM00 0
200#define ICS0 3
201#define ICES0 4
202#define ICNC0 5
203#define ICEN0 6
204#define TCW0 7
205
206#define TCCR0B _SFR_IO8(0x25)
207#define CS00 0
208#define CS01 1
209#define CS02 2
210
211#define TCNT0 _SFR_IO16(0x26)
212
213#define TCNT0L _SFR_IO8(0x26)
214#define TCNT0L0 0
215#define TCNT0L1 1
216#define TCNT0L2 2
217#define TCNT0L3 3
218#define TCNT0L4 4
219#define TCNT0L5 5
220#define TCNT0L6 6
221#define TCNT0L7 7
222
223#define TCNT0H _SFR_IO8(0x27)
224#define TCNT0H0 0
225#define TCNT0H1 1
226#define TCNT0H2 2
227#define TCNT0H3 3
228#define TCNT0H4 4
229#define TCNT0H5 5
230#define TCNT0H6 6
231#define TCNT0H7 7
232
233#define OCR0A _SFR_IO8(0x28)
234#define OCR0A0 0
235#define OCR0A1 1
236#define OCR0A2 2
237#define OCR0A3 3
238#define OCR0A4 4
239#define OCR0A5 5
240#define OCR0A6 6
241#define OCR0A7 7
242
243#define OCR0B _SFR_IO8(0x29)
244#define OCR0B0 0
245#define OCR0B1 1
246#define OCR0B2 2
247#define OCR0B3 3
248#define OCR0B4 4
249#define OCR0B5 5
250#define OCR0B6 6
251#define OCR0B7 7
252
253#define GPIOR1 _SFR_IO8(0x2A)
254#define GPIOR10 0
255#define GPIOR11 1
256#define GPIOR12 2
257#define GPIOR13 3
258#define GPIOR14 4
259#define GPIOR15 5
260#define GPIOR16 6
261#define GPIOR17 7
262
263#define GPIOR2 _SFR_IO8(0x2B)
264#define GPIOR20 0
265#define GPIOR21 1
266#define GPIOR22 2
267#define GPIOR23 3
268#define GPIOR24 4
269#define GPIOR25 5
270#define GPIOR26 6
271#define GPIOR27 7
272
273#define SPCR _SFR_IO8(0x2C)
274#define SPR0 0
275#define SPR1 1
276#define CPHA 2
277#define CPOL 3
278#define MSTR 4
279#define DORD 5
280#define SPE 6
281#define SPIE 7
282
283#define SPSR _SFR_IO8(0x2D)
284#define SPI2X 0
285#define WCOL 6
286#define SPIF 7
287
288#define SPDR _SFR_IO8(0x2E)
289#define SPDR0 0
290#define SPDR1 1
291#define SPDR2 2
292#define SPDR3 3
293#define SPDR4 4
294#define SPDR5 5
295#define SPDR6 6
296#define SPDR7 7
297
298#define DWDR _SFR_IO8(0x31)
299
300#define SMCR _SFR_IO8(0x33)
301#define SE 0
302#define SM0 1
303#define SM1 2
304#define SM2 3
305
306#define MCUSR _SFR_IO8(0x34)
307#define PORF 0
308#define EXTRF 1
309#define BODRF 2
310#define WDRF 3
311#define OCDRF 4
312
313#define MCUCR _SFR_IO8(0x35)
314#define IVCE 0
315#define IVSEL 1
316#define PUD 4
317#define CKOE 5
318
319#define SPMCSR _SFR_IO8(0x37)
320#define SPMEN 0
321#define PGERS 1
322#define PGWRT 2
323#define LBSET 3
324#define RWWSRE 4
325#define SIGRD 5
326#define RWWSB 6
327#define SPMIE 7
328
329#define WDTCSR _SFR_MEM8(0x60)
330#define WDP0 0
331#define WDP1 1
332#define WDP2 2
333#define WDE 3
334#define WDCE 4
335#define WDP3 5
336#define WDIE 6
337#define WDIF 7
338
339#define CLKPR _SFR_MEM8(0x61)
340#define CLKPS0 0
341#define CLKPS1 1
342#define CLKPCE 7
343
344#define PRR0 _SFR_MEM8(0x64)
345#define PRVADC 0
346#define PRTIM0 1
347#define PRTIM1 2
348#define PRSPI 3
349#define PRVRM 5
350#define PRTWI 6
351
352#define FOSCCAL _SFR_MEM8(0x66)
353#define FCAL0 0
354#define FCAL1 1
355#define FCAL2 2
356#define FCAL3 3
357#define FCAL4 4
358#define FCAL5 5
359#define FCAL6 6
360#define FCAL7 7
361
362#define PCICR _SFR_MEM8(0x68)
363#define PCIE0 0
364#define PCIE1 1
365
366#define EICRA _SFR_MEM8(0x69)
367#define ISC00 0
368#define ISC01 1
369#define ISC10 2
370#define ISC11 3
371#define ISC20 4
372#define ISC21 5
373#define ISC30 6
374#define ISC31 7
375
376#define PCMSK0 _SFR_MEM8(0x6B)
377#define PCINT0 0
378#define PCINT1 1
379#define PCINT2 2
380#define PCINT3 3
381
382#define PCMSK1 _SFR_MEM8(0x6C)
383#define PCINT4 0
384#define PCINT5 1
385#define PCINT6 2
386#define PCINT7 3
387#define PCINT8 4
388#define PCINT9 5
389#define PCINT10 6
390#define PCINT11 7
391
392#define TIMSK0 _SFR_MEM8(0x6E)
393#define TOIE0 0
394#define OCIE0A 1
395#define OCIE0B 2
396#define ICIE0 3
397
398#define TIMSK1 _SFR_MEM8(0x6F)
399#define TOIE1 0
400#define OCIE1A 1
401#define OCIE1B 2
402#define ICIE1 3
403
404#define VADC _SFR_MEM16(0x78)
405
406#define VADCL _SFR_MEM8(0x78)
407#define VADC0 0
408#define VADC1 1
409#define VADC2 2
410#define VADC3 3
411#define VADC4 4
412#define VADC5 5
413#define VADC6 6
414#define VADC7 7
415
416#define VADCH _SFR_MEM8(0x79)
417#define VADC8 0
418#define VADC9 1
419#define VADC10 2
420#define VADC11 3
421
422#define VADCSR _SFR_MEM8(0x7A)
423#define VADCCIE 0
424#define VADCCIF 1
425#define VADSC 2
426#define VADEN 3
427
428#define VADMUX _SFR_MEM8(0x7C)
429#define VADMUX0 0
430#define VADMUX1 1
431#define VADMUX2 2
432#define VADMUX3 3
433
434#define DIDR0 _SFR_MEM8(0x7E)
435#define PA0DID 0
436#define PA1DID 1
437
438#define TCCR1A _SFR_MEM8(0x80)
439#define WGM10 0
440#define ICS1 3
441#define ICES1 4
442#define ICNC1 5
443#define ICEN1 6
444#define TCW1 7
445
446#define TCCR1B _SFR_MEM8(0x81)
447#define CS10 0
448#define CS11 1
449#define CS12 2
450
451#define TCNT1 _SFR_MEM16(0x84)
452
453#define TCNT1L _SFR_MEM8(0x84)
454#define TCNT1L0 0
455#define TCNT1L1 1
456#define TCNT1L2 2
457#define TCNT1L3 3
458#define TCNT1L4 4
459#define TCNT1L5 5
460#define TCNT1L6 6
461#define TCNT1L7 7
462
463#define TCNT1H _SFR_MEM8(0x85)
464#define TCNT1H0 0
465#define TCNT1H1 1
466#define TCNT1H2 2
467#define TCNT1H3 3
468#define TCNT1H4 4
469#define TCNT1H5 5
470#define TCNT1H6 6
471#define TCNT1H7 7
472
473#define OCR1A _SFR_MEM8(0x88)
474#define OCR1A0 0
475#define OCR1A1 1
476#define OCR1A2 2
477#define OCR1A3 3
478#define OCR1A4 4
479#define OCR1A5 5
480#define OCR1A6 6
481#define OCR1A7 7
482
483#define OCR1B _SFR_MEM8(0x89)
484#define OCR1B0 0
485#define OCR1B1 1
486#define OCR1B2 2
487#define OCR1B3 3
488#define OCR1B4 4
489#define OCR1B5 5
490#define OCR1B6 6
491#define OCR1B7 7
492
493#define TWBR _SFR_MEM8(0xB8)
494#define TWBR0 0
495#define TWBR1 1
496#define TWBR2 2
497#define TWBR3 3
498#define TWBR4 4
499#define TWBR5 5
500#define TWBR6 6
501#define TWBR7 7
502
503#define TWSR _SFR_MEM8(0xB9)
504#define TWPS0 0
505#define TWPS1 1
506#define TWS3 3
507#define TWS4 4
508#define TWS5 5
509#define TWS6 6
510#define TWS7 7
511
512#define TWAR _SFR_MEM8(0xBA)
513#define TWGCE 0
514#define TWA0 1
515#define TWA1 2
516#define TWA2 3
517#define TWA3 4
518#define TWA4 5
519#define TWA5 6
520#define TWA6 7
521
522#define TWDR _SFR_MEM8(0xBB)
523#define TWD0 0
524#define TWD1 1
525#define TWD2 2
526#define TWD3 3
527#define TWD4 4
528#define TWD5 5
529#define TWD6 6
530#define TWD7 7
531
532#define TWCR _SFR_MEM8(0xBC)
533#define TWIE 0
534#define TWEN 2
535#define TWWC 3
536#define TWSTO 4
537#define TWSTA 5
538#define TWEA 6
539#define TWINT 7
540
541#define TWAMR _SFR_MEM8(0xBD)
542#define TWAM0 1
543#define TWAM1 2
544#define TWAM2 3
545#define TWAM3 4
546#define TWAM4 5
547#define TWAM5 6
548#define TWAM6 7
549
550#define TWBCSR _SFR_MEM8(0xBE)
551#define TWBCIP 0
552#define TWBDT0 1
553#define TWBDT1 2
554#define TWBCIE 6
555#define TWBCIF 7
556
557#define ROCR _SFR_MEM8(0xC8)
558#define ROCWIE 0
559#define ROCWIF 1
560#define ROCD 4
561#define ROCS 7
562
563#define BGCCR _SFR_MEM8(0xD0)
564#define BGCC0 0
565#define BGCC1 1
566#define BGCC2 2
567#define BGCC3 3
568#define BGCC4 4
569#define BGCC5 5
570
571#define BGCRR _SFR_MEM8(0xD1)
572#define BGCR0 0
573#define BGCR1 1
574#define BGCR2 2
575#define BGCR3 3
576#define BGCR4 4
577#define BGCR5 5
578#define BGCR6 6
579#define BGCR7 7
580
581#define BGCSR _SFR_MEM8(0xD2)
582#define BGSCDIE 0
583#define BGSCDIF 1
584#define BGSCDE 4
585#define BGD 5
586
587#define CHGDCSR _SFR_MEM8(0xD4)
588#define CHGDIE 0
589#define CHGDIF 1
590#define CHGDISC0 2
591#define CHGDISC1 3
592#define BATTPVL 4
593
594#define CADAC0 _SFR_MEM8(0xE0)
595#define CADAC00 0
596#define CADAC01 1
597#define CADAC02 2
598#define CADAC03 3
599#define CADAC04 4
600#define CADAC05 5
601#define CADAC06 6
602#define CADAC07 7
603
604#define CADAC1 _SFR_MEM8(0xE1)
605#define CADAC08 0
606#define CADAC09 1
607#define CADAC10 2
608#define CADAC11 3
609#define CADAC12 4
610#define CADAC13 5
611#define CADAC14 6
612#define CADAC15 7
613
614#define CADAC2 _SFR_MEM8(0xE2)
615#define CADAC16 0
616#define CADAC17 1
617#define CADAC18 2
618#define CADAC19 3
619#define CADAC20 4
620#define CADAC21 5
621#define CADAC22 6
622#define CADAC23 7
623
624#define CADAC3 _SFR_MEM8(0xE3)
625#define CADAC24 0
626#define CADAC25 1
627#define CADAC26 2
628#define CADAC27 3
629#define CADAC28 4
630#define CADAC29 5
631#define CADAC30 6
632#define CADAC31 7
633
634#define CADIC _SFR_MEM16(0xE4)
635
636#define CADICL _SFR_MEM8(0xE4)
637#define CADICL0 0
638#define CADICL1 1
639#define CADICL2 2
640#define CADICL3 3
641#define CADICL4 4
642#define CADICL5 5
643#define CADICL6 6
644#define CADICL7 7
645
646#define CADICH _SFR_MEM8(0xE5)
647#define CADICH0 0
648#define CADICH1 1
649#define CADICH2 2
650#define CADICH3 3
651#define CADICH4 4
652#define CADICH5 5
653#define CADICH6 6
654#define CADICH7 7
655
656#define CADCSRA _SFR_MEM8(0xE6)
657#define CADSE 0
658#define CADSI0 1
659#define CADSI1 2
660#define CADAS0 3
661#define CADAS1 4
662#define CADUB 5
663#define CADPOL 6
664#define CADEN 7
665
666#define CADCSRB _SFR_MEM8(0xE7)
667#define CADICIF 0
668#define CADRCIF 1
669#define CADACIF 2
670#define CADICIE 4
671#define CADRCIE 5
672#define CADACIE 6
673
674#define CADCSRC _SFR_MEM8(0xE8)
675#define CADVSE 0
676
677#define CADRCC _SFR_MEM8(0xE9)
678#define CADRCC0 0
679#define CADRCC1 1
680#define CADRCC2 2
681#define CADRCC3 3
682#define CADRCC4 4
683#define CADRCC5 5
684#define CADRCC6 6
685#define CADRCC7 7
686
687#define CADRDC _SFR_MEM8(0xEA)
688#define CADRDC0 0
689#define CADRDC1 1
690#define CADRDC2 2
691#define CADRDC3 3
692#define CADRDC4 4
693#define CADRDC5 5
694#define CADRDC6 6
695#define CADRDC7 7
696
697#define FCSR _SFR_MEM8(0xF0)
698#define CFE 0
699#define DFE 1
700#define CPS 2
701#define DUVRD 3
702
703#define CBCR _SFR_MEM8(0xF1)
704#define CBE1 0
705#define CBE2 1
706#define CBE3 2
707#define CBE4 3
708
709#define BPIMSK _SFR_MEM8(0xF2)
710#define CHCIE 0
711#define DHCIE 1
712#define COCIE 2
713#define DOCIE 3
714#define SCIE 4
715
716#define BPIFR _SFR_MEM8(0xF3)
717#define CHCIF 0
718#define DHCIF 1
719#define COCIF 2
720#define DOCIF 3
721#define SCIF 4
722
723#define BPSCD _SFR_MEM8(0xF5)
724#define SCDL0 0
725#define SCDL1 1
726#define SCDL2 2
727#define SCDL3 3
728#define SCDL4 4
729#define SCDL5 5
730#define SCDL6 6
731#define SCDL7 7
732
733#define BPDOCD _SFR_MEM8(0xF6)
734#define DOCDL0 0
735#define DOCDL1 1
736#define DOCDL2 2
737#define DOCDL3 3
738#define DOCDL4 4
739#define DOCDL5 5
740#define DOCDL6 6
741#define DOCDL7 7
742
743#define BPCOCD _SFR_MEM8(0xF7)
744#define COCDL0 0
745#define COCDL1 1
746#define COCDL2 2
747#define COCDL3 3
748#define COCDL4 4
749#define COCDL5 5
750#define COCDL6 6
751#define COCDL7 7
752
753#define BPDHCD _SFR_MEM8(0xF8)
754#define DHCDL0 0
755#define DHCDL1 1
756#define DHCDL2 2
757#define DHCDL3 3
758#define DHCDL4 4
759#define DHCDL5 5
760#define DHCDL6 6
761#define DHCDL7 7
762
763#define BPCHCD _SFR_MEM8(0xF9)
764#define CHCDL0 0
765#define CHCDL1 1
766#define CHCDL2 2
767#define CHCDL3 3
768#define CHCDL4 4
769#define CHCDL5 5
770#define CHCDL6 6
771#define CHCDL7 7
772
773#define BPSCTR _SFR_MEM8(0xFA)
774#define SCPT0 0
775#define SCPT1 1
776#define SCPT2 2
777#define SCPT3 3
778#define SCPT4 4
779#define SCPT5 5
780#define SCPT6 6
781
782#define BPOCTR _SFR_MEM8(0xFB)
783#define OCPT0 0
784#define OCPT1 1
785#define OCPT2 2
786#define OCPT3 3
787#define OCPT4 4
788#define OCPT5 5
789
790#define BPHCTR _SFR_MEM8(0xFC)
791#define HCPT0 0
792#define HCPT1 1
793#define HCPT2 2
794#define HCPT3 3
795#define HCPT4 4
796#define HCPT5 5
797
798#define BPCR _SFR_MEM8(0xFD)
799#define CHCD 0
800#define DHCD 1
801#define COCD 2
802#define DOCD 3
803#define SCD 4
804#define EPID 5
805
806#define BPPLR _SFR_MEM8(0xFE)
807#define BPPL 0
808#define BPPLE 1
809
810
811/* Interrupt vectors */
812/* Vector 0 is the reset vector */
813#define BPINT_vect_num  1
814#define BPINT_vect      _VECTOR(1)  /* Battery Protection Interrupt */
815#define VREGMON_vect_num  2
816#define VREGMON_vect      _VECTOR(2)  /* Voltage regulator monitor interrupt */
817#define INT0_vect_num  3
818#define INT0_vect      _VECTOR(3)  /* External Interrupt Request 0 */
819#define INT1_vect_num  4
820#define INT1_vect      _VECTOR(4)  /* External Interrupt Request 1 */
821#define INT2_vect_num  5
822#define INT2_vect      _VECTOR(5)  /* External Interrupt Request 2 */
823#define INT3_vect_num  6
824#define INT3_vect      _VECTOR(6)  /* External Interrupt Request 3 */
825#define PCINT0_vect_num  7
826#define PCINT0_vect      _VECTOR(7)  /* Pin Change Interrupt 0 */
827#define PCINT1_vect_num  8
828#define PCINT1_vect      _VECTOR(8)  /* Pin Change Interrupt 1 */
829#define WDT_vect_num  9
830#define WDT_vect      _VECTOR(9)  /* Watchdog Timeout Interrupt */
831#define BGSCD_vect_num  10
832#define BGSCD_vect      _VECTOR(10)  /* Bandgap Buffer Short Circuit Detected */
833#define CHDET_vect_num  11
834#define CHDET_vect      _VECTOR(11)  /* Charger Detect */
835#define TIMER1_IC_vect_num  12
836#define TIMER1_IC_vect      _VECTOR(12)  /* Timer 1 Input capture */
837#define TIMER1_COMPA_vect_num  13
838#define TIMER1_COMPA_vect      _VECTOR(13)  /* Timer 1 Compare Match A */
839#define TIMER1_COMPB_vect_num  14
840#define TIMER1_COMPB_vect      _VECTOR(14)  /* Timer 1 Compare Match B */
841#define TIMER1_OVF_vect_num  15
842#define TIMER1_OVF_vect      _VECTOR(15)  /* Timer 1 overflow */
843#define TIMER0_IC_vect_num  16
844#define TIMER0_IC_vect      _VECTOR(16)  /* Timer 0 Input Capture */
845#define TIMER0_COMPA_vect_num  17
846#define TIMER0_COMPA_vect      _VECTOR(17)  /* Timer 0 Comapre Match A */
847#define TIMER0_COMPB_vect_num  18
848#define TIMER0_COMPB_vect      _VECTOR(18)  /* Timer 0 Compare Match B */
849#define TIMER0_OVF_vect_num  19
850#define TIMER0_OVF_vect      _VECTOR(19)  /* Timer 0 Overflow */
851#define TWIBUSCD_vect_num  20
852#define TWIBUSCD_vect      _VECTOR(20)  /* Two-Wire Bus Connect/Disconnect */
853#define TWI_vect_num  21
854#define TWI_vect      _VECTOR(21)  /* Two-Wire Serial Interface */
855#define SPI_STC_vect_num  22
856#define SPI_STC_vect      _VECTOR(22)  /* SPI Serial transfer complete */
857#define VADC_vect_num  23
858#define VADC_vect      _VECTOR(23)  /* Voltage ADC Conversion Complete */
859#define CCADC_CONV_vect_num  24
860#define CCADC_CONV_vect      _VECTOR(24)  /* Coulomb Counter ADC Conversion Complete */
861#define CCADC_REG_CUR_vect_num  25
862#define CCADC_REG_CUR_vect      _VECTOR(25)  /* Coloumb Counter ADC Regular Current */
863#define CCADC_ACC_vect_num  26
864#define CCADC_ACC_vect      _VECTOR(26)  /* Coloumb Counter ADC Accumulator */
865#define EE_READY_vect_num  27
866#define EE_READY_vect      _VECTOR(27)  /* EEPROM Ready */
867#define SPM_vect_num  28
868#define SPM_vect      _VECTOR(28)  /* SPM Ready */
869
870#define _VECTOR_SIZE 4 /* Size of individual vector. */
871#define _VECTORS_SIZE (29 * _VECTOR_SIZE)
872
873
874/* Constants */
875#define SPM_PAGESIZE (128)
876#define RAMSTART     (0x100)
877#define RAMSIZE      (2048)
878#define RAMEND       (RAMSTART + RAMSIZE - 1)
879#define XRAMSTART    (NA)
880#define XRAMSIZE     (NA)
881#define XRAMEND      (RAMEND)
882#define E2END        (0x3FF)
883#define E2PAGESIZE   (4)
884#define FLASHEND     (0x7FFF)
885
886
887/* Fuses */
888#define FUSE_MEMORY_SIZE 2
889
890/* Low Fuse Byte */
891#define FUSE_OSCSEL0  (unsigned char)~_BV(0)  /* Oscillator Select */
892#define FUSE_OSCSEL1  (unsigned char)~_BV(1)  /* Oscillator Select */
893#define FUSE_SUT0  (unsigned char)~_BV(2)  /* Select start-up time */
894#define FUSE_SUT1  (unsigned char)~_BV(3)  /* Select start-up time */
895#define FUSE_SUT2  (unsigned char)~_BV(4)  /* Select start-up time */
896#define FUSE_SPIEN  (unsigned char)~_BV(5)  /* Enable Serial programming and Data Downloading */
897#define FUSE_EESAVE  (unsigned char)~_BV(6)  /* EEPROM memory is preserved through chip erase */
898#define FUSE_WDTON  (unsigned char)~_BV(7)  /* Watchdog Timer Always On */
899#define LFUSE_DEFAULT (FUSE_SPIEN & FUSE_OSCSEL0)
900
901/* High Fuse Byte */
902#define FUSE_BOOTRST  (unsigned char)~_BV(0)  /* Select Reset Vector */
903#define FUSE_BOOTSZ0  (unsigned char)~_BV(1)  /* Select Boot Size */
904#define FUSE_BOOTSZ1  (unsigned char)~_BV(2)  /* Select Boot Size */
905#define FUSE_DWEN  (unsigned char)~_BV(3)  /* Enable debugWire */
906#define FUSE_CKDIV  (unsigned char)~_BV(4)  /* CKDIV Register */
907#define HFUSE_DEFAULT (FUSE_CKDIV & FUSE_BOOTSZ1 & FUSE_BOOTSZ0)
908
909
910/* Lock Bits */
911#define __LOCK_BITS_EXIST
912#define __BOOT_LOCK_BITS_0_EXIST
913#define __BOOT_LOCK_BITS_1_EXIST
914
915
916/* Signature */
917#define SIGNATURE_0 0x1E
918#define SIGNATURE_1 0x95
919#define SIGNATURE_2 0x10
920
921
922/* Device Pin Definitions */
923#define PV2_DDR   DDRV
924#define PV2_PORT  PORTV
925#define PV2_PIN   PINV
926#define PV2_BIT   2
927
928#define PV1_DDR   DDRV
929#define PV1_PORT  PORTV
930#define PV1_PIN   PINV
931#define PV1_BIT   1
932
933#define NV_DDR   DDRNV
934#define NV_PORT  PORTNV
935#define NV_PIN   PINNV
936#define NV_BIT   NV
937
938#define VFET_DDR   DDRVFET
939#define VFET_PORT  PORTVFET
940#define VFET_PIN   PINVFET
941#define VFET_BIT   VFET
942
943#define CF1P_DDR   DDRCF1P
944#define CF1P_PORT  PORTCF1P
945#define CF1P_PIN   PINCF1P
946#define CF1P_BIT   CF1P
947
948#define CF1N_DDR   DDRCF1N
949#define CF1N_PORT  PORTCF1N
950#define CF1N_PIN   PINCF1N
951#define CF1N_BIT   CF1N
952
953#define CF2P_DDR   DDRCF2P
954#define CF2P_PORT  PORTCF2P
955#define CF2P_PIN   PINCF2P
956#define CF2P_BIT   CF2P
957
958#define CF2N_DDR   DDRCF2N
959#define CF2N_PORT  PORTCF2N
960#define CF2N_PIN   PINCF2N
961#define CF2N_BIT   CF2N
962
963#define VREG_DDR   DDRVREG
964#define VREG_PORT  PORTVREG
965#define VREG_PIN   PINVREG
966#define VREG_BIT   VREG
967
968#define VREF_DDR   DDRVREF
969#define VREF_PORT  PORTVREF
970#define VREF_PIN   PINVREF
971#define VREF_BIT   VREF
972
973#define VREFGND_DDR   DDRVREFGND
974#define VREFGND_PORT  PORTVREFGND
975#define VREFGND_PIN   PINVREFGND
976#define VREFGND_BIT   VREFGND
977
978#define PI_DDR   DDRI
979#define PI_PORT  PORTI
980#define PI_PIN   PINI
981#define PI_BIT   
982
983#define NI_DDR   DDRNI
984#define NI_PORT  PORTNI
985#define NI_PIN   PINNI
986#define NI_BIT   NI
987
988#define PA0_DDR   DDRA
989#define PA0_PORT  PORTA
990#define PA0_PIN   PINA
991#define PA0_BIT   0
992
993#define PA1_DDR   DDRA
994#define PA1_PORT  PORTA
995#define PA1_PIN   PINA
996#define PA1_BIT   1
997
998#define PA2_DDR   DDRA
999#define PA2_PORT  PORTA
1000#define PA2_PIN   PINA
1001#define PA2_BIT   2
1002
1003#define PB0_DDR   DDRB
1004#define PB0_PORT  PORTB
1005#define PB0_PIN   PINB
1006#define PB0_BIT   0
1007
1008#define PB1_DDR   DDRB
1009#define PB1_PORT  PORTB
1010#define PB1_PIN   PINB
1011#define PB1_BIT   1
1012
1013#define PB2_DDR   DDRB
1014#define PB2_PORT  PORTB
1015#define PB2_PIN   PINB
1016#define PB2_BIT   2
1017
1018#define PB3_DDR   DDRB
1019#define PB3_PORT  PORTB
1020#define PB3_PIN   PINB
1021#define PB3_BIT   3
1022
1023#define PC0_DDR   DDRC
1024#define PC0_PORT  PORTC
1025#define PC0_PIN   PINC
1026#define PC0_BIT   0
1027
1028#define BATT_DDR   DDRBATT
1029#define BATT_PORT  PORTBATT
1030#define BATT_PIN   PINBATT
1031#define BATT_BIT   BATT
1032
1033#define OC_DDR   DDROC
1034#define OC_PORT  PORTOC
1035#define OC_PIN   PINOC
1036#define OC_BIT   OC
1037
1038#endif /* _AVR_ATmega32HVB_H_ */
1039
Note: See TracBrowser for help on using the repository browser.