source: rtems/cpukit/score/cpu/avr/avr/iotn87.h @ 04a62dce

4.104.115
Last change on this file since 04a62dce was 04a62dce, checked in by Joel Sherrill <joel.sherrill@…>, on 08/06/09 at 14:52:07

2009-08-05 Josh Switnicki <josh.switnicki@…>

  • Makefile.am: added AVR specific Header files to score/cpu/avr/avr. These are from avr-libc 1.6 and assumed to exist by AVR applications.
  • preinstall.am: Regenerated.
  • Property mode set to 100644
File size: 16.9 KB
Line 
1/* Copyright (c) 2009 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$ */
32
33/* avr/iotn87.h - definitions for ATtiny87 */
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_ "iotn87.h"
43#else
44#  error "Attempt to include more than one <avr/ioXXX.h> file."
45#endif
46
47
48#ifndef _AVR_ATtiny87_H_
49#define _AVR_ATtiny87_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#define PINA4 4
60#define PINA5 5
61#define PINA6 6
62#define PINA7 7
63
64#define DDRA _SFR_IO8(0x01)
65#define DDA0 0
66#define DDA1 1
67#define DDA2 2
68#define DDA3 3
69#define DDA4 4
70#define DDA5 5
71#define DDA6 6
72#define DDA7 7
73
74#define PORTA _SFR_IO8(0x02)
75#define PORTA0 0
76#define PORTA1 1
77#define PORTA2 2
78#define PORTA3 3
79#define PORTA4 4
80#define PORTA5 5
81#define PORTA6 6
82#define PORTA7 7
83
84#define PINB _SFR_IO8(0x03)
85#define PINB0 0
86#define PINB1 1
87#define PINB2 2
88#define PINB3 3
89#define PINB4 4
90#define PINB5 5
91#define PINB6 6
92#define PINB7 7
93
94#define DDRB _SFR_IO8(0x04)
95#define DDB0 0
96#define DDB1 1
97#define DDB2 2
98#define DDB3 3
99#define DDB4 4
100#define DDB5 5
101#define DDB6 6
102#define DDB7 7
103
104#define PORTB _SFR_IO8(0x05)
105#define PORTB0 0
106#define PORTB1 1
107#define PORTB2 2
108#define PORTB3 3
109#define PORTB4 4
110#define PORTB5 5
111#define PORTB6 6
112#define PORTB7 7
113
114#define PORTCR _SFR_IO8(0x12)
115#define PUDA 0
116#define PUDB 2
117#define BBMA 4
118#define BBMB 5
119
120#define TIFR0 _SFR_IO8(0x15)
121#define TOV0 0
122#define OCF0A 1
123
124#define TIFR1 _SFR_IO8(0x16)
125#define TOV1 0
126#define OCF1A 1
127#define OCF1B 2
128#define ICF1 5
129
130#define PCIFR _SFR_IO8(0x1B)
131#define PCIF0 0
132#define PCIF1 1
133
134#define EIFR _SFR_IO8(0x1C)
135#define INTF0 0
136#define INTF1 1
137
138#define EIMSK _SFR_IO8(0x1D)
139#define INT0 0
140#define INT1 1
141
142#define GPIOR0 _SFR_IO8(0x1E)
143#define GPIOR00 0
144#define GPIOR01 1
145#define GPIOR02 2
146#define GPIOR03 3
147#define GPIOR04 4
148#define GPIOR05 5
149#define GPIOR06 6
150#define GPIOR07 7
151
152#define EECR _SFR_IO8(0x1F)
153#define EERE 0
154#define EEPE 1
155#define EEMPE 2
156#define EERIE 3
157#define EEPM0 4
158#define EEPM1 5
159
160#define EEDR _SFR_IO8(0x20)
161#define EEDR0 0
162#define EEDR1 1
163#define EEDR2 2
164#define EEDR3 3
165#define EEDR4 4
166#define EEDR5 5
167#define EEDR6 6
168#define EEDR7 7
169
170#define EEAR _SFR_IO16(0x21)
171
172#define EEARL _SFR_IO8(0x21)
173#define EEAR0 0
174#define EEAR1 1
175#define EEAR2 2
176#define EEAR3 3
177#define EEAR4 4
178#define EEAR5 5
179#define EEAR6 6
180#define EEAR7 7
181
182#define EEARH _SFR_IO8(0x22)
183#define EEAR8 0
184
185#define GTCCR _SFR_IO8(0x23)
186#define PSR1 0
187#define PSR0 1
188#define TSM 7
189
190#define TCCR0A _SFR_IO8(0x25)
191#define WGM00 0
192#define WGM01 1
193#define COM0A0 6
194#define COM0A1 7
195
196#define TCCR0B _SFR_IO8(0x26)
197#define CS00 0
198#define CS01 1
199#define CS02 2
200#define FOC0A 7
201
202#define TCNT0 _SFR_IO8(0x27)
203#define TCNT00 0
204#define TCNT01 1
205#define TCNT02 2
206#define TCNT03 3
207#define TCNT04 4
208#define TCNT05 5
209#define TCNT06 6
210#define TCNT07 7
211
212#define OCR0A _SFR_IO8(0x28)
213#define OCR00 0
214#define OCR01 1
215#define OCR02 2
216#define OCR03 3
217#define OCR04 4
218#define OCR05 5
219#define OCR06 6
220#define OCR07 7
221
222#define GPIOR1 _SFR_IO8(0x2A)
223#define GPIOR10 0
224#define GPIOR11 1
225#define GPIOR12 2
226#define GPIOR13 3
227#define GPIOR14 4
228#define GPIOR15 5
229#define GPIOR16 6
230#define GPIOR17 7
231
232#define GPIOR2 _SFR_IO8(0x2B)
233#define GPIOR20 0
234#define GPIOR21 1
235#define GPIOR22 2
236#define GPIOR23 3
237#define GPIOR24 4
238#define GPIOR25 5
239#define GPIOR26 6
240#define GPIOR27 7
241
242#define SPCR _SFR_IO8(0x2C)
243#define SPR0 0
244#define SPR1 1
245#define CPHA 2
246#define CPOL 3
247#define MSTR 4
248#define DORD 5
249#define SPE 6
250#define SPIE 7
251
252#define SPSR _SFR_IO8(0x2D)
253#define SPI2X 0
254#define WCOL 6
255#define SPIF 7
256
257#define SPDR _SFR_IO8(0x2E)
258#define SPDR0 0
259#define SPDR1 1
260#define SPDR2 2
261#define SPDR3 3
262#define SPDR4 4
263#define SPDR5 5
264#define SPDR6 6
265#define SPDR7 7
266
267#define ACSR _SFR_IO8(0x30)
268#define ACIS0 0
269#define ACIS1 1
270#define ACIC 2
271#define ACIE 3
272#define ACI 4
273#define ACO 5
274#define ACIRS 6
275#define ACD 7
276
277#define DWDR _SFR_IO8(0x31)
278#define DWDR0 0
279#define DWDR1 1
280#define DWDR2 2
281#define DWDR3 3
282#define DWDR4 4
283#define DWDR5 5
284#define DWDR6 6
285#define DWDR7 7
286
287#define SMCR _SFR_IO8(0x33)
288#define SE 0
289#define SM0 1
290#define SM1 2
291
292#define MCUSR _SFR_IO8(0x34)
293#define PORF 0
294#define EXTRF 1
295#define BORF 2
296#define WDRF 3
297
298#define MCUCR _SFR_IO8(0x35)
299#define PUD 4
300#define BODS 5
301#define BODSE 6
302
303#define SPMCSR _SFR_IO8(0x37)
304#define SPMEN 0
305#define PGERS 1
306#define PGWRT 2
307#define RFLB 3
308#define CTPB 4
309#define SIGRD 5
310#define RWWSB 6
311
312#define WDTCR _SFR_MEM8(0x60)
313#define WDP0 0
314#define WDP1 1
315#define WDP2 2
316#define WDE 3
317#define WDCE 4
318#define WDP3 5
319#define WDIE 6
320#define WDIF 7
321
322#define CLKPR _SFR_MEM8(0x61)
323#define CLKPS0 0
324#define CLKPS1 1
325#define CLKPS2 2
326#define CLKPS3 3
327#define CLKPCE 7
328
329#define CLKCSR _SFR_MEM8(0x62)
330#define CLKC0 0
331#define CLKC1 1
332#define CLKC2 2
333#define CLKC3 3
334#define CLKRDY 4
335#define CLKCCE 7
336
337#define CLKSELR _SFR_MEM8(0x63)
338#define CSEL0 0
339#define CSEL1 1
340#define CSEL2 2
341#define CSEL3 3
342#define CSUT0 4
343#define CSUT1 5
344#define COUT 6
345
346#define PRR _SFR_MEM8(0x64)
347#define PRADC 0
348#define PRUSI 1
349#define PRTIM0 2
350#define PRTIM1 3
351#define PRSPI 4
352#define PRLIN 5
353
354#define OSCCAL _SFR_MEM8(0x66)
355#define CAL0 0
356#define CAL1 1
357#define CAL2 2
358#define CAL3 3
359#define CAL4 4
360#define CAL5 5
361#define CAL6 6
362#define CAL7 7
363
364#define PCICR _SFR_MEM8(0x68)
365#define PCIE0 0
366#define PCIE1 1
367
368#define EICRA _SFR_MEM8(0x69)
369#define ISC00 0
370#define ISC01 1
371#define ISC10 2
372#define ISC11 3
373
374#define PCMSK0 _SFR_MEM8(0x6B)
375#define PCINT0 0
376#define PCINT1 1
377#define PCINT2 2
378#define PCINT3 3
379#define PCINT4 4
380#define PCINT5 5
381#define PCINT6 6
382#define PCINT7 7
383
384#define PCMSK1 _SFR_MEM8(0x6C)
385#define PCINT8 0
386#define PCINT9 1
387#define PCINT10 2
388#define PCINT11 3
389#define PCINT12 4
390#define PCINT13 5
391#define PCINT14 6
392#define PCINT15 7
393
394#define TIMSK0 _SFR_MEM8(0x6E)
395#define TOIE0 0
396#define OCIE0A 1
397
398#define TIMSK1 _SFR_MEM8(0x6F)
399#define TOIE1 0
400#define OCIE1A 1
401#define OCIE1B 2
402#define ICIE1 5
403
404#define AMISCR _SFR_MEM8(0x77)
405#define ISRCEN 0
406#define XREFEN 1
407#define AREFEN 2
408
409#ifndef __ASSEMBLER__
410#define ADC _SFR_MEM16(0x78)
411#endif
412#define ADCW _SFR_MEM16(0x78)
413
414#define ADCL _SFR_MEM8(0x78)
415#define ADCL0 0
416#define ADCL1 1
417#define ADCL2 2
418#define ADCL3 3
419#define ADCL4 4
420#define ADCL5 5
421#define ADCL6 6
422#define ADCL7 7
423
424#define ADCH _SFR_MEM8(0x79)
425#define ADCH0 0
426#define ADCH1 1
427#define ADCH2 2
428#define ADCH3 3
429#define ADCH4 4
430#define ADCH5 5
431#define ADCH6 6
432#define ADCH7 7
433
434#define ADCSRA _SFR_MEM8(0x7A)
435#define ADPS0 0
436#define ADPS1 1
437#define ADPS2 2
438#define ADIE 3
439#define ADIF 4
440#define ADATE 5
441#define ADSC 6
442#define ADEN 7
443
444#define ADCSRB _SFR_MEM8(0x7B)
445#define ADTS0 0
446#define ADTS1 1
447#define ADTS2 2
448#define ACIR0 4
449#define ACIR1 5
450#define ACME 6
451#define BIN 7
452
453#define ADMUX _SFR_MEM8(0x7C)
454#define MUX0 0
455#define MUX1 1
456#define MUX2 2
457#define MUX3 3
458#define MUX4 4
459#define ADLAR 5
460#define REFS0 6
461#define REFS1 7
462
463#define DIDR0 _SFR_MEM8(0x7E)
464#define ADC0D 0
465#define ADC1D 1
466#define ADC2D 2
467#define ADC3D 3
468#define ADC4D 4
469#define ADC5D 5
470#define ADC6D 6
471#define ADC7D 7
472
473#define DIDR1 _SFR_MEM8(0x7F)
474#define ADC8D 0
475#define ADC9D 1
476#define ADC10D 2
477
478#define TCCR1A _SFR_MEM8(0x80)
479#define WGM10 0
480#define WGM11 1
481#define COM1B0 4
482#define COM1B1 5
483#define COM1A0 6
484#define COM1A1 7
485
486#define TCCR1B _SFR_MEM8(0x81)
487#define CS10 0
488#define CS11 1
489#define CS12 2
490#define WGM12 3
491#define WGM13 4
492#define ICES1 6
493#define ICNC1 7
494
495#define TCCR1C _SFR_MEM8(0x82)
496#define FOC1B 6
497#define FOC1A 7
498
499#define TCCR1D _SFR_MEM8(0x83)
500#define OC1AU 0
501#define OC1AV 1
502#define OC1AW 2
503#define OC1AX 3
504#define OC1BU 4
505#define OC1BV 5
506#define OC1BW 6
507#define OC1BX 7
508
509#define TCNT1 _SFR_MEM16(0x84)
510
511#define TCNT1L _SFR_MEM8(0x84)
512#define TCNT1L0 0
513#define TCNT1L1 1
514#define TCNT1L2 2
515#define TCNT1L3 3
516#define TCNT1L4 4
517#define TCNT1L5 5
518#define TCNT1L6 6
519#define TCNT1L7 7
520
521#define TCNT1H _SFR_MEM8(0x85)
522#define TCNT1H0 0
523#define TCNT1H1 1
524#define TCNT1H2 2
525#define TCNT1H3 3
526#define TCNT1H4 4
527#define TCNT1H5 5
528#define TCNT1H6 6
529#define TCNT1H7 7
530
531#define ICR1 _SFR_MEM16(0x86)
532
533#define ICR1L _SFR_MEM8(0x86)
534#define ICR1L0 0
535#define ICR1L1 1
536#define ICR1L2 2
537#define ICR1L3 3
538#define ICR1L4 4
539#define ICR1L5 5
540#define ICR1L6 6
541#define ICR1L7 7
542
543#define ICR1H _SFR_MEM8(0x87)
544#define ICR1H0 0
545#define ICR1H1 1
546#define ICR1H2 2
547#define ICR1H3 3
548#define ICR1H4 4
549#define ICR1H5 5
550#define ICR1H6 6
551#define ICR1H7 7
552
553#define OCR1A _SFR_MEM16(0x88)
554
555#define OCR1AL _SFR_MEM8(0x88)
556#define OCR1AL0 0
557#define OCR1AL1 1
558#define OCR1AL2 2
559#define OCR1AL3 3
560#define OCR1AL4 4
561#define OCR1AL5 5
562#define OCR1AL6 6
563#define OCR1AL7 7
564
565#define OCR1AH _SFR_MEM8(0x89)
566#define OCR1AH0 0
567#define OCR1AH1 1
568#define OCR1AH2 2
569#define OCR1AH3 3
570#define OCR1AH4 4
571#define OCR1AH5 5
572#define OCR1AH6 6
573#define OCR1AH7 7
574
575#define OCR1B _SFR_MEM16(0x8A)
576
577#define OCR1BL _SFR_MEM8(0x8A)
578#define OCR1BL0 0
579#define OCR1BL1 1
580#define OCR1BL2 2
581#define OCR1BL3 3
582#define OCR1BL4 4
583#define OCR1BL5 5
584#define OCR1BL6 6
585#define OCR1BL7 7
586
587#define OCR1BH _SFR_MEM8(0x8B)
588#define OCR1BH0 0
589#define OCR1BH1 1
590#define OCR1BH2 2
591#define OCR1BH3 3
592#define OCR1BH4 4
593#define OCR1BH5 5
594#define OCR1BH6 6
595#define OCR1BH7 7
596
597#define ASSR _SFR_MEM8(0xB6)
598#define TCR0BUB 0
599#define TCR0AUB 1
600#define OCR0AUB 3
601#define TCN0UB 4
602#define AS0 5
603#define EXCLK 6
604
605#define USICR _SFR_MEM8(0xB8)
606#define USITC 0
607#define USICLK 1
608#define USICS0 2
609#define USICS1 3
610#define USIWM0 4
611#define USIWM1 5
612#define USIOIE 6
613#define USISIE 7
614
615#define USISR _SFR_MEM8(0xB9)
616#define USICNT0 0
617#define USICNT1 1
618#define USICNT2 2
619#define USICNT3 3
620#define USIDC 4
621#define USIPF 5
622#define USIOIF 6
623#define USISIF 7
624
625#define USIDR _SFR_MEM8(0xBA)
626#define USIDR0 0
627#define USIDR1 1
628#define USIDR2 2
629#define USIDR3 3
630#define USIDR4 4
631#define USIDR5 5
632#define USIDR6 6
633#define USIDR7 7
634
635#define USIBR _SFR_MEM8(0xBB)
636#define USIBR0 0
637#define USIBR1 1
638#define USIBR2 2
639#define USIBR3 3
640#define USIBR4 4
641#define USIBR5 5
642#define USIBR6 6
643#define USIBR7 7
644
645#define USIPP _SFR_MEM8(0xBC)
646#define USIPOS 0
647
648#define LINCR _SFR_MEM8(0xC8)
649#define LCMD0 0
650#define LCMD1 1
651#define LCMD2 2
652#define LENA 3
653#define LCONF0 4
654#define LCONF1 5
655#define LIN13 6
656#define LSWRES 7
657
658#define LINSIR _SFR_MEM8(0xC9)
659#define LRXOK 0
660#define LTXOK 1
661#define LIDOK 2
662#define LERR 3
663#define LBUSY 4
664#define LIDST0 5
665#define LIDST1 6
666#define LIDST2 7
667
668#define LINENIR _SFR_MEM8(0xCA)
669#define LENRXOK 0
670#define LENTXOK 1
671#define LENIDOK 2
672#define LENERR 3
673
674#define LINERR _SFR_MEM8(0xCB)
675#define LBERR 0
676#define LCERR 1
677#define LPERR 2
678#define LSERR 3
679#define LFERR 4
680#define LOVERR 5
681#define LTOERR 6
682#define LABORT 7
683
684#define LINBTR _SFR_MEM8(0xCC)
685#define LBT0 0
686#define LBT1 1
687#define LBT2 2
688#define LBT3 3
689#define LBT4 4
690#define LBT5 5
691#define LDISR 7
692
693#define LINBRR _SFR_MEM16(0xCD)
694
695#define LINBRRL _SFR_MEM8(0xCD)
696#define LDIV0 0
697#define LDIV1 1
698#define LDIV2 2
699#define LDIV3 3
700#define LDIV4 4
701#define LDIV5 5
702#define LDIV6 6
703#define LDIV7 7
704
705#define LINBRRH _SFR_MEM8(0xCE)
706#define LDIV8 0
707#define LDIV9 1
708#define LDIV10 2
709#define LDIV11 3
710
711#define LINDLR _SFR_MEM8(0xCF)
712#define LRXDL0 0
713#define LRXDL1 1
714#define LRXDL2 2
715#define LRXDL3 3
716#define LTXDL0 4
717#define LTXDL1 5
718#define LTXDL2 6
719#define LTXDL3 7
720
721#define LINIDR _SFR_MEM8(0xD0)
722#define LID0 0
723#define LID1 1
724#define LID2 2
725#define LID3 3
726#define LID4 4
727#define LID5 5
728#define LP0 6
729#define LP1 7
730
731#define LINSEL _SFR_MEM8(0xD1)
732#define LINDX0 0
733#define LINDX1 1
734#define LINDX2 2
735#define LAINC 3
736
737#define LINDAT _SFR_MEM8(0xD2)
738#define LDATA0 0
739#define LDATA1 1
740#define LDATA2 2
741#define LDATA3 3
742#define LDATA4 4
743#define LDATA5 5
744#define LDATA6 6
745#define LDATA7 7
746
747
748/* Interrupt vectors */
749/* Vector 0 is the reset vector */
750#define INT0_vect_num  1
751#define INT0_vect      _VECTOR(1)  /* External Interrupt Request 0 */
752#define USI_OVF_vect_num  19
753#define USI_OVF_vect      _VECTOR(19)  /* USI Overflow */
754#define INT1_vect_num  2
755#define INT1_vect      _VECTOR(2)  /* External Interrupt Request 1 */
756#define PCINT0_vect_num  3
757#define PCINT0_vect      _VECTOR(3)  /* Pin Change Interrupt Request 0 */
758#define PCINT1_vect_num  4
759#define PCINT1_vect      _VECTOR(4)  /* Pin Change Interrupt Request 1 */
760#define WDT_vect_num  5
761#define WDT_vect      _VECTOR(5)  /* Watchdog Time-Out Interrupt */
762#define TIMER1_CAPT_vect_num  6
763#define TIMER1_CAPT_vect      _VECTOR(6)  /* Timer/Counter1 Capture Event */
764#define TIMER1_COMPA_vect_num  7
765#define TIMER1_COMPA_vect      _VECTOR(7)  /* Timer/Counter1 Compare Match 1A */
766#define TIMER1_COMPB_vect_num  8
767#define TIMER1_COMPB_vect      _VECTOR(8)  /* Timer/Counter1 Compare Match 1B */
768#define TIMER1_OVF_vect_num  9
769#define TIMER1_OVF_vect      _VECTOR(9)  /* Timer/Counter1 Overflow */
770#define TIMER0_COMPA_vect_num  10
771#define TIMER0_COMPA_vect      _VECTOR(10)  /* Timer/Counter0 Compare Match 0A */
772#define TIMER0_OVF_vect_num  11
773#define TIMER0_OVF_vect      _VECTOR(11)  /* Timer/Counter0 Overflow */
774#define LIN_TC_vect_num  12
775#define LIN_TC_vect      _VECTOR(12)  /* LIN Transfer Complete */
776#define LIN_ERR_vect_num  13
777#define LIN_ERR_vect      _VECTOR(13)  /* LIN Error */
778#define SPI_STC_vect_num  14
779#define SPI_STC_vect      _VECTOR(14)  /* SPI Serial Transfer Complete */
780#define ADC_vect_num  15
781#define ADC_vect      _VECTOR(15)  /* ADC Conversion Complete */
782#define EE_RDY_vect_num  16
783#define EE_RDY_vect      _VECTOR(16)  /* EEPROM Ready */
784#define ANA_COMP_vect_num  17
785#define ANA_COMP_vect      _VECTOR(17)  /* Analog Comparator */
786#define USI_START_vect_num  18
787#define USI_START_vect      _VECTOR(18)  /* USI Start */
788
789#define _VECTOR_SIZE 2 /* Size of individual vector. */
790#define _VECTORS_SIZE (20 * _VECTOR_SIZE)
791
792
793/* Constants */
794#define SPM_PAGESIZE (128)
795#define RAMSTART     (0x0100)
796#define RAMSIZE      (512)
797#define RAMEND       (RAMSTART + RAMSIZE - 1)
798#define XRAMSTART    (NA)
799#define XRAMSIZE     (0)
800#define XRAMEND      (RAMEND)
801#define E2END        (0x1FF)
802#define E2PAGESIZE   (4)
803#define FLASHEND     (0x1FFF)
804
805
806/* Fuses */
807#define FUSE_MEMORY_SIZE 3
808
809/* Low Fuse Byte */
810#define FUSE_CKSEL0  (unsigned char)~_BV(0)  /* Select Clock source */
811#define FUSE_CKSEL1  (unsigned char)~_BV(1)  /* Select Clock source */
812#define FUSE_CKSEL2  (unsigned char)~_BV(2)  /* Select Clock source */
813#define FUSE_CKSEL3  (unsigned char)~_BV(3)  /* Select Clock source */
814#define FUSE_SUT0  (unsigned char)~_BV(4)  /* Select start-up time */
815#define FUSE_SUT1  (unsigned char)~_BV(5)  /* Select start-up time */
816#define FUSE_CKOUT  (unsigned char)~_BV(6)  /* Clock Output Enable */
817#define FUSE_CKDIV8  (unsigned char)~_BV(7)  /* Divide clock by 8 */
818#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
819
820/* High Fuse Byte */
821#define FUSE_BODLEVEL0  (unsigned char)~_BV(0)  /* Brown-out Detector trigger level */
822#define FUSE_BODLEVEL1  (unsigned char)~_BV(1)  /* Brown-out Detector trigger level */
823#define FUSE_BODLEVEL2  (unsigned char)~_BV(2)  /* Brown-out Detector trigger level */
824#define FUSE_EESAVE  (unsigned char)~_BV(3)  /* EEPROM memory is preserved through the Chip Erase */
825#define FUSE_WDTON  (unsigned char)~_BV(4)  /* Watchdog Timer always ON */
826#define FUSE_SPIEN  (unsigned char)~_BV(5)  /* Enable Serial Program and Data Downloading */
827#define FUSE_DWEN  (unsigned char)~_BV(6)  /* DebugWIRE Enable */
828#define FUSE_RSTDISBL  (unsigned char)~_BV(7)  /* External Reset disable */
829#define HFUSE_DEFAULT (FUSE_SPIEN)
830
831/* Extended Fuse Byte */
832#define FUSE_SELFPRGEN  (unsigned char)~_BV(0)  /* Self-Programming Enable */
833#define EFUSE_DEFAULT (0xFF)
834
835
836/* Lock Bits */
837#define __LOCK_BITS_EXIST
838
839
840/* Signature */
841#define SIGNATURE_0 0x1E
842#define SIGNATURE_1 0x93
843#define SIGNATURE_2 0x87
844
845
846#endif /* _AVR_ATtiny87_H_ */
847
Note: See TracBrowser for help on using the repository browser.