source: rtems/cpukit/score/cpu/avr/avr/iom16m1.h @ b98bb9e

4.115
Last change on this file since b98bb9e was b98bb9e, checked in by Mathew Kallada <matkallada@…>, on 12/29/12 at 13:34:18

score: Doxygen Clean Up Task #6

  • Property mode set to 100644
File size: 29.9 KB
Line 
1/**
2 * @file avr/iom16m1.h
3 *
4 * @brief Definitions for ATmega16M1
5 *
6 * This file should only be included from <avr/io.h>, never directly.
7 */
8
9/*
10 *  Copyright (c) 2009 Atmel Corporation
11 *  All rights reserved.
12 *
13 *   Redistribution and use in source and binary forms, with or without
14 *   modification, are permitted provided that the following conditions are met:
15 *
16 * * Redistributions of source code must retain the above copyright
17 *   notice, this list of conditions and the following disclaimer.
18 *
19 * * Redistributions in binary form must reproduce the above copyright
20 *   notice, this list of conditions and the following disclaimer in
21 *   the documentation and/or other materials provided with the
22 *   distribution.
23 *
24 * * Neither the name of the copyright holders nor the names of
25 *   contributors may be used to endorse or promote products derived
26 *   from this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 */
40
41#ifndef _AVR_IO_H_
42#  error "Include <avr/io.h> instead of this file."
43#endif
44
45#ifndef _AVR_IOXXX_H_
46#  define _AVR_IOXXX_H_ "iom16m1.h"
47#else
48#  error "Attempt to include more than one <avr/ioXXX.h> file."
49#endif
50
51
52#ifndef _AVR_ATmega16M1_H_
53#define _AVR_ATmega16M1_H_ 1
54
55/**
56 *  @defgroup Avr_iom16m1 ATmega16M1 Definitions
57 *
58 *  @ingroup avr
59 */
60/**@{*/
61
62/* Registers and associated bit numbers. */
63
64#define PINB _SFR_IO8(0x03)
65#define PINB0 0
66#define PINB1 1
67#define PINB2 2
68#define PINB3 3
69#define PINB4 4
70#define PINB5 5
71#define PINB6 6
72#define PINB7 7
73
74#define DDRB _SFR_IO8(0x04)
75#define DDB0 0
76#define DDB1 1
77#define DDB2 2
78#define DDB3 3
79#define DDB4 4
80#define DDB5 5
81#define DDB6 6
82#define DDB7 7
83
84#define PORTB _SFR_IO8(0x05)
85#define PORTB0 0
86#define PORTB1 1
87#define PORTB2 2
88#define PORTB3 3
89#define PORTB4 4
90#define PORTB5 5
91#define PORTB6 6
92#define PORTB7 7
93
94#define PINC _SFR_IO8(0x06)
95#define PINC0 0
96#define PINC1 1
97#define PINC2 2
98#define PINC3 3
99#define PINC4 4
100#define PINC5 5
101#define PINC6 6
102#define PINC7 7
103
104#define DDRC _SFR_IO8(0x07)
105#define DDC0 0
106#define DDC1 1
107#define DDC2 2
108#define DDC3 3
109#define DDC4 4
110#define DDC5 5
111#define DDC6 6
112#define DDC7 7
113
114#define PORTC _SFR_IO8(0x08)
115#define PORTC0 0
116#define PORTC1 1
117#define PORTC2 2
118#define PORTC3 3
119#define PORTC4 4
120#define PORTC5 5
121#define PORTC6 6
122#define PORTC7 7
123
124#define PIND _SFR_IO8(0x09)
125#define PIND0 0
126#define PIND1 1
127#define PIND2 2
128#define PIND3 3
129#define PIND4 4
130#define PIND5 5
131#define PIND6 6
132#define PIND7 7
133
134#define DDRD _SFR_IO8(0x0A)
135#define DDD0 0
136#define DDD1 1
137#define DDD2 2
138#define DDD3 3
139#define DDD4 4
140#define DDD5 5
141#define DDD6 6
142#define DDD7 7
143
144#define PORTD _SFR_IO8(0x0B)
145#define PORTD0 0
146#define PORTD1 1
147#define PORTD2 2
148#define PORTD3 3
149#define PORTD4 4
150#define PORTD5 5
151#define PORTD6 6
152#define PORTD7 7
153
154#define PINE _SFR_IO8(0x0C)
155#define PINE0 0
156#define PINE1 1
157#define PINE2 2
158
159#define DDRE _SFR_IO8(0x0D)
160#define DDE0 0
161#define DDE1 1
162#define DDE2 2
163
164#define PORTE _SFR_IO8(0x0E)
165#define PORTE0 0
166#define PORTE1 1
167#define PORTE2 2
168
169#define TIFR0 _SFR_IO8(0x15)
170#define TOV0 0
171#define OCF0A 1
172#define OCF0B 2
173
174#define TIFR1 _SFR_IO8(0x16)
175#define TOV1 0
176#define OCF1A 1
177#define OCF1B 2
178#define ICF1 5
179
180#define GPIOR1 _SFR_IO8(0x19)
181#define GPIOR10 0
182#define GPIOR11 1
183#define GPIOR12 2
184#define GPIOR13 3
185#define GPIOR14 4
186#define GPIOR15 5
187#define GPIOR16 6
188#define GPIOR17 7
189
190#define GPIOR2 _SFR_IO8(0x1A)
191#define GPIOR20 0
192#define GPIOR21 1
193#define GPIOR22 2
194#define GPIOR23 3
195#define GPIOR24 4
196#define GPIOR25 5
197#define GPIOR26 6
198#define GPIOR27 7
199
200#define PCIFR _SFR_IO8(0x1B)
201#define PCIF0 0
202#define PCIF1 1
203#define PCIF2 2
204#define PCIF3 3
205
206#define EIFR _SFR_IO8(0x1C)
207#define INTF0 0
208#define INTF1 1
209#define INTF2 2
210#define INTF3 3
211
212#define EIMSK _SFR_IO8(0x1D)
213#define INT0 0
214#define INT1 1
215#define INT2 2
216#define INT3 3
217
218#define GPIOR0 _SFR_IO8(0x1E)
219#define GPIOR00 0
220#define GPIOR01 1
221#define GPIOR02 2
222#define GPIOR03 3
223#define GPIOR04 4
224#define GPIOR05 5
225#define GPIOR06 6
226#define GPIOR07 7
227
228#define EECR _SFR_IO8(0x1F)
229#define EERE 0
230#define EEWE 1
231#define EEMWE 2
232#define EERIE 3
233#define EEPM0 4
234#define EEPM1 5
235
236#define EEDR _SFR_IO8(0x20)
237#define EEDR0 0
238#define EEDR1 1
239#define EEDR2 2
240#define EEDR3 3
241#define EEDR4 4
242#define EEDR5 5
243#define EEDR6 6
244#define EEDR7 7
245
246#define EEAR _SFR_IO16(0x21)
247
248#define EEARL _SFR_IO8(0x21)
249#define EEAR0 0
250#define EEAR1 1
251#define EEAR2 2
252#define EEAR3 3
253#define EEAR4 4
254#define EEAR5 5
255#define EEAR6 6
256#define EEAR7 7
257
258#define EEARH _SFR_IO8(0x22)
259#define EEAR8 0
260#define EEAR9 1
261
262#define GTCCR _SFR_IO8(0x23)
263#define PSR10 0
264#define PSRSYNC 0
265#define ICPSEL1 6
266#define TSM 7
267
268#define TCCR0A _SFR_IO8(0x24)
269#define WGM00 0
270#define WGM01 1
271#define COM0B0 4
272#define COM0B1 5
273#define COM0A0 6
274#define COM0A1 7
275
276#define TCCR0B _SFR_IO8(0x25)
277#define CS00 0
278#define CS01 1
279#define CS02 2
280#define WGM02 3
281#define FOC0B 6
282#define FOC0A 7
283
284#define TCNT0 _SFR_IO8(0x26)
285#define TCNT0_0 0
286#define TCNT0_1 1
287#define TCNT0_2 2
288#define TCNT0_3 3
289#define TCNT0_4 4
290#define TCNT0_5 5
291#define TCNT0_6 6
292#define TCNT0_7 7
293
294#define OCR0A _SFR_IO8(0x27)
295#define OCR0A_0 0
296#define OCR0A_1 1
297#define OCR0A_2 2
298#define OCR0A_3 3
299#define OCR0A_4 4
300#define OCR0A_5 5
301#define OCR0A_6 6
302#define OCR0A_7 7
303
304#define OCR0B _SFR_IO8(0x28)
305#define OCR0B_0 0
306#define OCR0B_1 1
307#define OCR0B_2 2
308#define OCR0B_3 3
309#define OCR0B_4 4
310#define OCR0B_5 5
311#define OCR0B_6 6
312#define OCR0B_7 7
313
314#define PLLCSR _SFR_IO8(0x29)
315#define PLOCK 0
316#define PLLE 1
317#define PLLF 2
318
319#define SPCR _SFR_IO8(0x2C)
320#define SPR0 0
321#define SPR1 1
322#define CPHA 2
323#define CPOL 3
324#define MSTR 4
325#define DORD 5
326#define SPE 6
327#define SPIE 7
328
329#define SPSR _SFR_IO8(0x2D)
330#define SPI2X 0
331#define WCOL 6
332#define SPIF 7
333
334#define SPDR _SFR_IO8(0x2E)
335#define SPDR0 0
336#define SPDR1 1
337#define SPDR2 2
338#define SPDR3 3
339#define SPDR4 4
340#define SPDR5 5
341#define SPDR6 6
342#define SPDR7 7
343
344#define ACSR _SFR_IO8(0x30)
345#define AC0O 0
346#define AC1O 1
347#define AC2O 2
348#define AC3O 3
349#define AC0IF 4
350#define AC1IF 5
351#define AC2IF 6
352#define AC3IF 7
353
354#define DWDR _SFR_IO8(0x31)
355
356#define SMCR _SFR_IO8(0x33)
357#define SE 0
358#define SM0 1
359#define SM1 2
360#define SM2 3
361
362#define MCUSR _SFR_IO8(0x34)
363#define PORF 0
364#define EXTRF 1
365#define BORF 2
366#define WDRF 3
367
368#define MCUCR _SFR_IO8(0x35)
369#define IVCE 0
370#define IVSEL 1
371#define PUD 4
372#define SPIPS 7
373
374#define SPMCSR _SFR_IO8(0x37)
375#define SPMEN 0
376#define PGERS 1
377#define PGWRT 2
378#define BLBSET 3
379#define RWWSRE 4
380#define SIGRD 5
381#define RWWSB 6
382#define SPMIE 7
383
384#define WDTCSR _SFR_MEM8(0x60)
385#define WDP0 0
386#define WDP1 1
387#define WDP2 2
388#define WDE 3
389#define WDCE 4
390#define WDP3 5
391#define WDIE 6
392#define WDIF 7
393
394#define CLKPR _SFR_MEM8(0x61)
395#define CLKPS0 0
396#define CLKPS1 1
397#define CLKPS2 2
398#define CLKPS3 3
399#define CLKPCE 7
400
401#define PRR _SFR_MEM8(0x64)
402#define PRADC 0
403#define PRLIN 1
404#define PRSPI 2
405#define PRTIM0 3
406#define PRTIM1 4
407#define PRPSC 5
408#define PRCAN 6
409
410#define OSCCAL _SFR_MEM8(0x66)
411#define CAL0 0
412#define CAL1 1
413#define CAL2 2
414#define CAL3 3
415#define CAL4 4
416#define CAL5 5
417#define CAL6 6
418
419#define PCICR _SFR_MEM8(0x68)
420#define PCIE0 0
421#define PCIE1 1
422#define PCIE2 2
423#define PCIE3 3
424
425#define EICRA _SFR_MEM8(0x69)
426#define ISC00 0
427#define ISC01 1
428#define ISC10 2
429#define ISC11 3
430#define ISC20 4
431#define ISC21 5
432#define ISC30 6
433#define ISC31 7
434
435#define PCMSK0 _SFR_MEM8(0x6A)
436#define PCINT0 0
437#define PCINT1 1
438#define PCINT2 2
439#define PCINT3 3
440#define PCINT4 4
441#define PCINT5 5
442#define PCINT6 6
443#define PCINT7 7
444
445#define PCMSK1 _SFR_MEM8(0x6B)
446#define PCINT8 0
447#define PCINT9 1
448#define PCINT10 2
449#define PCINT11 3
450#define PCINT12 4
451#define PCINT13 5
452#define PCINT14 6
453#define PCINT15 7
454
455#define PCMSK2 _SFR_MEM8(0x6C)
456#define PCINT16 0
457#define PCINT17 1
458#define PCINT18 2
459#define PCINT19 3
460#define PCINT20 4
461#define PCINT21 5
462#define PCINT22 6
463#define PCINT23 7
464
465#define PCMSK3 _SFR_MEM8(0x6D)
466#define PCINT24 0
467#define PCINT25 1
468#define PCINT26 2
469
470#define TIMSK0 _SFR_MEM8(0x6E)
471#define TOIE0 0
472#define OCIE0A 1
473#define OCIE0B 2
474
475#define TIMSK1 _SFR_MEM8(0x6F)
476#define TOIE1 0
477#define OCIE1A 1
478#define OCIE1B 2
479#define ICIE1 5
480
481#define AMP0CSR _SFR_MEM8(0x75)
482#define AMP0TS0 0
483#define AMP0TS1 1
484#define AMP0TS2 2
485#define AMPCMP0 3
486#define AMP0G0 4
487#define AMP0G1 5
488#define AMP0IS 6
489#define AMP0EN 7
490
491#define AMP1CSR _SFR_MEM8(0x76)
492#define AMP1TS0 0
493#define AMP1TS1 1
494#define AMP1TS2 2
495#define AMPCMP1 3
496#define AMP1G0 4
497#define AMP1G1 5
498#define AMP1IS 6
499#define AMP1EN 7
500
501#define AMP2CSR _SFR_MEM8(0x77)
502#define AMP2TS0 0
503#define AMP2TS1 1
504#define AMP2TS2 2
505#define AMPCMP2 3
506#define AMP2G0 4
507#define AMP2G1 5
508#define AMP2IS 6
509#define AMP2EN 7
510
511#ifndef __ASSEMBLER__
512#define ADC _SFR_MEM16(0x78)
513#endif
514#define ADCW _SFR_MEM16(0x78)
515
516#define ADCL _SFR_MEM8(0x78)
517#define ADCL0 0
518#define ADCL1 1
519#define ADCL2 2
520#define ADCL3 3
521#define ADCL4 4
522#define ADCL5 5
523#define ADCL6 6
524#define ADCL7 7
525
526#define ADCH _SFR_MEM8(0x79)
527#define ADCH0 0
528#define ADCH1 1
529#define ADCH2 2
530#define ADCH3 3
531#define ADCH4 4
532#define ADCH5 5
533#define ADCH6 6
534#define ADCH7 7
535
536#define ADCSRA _SFR_MEM8(0x7A)
537#define ADPS0 0
538#define ADPS1 1
539#define ADPS2 2
540#define ADIE 3
541#define ADIF 4
542#define ADATE 5
543#define ADSC 6
544#define ADEN 7
545
546#define ADCSRB _SFR_MEM8(0x7B)
547#define ADTS0 0
548#define ADTS1 1
549#define ADTS2 2
550#define ADTS3 3
551#define AREFEN 5
552#define ISRCEN 6
553#define ADHSM 7
554
555#define ADMUX _SFR_MEM8(0x7C)
556#define MUX0 0
557#define MUX1 1
558#define MUX2 2
559#define MUX3 3
560#define MUX4 4
561#define ADLAR 5
562#define REFS0 6
563#define REFS1 7
564
565#define DIDR0 _SFR_MEM8(0x7E)
566#define ADC0D 0
567#define ADC1D 1
568#define ADC2D 2
569#define ADC3D 3
570#define ADC4D 4
571#define ADC5D 5
572#define ADC6D 6
573#define ADC7D 7
574
575#define DIDR1 _SFR_MEM8(0x7F)
576#define ADC8D 0
577#define ADC9D 1
578#define ADC10D 2
579#define AMP0ND 3
580#define AMP0PD 4
581#define ACMP0D 5
582#define AMP2PD 6
583
584#define TCCR1A _SFR_MEM8(0x80)
585#define WGM10 0
586#define WGM11 1
587#define COM1B0 4
588#define COM1B1 5
589#define COM1A0 6
590#define COM1A1 7
591
592#define TCCR1B _SFR_MEM8(0x81)
593#define CS10 0
594#define CS11 1
595#define CS12 2
596#define WGM12 3
597#define WGM13 4
598#define ICES1 6
599#define ICNC1 7
600
601#define TCCR1C _SFR_MEM8(0x82)
602#define FOC1B 6
603#define FOC1A 7
604
605#define TCNT1 _SFR_MEM16(0x84)
606
607#define TCNT1L _SFR_MEM8(0x84)
608#define TCNT1L0 0
609#define TCNT1L1 1
610#define TCNT1L2 2
611#define TCNT1L3 3
612#define TCNT1L4 4
613#define TCNT1L5 5
614#define TCNT1L6 6
615#define TCNT1L7 7
616
617#define TCNT1H _SFR_MEM8(0x85)
618#define TCNT1H0 0
619#define TCNT1H1 1
620#define TCNT1H2 2
621#define TCNT1H3 3
622#define TCNT1H4 4
623#define TCNT1H5 5
624#define TCNT1H6 6
625#define TCNT1H7 7
626
627#define ICR1 _SFR_MEM16(0x86)
628
629#define ICR1L _SFR_MEM8(0x86)
630#define ICR1L0 0
631#define ICR1L1 1
632#define ICR1L2 2
633#define ICR1L3 3
634#define ICR1L4 4
635#define ICR1L5 5
636#define ICR1L6 6
637#define ICR1L7 7
638
639#define ICR1H _SFR_MEM8(0x87)
640#define ICR1H0 0
641#define ICR1H1 1
642#define ICR1H2 2
643#define ICR1H3 3
644#define ICR1H4 4
645#define ICR1H5 5
646#define ICR1H6 6
647#define ICR1H7 7
648
649#define OCR1A _SFR_MEM16(0x88)
650
651#define OCR1AL _SFR_MEM8(0x88)
652#define OCR1AL0 0
653#define OCR1AL1 1
654#define OCR1AL2 2
655#define OCR1AL3 3
656#define OCR1AL4 4
657#define OCR1AL5 5
658#define OCR1AL6 6
659#define OCR1AL7 7
660
661#define OCR1AH _SFR_MEM8(0x89)
662#define OCR1AH0 0
663#define OCR1AH1 1
664#define OCR1AH2 2
665#define OCR1AH3 3
666#define OCR1AH4 4
667#define OCR1AH5 5
668#define OCR1AH6 6
669#define OCR1AH7 7
670
671#define OCR1B _SFR_MEM16(0x8A)
672
673#define OCR1BL _SFR_MEM8(0x8A)
674#define OCR1BL0 0
675#define OCR1BL1 1
676#define OCR1BL2 2
677#define OCR1BL3 3
678#define OCR1BL4 4
679#define OCR1BL5 5
680#define OCR1BL6 6
681#define OCR1BL7 7
682
683#define OCR1BH _SFR_MEM8(0x8B)
684#define OCR1BH0 0
685#define OCR1BH1 1
686#define OCR1BH2 2
687#define OCR1BH3 3
688#define OCR1BH4 4
689#define OCR1BH5 5
690#define OCR1BH6 6
691#define OCR1BH7 7
692
693#define DACON _SFR_MEM8(0x90)
694#define DAEN 0
695#define DAOE 1
696#define DALA 2
697#define DATS0 4
698#define DATS1 5
699#define DATS2 6
700#define DAATE 7
701
702#define DAC _SFR_MEM16(0x91)
703
704#define DACL _SFR_MEM8(0x91)
705#define DACL0 0
706#define DACL1 1
707#define DACL2 2
708#define DACL3 3
709#define DACL4 4
710#define DACL5 5
711#define DACL6 6
712#define DACL7 7
713
714#define DACH _SFR_MEM8(0x92)
715#define DACH0 0
716#define DACH1 1
717#define DACH2 2
718#define DACH3 3
719#define DACH4 4
720#define DACH5 5
721#define DACH6 6
722#define DACH7 7
723
724#define AC0CON _SFR_MEM8(0x94)
725#define AC0M0 0
726#define AC0M1 1
727#define AC0M2 2
728#define ACCKSEL 3
729#define AC0IS0 4
730#define AC0IS1 5
731#define AC0IE 6
732#define AC0EN 7
733
734#define AC1CON _SFR_MEM8(0x95)
735#define AC1M0 0
736#define AC1M1 1
737#define AC1M2 2
738#define AC1ICE 3
739#define AC1IS0 4
740#define AC1IS1 5
741#define AC1IE 6
742#define AC1EN 7
743
744#define AC2CON _SFR_MEM8(0x96)
745#define AC2M0 0
746#define AC2M1 1
747#define AC2M2 2
748#define AC2IS0 4
749#define AC2IS1 5
750#define AC2IE 6
751#define AC2EN 7
752
753#define AC3CON _SFR_MEM8(0x97)
754#define AC3M0 0
755#define AC3M1 1
756#define AC3M2 2
757#define AC3IS0 4
758#define AC3IS1 5
759#define AC3IE 6
760#define AC3EN 7
761
762#define POCR0SA _SFR_MEM16(0xA0)
763
764#define POCR0SAL _SFR_MEM8(0xA0)
765#define POCR0SA_0 0
766#define POCR0SA_1 1
767#define POCR0SA_2 2
768#define POCR0SA_3 3
769#define POCR0SA_4 4
770#define POCR0SA_5 5
771#define POCR0SA_6 6
772#define POCR0SA_7 7
773
774#define POCR0SAH _SFR_MEM8(0xA1)
775#define POCR0SA_8 0
776#define POCR0SA_9 1
777#define POCR0SA_10 2
778#define POCR0SA_11 3
779
780#define POCR0RA _SFR_MEM16(0xA2)
781
782#define POCR0RAL _SFR_MEM8(0xA2)
783#define POCR0RA_0 0
784#define POCR0RA_1 1
785#define POCR0RA_2 2
786#define POCR0RA_3 3
787#define POCR0RA_4 4
788#define POCR0RA_5 5
789#define POCR0RA_6 6
790#define POCR0RA_7 7
791
792#define POCR0RAH _SFR_MEM8(0xA3)
793#define POCR0RA_8 0
794#define POCR0RA_9 1
795#define POCR0RA_10 2
796#define POCR0RA_11 3
797
798#define POCR0SB _SFR_MEM16(0xA4)
799
800#define POCR0SBL _SFR_MEM8(0xA4)
801#define POCR0SB_0 0
802#define POCR0SB_1 1
803#define POCR0SB_2 2
804#define POCR0SB_3 3
805#define POCR0SB_4 4
806#define POCR0SB_5 5
807#define POCR0SB_6 6
808#define POCR0SB_7 7
809
810#define POCR0SBH _SFR_MEM8(0xA5)
811#define POCR0SB_8 0
812#define POCR0SB_9 1
813#define POCR0SB_10 2
814#define POCR0SB_11 3
815
816#define POCR1SA _SFR_MEM16(0xA6)
817
818#define POCR1SAL _SFR_MEM8(0xA6)
819#define POCR1SA_0 0
820#define POCR1SA_1 1
821#define POCR1SA_2 2
822#define POCR1SA_3 3
823#define POCR1SA_4 4
824#define POCR1SA_5 5
825#define POCR1SA_6 6
826#define POCR1SA_7 7
827
828#define POCR1SAH _SFR_MEM8(0xA7)
829#define POCR1SA_8 0
830#define POCR1SA_9 1
831#define POCR1SA_10 2
832#define POCR1SA_11 3
833
834#define POCR1RA _SFR_MEM16(0xA8)
835
836#define POCR1RAL _SFR_MEM8(0xA8)
837#define POCR1RA_0 0
838#define POCR1RA_1 1
839#define POCR1RA_2 2
840#define POCR1RA_3 3
841#define POCR1RA_4 4
842#define POCR1RA_5 5
843#define POCR1RA_6 6
844#define POCR1RA_7 7
845
846#define POCR1RAH _SFR_MEM8(0xA9)
847#define POCR1RA_8 0
848#define POCR1RA_9 1
849#define POCR1RA_10 2
850#define POCR1RA_11 3
851
852#define POCR1SB _SFR_MEM16(0xAA)
853
854#define POCR1SBL _SFR_MEM8(0xAA)
855#define POCR1SB_0 0
856#define POCR1SB_1 1
857#define POCR1SB_2 2
858#define POCR1SB_3 3
859#define POCR1SB_4 4
860#define POCR1SB_5 5
861#define POCR1SB_6 6
862#define POCR1SB_7 7
863
864#define POCR1SBH _SFR_MEM8(0xAB)
865#define POCR1SB_8 0
866#define POCR1SB_9 1
867#define POCR1SB_10 2
868#define POCR1SB_11 3
869
870#define POCR2SA _SFR_MEM16(0xAC)
871
872#define POCR2SAL _SFR_MEM8(0xAC)
873#define POCR2SA_0 0
874#define POCR2SA_1 1
875#define POCR2SA_2 2
876#define POCR2SA_3 3
877#define POCR2SA_4 4
878#define POCR2SA_5 5
879#define POCR2SA_6 6
880#define POCR2SA_7 7
881
882#define POCR2SAH _SFR_MEM8(0xAD)
883#define POCR2SA_8 0
884#define POCR2SA_9 1
885#define POCR2SA_10 2
886#define POCR2SA_11 3
887
888#define POCR2RA _SFR_MEM16(0xAE)
889
890#define POCR2RAL _SFR_MEM8(0xAE)
891#define POCR2RA_0 0
892#define POCR2RA_1 1
893#define POCR2RA_2 2
894#define POCR2RA_3 3
895#define POCR2RA_4 4
896#define POCR2RA_5 5
897#define POCR2RA_6 6
898#define POCR2RA_7 7
899
900#define POCR2RAH _SFR_MEM8(0xAF)
901#define POCR2RA_8 0
902#define POCR2RA_9 1
903#define POCR2RA_10 2
904#define POCR2RA_11 3
905
906#define POCR2SB _SFR_MEM16(0xB0)
907
908#define POCR2SBL _SFR_MEM8(0xB0)
909#define POCR2SB_0 0
910#define POCR2SB_1 1
911#define POCR2SB_2 2
912#define POCR2SB_3 3
913#define POCR2SB_4 4
914#define POCR2SB_5 5
915#define POCR2SB_6 6
916#define POCR2SB_7 7
917
918#define POCR2SBH _SFR_MEM8(0xB1)
919#define POCR2SB_8 0
920#define POCR2SB_9 1
921#define POCR2SB_10 2
922#define POCR2SB_11 3
923
924#define POCR_RB _SFR_MEM16(0xB2)
925
926#define POCR_RBL _SFR_MEM8(0xB2)
927#define POCR_RB_0 0
928#define POCR_RB_1 1
929#define POCR_RB_2 2
930#define POCR_RB_3 3
931#define POCR_RB_4 4
932#define POCR_RB_5 5
933#define POCR_RB_6 6
934#define POCR_RB_7 7
935
936#define POCR_RBH _SFR_MEM8(0xB3)
937#define POCR_RB_8 0
938#define POCR_RB_9 1
939#define POCR_RB_10 2
940#define POCR_RB_11 3
941
942#define PSYNC _SFR_MEM8(0xB4)
943#define PSYNC00 0
944#define PSYNC01 1
945#define PSYNC10 2
946#define PSYNC11 3
947#define PSYNC20 4
948#define PSYNC21 5
949
950#define PCNF _SFR_MEM8(0xB5)
951#define POPA 2
952#define POPB 3
953#define PMODE 4
954#define PULOCK 5
955
956#define POC _SFR_MEM8(0xB6)
957#define POEN0A 0
958#define POEN0B 1
959#define POEN1A 2
960#define POEN1B 3
961#define POEN2A 4
962#define POEN2B 5
963
964#define PCTL _SFR_MEM8(0xB7)
965#define PRUN 0
966#define PCCYC 1
967#define PCLKSEL 5
968#define PPRE0 6
969#define PPRE1 7
970
971#define PMIC0 _SFR_MEM8(0xB8)
972#define PRFM00 0
973#define PRFM01 1
974#define PRFM02 2
975#define PAOC0 3
976#define PFLTE0 4
977#define PELEV0 5
978#define PISEL0 6
979#define POVEN0 7
980
981#define PMIC1 _SFR_MEM8(0xB9)
982#define PRFM10 0
983#define PRFM11 1
984#define PRFM12 2
985#define PAOC1 3
986#define PFLTE1 4
987#define PELEV1 5
988#define PISEL1 6
989#define POVEN1 7
990
991#define PMIC2 _SFR_MEM8(0xBA)
992#define PRFM20 0
993#define PRFM21 1
994#define PRFM22 2
995#define PAOC2 3
996#define PFLTE2 4
997#define PELEV2 5
998#define PISEL2 6
999#define POVEN2 7
1000
1001#define PIM _SFR_MEM8(0xBB)
1002#define PEOPE 0
1003#define PEVE0 1
1004#define PEVE1 2
1005#define PEVE2 3
1006
1007#define PIFR _SFR_MEM8(0xBC)
1008#define PEOP 0
1009#define PEV0 1
1010#define PEV1 2
1011#define PEV2 3
1012
1013#define LINCR _SFR_MEM8(0xC8)
1014#define LCMD0 0
1015#define LCMD1 1
1016#define LCMD2 2
1017#define LENA 3
1018#define LCONF0 4
1019#define LCONF1 5
1020#define LIN13 6
1021#define LSWRES 7
1022
1023#define LINSIR _SFR_MEM8(0xC9)
1024#define LRXOK 0
1025#define LTXOK 1
1026#define LIDOK 2
1027#define LERR 3
1028#define LBUSY 4
1029#define LIDST0 5
1030#define LIDST1 6
1031#define LIDST2 7
1032
1033#define LINENIR _SFR_MEM8(0xCA)
1034#define LENRXOK 0
1035#define LENTXOK 1
1036#define LENIDOK 2
1037#define LENERR 3
1038
1039#define LINERR _SFR_MEM8(0xCB)
1040#define LBERR 0
1041#define LCERR 1
1042#define LPERR 2
1043#define LSERR 3
1044#define LFERR 4
1045#define LOVERR 5
1046#define LTOERR 6
1047#define LABORT 7
1048
1049#define LINBTR _SFR_MEM8(0xCC)
1050#define LBT0 0
1051#define LBT1 1
1052#define LBT2 2
1053#define LBT3 3
1054#define LBT4 4
1055#define LBT5 5
1056#define LDISR 7
1057
1058#define LINBRR _SFR_MEM16(0xCD)
1059
1060#define LINBRRL _SFR_MEM8(0xCD)
1061#define LDIV0 0
1062#define LDIV1 1
1063#define LDIV2 2
1064#define LDIV3 3
1065#define LDIV4 4
1066#define LDIV5 5
1067#define LDIV6 6
1068#define LDIV7 7
1069
1070#define LINBRRH _SFR_MEM8(0xCE)
1071#define LDIV8 0
1072#define LDIV9 1
1073#define LDIV10 2
1074#define LDIV11 3
1075
1076#define LINDLR _SFR_MEM8(0xCF)
1077#define LRXDL0 0
1078#define LRXDL1 1
1079#define LRXDL2 2
1080#define LRXDL3 3
1081#define LTXDL0 4
1082#define LTXDL1 5
1083#define LTXDL2 6
1084#define LTXDL3 7
1085
1086#define LINIDR _SFR_MEM8(0xD0)
1087#define LID0 0
1088#define LID1 1
1089#define LID2 2
1090#define LID3 3
1091#define LID4 4
1092#define LID5 5
1093#define LP0 6
1094#define LP1 7
1095
1096#define LINSEL _SFR_MEM8(0xD1)
1097#define LINDX0 0
1098#define LINDX1 1
1099#define LINDX2 2
1100#define LAINC 3
1101
1102#define LINDAT _SFR_MEM8(0xD2)
1103#define LDATA0 0
1104#define LDATA1 1
1105#define LDATA2 2
1106#define LDATA3 3
1107#define LDATA4 4
1108#define LDATA5 5
1109#define LDATA6 6
1110#define LDATA7 7
1111
1112#define CANGCON _SFR_MEM8(0xD8)
1113#define SWRES 0
1114#define ENASTB 1
1115#define TEST 2
1116#define LISTEN 3
1117#define SYNTTC 4
1118#define TTC 5
1119#define OVRQ 6
1120#define ABRQ 7
1121
1122#define CANGSTA _SFR_MEM8(0xD9)
1123#define ERRP 0
1124#define BOFF 1
1125#define ENFG 2
1126#define RXBSY 3
1127#define TXBSY 4
1128#define OVFG 6
1129
1130#define CANGIT _SFR_MEM8(0xDA)
1131#define AERG 0
1132#define FERG 1
1133#define CERG 2
1134#define SERG 3
1135#define BXOK 4
1136#define OVRTIM 5
1137#define BOFFIT 6
1138#define CANIT 7
1139
1140#define CANGIE _SFR_MEM8(0xDB)
1141#define ENOVRT 0
1142#define ENERG 1
1143#define ENBX 2
1144#define ENERR 3
1145#define ENTX 4
1146#define ENRX 5
1147#define ENBOFF 6
1148#define ENIT 7
1149
1150#define CANEN2 _SFR_MEM8(0xDC)
1151#define ENMOB0 0
1152#define ENMOB1 1
1153#define ENMOB2 2
1154#define ENMOB3 3
1155#define ENMOB4 4
1156#define ENMOB5 5
1157
1158#define CANEN1 _SFR_MEM8(0xDD)
1159
1160#define CANIE2 _SFR_MEM8(0xDE)
1161#define IEMOB0 0
1162#define IEMOB1 1
1163#define IEMOB2 2
1164#define IEMOB3 3
1165#define IEMOB4 4
1166#define IEMOB5 5
1167
1168#define CANIE1 _SFR_MEM8(0xDF)
1169
1170#define CANSIT2 _SFR_MEM8(0xE0)
1171#define SIT0 0
1172#define SIT1 1
1173#define SIT2 2
1174#define SIT3 3
1175#define SIT4 4
1176#define SIT5 5
1177
1178#define CANSIT1 _SFR_MEM8(0xE1)
1179
1180#define CANBT1 _SFR_MEM8(0xE2)
1181#define BRP0 1
1182#define BRP1 2
1183#define BRP2 3
1184#define BRP3 4
1185#define BRP4 5
1186#define BRP5 6
1187
1188#define CANBT2 _SFR_MEM8(0xE3)
1189#define PRS0 1
1190#define PRS1 2
1191#define PRS2 3
1192#define SJW0 5
1193#define SJW1 6
1194
1195#define CANBT3 _SFR_MEM8(0xE4)
1196#define SMP 0
1197#define PHS10 1
1198#define PHS11 2
1199#define PHS12 3
1200#define PHS20 4
1201#define PHS21 5
1202#define PHS22 6
1203
1204#define CANTCON _SFR_MEM8(0xE5)
1205#define TPRSC0 0
1206#define TPRSC1 1
1207#define TPRSC2 2
1208#define TPRSC3 3
1209#define TPRSC4 4
1210#define TPRSC5 5
1211#define TPRSC6 6
1212#define TPRSC7 7
1213
1214#define CANTIM _SFR_MEM16(0xE6)
1215
1216#define CANTIML _SFR_MEM8(0xE6)
1217#define CANTIM0 0
1218#define CANTIM1 1
1219#define CANTIM2 2
1220#define CANTIM3 3
1221#define CANTIM4 4
1222#define CANTIM5 5
1223#define CANTIM6 6
1224#define CANTIM7 7
1225
1226#define CANTIMH _SFR_MEM8(0xE7)
1227#define CANTIM8 0
1228#define CANTIM9 1
1229#define CANTIM10 2
1230#define CANTIM11 3
1231#define CANTIM12 4
1232#define CANTIM13 5
1233#define CANTIM14 6
1234#define CANTIM15 7
1235
1236#define CANTTC _SFR_MEM16(0xE8)
1237
1238#define CANTTCL _SFR_MEM8(0xE8)
1239#define TIMTCC0 0
1240#define TIMTCC1 1
1241#define TIMTCC2 2
1242#define TIMTCC3 3
1243#define TIMTCC4 4
1244#define TIMTCC5 5
1245#define TIMTCC6 6
1246#define TIMTCC7 7
1247
1248#define CANTTCH _SFR_MEM8(0xE9)
1249#define TIMTCC8 0
1250#define TIMTCC9 1
1251#define TIMTCC10 2
1252#define TIMTCC11 3
1253#define TIMTCC12 4
1254#define TIMTCC13 5
1255#define TIMTCC14 6
1256#define TIMTCC15 7
1257
1258#define CANTEC _SFR_MEM8(0xEA)
1259#define TEC0 0
1260#define TEC1 1
1261#define TEC2 2
1262#define TEC3 3
1263#define TEC4 4
1264#define TEC5 5
1265#define TEC6 6
1266#define TEC7 7
1267
1268#define CANREC _SFR_MEM8(0xEB)
1269#define REC0 0
1270#define REC1 1
1271#define REC2 2
1272#define REC3 3
1273#define REC4 4
1274#define REC5 5
1275#define REC6 6
1276#define REC7 7
1277
1278#define CANHPMOB _SFR_MEM8(0xEC)
1279#define CGP0 0
1280#define CGP1 1
1281#define CGP2 2
1282#define CGP3 3
1283#define HPMOB0 4
1284#define HPMOB1 5
1285#define HPMOB2 6
1286#define HPMOB3 7
1287
1288#define CANPAGE _SFR_MEM8(0xED)
1289#define INDX0 0
1290#define INDX1 1
1291#define INDX2 2
1292#define AINC 3
1293#define MOBNB0 4
1294#define MOBNB1 5
1295#define MOBNB2 6
1296#define MOBNB3 7
1297
1298#define CANSTMOB _SFR_MEM8(0xEE)
1299#define AERR 0
1300#define FERR 1
1301#define CERR 2
1302#define SERR 3
1303#define BERR 4
1304#define RXOK 5
1305#define TXOK 6
1306#define DLCW 7
1307
1308#define CANCDMOB _SFR_MEM8(0xEF)
1309#define DLC0 0
1310#define DLC1 1
1311#define DLC2 2
1312#define DLC3 3
1313#define IDE 4
1314#define RPLV 5
1315#define CONMOB0 6
1316#define CONMOB1 7
1317
1318#define CANIDT4 _SFR_MEM8(0xF0)
1319#define RB0TAG 0
1320#define RB1TAG 1
1321#define RTRTAG 2
1322#define IDT0 3
1323#define IDT1 4
1324#define IDT2 5
1325#define IDT3 6
1326#define IDT4 7
1327
1328#define CANIDT3 _SFR_MEM8(0xF1)
1329#define IDT5 0
1330#define IDT6 1
1331#define IDT7 2
1332#define IDT8 3
1333#define IDT9 4
1334#define IDT10 5
1335#define IDT11 6
1336#define IDT12 7
1337
1338#define CANIDT2 _SFR_MEM8(0xF2)
1339#define IDT13 0
1340#define IDT14 1
1341#define IDT15 2
1342#define IDT16 3
1343#define IDT17 4
1344#define IDT18 5
1345#define IDT19 6
1346#define IDT20 7
1347
1348#define CANIDT1 _SFR_MEM8(0xF3)
1349#define IDT21 0
1350#define IDT22 1
1351#define IDT23 2
1352#define IDT24 3
1353#define IDT25 4
1354#define IDT26 5
1355#define IDT27 6
1356#define IDT28 7
1357
1358#define CANIDM4 _SFR_MEM8(0xF4)
1359#define IDEMSK 0
1360#define RTRMSK 2
1361#define IDMSK0 3
1362#define IDMSK1 4
1363#define IDMSK2 5
1364#define IDMSK3 6
1365#define IDMSK4 7
1366
1367#define CANIDM3 _SFR_MEM8(0xF5)
1368#define IDMSK5 0
1369#define IDMSK6 1
1370#define IDMSK7 2
1371#define IDMSK8 3
1372#define IDMSK9 4
1373#define IDMSK10 5
1374#define IDMSK11 6
1375#define IDMSK12 7
1376
1377#define CANIDM2 _SFR_MEM8(0xF6)
1378#define IDMSK13 0
1379#define IDMSK14 1
1380#define IDMSK15 2
1381#define IDMSK16 3
1382#define IDMSK17 4
1383#define IDMSK18 5
1384#define IDMSK19 6
1385#define IDMSK20 7
1386
1387#define CANIDM1 _SFR_MEM8(0xF7)
1388#define IDMSK21 0
1389#define IDMSK22 1
1390#define IDMSK23 2
1391#define IDMSK24 3
1392#define IDMSK25 4
1393#define IDMSK26 5
1394#define IDMSK27 6
1395#define IDMSK28 7
1396
1397#define CANSTM _SFR_MEM16(0xF8)
1398
1399#define CANSTML _SFR_MEM8(0xF8)
1400#define TIMSTM0 0
1401#define TIMSTM1 1
1402#define TIMSTM2 2
1403#define TIMSTM3 3
1404#define TIMSTM4 4
1405#define TIMSTM5 5
1406#define TIMSTM6 6
1407#define TIMSTM7 7
1408
1409#define CANSTMH _SFR_MEM8(0xF9)
1410#define TIMSTM8 0
1411#define TIMSTM9 1
1412#define TIMSTM10 2
1413#define TIMSTM11 3
1414#define TIMSTM12 4
1415#define TIMSTM13 5
1416#define TIMSTM14 6
1417#define TIMSTM15 7
1418
1419#define CANMSG _SFR_MEM8(0xFA)
1420#define MSG0 0
1421#define MSG1 1
1422#define MSG2 2
1423#define MSG3 3
1424#define MSG4 4
1425#define MSG5 5
1426#define MSG6 6
1427#define MSG7 7
1428
1429
1430/* Interrupt vectors */
1431/* Vector 0 is the reset vector */
1432#define ANACOMP0_vect_num  1
1433#define ANACOMP0_vect      _VECTOR(1)  /* Analog Comparator 0 */
1434#define ANACOMP1_vect_num  2
1435#define ANACOMP1_vect      _VECTOR(2)  /* Analog Comparator 1 */
1436#define ANACOMP2_vect_num  3
1437#define ANACOMP2_vect      _VECTOR(3)  /* Analog Comparator 2 */
1438#define ANACOMP3_vect_num  4
1439#define ANACOMP3_vect      _VECTOR(4)  /* Analog Comparator 3 */
1440#define PSC_FAULT_vect_num  5
1441#define PSC_FAULT_vect      _VECTOR(5)  /* PSC Fault */
1442#define PSC_EC_vect_num  6
1443#define PSC_EC_vect      _VECTOR(6)  /* PSC End of Cycle */
1444#define INT0_vect_num  7
1445#define INT0_vect      _VECTOR(7)  /* External Interrupt Request 0 */
1446#define INT1_vect_num  8
1447#define INT1_vect      _VECTOR(8)  /* External Interrupt Request 1 */
1448#define INT2_vect_num  9
1449#define INT2_vect      _VECTOR(9)  /* External Interrupt Request 2 */
1450#define INT3_vect_num  10
1451#define INT3_vect      _VECTOR(10)  /* External Interrupt Request 3 */
1452#define TIMER1_CAPT_vect_num  11
1453#define TIMER1_CAPT_vect      _VECTOR(11)  /* Timer/Counter1 Capture Event */
1454#define TIMER1_COMPA_vect_num  12
1455#define TIMER1_COMPA_vect      _VECTOR(12)  /* Timer/Counter1 Compare Match A */
1456#define TIMER1_COMPB_vect_num  13
1457#define TIMER1_COMPB_vect      _VECTOR(13)  /* Timer/Counter1 Compare Match B */
1458#define TIMER1_OVF_vect_num  14
1459#define TIMER1_OVF_vect      _VECTOR(14)  /* Timer1/Counter1 Overflow */
1460#define TIMER0_COMPA_vect_num  15
1461#define TIMER0_COMPA_vect      _VECTOR(15)  /* Timer/Counter0 Compare Match A */
1462#define TIMER0_COMPB_vect_num  16
1463#define TIMER0_COMPB_vect      _VECTOR(16)  /* Timer/Counter0 Compare Match B */
1464#define TIMER0_OVF_vect_num  17
1465#define TIMER0_OVF_vect      _VECTOR(17)  /* Timer/Counter0 Overflow */
1466#define CAN_INT_vect_num  18
1467#define CAN_INT_vect      _VECTOR(18)  /* CAN MOB, Burst, General Errors */
1468#define CAN_TOVF_vect_num  19
1469#define CAN_TOVF_vect      _VECTOR(19)  /* CAN Timer Overflow */
1470#define LIN_TC_vect_num  20
1471#define LIN_TC_vect      _VECTOR(20)  /* LIN Transfer Complete */
1472#define LIN_ERR_vect_num  21
1473#define LIN_ERR_vect      _VECTOR(21)  /* LIN Error */
1474#define PCINT0_vect_num  22
1475#define PCINT0_vect      _VECTOR(22)  /* Pin Change Interrupt Request 0 */
1476#define PCINT1_vect_num  23
1477#define PCINT1_vect      _VECTOR(23)  /* Pin Change Interrupt Request 1 */
1478#define PCINT2_vect_num  24
1479#define PCINT2_vect      _VECTOR(24)  /* Pin Change Interrupt Request 2 */
1480#define PCINT3_vect_num  25
1481#define PCINT3_vect      _VECTOR(25)  /* Pin Change Interrupt Request 3 */
1482#define SPI_STC_vect_num  26
1483#define SPI_STC_vect      _VECTOR(26)  /* SPI Serial Transfer Complete */
1484#define ADC_vect_num  27
1485#define ADC_vect      _VECTOR(27)  /* ADC Conversion Complete */
1486#define WDT_vect_num  28
1487#define WDT_vect      _VECTOR(28)  /* Watchdog Time-Out Interrupt */
1488#define EE_READY_vect_num  29
1489#define EE_READY_vect      _VECTOR(29)  /* EEPROM Ready */
1490#define SPM_READY_vect_num  30
1491#define SPM_READY_vect      _VECTOR(30)  /* Store Program Memory Read */
1492
1493#define _VECTOR_SIZE 4 /* Size of individual vector. */
1494#define _VECTORS_SIZE (31 * _VECTOR_SIZE)
1495
1496
1497/* Constants */
1498#define SPM_PAGESIZE (128)
1499#define RAMSTART     (0x0100)
1500#define RAMSIZE      (1024)
1501#define RAMEND       (RAMSTART + RAMSIZE - 1)
1502#define XRAMSTART    (0x0)
1503#define XRAMSIZE     (0)
1504#define XRAMEND      (RAMEND)
1505#define E2END        (0x1FF)
1506#define E2PAGESIZE   (4)
1507#define FLASHEND     (0x3FFF)
1508
1509
1510/* Fuses */
1511#define FUSE_MEMORY_SIZE 3
1512
1513/* Low Fuse Byte */
1514#define FUSE_CKSEL0  (unsigned char)~_BV(0)  /* Select Clock Source */
1515#define FUSE_CKSEL1  (unsigned char)~_BV(1)  /* Select Clock Source */
1516#define FUSE_CKSEL2  (unsigned char)~_BV(2)  /* Select Clock Source */
1517#define FUSE_CKSEL3  (unsigned char)~_BV(3)  /* Select Clock Source */
1518#define FUSE_SUT0  (unsigned char)~_BV(4)  /* Select start-up time */
1519#define FUSE_SUT1  (unsigned char)~_BV(5)  /* Select start-up time */
1520#define FUSE_CKOUT  (unsigned char)~_BV(6)  /* Oscillator output option */
1521#define FUSE_CKDIV8  (unsigned char)~_BV(7)  /* Divide clock by 8 */
1522#define LFUSE_DEFAULT (FUSE_CKDIV8 & FUSE_SUT1 & FUSE_SUT0 & FUSE_CKSEL3 & FUSE_CKSEL2 & FUSE_CKSEL1)
1523
1524/* High Fuse Byte */
1525#define FUSE_BOOTRST  (unsigned char)~_BV(0)  /* Select Reset Vector */
1526#define FUSE_BOOTSZ0  (unsigned char)~_BV(1)  /* Select Boot Size */
1527#define FUSE_BOOTSZ1  (unsigned char)~_BV(2)  /* Select Boot Size */
1528#define FUSE_EESAVE  (unsigned char)~_BV(3)  /* EEPROM memory is preserved through chip erase */
1529#define FUSE_WDTON  (unsigned char)~_BV(4)  /* Watchdog timer always on */
1530#define FUSE_SPIEN  (unsigned char)~_BV(5)  /* Enable Serial programming and Data Downloading */
1531#define FUSE_DWEN  (unsigned char)~_BV(6)  /* DebugWIRE Enable */
1532#define FUSE_RSTDISBL  (unsigned char)~_BV(7)  /* External Reset Disable */
1533#define HFUSE_DEFAULT (FUSE_SPIEN & FUSE_BOOTSZ1 & FUSE_BOOTSZ0)
1534
1535/* Extended Fuse Byte */
1536#define FUSE_BODLEVEL0  (unsigned char)~_BV(0)  /* Brown-out Detector Trigger Level */
1537#define FUSE_BODLEVEL1  (unsigned char)~_BV(1)  /* Brown-out Detector Trigger Level */
1538#define FUSE_BODLEVEL2  (unsigned char)~_BV(2)  /* Brown-out Detector Trigger Level */
1539#define FUSE_PSCRVB  (unsigned char)~_BV(3)  /* PSC Outputs xB Reset Value */
1540#define FUSE_PSCRVA  (unsigned char)~_BV(4)  /* PSC Outputs xA Reset Value */
1541#define FUSE_PSCRB  (unsigned char)~_BV(5)  /* PSC Reset Behavior */
1542#define EFUSE_DEFAULT (FUSE_BODLEVEL2 & FUSE_BODLEVEL1)
1543
1544
1545/* Lock Bits */
1546#define __LOCK_BITS_EXIST
1547#define __BOOT_LOCK_BITS_0_EXIST
1548#define __BOOT_LOCK_BITS_1_EXIST
1549
1550
1551/* Signature */
1552#define SIGNATURE_0 0x1E
1553#define SIGNATURE_1 0x94
1554#define SIGNATURE_2 0x84
1555
1556/**@}*/
1557#endif /* _AVR_ATmega16M1_H_ */
Note: See TracBrowser for help on using the repository browser.