source: rtems/cpukit/score/cpu/avr/avr/iom32m1.h @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

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