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

Last change on this file since 4837 was 4837, checked in by daduve, 2 years ago

Adding new version

File size: 59.2 KB
Line 
1/*****************************************************************************
2 *
3 * Copyright (C) 2016 Atmel Corporation
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 *   notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 *   notice, this list of conditions and the following disclaimer in
14 *   the documentation and/or other materials provided with the
15 *   distribution.
16 *
17 * * Neither the name of the copyright holders nor the names of
18 *   contributors may be used to endorse or promote products derived
19 *   from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 ****************************************************************************/
33
34
35#ifndef _AVR_ATMEGA64RFR2_H_INCLUDED
36#define _AVR_ATMEGA64RFR2_H_INCLUDED
37
38
39#ifndef _AVR_IO_H_
40#  error "Include <avr/io.h> instead of this file."
41#endif
42
43#ifndef _AVR_IOXXX_H_
44#  define _AVR_IOXXX_H_ "iom64rfr2.h"
45#else
46#  error "Attempt to include more than one <avr/ioXXX.h> file."
47#endif
48
49/* Registers and associated bit numbers */
50
51#define PINA    _SFR_IO8(0x00)
52#define PINA7   7
53#define PINA6   6
54#define PINA5   5
55#define PINA4   4
56#define PINA3   3
57#define PINA2   2
58#define PINA1   1
59#define PINA0   0
60
61#define DDRA    _SFR_IO8(0x01)
62#define DDRA7   7
63// Inserted "DDA7" from "DDRA7" due to compatibility
64#define DDA7    7
65#define DDRA6   6
66// Inserted "DDA6" from "DDRA6" due to compatibility
67#define DDA6    6
68#define DDRA5   5
69// Inserted "DDA5" from "DDRA5" due to compatibility
70#define DDA5    5
71#define DDRA4   4
72// Inserted "DDA4" from "DDRA4" due to compatibility
73#define DDA4    4
74#define DDRA3   3
75// Inserted "DDA3" from "DDRA3" due to compatibility
76#define DDA3    3
77#define DDRA2   2
78// Inserted "DDA2" from "DDRA2" due to compatibility
79#define DDA2    2
80#define DDRA1   1
81// Inserted "DDA1" from "DDRA1" due to compatibility
82#define DDA1    1
83#define DDRA0   0
84// Inserted "DDA0" from "DDRA0" due to compatibility
85#define DDA0    0
86
87#define PORTA   _SFR_IO8(0x02)
88#define PORTA7  7
89#define PORTA6  6
90#define PORTA5  5
91#define PORTA4  4
92#define PORTA3  3
93#define PORTA2  2
94#define PORTA1  1
95#define PORTA0  0
96
97#define PINB    _SFR_IO8(0x03)
98#define PINB7   7
99#define PINB6   6
100#define PINB5   5
101#define PINB4   4
102#define PINB3   3
103#define PINB2   2
104#define PINB1   1
105#define PINB0   0
106
107#define DDRB    _SFR_IO8(0x04)
108#define DDRB7   7
109// Inserted "DDB7" from "DDRB7" due to compatibility
110#define DDB7    7
111#define DDRB6   6
112// Inserted "DDB6" from "DDRB6" due to compatibility
113#define DDB6    6
114#define DDRB5   5
115// Inserted "DDB5" from "DDRB5" due to compatibility
116#define DDB5    5
117#define DDRB4   4
118// Inserted "DDB4" from "DDRB4" due to compatibility
119#define DDB4    4
120#define DDRB3   3
121// Inserted "DDB3" from "DDRB3" due to compatibility
122#define DDB3    3
123#define DDRB2   2
124// Inserted "DDB2" from "DDRB2" due to compatibility
125#define DDB2    2
126#define DDRB1   1
127// Inserted "DDB1" from "DDRB1" due to compatibility
128#define DDB1    1
129#define DDRB0   0
130// Inserted "DDB0" from "DDRB0" due to compatibility
131#define DDB0    0
132
133#define PORTB   _SFR_IO8(0x05)
134#define PORTB7  7
135#define PORTB6  6
136#define PORTB5  5
137#define PORTB4  4
138#define PORTB3  3
139#define PORTB2  2
140#define PORTB1  1
141#define PORTB0  0
142
143#define PINC    _SFR_IO8(0x06)
144#define PINC7   7
145#define PINC6   6
146#define PINC5   5
147#define PINC4   4
148#define PINC3   3
149#define PINC2   2
150#define PINC1   1
151#define PINC0   0
152
153#define DDRC    _SFR_IO8(0x07)
154#define DDRC7   7
155// Inserted "DDC7" from "DDRC7" due to compatibility
156#define DDC7    7
157#define DDRC6   6
158// Inserted "DDC6" from "DDRC6" due to compatibility
159#define DDC6    6
160#define DDRC5   5
161// Inserted "DDC5" from "DDRC5" due to compatibility
162#define DDC5    5
163#define DDRC4   4
164// Inserted "DDC4" from "DDRC4" due to compatibility
165#define DDC4    4
166#define DDRC3   3
167// Inserted "DDC3" from "DDRC3" due to compatibility
168#define DDC3    3
169#define DDRC2   2
170// Inserted "DDC2" from "DDRC2" due to compatibility
171#define DDC2    2
172#define DDRC1   1
173// Inserted "DDC1" from "DDRC1" due to compatibility
174#define DDC1    1
175#define DDRC0   0
176// Inserted "DDC0" from "DDRC0" due to compatibility
177#define DDC0    0
178
179#define PORTC   _SFR_IO8(0x08)
180#define PORTC7  7
181#define PORTC6  6
182#define PORTC5  5
183#define PORTC4  4
184#define PORTC3  3
185#define PORTC2  2
186#define PORTC1  1
187#define PORTC0  0
188
189#define PIND    _SFR_IO8(0x09)
190#define PIND7   7
191#define PIND6   6
192#define PIND5   5
193#define PIND4   4
194#define PIND3   3
195#define PIND2   2
196#define PIND1   1
197#define PIND0   0
198
199#define DDRD    _SFR_IO8(0x0A)
200#define DDRD7   7
201// Inserted "DDD7" from "DDRD7" due to compatibility
202#define DDD7    7
203#define DDRD6   6
204// Inserted "DDD6" from "DDRD6" due to compatibility
205#define DDD6    6
206#define DDRD5   5
207// Inserted "DDD5" from "DDRD5" due to compatibility
208#define DDD5    5
209#define DDRD4   4
210// Inserted "DDD4" from "DDRD4" due to compatibility
211#define DDD4    4
212#define DDRD3   3
213// Inserted "DDD3" from "DDRD3" due to compatibility
214#define DDD3    3
215#define DDRD2   2
216// Inserted "DDD2" from "DDRD2" due to compatibility
217#define DDD2    2
218#define DDRD1   1
219// Inserted "DDD1" from "DDRD1" due to compatibility
220#define DDD1    1
221#define DDRD0   0
222// Inserted "DDD0" from "DDRD0" due to compatibility
223#define DDD0    0
224
225#define PORTD   _SFR_IO8(0x0B)
226#define PORTD7  7
227#define PORTD6  6
228#define PORTD5  5
229#define PORTD4  4
230#define PORTD3  3
231#define PORTD2  2
232#define PORTD1  1
233#define PORTD0  0
234
235#define PINE    _SFR_IO8(0x0C)
236#define PINE7   7
237#define PINE6   6
238#define PINE5   5
239#define PINE4   4
240#define PINE3   3
241#define PINE2   2
242#define PINE1   1
243#define PINE0   0
244
245#define DDRE    _SFR_IO8(0x0D)
246#define DDRE7   7
247// Inserted "DDE7" from "DDRE7" due to compatibility
248#define DDE7    7
249#define DDRE6   6
250// Inserted "DDE6" from "DDRE6" due to compatibility
251#define DDE6    6
252#define DDRE5   5
253// Inserted "DDE5" from "DDRE5" due to compatibility
254#define DDE5    5
255#define DDRE4   4
256// Inserted "DDE4" from "DDRE4" due to compatibility
257#define DDE4    4
258#define DDRE3   3
259// Inserted "DDE3" from "DDRE3" due to compatibility
260#define DDE3    3
261#define DDRE2   2
262// Inserted "DDE2" from "DDRE2" due to compatibility
263#define DDE2    2
264#define DDRE1   1
265// Inserted "DDE1" from "DDRE1" due to compatibility
266#define DDE1    1
267#define DDRE0   0
268// Inserted "DDE0" from "DDRE0" due to compatibility
269#define DDE0    0
270
271#define PORTE   _SFR_IO8(0x0E)
272#define PORTE7  7
273#define PORTE6  6
274#define PORTE5  5
275#define PORTE4  4
276#define PORTE3  3
277#define PORTE2  2
278#define PORTE1  1
279#define PORTE0  0
280
281#define PINF    _SFR_IO8(0x0F)
282#define PINF7   7
283#define PINF6   6
284#define PINF5   5
285#define PINF4   4
286#define PINF3   3
287#define PINF2   2
288#define PINF1   1
289#define PINF0   0
290
291#define DDRF    _SFR_IO8(0x10)
292#define DDRF7   7
293// Inserted "DDF7" from "DDRF7" due to compatibility
294#define DDF7    7
295#define DDRF6   6
296// Inserted "DDF6" from "DDRF6" due to compatibility
297#define DDF6    6
298#define DDRF5   5
299// Inserted "DDF5" from "DDRF5" due to compatibility
300#define DDF5    5
301#define DDRF4   4
302// Inserted "DDF4" from "DDRF4" due to compatibility
303#define DDF4    4
304#define DDRF3   3
305// Inserted "DDF3" from "DDRF3" due to compatibility
306#define DDF3    3
307#define DDRF2   2
308// Inserted "DDF2" from "DDRF2" due to compatibility
309#define DDF2    2
310#define DDRF1   1
311// Inserted "DDF1" from "DDRF1" due to compatibility
312#define DDF1    1
313#define DDRF0   0
314// Inserted "DDF0" from "DDRF0" due to compatibility
315#define DDF0    0
316
317#define PORTF   _SFR_IO8(0x11)
318#define PORTF7  7
319#define PORTF6  6
320#define PORTF5  5
321#define PORTF4  4
322#define PORTF3  3
323#define PORTF2  2
324#define PORTF1  1
325#define PORTF0  0
326
327#define PING    _SFR_IO8(0x12)
328#define PING7   7
329#define PING6   6
330#define PING5   5
331#define PING4   4
332#define PING3   3
333#define PING2   2
334#define PING1   1
335#define PING0   0
336
337#define DDRG    _SFR_IO8(0x13)
338#define DDRG7   7
339// Inserted "DDG7" from "DDRG7" due to compatibility
340#define DDG7    7
341#define DDRG6   6
342// Inserted "DDG6" from "DDRG6" due to compatibility
343#define DDG6    6
344#define DDRG5   5
345// Inserted "DDG5" from "DDRG5" due to compatibility
346#define DDG5    5
347#define DDRG4   4
348// Inserted "DDG4" from "DDRG4" due to compatibility
349#define DDG4    4
350#define DDRG3   3
351// Inserted "DDG3" from "DDRG3" due to compatibility
352#define DDG3    3
353#define DDRG2   2
354// Inserted "DDG2" from "DDRG2" due to compatibility
355#define DDG2    2
356#define DDRG1   1
357// Inserted "DDG1" from "DDRG1" due to compatibility
358#define DDG1    1
359#define DDRG0   0
360// Inserted "DDG0" from "DDRG0" due to compatibility
361#define DDG0    0
362
363#define PORTG   _SFR_IO8(0x14)
364#define PORTG7  7
365#define PORTG6  6
366#define PORTG5  5
367#define PORTG4  4
368#define PORTG3  3
369#define PORTG2  2
370#define PORTG1  1
371#define PORTG0  0
372
373#define TIFR0   _SFR_IO8(0x15)
374#define TOV0    0
375#define OCF0A   1
376#define OCF0B   2
377#define Res0    3
378#define Res1    4
379#define Res2    5
380#define Res3    6
381#define Res4    7
382
383#define TIFR1   _SFR_IO8(0x16)
384#define TOV1    0
385#define OCF1A   1
386#define OCF1B   2
387#define OCF1C   3
388#define ICF1    5
389
390#define TIFR2   _SFR_IO8(0x17)
391#define TOV2    0
392#define OCF2A   1
393#define OCF2B   2
394
395#define TIFR3   _SFR_IO8(0x18)
396#define TOV3    0
397#define OCF3A   1
398#define OCF3B   2
399#define OCF3C   3
400#define ICF3    5
401
402#define TIFR4   _SFR_IO8(0x19)
403#define TOV4    0
404#define OCF4A   1
405#define OCF4B   2
406#define OCF4C   3
407#define ICF4    5
408
409#define TIFR5   _SFR_IO8(0x1A)
410#define TOV5    0
411#define OCF5A   1
412#define OCF5B   2
413#define OCF5C   3
414#define ICF5    5
415
416#define PCIFR   _SFR_IO8(0x1B)
417#define PCIF0   0
418#define PCIF1   1
419#define PCIF2   2
420
421#define EIFR    _SFR_IO8(0x1C)
422#define INTF0   0
423#define INTF1   1
424#define INTF2   2
425#define INTF3   3
426#define INTF4   4
427#define INTF5   5
428#define INTF6   6
429#define INTF7   7
430
431#define EIMSK   _SFR_IO8(0x1D)
432#define INT0    0
433#define INT1    1
434#define INT2    2
435#define INT3    3
436#define INT4    4
437#define INT5    5
438#define INT6    6
439#define INT7    7
440
441#define GPIOR0  _SFR_IO8(0x1E)
442#define GPIOR00 0
443#define GPIOR01 1
444#define GPIOR02 2
445#define GPIOR03 3
446#define GPIOR04 4
447#define GPIOR05 5
448#define GPIOR06 6
449#define GPIOR07 7
450
451#define EECR    _SFR_IO8(0x1F)
452#define EERE    0
453#define EEPE    1
454#define EEMPE   2
455#define EERIE   3
456#define EEPM0   4
457#define EEPM1   5
458
459#define EEDR    _SFR_IO8(0x20)
460
461/* Combine EEARL and EEARH */
462#define EEAR    _SFR_IO16(0x21)
463
464#define EEARL   _SFR_IO8(0x21)
465#define EEARH   _SFR_IO8(0x22)
466
467#define GTCCR   _SFR_IO8(0x23)
468#define PSRSYNC 0
469#define PSRASY  1
470#define TSM     7
471
472#define TCCR0A  _SFR_IO8(0x24)
473#define WGM00   0
474#define WGM01   1
475#define COM0B0  4
476#define COM0B1  5
477#define COM0A0  6
478#define COM0A1  7
479
480#define TCCR0B  _SFR_IO8(0x25)
481#define CS00    0
482#define CS01    1
483#define CS02    2
484#define WGM02   3
485#define FOC0B   6
486#define FOC0A   7
487
488#define TCNT0   _SFR_IO8(0x26)
489
490#define OCR0A   _SFR_IO8(0x27)
491
492#define OCR0B   _SFR_IO8(0x28)
493
494/* Reserved [0x29] */
495
496#define GPIOR1  _SFR_IO8(0x2A)
497#define GPIOR10 0
498#define GPIOR11 1
499#define GPIOR12 2
500#define GPIOR13 3
501#define GPIOR14 4
502#define GPIOR15 5
503#define GPIOR16 6
504#define GPIOR17 7
505
506#define GPIOR2  _SFR_IO8(0x2B)
507#define GPIOR20 0
508#define GPIOR21 1
509#define GPIOR22 2
510#define GPIOR23 3
511#define GPIOR24 4
512#define GPIOR25 5
513#define GPIOR26 6
514#define GPIOR27 7
515
516#define SPCR    _SFR_IO8(0x2C)
517#define SPR0    0
518#define SPR1    1
519#define CPHA    2
520#define CPOL    3
521#define MSTR    4
522#define DORD    5
523#define SPE     6
524#define SPIE    7
525
526#define SPSR    _SFR_IO8(0x2D)
527#define SPI2X   0
528#define WCOL    6
529#define SPIF    7
530
531#define SPDR    _SFR_IO8(0x2E)
532
533/* Reserved [0x2F] */
534
535#define ACSR    _SFR_IO8(0x30)
536#define ACIS0   0
537#define ACIS1   1
538#define ACIC    2
539#define ACIE    3
540#define ACI     4
541#define ACO     5
542#define ACBG    6
543#define ACD     7
544
545#define OCDR    _SFR_IO8(0x31)
546#define OCDR0   0
547#define OCDR1   1
548#define OCDR2   2
549#define OCDR3   3
550#define OCDR4   4
551#define OCDR5   5
552#define OCDR6   6
553#define OCDR7   7
554
555/* Reserved [0x32] */
556
557#define SMCR    _SFR_IO8(0x33)
558#define SE      0
559#define SM0     1
560#define SM1     2
561#define SM2     3
562
563#define MCUSR   _SFR_IO8(0x34)
564#define JTRF    4
565#define PORF    0
566#define EXTRF   1
567#define BORF    2
568#define WDRF    3
569
570#define MCUCR   _SFR_IO8(0x35)
571#define JTD     7
572#define IVCE    0
573#define IVSEL   1
574#define PUD     4
575
576/* Reserved [0x36] */
577
578#define SPMCSR  _SFR_IO8(0x37)
579#define SPMEN   0
580#define PGERS   1
581#define PGWRT   2
582#define BLBSET  3
583#define RWWSRE  4
584#define SIGRD   5
585#define RWWSB   6
586#define SPMIE   7
587
588/* Reserved [0x38..0x3C] */
589
590/* SP [0x3D..0x3E] */
591
592/* SREG [0x3F] */
593
594#define WDTCSR  _SFR_MEM8(0x60)
595#define WDE     3
596#define WDCE    4
597#define WDP0    0
598#define WDP1    1
599#define WDP2    2
600#define WDP3    5
601#define WDIE    6
602#define WDIF    7
603
604#define CLKPR   _SFR_MEM8(0x61)
605#define CLKPS0  0
606#define CLKPS1  1
607#define CLKPS2  2
608#define CLKPS3  3
609#define CLKPCE  7
610
611/* Reserved [0x62] */
612
613#define PRR2    _SFR_MEM8(0x63)
614#define PRRAM0  0
615#define PRRAM1  1
616#define PRRAM2  2
617#define PRRAM3  3
618
619#define __AVR_HAVE_PRR2 ((1<<PRRAM0)|(1<<PRRAM1)|(1<<PRRAM2)|(1<<PRRAM3))
620#define __AVR_HAVE_PRR2_PRRAM0
621#define __AVR_HAVE_PRR2_PRRAM1
622#define __AVR_HAVE_PRR2_PRRAM2
623#define __AVR_HAVE_PRR2_PRRAM3
624
625#define PRR0    _SFR_MEM8(0x64)
626#define PRADC   0
627#define PRUSART0 1
628#define PRSPI   2
629#define PRTIM1  3
630#define PRPGA   4
631#define PRTIM0  5
632#define PRTIM2  6
633#define PRTWI   7
634
635#define __AVR_HAVE_PRR0 ((1<<PRADC)|(1<<PRUSART0)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRPGA)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI))
636#define __AVR_HAVE_PRR0_PRADC
637#define __AVR_HAVE_PRR0_PRUSART0
638#define __AVR_HAVE_PRR0_PRSPI
639#define __AVR_HAVE_PRR0_PRTIM1
640#define __AVR_HAVE_PRR0_PRPGA
641#define __AVR_HAVE_PRR0_PRTIM0
642#define __AVR_HAVE_PRR0_PRTIM2
643#define __AVR_HAVE_PRR0_PRTWI
644
645#define PRR1    _SFR_MEM8(0x65)
646#define PRUSART1 0
647#define PRTIM3  3
648#define PRTIM4  4
649#define PRTIM5  5
650#define PRTRX24 6
651#define Res     7
652
653#define __AVR_HAVE_PRR1 ((1<<PRUSART1)|(1<<PRTIM3)|(1<<PRTIM4)|(1<<PRTIM5)|(1<<PRTRX24))
654#define __AVR_HAVE_PRR1_PRUSART1
655#define __AVR_HAVE_PRR1_PRTIM3
656#define __AVR_HAVE_PRR1_PRTIM4
657#define __AVR_HAVE_PRR1_PRTIM5
658#define __AVR_HAVE_PRR1_PRTRX24
659
660#define OSCCAL  _SFR_MEM8(0x66)
661#define CAL0    0
662#define CAL1    1
663#define CAL2    2
664#define CAL3    3
665#define CAL4    4
666#define CAL5    5
667#define CAL6    6
668#define CAL7    7
669#define OSCCAL0 0
670#define OSCCAL1 1
671#define OSCCAL2 2
672#define OSCCAL3 3
673#define OSCCAL4 4
674#define OSCCAL5 5
675#define OSCCAL6 6
676#define OSCCAL7 7
677
678#define BGCR    _SFR_MEM8(0x67)
679#define BGCAL0  0
680#define BGCAL1  1
681#define BGCAL2  2
682#define BGCAL_FINE0 3
683#define BGCAL_FINE1 4
684#define BGCAL_FINE2 5
685#define BGCAL_FINE3 6
686
687#define PCICR   _SFR_MEM8(0x68)
688#define PCIE0   0
689#define PCIE1   1
690#define PCIE2   2
691
692#define EICRA   _SFR_MEM8(0x69)
693#define ISC00   0
694#define ISC01   1
695#define ISC10   2
696#define ISC11   3
697#define ISC20   4
698#define ISC21   5
699#define ISC30   6
700#define ISC31   7
701
702#define EICRB   _SFR_MEM8(0x6A)
703#define ISC40   0
704#define ISC41   1
705#define ISC50   2
706#define ISC51   3
707#define ISC60   4
708#define ISC61   5
709#define ISC70   6
710#define ISC71   7
711
712#define PCMSK0  _SFR_MEM8(0x6B)
713#define PCINT0  0
714#define PCINT1  1
715#define PCINT2  2
716#define PCINT3  3
717#define PCINT4  4
718#define PCINT5  5
719#define PCINT6  6
720#define PCINT7  7
721
722#define PCMSK1  _SFR_MEM8(0x6C)
723#define PCINT8  0
724#define PCINT9  1
725#define PCINT10 2
726#define PCINT11 3
727#define PCINT12 4
728#define PCINT13 5
729#define PCINT14 6
730#define PCINT15 7
731
732#define PCMSK2  _SFR_MEM8(0x6D)
733#define PCINT16 0
734#define PCINT17 1
735#define PCINT18 2
736#define PCINT19 3
737#define PCINT20 4
738#define PCINT21 5
739#define PCINT22 6
740#define PCINT23 7
741
742#define TIMSK0  _SFR_MEM8(0x6E)
743#define TOIE0   0
744#define OCIE0A  1
745#define OCIE0B  2
746
747#define TIMSK1  _SFR_MEM8(0x6F)
748#define TOIE1   0
749#define OCIE1A  1
750#define OCIE1B  2
751#define OCIE1C  3
752#define ICIE1   5
753
754#define TIMSK2  _SFR_MEM8(0x70)
755#define TOIE2   0
756#define OCIE2A  1
757#define OCIE2B  2
758
759#define TIMSK3  _SFR_MEM8(0x71)
760#define TOIE3   0
761#define OCIE3A  1
762#define OCIE3B  2
763#define OCIE3C  3
764#define ICIE3   5
765
766#define TIMSK4  _SFR_MEM8(0x72)
767#define TOIE4   0
768#define OCIE4A  1
769#define OCIE4B  2
770#define OCIE4C  3
771#define ICIE4   5
772
773#define TIMSK5  _SFR_MEM8(0x73)
774#define TOIE5   0
775#define OCIE5A  1
776#define OCIE5B  2
777#define OCIE5C  3
778#define ICIE5   5
779
780/* Reserved [0x74] */
781
782#define NEMCR   _SFR_MEM8(0x75)
783#define AEAM0   4
784#define AEAM1   5
785#define ENEAM   6
786
787/* Reserved [0x76] */
788
789#define ADCSRC  _SFR_MEM8(0x77)
790#define ADSUT0  0
791#define ADSUT1  1
792#define ADSUT2  2
793#define ADSUT3  3
794#define ADSUT4  4
795#define ADTHT0  6
796#define ADTHT1  7
797
798/* Combine ADCL and ADCH */
799#ifndef __ASSEMBLER__
800#define ADC     _SFR_MEM16(0x78)
801#endif
802#define ADCW    _SFR_MEM16(0x78)
803
804#define ADCL    _SFR_MEM8(0x78)
805#define ADCH    _SFR_MEM8(0x79)
806
807#define ADCSRA  _SFR_MEM8(0x7A)
808#define ADPS0   0
809#define ADPS1   1
810#define ADPS2   2
811#define ADIE    3
812#define ADIF    4
813#define ADATE   5
814#define ADSC    6
815#define ADEN    7
816
817#define ADCSRB  _SFR_MEM8(0x7B)
818#define ACME    6
819#define ADTS0   0
820#define ADTS1   1
821#define ADTS2   2
822#define MUX5    3
823#define ACCH    4
824#define REFOK   5
825#define AVDDOK  7
826
827#define ADMUX   _SFR_MEM8(0x7C)
828#define MUX0    0
829#define MUX1    1
830#define MUX2    2
831#define MUX3    3
832#define MUX4    4
833#define ADLAR   5
834#define REFS0   6
835#define REFS1   7
836
837#define DIDR2   _SFR_MEM8(0x7D)
838#define ADC8D   0
839#define ADC9D   1
840#define ADC10D  2
841#define ADC11D  3
842#define ADC12D  4
843#define ADC13D  5
844#define ADC14D  6
845#define ADC15D  7
846
847#define DIDR0   _SFR_MEM8(0x7E)
848#define ADC0D   0
849#define ADC1D   1
850#define ADC2D   2
851#define ADC3D   3
852#define ADC4D   4
853#define ADC5D   5
854#define ADC6D   6
855#define ADC7D   7
856
857#define DIDR1   _SFR_MEM8(0x7F)
858#define AIN0D   0
859#define AIN1D   1
860
861#define TCCR1A  _SFR_MEM8(0x80)
862#define WGM10   0
863#define WGM11   1
864#define COM1C0  2
865#define COM1C1  3
866#define COM1B0  4
867#define COM1B1  5
868#define COM1A0  6
869#define COM1A1  7
870
871#define TCCR1B  _SFR_MEM8(0x81)
872#define CS10    0
873#define CS11    1
874#define CS12    2
875#define WGM12   3
876#define WGM13   4
877#define ICES1   6
878#define ICNC1   7
879
880#define TCCR1C  _SFR_MEM8(0x82)
881#define FOC1C   5
882#define FOC1B   6
883#define FOC1A   7
884
885/* Reserved [0x83] */
886
887/* Combine TCNT1L and TCNT1H */
888#define TCNT1   _SFR_MEM16(0x84)
889
890#define TCNT1L  _SFR_MEM8(0x84)
891#define TCNT1H  _SFR_MEM8(0x85)
892
893/* Combine ICR1L and ICR1H */
894#define ICR1    _SFR_MEM16(0x86)
895
896#define ICR1L   _SFR_MEM8(0x86)
897#define ICR1H   _SFR_MEM8(0x87)
898
899/* Combine OCR1AL and OCR1AH */
900#define OCR1A   _SFR_MEM16(0x88)
901
902#define OCR1AL  _SFR_MEM8(0x88)
903#define OCR1AH  _SFR_MEM8(0x89)
904
905/* Combine OCR1BL and OCR1BH */
906#define OCR1B   _SFR_MEM16(0x8A)
907
908#define OCR1BL  _SFR_MEM8(0x8A)
909#define OCR1BH  _SFR_MEM8(0x8B)
910
911/* Combine OCR1CL and OCR1CH */
912#define OCR1C   _SFR_MEM16(0x8C)
913
914#define OCR1CL  _SFR_MEM8(0x8C)
915#define OCR1CH  _SFR_MEM8(0x8D)
916
917/* Reserved [0x8E..0x8F] */
918
919#define TCCR3A  _SFR_MEM8(0x90)
920#define WGM30   0
921#define WGM31   1
922#define COM3C0  2
923#define COM3C1  3
924#define COM3B0  4
925#define COM3B1  5
926#define COM3A0  6
927#define COM3A1  7
928
929#define TCCR3B  _SFR_MEM8(0x91)
930#define CS30    0
931#define CS31    1
932#define CS32    2
933#define WGM32   3
934#define WGM33   4
935#define ICES3   6
936#define ICNC3   7
937
938#define TCCR3C  _SFR_MEM8(0x92)
939#define FOC3C   5
940#define FOC3B   6
941#define FOC3A   7
942
943/* Reserved [0x93] */
944
945/* Combine TCNT3L and TCNT3H */
946#define TCNT3   _SFR_MEM16(0x94)
947
948#define TCNT3L  _SFR_MEM8(0x94)
949#define TCNT3H  _SFR_MEM8(0x95)
950
951/* Combine ICR3L and ICR3H */
952#define ICR3    _SFR_MEM16(0x96)
953
954#define ICR3L   _SFR_MEM8(0x96)
955#define ICR3H   _SFR_MEM8(0x97)
956
957/* Combine OCR3AL and OCR3AH */
958#define OCR3A   _SFR_MEM16(0x98)
959
960#define OCR3AL  _SFR_MEM8(0x98)
961#define OCR3AH  _SFR_MEM8(0x99)
962
963/* Combine OCR3BL and OCR3BH */
964#define OCR3B   _SFR_MEM16(0x9A)
965
966#define OCR3BL  _SFR_MEM8(0x9A)
967#define OCR3BH  _SFR_MEM8(0x9B)
968
969/* Combine OCR3CL and OCR3CH */
970#define OCR3C   _SFR_MEM16(0x9C)
971
972#define OCR3CL  _SFR_MEM8(0x9C)
973#define OCR3CH  _SFR_MEM8(0x9D)
974
975/* Reserved [0x9E..0x9F] */
976
977#define TCCR4A  _SFR_MEM8(0xA0)
978#define WGM40   0
979#define WGM41   1
980#define COM4C0  2
981#define COM4C1  3
982#define COM4B0  4
983#define COM4B1  5
984#define COM4A0  6
985#define COM4A1  7
986
987#define TCCR4B  _SFR_MEM8(0xA1)
988#define CS40    0
989#define CS41    1
990#define CS42    2
991#define WGM42   3
992#define WGM43   4
993#define ICES4   6
994#define ICNC4   7
995
996#define TCCR4C  _SFR_MEM8(0xA2)
997#define FOC4C   5
998#define FOC4B   6
999#define FOC4A   7
1000
1001/* Reserved [0xA3] */
1002
1003/* Combine TCNT4L and TCNT4H */
1004#define TCNT4   _SFR_MEM16(0xA4)
1005
1006#define TCNT4L  _SFR_MEM8(0xA4)
1007#define TCNT4H  _SFR_MEM8(0xA5)
1008
1009/* Combine ICR4L and ICR4H */
1010#define ICR4    _SFR_MEM16(0xA6)
1011
1012#define ICR4L   _SFR_MEM8(0xA6)
1013#define ICR4H   _SFR_MEM8(0xA7)
1014
1015/* Combine OCR4AL and OCR4AH */
1016#define OCR4A   _SFR_MEM16(0xA8)
1017
1018#define OCR4AL  _SFR_MEM8(0xA8)
1019#define OCR4AH  _SFR_MEM8(0xA9)
1020
1021/* Combine OCR4BL and OCR4BH */
1022#define OCR4B   _SFR_MEM16(0xAA)
1023
1024#define OCR4BL  _SFR_MEM8(0xAA)
1025#define OCR4BH  _SFR_MEM8(0xAB)
1026
1027/* Combine OCR4CL and OCR4CH */
1028#define OCR4C   _SFR_MEM16(0xAC)
1029
1030#define OCR4CL  _SFR_MEM8(0xAC)
1031#define OCR4CH  _SFR_MEM8(0xAD)
1032
1033/* Reserved [0xAE..0xAF] */
1034
1035#define TCCR2A  _SFR_MEM8(0xB0)
1036#define WGM20   0
1037#define WGM21   1
1038#define COM2B0  4
1039#define COM2B1  5
1040#define COM2A0  6
1041#define COM2A1  7
1042
1043#define TCCR2B  _SFR_MEM8(0xB1)
1044#define CS20    0
1045#define CS21    1
1046#define CS22    2
1047#define WGM22   3
1048#define FOC2B   6
1049#define FOC2A   7
1050
1051#define TCNT2   _SFR_MEM8(0xB2)
1052
1053#define OCR2A   _SFR_MEM8(0xB3)
1054
1055#define OCR2B   _SFR_MEM8(0xB4)
1056
1057/* Reserved [0xB5] */
1058
1059#define ASSR    _SFR_MEM8(0xB6)
1060#define TCR2BUB 0
1061#define TCR2AUB 1
1062#define OCR2BUB 2
1063#define OCR2AUB 3
1064#define TCN2UB  4
1065#define AS2     5
1066#define EXCLK   6
1067#define EXCLKAMR 7
1068
1069/* Reserved [0xB7] */
1070
1071#define TWBR    _SFR_MEM8(0xB8)
1072
1073#define TWSR    _SFR_MEM8(0xB9)
1074#define TWPS0   0
1075#define TWPS1   1
1076#define TWS3    3
1077#define TWS4    4
1078#define TWS5    5
1079#define TWS6    6
1080#define TWS7    7
1081
1082#define TWAR    _SFR_MEM8(0xBA)
1083#define TWGCE   0
1084#define TWA0    1
1085#define TWA1    2
1086#define TWA2    3
1087#define TWA3    4
1088#define TWA4    5
1089#define TWA5    6
1090#define TWA6    7
1091
1092#define TWDR    _SFR_MEM8(0xBB)
1093
1094#define TWCR    _SFR_MEM8(0xBC)
1095#define TWIE    0
1096#define TWEN    2
1097#define TWWC    3
1098#define TWSTO   4
1099#define TWSTA   5
1100#define TWEA    6
1101#define TWINT   7
1102
1103#define TWAMR   _SFR_MEM8(0xBD)
1104#define TWAM0   1
1105#define TWAM1   2
1106#define TWAM2   3
1107#define TWAM3   4
1108#define TWAM4   5
1109#define TWAM5   6
1110#define TWAM6   7
1111
1112#define IRQ_MASK1 _SFR_MEM8(0xBE)
1113#define TX_START_EN 0
1114#define MAF_0_AMI_EN 1
1115#define MAF_1_AMI_EN 2
1116#define MAF_2_AMI_EN 3
1117#define MAF_3_AMI_EN 4
1118
1119#define IRQ_STATUS1 _SFR_MEM8(0xBF)
1120#define TX_START 0
1121#define MAF_0_AMI 1
1122#define MAF_1_AMI 2
1123#define MAF_2_AMI 3
1124#define MAF_3_AMI 4
1125
1126#define UCSR0A  _SFR_MEM8(0xC0)
1127#define MPCM0   0
1128#define U2X0    1
1129#define UPE0    2
1130#define DOR0    3
1131#define FE0     4
1132#define UDRE0   5
1133#define TXC0    6
1134#define RXC0    7
1135
1136#define UCSR0B  _SFR_MEM8(0xC1)
1137#define TXB80   0
1138#define RXB80   1
1139#define UCSZ02  2
1140#define TXEN0   3
1141#define RXEN0   4
1142#define UDRIE0  5
1143#define TXCIE0  6
1144#define RXCIE0  7
1145
1146#define UCSR0C  _SFR_MEM8(0xC2)
1147#define UCPOL0  0
1148#define UCSZ00  1
1149#define UCSZ01  2
1150#define USBS0   3
1151#define UPM00   4
1152#define UPM01   5
1153#define UMSEL00 6
1154#define UMSEL01 7
1155#define UCPHA0  1
1156#define UDORD0  2
1157
1158/* Reserved [0xC3] */
1159
1160/* Combine UBRR0L and UBRR0H */
1161#define UBRR0   _SFR_MEM16(0xC4)
1162
1163#define UBRR0L  _SFR_MEM8(0xC4)
1164#define UBRR0H  _SFR_MEM8(0xC5)
1165
1166#define UDR0    _SFR_MEM8(0xC6)
1167
1168/* Reserved [0xC7] */
1169
1170#define UCSR1A  _SFR_MEM8(0xC8)
1171#define MPCM1   0
1172#define U2X1    1
1173#define UPE1    2
1174#define DOR1    3
1175#define FE1     4
1176#define UDRE1   5
1177#define TXC1    6
1178#define RXC1    7
1179
1180#define UCSR1B  _SFR_MEM8(0xC9)
1181#define TXB81   0
1182#define RXB81   1
1183#define UCSZ12  2
1184#define TXEN1   3
1185#define RXEN1   4
1186#define UDRIE1  5
1187#define TXCIE1  6
1188#define RXCIE1  7
1189
1190#define UCSR1C  _SFR_MEM8(0xCA)
1191#define UCPOL1  0
1192#define UCSZ10  1
1193#define UCSZ11  2
1194#define USBS1   3
1195#define UPM10   4
1196#define UPM11   5
1197#define UMSEL10 6
1198#define UMSEL11 7
1199#define UCPHA1  1
1200#define UDORD1  2
1201
1202/* Reserved [0xCB] */
1203
1204/* Combine UBRR1L and UBRR1H */
1205#define UBRR1   _SFR_MEM16(0xCC)
1206
1207#define UBRR1L  _SFR_MEM8(0xCC)
1208#define UBRR1H  _SFR_MEM8(0xCD)
1209
1210#define UDR1    _SFR_MEM8(0xCE)
1211
1212/* Reserved [0xCF..0xD6] */
1213
1214#define SCRSTRLL _SFR_MEM8(0xD7)
1215#define SCRSTRLL0 0
1216#define SCRSTRLL1 1
1217#define SCRSTRLL2 2
1218#define SCRSTRLL3 3
1219#define SCRSTRLL4 4
1220#define SCRSTRLL5 5
1221#define SCRSTRLL6 6
1222#define SCRSTRLL7 7
1223
1224#define SCRSTRLH _SFR_MEM8(0xD8)
1225#define SCRSTRLH0 0
1226#define SCRSTRLH1 1
1227#define SCRSTRLH2 2
1228#define SCRSTRLH3 3
1229#define SCRSTRLH4 4
1230#define SCRSTRLH5 5
1231#define SCRSTRLH6 6
1232#define SCRSTRLH7 7
1233
1234#define SCRSTRHL _SFR_MEM8(0xD9)
1235#define SCRSTRHL0 0
1236#define SCRSTRHL1 1
1237#define SCRSTRHL2 2
1238#define SCRSTRHL3 3
1239#define SCRSTRHL4 4
1240#define SCRSTRHL5 5
1241#define SCRSTRHL6 6
1242#define SCRSTRHL7 7
1243
1244#define SCRSTRHH _SFR_MEM8(0xDA)
1245#define SCRSTRHH0 0
1246#define SCRSTRHH1 1
1247#define SCRSTRHH2 2
1248#define SCRSTRHH3 3
1249#define SCRSTRHH4 4
1250#define SCRSTRHH5 5
1251#define SCRSTRHH6 6
1252#define SCRSTRHH7 7
1253
1254#define SCCSR   _SFR_MEM8(0xDB)
1255#define SCCS10  0
1256#define SCCS11  1
1257#define SCCS20  2
1258#define SCCS21  3
1259#define SCCS30  4
1260#define SCCS31  5
1261
1262#define SCCR0   _SFR_MEM8(0xDC)
1263#define SCCMP1  0
1264#define SCCMP2  1
1265#define SCCMP3  2
1266#define SCTSE   3
1267#define SCCKSEL 4
1268#define SCEN    5
1269#define SCMBTS  6
1270#define SCRES   7
1271
1272#define SCCR1   _SFR_MEM8(0xDD)
1273#define SCENBO  0
1274#define SCEECLK 1
1275#define SCCKDIV0 2
1276#define SCCKDIV1 3
1277#define SCCKDIV2 4
1278#define SCBTSM  5
1279#define Res5    6
1280#define Res6    7
1281
1282#define SCSR    _SFR_MEM8(0xDE)
1283#define SCBSY   0
1284
1285#define SCIRQM  _SFR_MEM8(0xDF)
1286#define IRQMCP1 0
1287#define IRQMCP2 1
1288#define IRQMCP3 2
1289#define IRQMOF  3
1290#define IRQMBO  4
1291
1292#define SCIRQS  _SFR_MEM8(0xE0)
1293#define IRQSCP1 0
1294#define IRQSCP2 1
1295#define IRQSCP3 2
1296#define IRQSOF  3
1297#define IRQSBO  4
1298
1299#define SCCNTLL _SFR_MEM8(0xE1)
1300#define SCCNTLL0 0
1301#define SCCNTLL1 1
1302#define SCCNTLL2 2
1303#define SCCNTLL3 3
1304#define SCCNTLL4 4
1305#define SCCNTLL5 5
1306#define SCCNTLL6 6
1307#define SCCNTLL7 7
1308
1309#define SCCNTLH _SFR_MEM8(0xE2)
1310#define SCCNTLH0 0
1311#define SCCNTLH1 1
1312#define SCCNTLH2 2
1313#define SCCNTLH3 3
1314#define SCCNTLH4 4
1315#define SCCNTLH5 5
1316#define SCCNTLH6 6
1317#define SCCNTLH7 7
1318
1319#define SCCNTHL _SFR_MEM8(0xE3)
1320#define SCCNTHL0 0
1321#define SCCNTHL1 1
1322#define SCCNTHL2 2
1323#define SCCNTHL3 3
1324#define SCCNTHL4 4
1325#define SCCNTHL5 5
1326#define SCCNTHL6 6
1327#define SCCNTHL7 7
1328
1329#define SCCNTHH _SFR_MEM8(0xE4)
1330#define SCCNTHH0 0
1331#define SCCNTHH1 1
1332#define SCCNTHH2 2
1333#define SCCNTHH3 3
1334#define SCCNTHH4 4
1335#define SCCNTHH5 5
1336#define SCCNTHH6 6
1337#define SCCNTHH7 7
1338
1339#define SCBTSRLL _SFR_MEM8(0xE5)
1340#define SCBTSRLL0 0
1341#define SCBTSRLL1 1
1342#define SCBTSRLL2 2
1343#define SCBTSRLL3 3
1344#define SCBTSRLL4 4
1345#define SCBTSRLL5 5
1346#define SCBTSRLL6 6
1347#define SCBTSRLL7 7
1348
1349#define SCBTSRLH _SFR_MEM8(0xE6)
1350#define SCBTSRLH0 0
1351#define SCBTSRLH1 1
1352#define SCBTSRLH2 2
1353#define SCBTSRLH3 3
1354#define SCBTSRLH4 4
1355#define SCBTSRLH5 5
1356#define SCBTSRLH6 6
1357#define SCBTSRLH7 7
1358
1359#define SCBTSRHL _SFR_MEM8(0xE7)
1360#define SCBTSRHL0 0
1361#define SCBTSRHL1 1
1362#define SCBTSRHL2 2
1363#define SCBTSRHL3 3
1364#define SCBTSRHL4 4
1365#define SCBTSRHL5 5
1366#define SCBTSRHL6 6
1367#define SCBTSRHL7 7
1368
1369#define SCBTSRHH _SFR_MEM8(0xE8)
1370#define SCBTSRHH0 0
1371#define SCBTSRHH1 1
1372#define SCBTSRHH2 2
1373#define SCBTSRHH3 3
1374#define SCBTSRHH4 4
1375#define SCBTSRHH5 5
1376#define SCBTSRHH6 6
1377#define SCBTSRHH7 7
1378
1379#define SCTSRLL _SFR_MEM8(0xE9)
1380#define SCTSRLL0 0
1381#define SCTSRLL1 1
1382#define SCTSRLL2 2
1383#define SCTSRLL3 3
1384#define SCTSRLL4 4
1385#define SCTSRLL5 5
1386#define SCTSRLL6 6
1387#define SCTSRLL7 7
1388
1389#define SCTSRLH _SFR_MEM8(0xEA)
1390#define SCTSRLH0 0
1391#define SCTSRLH1 1
1392#define SCTSRLH2 2
1393#define SCTSRLH3 3
1394#define SCTSRLH4 4
1395#define SCTSRLH5 5
1396#define SCTSRLH6 6
1397#define SCTSRLH7 7
1398
1399#define SCTSRHL _SFR_MEM8(0xEB)
1400#define SCTSRHL0 0
1401#define SCTSRHL1 1
1402#define SCTSRHL2 2
1403#define SCTSRHL3 3
1404#define SCTSRHL4 4
1405#define SCTSRHL5 5
1406#define SCTSRHL6 6
1407#define SCTSRHL7 7
1408
1409#define SCTSRHH _SFR_MEM8(0xEC)
1410#define SCTSRHH0 0
1411#define SCTSRHH1 1
1412#define SCTSRHH2 2
1413#define SCTSRHH3 3
1414#define SCTSRHH4 4
1415#define SCTSRHH5 5
1416#define SCTSRHH6 6
1417#define SCTSRHH7 7
1418
1419#define SCOCR3LL _SFR_MEM8(0xED)
1420#define SCOCR3LL0 0
1421#define SCOCR3LL1 1
1422#define SCOCR3LL2 2
1423#define SCOCR3LL3 3
1424#define SCOCR3LL4 4
1425#define SCOCR3LL5 5
1426#define SCOCR3LL6 6
1427#define SCOCR3LL7 7
1428
1429#define SCOCR3LH _SFR_MEM8(0xEE)
1430#define SCOCR3LH0 0
1431#define SCOCR3LH1 1
1432#define SCOCR3LH2 2
1433#define SCOCR3LH3 3
1434#define SCOCR3LH4 4
1435#define SCOCR3LH5 5
1436#define SCOCR3LH6 6
1437#define SCOCR3LH7 7
1438
1439#define SCOCR3HL _SFR_MEM8(0xEF)
1440#define SCOCR3HL0 0
1441#define SCOCR3HL1 1
1442#define SCOCR3HL2 2
1443#define SCOCR3HL3 3
1444#define SCOCR3HL4 4
1445#define SCOCR3HL5 5
1446#define SCOCR3HL6 6
1447#define SCOCR3HL7 7
1448
1449#define SCOCR3HH _SFR_MEM8(0xF0)
1450#define SCOCR3HH0 0
1451#define SCOCR3HH1 1
1452#define SCOCR3HH2 2
1453#define SCOCR3HH3 3
1454#define SCOCR3HH4 4
1455#define SCOCR3HH5 5
1456#define SCOCR3HH6 6
1457#define SCOCR3HH7 7
1458
1459#define SCOCR2LL _SFR_MEM8(0xF1)
1460#define SCOCR2LL0 0
1461#define SCOCR2LL1 1
1462#define SCOCR2LL2 2
1463#define SCOCR2LL3 3
1464#define SCOCR2LL4 4
1465#define SCOCR2LL5 5
1466#define SCOCR2LL6 6
1467#define SCOCR2LL7 7
1468
1469#define SCOCR2LH _SFR_MEM8(0xF2)
1470#define SCOCR2LH0 0
1471#define SCOCR2LH1 1
1472#define SCOCR2LH2 2
1473#define SCOCR2LH3 3
1474#define SCOCR2LH4 4
1475#define SCOCR2LH5 5
1476#define SCOCR2LH6 6
1477#define SCOCR2LH7 7
1478
1479#define SCOCR2HL _SFR_MEM8(0xF3)
1480#define SCOCR2HL0 0
1481#define SCOCR2HL1 1
1482#define SCOCR2HL2 2
1483#define SCOCR2HL3 3
1484#define SCOCR2HL4 4
1485#define SCOCR2HL5 5
1486#define SCOCR2HL6 6
1487#define SCOCR2HL7 7
1488
1489#define SCOCR2HH _SFR_MEM8(0xF4)
1490#define SCOCR2HH0 0
1491#define SCOCR2HH1 1
1492#define SCOCR2HH2 2
1493#define SCOCR2HH3 3
1494#define SCOCR2HH4 4
1495#define SCOCR2HH5 5
1496#define SCOCR2HH6 6
1497#define SCOCR2HH7 7
1498
1499#define SCOCR1LL _SFR_MEM8(0xF5)
1500#define SCOCR1LL0 0
1501#define SCOCR1LL1 1
1502#define SCOCR1LL2 2
1503#define SCOCR1LL3 3
1504#define SCOCR1LL4 4
1505#define SCOCR1LL5 5
1506#define SCOCR1LL6 6
1507#define SCOCR1LL7 7
1508
1509#define SCOCR1LH _SFR_MEM8(0xF6)
1510#define SCOCR1LH0 0
1511#define SCOCR1LH1 1
1512#define SCOCR1LH2 2
1513#define SCOCR1LH3 3
1514#define SCOCR1LH4 4
1515#define SCOCR1LH5 5
1516#define SCOCR1LH6 6
1517#define SCOCR1LH7 7
1518
1519#define SCOCR1HL _SFR_MEM8(0xF7)
1520#define SCOCR1HL0 0
1521#define SCOCR1HL1 1
1522#define SCOCR1HL2 2
1523#define SCOCR1HL3 3
1524#define SCOCR1HL4 4
1525#define SCOCR1HL5 5
1526#define SCOCR1HL6 6
1527#define SCOCR1HL7 7
1528
1529#define SCOCR1HH _SFR_MEM8(0xF8)
1530#define SCOCR1HH0 0
1531#define SCOCR1HH1 1
1532#define SCOCR1HH2 2
1533#define SCOCR1HH3 3
1534#define SCOCR1HH4 4
1535#define SCOCR1HH5 5
1536#define SCOCR1HH6 6
1537#define SCOCR1HH7 7
1538
1539#define SCTSTRLL _SFR_MEM8(0xF9)
1540#define SCTSTRLL0 0
1541#define SCTSTRLL1 1
1542#define SCTSTRLL2 2
1543#define SCTSTRLL3 3
1544#define SCTSTRLL4 4
1545#define SCTSTRLL5 5
1546#define SCTSTRLL6 6
1547#define SCTSTRLL7 7
1548
1549#define SCTSTRLH _SFR_MEM8(0xFA)
1550#define SCTSTRLH0 0
1551#define SCTSTRLH1 1
1552#define SCTSTRLH2 2
1553#define SCTSTRLH3 3
1554#define SCTSTRLH4 4
1555#define SCTSTRLH5 5
1556#define SCTSTRLH6 6
1557#define SCTSTRLH7 7
1558
1559#define SCTSTRHL _SFR_MEM8(0xFB)
1560#define SCTSTRHL0 0
1561#define SCTSTRHL1 1
1562#define SCTSTRHL2 2
1563#define SCTSTRHL3 3
1564#define SCTSTRHL4 4
1565#define SCTSTRHL5 5
1566#define SCTSTRHL6 6
1567#define SCTSTRHL7 7
1568
1569#define SCTSTRHH _SFR_MEM8(0xFC)
1570#define SCTSTRHH0 0
1571#define SCTSTRHH1 1
1572#define SCTSTRHH2 2
1573#define SCTSTRHH3 3
1574#define SCTSTRHH4 4
1575#define SCTSTRHH5 5
1576#define SCTSTRHH6 6
1577#define SCTSTRHH7 7
1578
1579/* Reserved [0xFD..0x10B] */
1580
1581#define MAFCR0  _SFR_MEM8(0x10C)
1582#define MAF0EN  0
1583#define MAF1EN  1
1584#define MAF2EN  2
1585#define MAF3EN  3
1586
1587#define MAFCR1  _SFR_MEM8(0x10D)
1588#define AACK_0_I_AM_COORD 0
1589#define AACK_0_SET_PD 1
1590#define AACK_1_I_AM_COORD 2
1591#define AACK_1_SET_PD 3
1592#define AACK_2_I_AM_COORD 4
1593#define AACK_2_SET_PD 5
1594#define AACK_3_I_AM_COORD 6
1595#define AACK_3_SET_PD 7
1596
1597#define MAFSA0L _SFR_MEM8(0x10E)
1598#define MAFSA0L0 0
1599#define MAFSA0L1 1
1600#define MAFSA0L2 2
1601#define MAFSA0L3 3
1602#define MAFSA0L4 4
1603#define MAFSA0L5 5
1604#define MAFSA0L6 6
1605#define MAFSA0L7 7
1606
1607#define MAFSA0H _SFR_MEM8(0x10F)
1608#define MAFSA0H0 0
1609#define MAFSA0H1 1
1610#define MAFSA0H2 2
1611#define MAFSA0H3 3
1612#define MAFSA0H4 4
1613#define MAFSA0H5 5
1614#define MAFSA0H6 6
1615#define MAFSA0H7 7
1616
1617#define MAFPA0L _SFR_MEM8(0x110)
1618#define MAFPA0L0 0
1619#define MAFPA0L1 1
1620#define MAFPA0L2 2
1621#define MAFPA0L3 3
1622#define MAFPA0L4 4
1623#define MAFPA0L5 5
1624#define MAFPA0L6 6
1625#define MAFPA0L7 7
1626
1627#define MAFPA0H _SFR_MEM8(0x111)
1628#define MAFPA0H0 0
1629#define MAFPA0H1 1
1630#define MAFPA0H2 2
1631#define MAFPA0H3 3
1632#define MAFPA0H4 4
1633#define MAFPA0H5 5
1634#define MAFPA0H6 6
1635#define MAFPA0H7 7
1636
1637#define MAFSA1L _SFR_MEM8(0x112)
1638#define MAFSA1L0 0
1639#define MAFSA1L1 1
1640#define MAFSA1L2 2
1641#define MAFSA1L3 3
1642#define MAFSA1L4 4
1643#define MAFSA1L5 5
1644#define MAFSA1L6 6
1645#define MAFSA1L7 7
1646
1647#define MAFSA1H _SFR_MEM8(0x113)
1648#define MAFSA1H0 0
1649#define MAFSA1H1 1
1650#define MAFSA1H2 2
1651#define MAFSA1H3 3
1652#define MAFSA1H4 4
1653#define MAFSA1H5 5
1654#define MAFSA1H6 6
1655#define MAFSA1H7 7
1656
1657#define MAFPA1L _SFR_MEM8(0x114)
1658#define MAFPA1L0 0
1659#define MAFPA1L1 1
1660#define MAFPA1L2 2
1661#define MAFPA1L3 3
1662#define MAFPA1L4 4
1663#define MAFPA1L5 5
1664#define MAFPA1L6 6
1665#define MAFPA1L7 7
1666
1667#define MAFPA1H _SFR_MEM8(0x115)
1668#define MAFPA1H0 0
1669#define MAFPA1H1 1
1670#define MAFPA1H2 2
1671#define MAFPA1H3 3
1672#define MAFPA1H4 4
1673#define MAFPA1H5 5
1674#define MAFPA1H6 6
1675#define MAFPA1H7 7
1676
1677#define MAFSA2L _SFR_MEM8(0x116)
1678#define MAFSA2L0 0
1679#define MAFSA2L1 1
1680#define MAFSA2L2 2
1681#define MAFSA2L3 3
1682#define MAFSA2L4 4
1683#define MAFSA2L5 5
1684#define MAFSA2L6 6
1685#define MAFSA2L7 7
1686
1687#define MAFSA2H _SFR_MEM8(0x117)
1688#define MAFSA2H0 0
1689#define MAFSA2H1 1
1690#define MAFSA2H2 2
1691#define MAFSA2H3 3
1692#define MAFSA2H4 4
1693#define MAFSA2H5 5
1694#define MAFSA2H6 6
1695#define MAFSA2H7 7
1696
1697#define MAFPA2L _SFR_MEM8(0x118)
1698#define MAFPA2L0 0
1699#define MAFPA2L1 1
1700#define MAFPA2L2 2
1701#define MAFPA2L3 3
1702#define MAFPA2L4 4
1703#define MAFPA2L5 5
1704#define MAFPA2L6 6
1705#define MAFPA2L7 7
1706
1707#define MAFPA2H _SFR_MEM8(0x119)
1708#define MAFPA2H0 0
1709#define MAFPA2H1 1
1710#define MAFPA2H2 2
1711#define MAFPA2H3 3
1712#define MAFPA2H4 4
1713#define MAFPA2H5 5
1714#define MAFPA2H6 6
1715#define MAFPA2H7 7
1716
1717#define MAFSA3L _SFR_MEM8(0x11A)
1718#define MAFSA3L0 0
1719#define MAFSA3L1 1
1720#define MAFSA3L2 2
1721#define MAFSA3L3 3
1722#define MAFSA3L4 4
1723#define MAFSA3L5 5
1724#define MAFSA3L6 6
1725#define MAFSA3L7 7
1726
1727#define MAFSA3H _SFR_MEM8(0x11B)
1728#define MAFSA3H0 0
1729#define MAFSA3H1 1
1730#define MAFSA3H2 2
1731#define MAFSA3H3 3
1732#define MAFSA3H4 4
1733#define MAFSA3H5 5
1734#define MAFSA3H6 6
1735#define MAFSA3H7 7
1736
1737#define MAFPA3L _SFR_MEM8(0x11C)
1738#define MAFPA3L0 0
1739#define MAFPA3L1 1
1740#define MAFPA3L2 2
1741#define MAFPA3L3 3
1742#define MAFPA3L4 4
1743#define MAFPA3L5 5
1744#define MAFPA3L6 6
1745#define MAFPA3L7 7
1746
1747#define MAFPA3H _SFR_MEM8(0x11D)
1748#define MAFPA3H0 0
1749#define MAFPA3H1 1
1750#define MAFPA3H2 2
1751#define MAFPA3H3 3
1752#define MAFPA3H4 4
1753#define MAFPA3H5 5
1754#define MAFPA3H6 6
1755#define MAFPA3H7 7
1756
1757/* Reserved [0x11E..0x11F] */
1758
1759#define TCCR5A  _SFR_MEM8(0x120)
1760#define WGM50   0
1761#define WGM51   1
1762#define COM5C0  2
1763#define COM5C1  3
1764#define COM5B0  4
1765#define COM5B1  5
1766#define COM5A0  6
1767#define COM5A1  7
1768
1769#define TCCR5B  _SFR_MEM8(0x121)
1770#define CS50    0
1771#define CS51    1
1772#define CS52    2
1773#define WGM52   3
1774#define WGM53   4
1775#define ICES5   6
1776#define ICNC5   7
1777
1778#define TCCR5C  _SFR_MEM8(0x122)
1779#define FOC5C   5
1780#define FOC5B   6
1781#define FOC5A   7
1782
1783/* Reserved [0x123] */
1784
1785/* Combine TCNT5L and TCNT5H */
1786#define TCNT5   _SFR_MEM16(0x124)
1787
1788#define TCNT5L  _SFR_MEM8(0x124)
1789#define TCNT5H  _SFR_MEM8(0x125)
1790
1791/* Combine ICR5L and ICR5H */
1792#define ICR5    _SFR_MEM16(0x126)
1793
1794#define ICR5L   _SFR_MEM8(0x126)
1795#define ICR5H   _SFR_MEM8(0x127)
1796
1797/* Combine OCR5AL and OCR5AH */
1798#define OCR5A   _SFR_MEM16(0x128)
1799
1800#define OCR5AL  _SFR_MEM8(0x128)
1801#define OCR5AH  _SFR_MEM8(0x129)
1802
1803/* Combine OCR5BL and OCR5BH */
1804#define OCR5B   _SFR_MEM16(0x12A)
1805
1806#define OCR5BL  _SFR_MEM8(0x12A)
1807#define OCR5BH  _SFR_MEM8(0x12B)
1808
1809/* Combine OCR5CL and OCR5CH */
1810#define OCR5C   _SFR_MEM16(0x12C)
1811
1812#define OCR5CL  _SFR_MEM8(0x12C)
1813#define OCR5CH  _SFR_MEM8(0x12D)
1814
1815/* Reserved [0x12E] */
1816
1817#define LLCR    _SFR_MEM8(0x12F)
1818#define LLENCAL 0
1819#define LLSHORT 1
1820#define LLTCO   2
1821#define LLCAL   3
1822#define LLCOMP  4
1823#define LLDONE  5
1824
1825#define LLDRL   _SFR_MEM8(0x130)
1826#define LLDRL0  0
1827#define LLDRL1  1
1828#define LLDRL2  2
1829#define LLDRL3  3
1830
1831#define LLDRH   _SFR_MEM8(0x131)
1832#define LLDRH0  0
1833#define LLDRH1  1
1834#define LLDRH2  2
1835#define LLDRH3  3
1836#define LLDRH4  4
1837
1838#define DRTRAM3 _SFR_MEM8(0x132)
1839#define ENDRT   4
1840#define DRTSWOK 5
1841
1842#define DRTRAM2 _SFR_MEM8(0x133)
1843
1844#define DRTRAM1 _SFR_MEM8(0x134)
1845
1846#define DRTRAM0 _SFR_MEM8(0x135)
1847
1848#define DPDS0   _SFR_MEM8(0x136)
1849#define PBDRV0  0
1850#define PBDRV1  1
1851#define PDDRV0  2
1852#define PDDRV1  3
1853#define PEDRV0  4
1854#define PEDRV1  5
1855#define PFDRV0  6
1856#define PFDRV1  7
1857
1858#define DPDS1   _SFR_MEM8(0x137)
1859#define PGDRV0  0
1860#define PGDRV1  1
1861
1862#define PARCR   _SFR_MEM8(0x138)
1863#define PARUFI  0
1864#define PARDFI  1
1865#define PALTU0  2
1866#define PALTU1  3
1867#define PALTU2  4
1868#define PALTD0  5
1869#define PALTD1  6
1870#define PALTD2  7
1871
1872#define TRXPR   _SFR_MEM8(0x139)
1873#define TRXRST  0
1874#define SLPTR   1
1875
1876/* Reserved [0x13A..0x13B] */
1877
1878#define AES_CTRL _SFR_MEM8(0x13C)
1879#define AES_IM  2
1880#define AES_DIR 3
1881#define AES_MODE 5
1882#define AES_REQUEST 7
1883
1884#define AES_STATUS _SFR_MEM8(0x13D)
1885#define AES_DONE 0
1886#define AES_ER  7
1887
1888#define AES_STATE _SFR_MEM8(0x13E)
1889#define AES_STATE0 0
1890#define AES_STATE1 1
1891#define AES_STATE2 2
1892#define AES_STATE3 3
1893#define AES_STATE4 4
1894#define AES_STATE5 5
1895#define AES_STATE6 6
1896#define AES_STATE7 7
1897
1898#define AES_KEY _SFR_MEM8(0x13F)
1899#define AES_KEY0 0
1900#define AES_KEY1 1
1901#define AES_KEY2 2
1902#define AES_KEY3 3
1903#define AES_KEY4 4
1904#define AES_KEY5 5
1905#define AES_KEY6 6
1906#define AES_KEY7 7
1907
1908/* Reserved [0x140] */
1909
1910#define TRX_STATUS _SFR_MEM8(0x141)
1911#define TRX_STATUS0 0
1912#define TRX_STATUS1 1
1913#define TRX_STATUS2 2
1914#define TRX_STATUS3 3
1915#define TRX_STATUS4 4
1916#define TST_STATUS 5
1917#define CCA_STATUS 6
1918#define CCA_DONE 7
1919
1920#define TRX_STATE _SFR_MEM8(0x142)
1921#define TRX_CMD0 0
1922#define TRX_CMD1 1
1923#define TRX_CMD2 2
1924#define TRX_CMD3 3
1925#define TRX_CMD4 4
1926#define TRAC_STATUS0 5
1927#define TRAC_STATUS1 6
1928#define TRAC_STATUS2 7
1929
1930#define TRX_CTRL_0 _SFR_MEM8(0x143)
1931#define PMU_IF_INV 4
1932#define PMU_START 5
1933#define PMU_EN  6
1934#define Res7    7
1935
1936#define TRX_CTRL_1 _SFR_MEM8(0x144)
1937#define PLL_TX_FLT 4
1938#define TX_AUTO_CRC_ON 5
1939#define IRQ_2_EXT_EN 6
1940#define PA_EXT_EN 7
1941
1942#define PHY_TX_PWR _SFR_MEM8(0x145)
1943#define TX_PWR0 0
1944#define TX_PWR1 1
1945#define TX_PWR2 2
1946#define TX_PWR3 3
1947
1948#define PHY_RSSI _SFR_MEM8(0x146)
1949#define RSSI0   0
1950#define RSSI1   1
1951#define RSSI2   2
1952#define RSSI3   3
1953#define RSSI4   4
1954#define RND_VALUE0 5
1955#define RND_VALUE1 6
1956#define RX_CRC_VALID 7
1957
1958#define PHY_ED_LEVEL _SFR_MEM8(0x147)
1959#define ED_LEVEL0 0
1960#define ED_LEVEL1 1
1961#define ED_LEVEL2 2
1962#define ED_LEVEL3 3
1963#define ED_LEVEL4 4
1964#define ED_LEVEL5 5
1965#define ED_LEVEL6 6
1966#define ED_LEVEL7 7
1967
1968#define PHY_CC_CCA _SFR_MEM8(0x148)
1969#define CHANNEL0 0
1970#define CHANNEL1 1
1971#define CHANNEL2 2
1972#define CHANNEL3 3
1973#define CHANNEL4 4
1974#define CCA_MODE0 5
1975#define CCA_MODE1 6
1976#define CCA_REQUEST 7
1977
1978#define CCA_THRES _SFR_MEM8(0x149)
1979#define CCA_ED_THRES0 0
1980#define CCA_ED_THRES1 1
1981#define CCA_ED_THRES2 2
1982#define CCA_ED_THRES3 3
1983#define CCA_CS_THRES0 4
1984#define CCA_CS_THRES1 5
1985#define CCA_CS_THRES2 6
1986#define CCA_CS_THRES3 7
1987
1988#define RX_CTRL _SFR_MEM8(0x14A)
1989#define PDT_THRES0 0
1990#define PDT_THRES1 1
1991#define PDT_THRES2 2
1992#define PDT_THRES3 3
1993
1994#define SFD_VALUE _SFR_MEM8(0x14B)
1995#define SFD_VALUE0 0
1996#define SFD_VALUE1 1
1997#define SFD_VALUE2 2
1998#define SFD_VALUE3 3
1999#define SFD_VALUE4 4
2000#define SFD_VALUE5 5
2001#define SFD_VALUE6 6
2002#define SFD_VALUE7 7
2003
2004#define TRX_CTRL_2 _SFR_MEM8(0x14C)
2005#define OQPSK_DATA_RATE0 0
2006#define OQPSK_DATA_RATE1 1
2007#define RX_SAFE_MODE 7
2008
2009#define ANT_DIV _SFR_MEM8(0x14D)
2010#define ANT_CTRL0 0
2011#define ANT_CTRL1 1
2012#define ANT_EXT_SW_EN 2
2013#define ANT_DIV_EN 3
2014#define ANT_SEL 7
2015
2016#define IRQ_MASK _SFR_MEM8(0x14E)
2017#define PLL_LOCK_EN 0
2018#define PLL_UNLOCK_EN 1
2019#define RX_START_EN 2
2020#define RX_END_EN 3
2021#define CCA_ED_DONE_EN 4
2022#define AMI_EN  5
2023#define TX_END_EN 6
2024#define AWAKE_EN 7
2025
2026#define IRQ_STATUS _SFR_MEM8(0x14F)
2027#define PLL_LOCK 0
2028#define PLL_UNLOCK 1
2029#define RX_START 2
2030#define RX_END  3
2031#define CCA_ED_DONE 4
2032#define AMI     5
2033#define TX_END  6
2034#define AWAKE   7
2035
2036#define VREG_CTRL _SFR_MEM8(0x150)
2037#define DVDD_OK 2
2038#define DVREG_EXT 3
2039#define AVDD_OK 6
2040#define AVREG_EXT 7
2041
2042#define BATMON  _SFR_MEM8(0x151)
2043#define BATMON_VTH0 0
2044#define BATMON_VTH1 1
2045#define BATMON_VTH2 2
2046#define BATMON_VTH3 3
2047#define BATMON_HR 4
2048#define BATMON_OK 5
2049#define BAT_LOW_EN 6
2050#define BAT_LOW 7
2051
2052#define XOSC_CTRL _SFR_MEM8(0x152)
2053#define XTAL_TRIM0 0
2054#define XTAL_TRIM1 1
2055#define XTAL_TRIM2 2
2056#define XTAL_TRIM3 3
2057#define XTAL_MODE0 4
2058#define XTAL_MODE1 5
2059#define XTAL_MODE2 6
2060#define XTAL_MODE3 7
2061
2062#define CC_CTRL_0 _SFR_MEM8(0x153)
2063#define CC_NUMBER0 0
2064#define CC_NUMBER1 1
2065#define CC_NUMBER2 2
2066#define CC_NUMBER3 3
2067#define CC_NUMBER4 4
2068#define CC_NUMBER5 5
2069#define CC_NUMBER6 6
2070#define CC_NUMBER7 7
2071
2072#define CC_CTRL_1 _SFR_MEM8(0x154)
2073#define CC_BAND0 0
2074#define CC_BAND1 1
2075#define CC_BAND2 2
2076#define CC_BAND3 3
2077
2078#define RX_SYN  _SFR_MEM8(0x155)
2079#define RX_PDT_LEVEL0 0
2080#define RX_PDT_LEVEL1 1
2081#define RX_PDT_LEVEL2 2
2082#define RX_PDT_LEVEL3 3
2083#define RX_OVERRIDE 6
2084#define RX_PDT_DIS 7
2085
2086#define TRX_RPC _SFR_MEM8(0x156)
2087#define XAH_RPC_EN 0
2088#define IPAN_RPC_EN 1
2089#define PLL_RPC_EN 3
2090#define PDT_RPC_EN 4
2091#define RX_RPC_EN 5
2092#define RX_RPC_CTRL0 6
2093#define RX_RPC_CTRL1 7
2094
2095#define XAH_CTRL_1 _SFR_MEM8(0x157)
2096#define AACK_PROM_MODE 1
2097#define AACK_ACK_TIME 2
2098#define AACK_UPLD_RES_FT 4
2099#define AACK_FLTR_RES_FT 5
2100
2101#define FTN_CTRL _SFR_MEM8(0x158)
2102#define FTN_START 7
2103
2104/* Reserved [0x159] */
2105
2106#define PLL_CF  _SFR_MEM8(0x15A)
2107#define PLL_CF_START 7
2108
2109#define PLL_DCU _SFR_MEM8(0x15B)
2110#define PLL_DCU_START 7
2111
2112#define PART_NUM _SFR_MEM8(0x15C)
2113#define PART_NUM0 0
2114#define PART_NUM1 1
2115#define PART_NUM2 2
2116#define PART_NUM3 3
2117#define PART_NUM4 4
2118#define PART_NUM5 5
2119#define PART_NUM6 6
2120#define PART_NUM7 7
2121
2122#define VERSION_NUM _SFR_MEM8(0x15D)
2123#define VERSION_NUM0 0
2124#define VERSION_NUM1 1
2125#define VERSION_NUM2 2
2126#define VERSION_NUM3 3
2127#define VERSION_NUM4 4
2128#define VERSION_NUM5 5
2129#define VERSION_NUM6 6
2130#define VERSION_NUM7 7
2131
2132#define MAN_ID_0 _SFR_MEM8(0x15E)
2133#define MAN_ID_00 0
2134#define MAN_ID_01 1
2135#define MAN_ID_02 2
2136#define MAN_ID_03 3
2137#define MAN_ID_04 4
2138#define MAN_ID_05 5
2139#define MAN_ID_06 6
2140#define MAN_ID_07 7
2141
2142#define MAN_ID_1 _SFR_MEM8(0x15F)
2143#define MAN_ID_10 0
2144#define MAN_ID_11 1
2145#define MAN_ID_12 2
2146#define MAN_ID_13 3
2147#define MAN_ID_14 4
2148#define MAN_ID_15 5
2149#define MAN_ID_16 6
2150#define MAN_ID_17 7
2151
2152#define SHORT_ADDR_0 _SFR_MEM8(0x160)
2153#define SHORT_ADDR_00 0
2154#define SHORT_ADDR_01 1
2155#define SHORT_ADDR_02 2
2156#define SHORT_ADDR_03 3
2157#define SHORT_ADDR_04 4
2158#define SHORT_ADDR_05 5
2159#define SHORT_ADDR_06 6
2160#define SHORT_ADDR_07 7
2161
2162#define SHORT_ADDR_1 _SFR_MEM8(0x161)
2163#define SHORT_ADDR_10 0
2164#define SHORT_ADDR_11 1
2165#define SHORT_ADDR_12 2
2166#define SHORT_ADDR_13 3
2167#define SHORT_ADDR_14 4
2168#define SHORT_ADDR_15 5
2169#define SHORT_ADDR_16 6
2170#define SHORT_ADDR_17 7
2171
2172#define PAN_ID_0 _SFR_MEM8(0x162)
2173#define PAN_ID_00 0
2174#define PAN_ID_01 1
2175#define PAN_ID_02 2
2176#define PAN_ID_03 3
2177#define PAN_ID_04 4
2178#define PAN_ID_05 5
2179#define PAN_ID_06 6
2180#define PAN_ID_07 7
2181
2182#define PAN_ID_1 _SFR_MEM8(0x163)
2183#define PAN_ID_10 0
2184#define PAN_ID_11 1
2185#define PAN_ID_12 2
2186#define PAN_ID_13 3
2187#define PAN_ID_14 4
2188#define PAN_ID_15 5
2189#define PAN_ID_16 6
2190#define PAN_ID_17 7
2191
2192#define IEEE_ADDR_0 _SFR_MEM8(0x164)
2193#define IEEE_ADDR_00 0
2194#define IEEE_ADDR_01 1
2195#define IEEE_ADDR_02 2
2196#define IEEE_ADDR_03 3
2197#define IEEE_ADDR_04 4
2198#define IEEE_ADDR_05 5
2199#define IEEE_ADDR_06 6
2200#define IEEE_ADDR_07 7
2201
2202#define IEEE_ADDR_1 _SFR_MEM8(0x165)
2203#define IEEE_ADDR_10 0
2204#define IEEE_ADDR_11 1
2205#define IEEE_ADDR_12 2
2206#define IEEE_ADDR_13 3
2207#define IEEE_ADDR_14 4
2208#define IEEE_ADDR_15 5
2209#define IEEE_ADDR_16 6
2210#define IEEE_ADDR_17 7
2211
2212#define IEEE_ADDR_2 _SFR_MEM8(0x166)
2213#define IEEE_ADDR_20 0
2214#define IEEE_ADDR_21 1
2215#define IEEE_ADDR_22 2
2216#define IEEE_ADDR_23 3
2217#define IEEE_ADDR_24 4
2218#define IEEE_ADDR_25 5
2219#define IEEE_ADDR_26 6
2220#define IEEE_ADDR_27 7
2221
2222#define IEEE_ADDR_3 _SFR_MEM8(0x167)
2223#define IEEE_ADDR_30 0
2224#define IEEE_ADDR_31 1
2225#define IEEE_ADDR_32 2
2226#define IEEE_ADDR_33 3
2227#define IEEE_ADDR_34 4
2228#define IEEE_ADDR_35 5
2229#define IEEE_ADDR_36 6
2230#define IEEE_ADDR_37 7
2231
2232#define IEEE_ADDR_4 _SFR_MEM8(0x168)
2233#define IEEE_ADDR_40 0
2234#define IEEE_ADDR_41 1
2235#define IEEE_ADDR_42 2
2236#define IEEE_ADDR_43 3
2237#define IEEE_ADDR_44 4
2238#define IEEE_ADDR_45 5
2239#define IEEE_ADDR_46 6
2240#define IEEE_ADDR_47 7
2241
2242#define IEEE_ADDR_5 _SFR_MEM8(0x169)
2243#define IEEE_ADDR_50 0
2244#define IEEE_ADDR_51 1
2245#define IEEE_ADDR_52 2
2246#define IEEE_ADDR_53 3
2247#define IEEE_ADDR_54 4
2248#define IEEE_ADDR_55 5
2249#define IEEE_ADDR_56 6
2250#define IEEE_ADDR_57 7
2251
2252#define IEEE_ADDR_6 _SFR_MEM8(0x16A)
2253#define IEEE_ADDR_60 0
2254#define IEEE_ADDR_61 1
2255#define IEEE_ADDR_62 2
2256#define IEEE_ADDR_63 3
2257#define IEEE_ADDR_64 4
2258#define IEEE_ADDR_65 5
2259#define IEEE_ADDR_66 6
2260#define IEEE_ADDR_67 7
2261
2262#define IEEE_ADDR_7 _SFR_MEM8(0x16B)
2263#define IEEE_ADDR_70 0
2264#define IEEE_ADDR_71 1
2265#define IEEE_ADDR_72 2
2266#define IEEE_ADDR_73 3
2267#define IEEE_ADDR_74 4
2268#define IEEE_ADDR_75 5
2269#define IEEE_ADDR_76 6
2270#define IEEE_ADDR_77 7
2271
2272#define XAH_CTRL_0 _SFR_MEM8(0x16C)
2273#define SLOTTED_OPERATION 0
2274#define MAX_CSMA_RETRIES0 1
2275#define MAX_CSMA_RETRIES1 2
2276#define MAX_CSMA_RETRIES2 3
2277#define MAX_FRAME_RETRIES0 4
2278#define MAX_FRAME_RETRIES1 5
2279#define MAX_FRAME_RETRIES2 6
2280#define MAX_FRAME_RETRIES3 7
2281
2282#define CSMA_SEED_0 _SFR_MEM8(0x16D)
2283#define CSMA_SEED_00 0
2284#define CSMA_SEED_01 1
2285#define CSMA_SEED_02 2
2286#define CSMA_SEED_03 3
2287#define CSMA_SEED_04 4
2288#define CSMA_SEED_05 5
2289#define CSMA_SEED_06 6
2290#define CSMA_SEED_07 7
2291
2292#define CSMA_SEED_1 _SFR_MEM8(0x16E)
2293#define CSMA_SEED_10 0
2294#define CSMA_SEED_11 1
2295#define CSMA_SEED_12 2
2296#define AACK_I_AM_COORD 3
2297#define AACK_DIS_ACK 4
2298#define AACK_SET_PD 5
2299#define AACK_FVN_MODE0 6
2300#define AACK_FVN_MODE1 7
2301
2302#define CSMA_BE _SFR_MEM8(0x16F)
2303#define MIN_BE0 0
2304#define MIN_BE1 1
2305#define MIN_BE2 2
2306#define MIN_BE3 3
2307#define MAX_BE0 4
2308#define MAX_BE1 5
2309#define MAX_BE2 6
2310#define MAX_BE3 7
2311
2312/* Reserved [0x170..0x175] */
2313
2314#define TST_CTRL_DIGI _SFR_MEM8(0x176)
2315#define TST_CTRL_DIG0 0
2316#define TST_CTRL_DIG1 1
2317#define TST_CTRL_DIG2 2
2318#define TST_CTRL_DIG3 3
2319
2320/* Reserved [0x177..0x17A] */
2321
2322#define TST_RX_LENGTH _SFR_MEM8(0x17B)
2323#define RX_LENGTH0 0
2324#define RX_LENGTH1 1
2325#define RX_LENGTH2 2
2326#define RX_LENGTH3 3
2327#define RX_LENGTH4 4
2328#define RX_LENGTH5 5
2329#define RX_LENGTH6 6
2330#define RX_LENGTH7 7
2331
2332/* Reserved [0x17C..0x17F] */
2333
2334#define TRXFBST _SFR_MEM8(0x180)
2335
2336/* Reserved [0x181..0x1FE] */
2337
2338#define TRXFBEND _SFR_MEM8(0x1FF)
2339
2340
2341
2342/* Values and associated defines */
2343
2344
2345#define SLEEP_MODE_IDLE (0x00<<1)
2346#define SLEEP_MODE_ADC (0x01<<1)
2347#define SLEEP_MODE_PWR_DOWN (0x02<<1)
2348#define SLEEP_MODE_PWR_SAVE (0x03<<1)
2349#define SLEEP_MODE_STANDBY (0x06<<1)
2350#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
2351
2352/* Interrupt vectors */
2353/* Vector 0 is the reset vector */
2354/* External Interrupt Request 0 */
2355#define INT0_vect            _VECTOR(1)
2356#define INT0_vect_num        1
2357
2358/* External Interrupt Request 1 */
2359#define INT1_vect            _VECTOR(2)
2360#define INT1_vect_num        2
2361
2362/* External Interrupt Request 2 */
2363#define INT2_vect            _VECTOR(3)
2364#define INT2_vect_num        3
2365
2366/* External Interrupt Request 3 */
2367#define INT3_vect            _VECTOR(4)
2368#define INT3_vect_num        4
2369
2370/* External Interrupt Request 4 */
2371#define INT4_vect            _VECTOR(5)
2372#define INT4_vect_num        5
2373
2374/* External Interrupt Request 5 */
2375#define INT5_vect            _VECTOR(6)
2376#define INT5_vect_num        6
2377
2378/* External Interrupt Request 6 */
2379#define INT6_vect            _VECTOR(7)
2380#define INT6_vect_num        7
2381
2382/* External Interrupt Request 7 */
2383#define INT7_vect            _VECTOR(8)
2384#define INT7_vect_num        8
2385
2386/* Pin Change Interrupt Request 0 */
2387#define PCINT0_vect            _VECTOR(9)
2388#define PCINT0_vect_num        9
2389
2390/* Pin Change Interrupt Request 1 */
2391#define PCINT1_vect            _VECTOR(10)
2392#define PCINT1_vect_num        10
2393
2394/* Pin Change Interrupt Request 2 */
2395#define PCINT2_vect            _VECTOR(11)
2396#define PCINT2_vect_num        11
2397
2398/* Watchdog Time-out Interrupt */
2399#define WDT_vect            _VECTOR(12)
2400#define WDT_vect_num        12
2401
2402/* Timer/Counter2 Compare Match A */
2403#define TIMER2_COMPA_vect            _VECTOR(13)
2404#define TIMER2_COMPA_vect_num        13
2405
2406/* Timer/Counter2 Compare Match B */
2407#define TIMER2_COMPB_vect            _VECTOR(14)
2408#define TIMER2_COMPB_vect_num        14
2409
2410/* Timer/Counter2 Overflow */
2411#define TIMER2_OVF_vect            _VECTOR(15)
2412#define TIMER2_OVF_vect_num        15
2413
2414/* Timer/Counter1 Capture Event */
2415#define TIMER1_CAPT_vect            _VECTOR(16)
2416#define TIMER1_CAPT_vect_num        16
2417
2418/* Timer/Counter1 Compare Match A */
2419#define TIMER1_COMPA_vect            _VECTOR(17)
2420#define TIMER1_COMPA_vect_num        17
2421
2422/* Timer/Counter1 Compare Match B */
2423#define TIMER1_COMPB_vect            _VECTOR(18)
2424#define TIMER1_COMPB_vect_num        18
2425
2426/* Timer/Counter1 Compare Match C */
2427#define TIMER1_COMPC_vect            _VECTOR(19)
2428#define TIMER1_COMPC_vect_num        19
2429
2430/* Timer/Counter1 Overflow */
2431#define TIMER1_OVF_vect            _VECTOR(20)
2432#define TIMER1_OVF_vect_num        20
2433
2434/* Timer/Counter0 Compare Match A */
2435#define TIMER0_COMPA_vect            _VECTOR(21)
2436#define TIMER0_COMPA_vect_num        21
2437
2438/* Timer/Counter0 Compare Match B */
2439#define TIMER0_COMPB_vect            _VECTOR(22)
2440#define TIMER0_COMPB_vect_num        22
2441
2442/* Timer/Counter0 Overflow */
2443#define TIMER0_OVF_vect            _VECTOR(23)
2444#define TIMER0_OVF_vect_num        23
2445
2446/* SPI Serial Transfer Complete */
2447#define SPI_STC_vect            _VECTOR(24)
2448#define SPI_STC_vect_num        24
2449
2450/* USART0, Rx Complete */
2451#define USART0_RX_vect            _VECTOR(25)
2452#define USART0_RX_vect_num        25
2453
2454/* USART0 Data register Empty */
2455#define USART0_UDRE_vect            _VECTOR(26)
2456#define USART0_UDRE_vect_num        26
2457
2458/* USART0, Tx Complete */
2459#define USART0_TX_vect            _VECTOR(27)
2460#define USART0_TX_vect_num        27
2461
2462/* Analog Comparator */
2463#define ANALOG_COMP_vect            _VECTOR(28)
2464#define ANALOG_COMP_vect_num        28
2465
2466/* ADC Conversion Complete */
2467#define ADC_vect            _VECTOR(29)
2468#define ADC_vect_num        29
2469
2470/* EEPROM Ready */
2471#define EE_READY_vect            _VECTOR(30)
2472#define EE_READY_vect_num        30
2473
2474/* Timer/Counter3 Capture Event */
2475#define TIMER3_CAPT_vect            _VECTOR(31)
2476#define TIMER3_CAPT_vect_num        31
2477
2478/* Timer/Counter3 Compare Match A */
2479#define TIMER3_COMPA_vect            _VECTOR(32)
2480#define TIMER3_COMPA_vect_num        32
2481
2482/* Timer/Counter3 Compare Match B */
2483#define TIMER3_COMPB_vect            _VECTOR(33)
2484#define TIMER3_COMPB_vect_num        33
2485
2486/* Timer/Counter3 Compare Match C */
2487#define TIMER3_COMPC_vect            _VECTOR(34)
2488#define TIMER3_COMPC_vect_num        34
2489
2490/* Timer/Counter3 Overflow */
2491#define TIMER3_OVF_vect            _VECTOR(35)
2492#define TIMER3_OVF_vect_num        35
2493
2494/* USART1, Rx Complete */
2495#define USART1_RX_vect            _VECTOR(36)
2496#define USART1_RX_vect_num        36
2497
2498/* USART1 Data register Empty */
2499#define USART1_UDRE_vect            _VECTOR(37)
2500#define USART1_UDRE_vect_num        37
2501
2502/* USART1, Tx Complete */
2503#define USART1_TX_vect            _VECTOR(38)
2504#define USART1_TX_vect_num        38
2505
2506/* 2-wire Serial Interface */
2507#define TWI_vect            _VECTOR(39)
2508#define TWI_vect_num        39
2509
2510/* Store Program Memory Read */
2511#define SPM_READY_vect            _VECTOR(40)
2512#define SPM_READY_vect_num        40
2513
2514/* Timer/Counter4 Capture Event */
2515#define TIMER4_CAPT_vect            _VECTOR(41)
2516#define TIMER4_CAPT_vect_num        41
2517
2518/* Timer/Counter4 Compare Match A */
2519#define TIMER4_COMPA_vect            _VECTOR(42)
2520#define TIMER4_COMPA_vect_num        42
2521
2522/* Timer/Counter4 Compare Match B */
2523#define TIMER4_COMPB_vect            _VECTOR(43)
2524#define TIMER4_COMPB_vect_num        43
2525
2526/* Timer/Counter4 Compare Match C */
2527#define TIMER4_COMPC_vect            _VECTOR(44)
2528#define TIMER4_COMPC_vect_num        44
2529
2530/* Timer/Counter4 Overflow */
2531#define TIMER4_OVF_vect            _VECTOR(45)
2532#define TIMER4_OVF_vect_num        45
2533
2534/* Timer/Counter5 Capture Event */
2535#define TIMER5_CAPT_vect            _VECTOR(46)
2536#define TIMER5_CAPT_vect_num        46
2537
2538/* Timer/Counter5 Compare Match A */
2539#define TIMER5_COMPA_vect            _VECTOR(47)
2540#define TIMER5_COMPA_vect_num        47
2541
2542/* Timer/Counter5 Compare Match B */
2543#define TIMER5_COMPB_vect            _VECTOR(48)
2544#define TIMER5_COMPB_vect_num        48
2545
2546/* Timer/Counter5 Compare Match C */
2547#define TIMER5_COMPC_vect            _VECTOR(49)
2548#define TIMER5_COMPC_vect_num        49
2549
2550/* Timer/Counter5 Overflow */
2551#define TIMER5_OVF_vect            _VECTOR(50)
2552#define TIMER5_OVF_vect_num        50
2553
2554/* TRX24 - PLL lock interrupt */
2555#define TRX24_PLL_LOCK_vect            _VECTOR(57)
2556#define TRX24_PLL_LOCK_vect_num        57
2557
2558/* TRX24 - PLL unlock interrupt */
2559#define TRX24_PLL_UNLOCK_vect            _VECTOR(58)
2560#define TRX24_PLL_UNLOCK_vect_num        58
2561
2562/* TRX24 - Receive start interrupt */
2563#define TRX24_RX_START_vect            _VECTOR(59)
2564#define TRX24_RX_START_vect_num        59
2565
2566/* TRX24 - RX_END interrupt */
2567#define TRX24_RX_END_vect            _VECTOR(60)
2568#define TRX24_RX_END_vect_num        60
2569
2570/* TRX24 - CCA/ED done interrupt */
2571#define TRX24_CCA_ED_DONE_vect            _VECTOR(61)
2572#define TRX24_CCA_ED_DONE_vect_num        61
2573
2574/* TRX24 - XAH - AMI */
2575#define TRX24_XAH_AMI_vect            _VECTOR(62)
2576#define TRX24_XAH_AMI_vect_num        62
2577
2578/* TRX24 - TX_END interrupt */
2579#define TRX24_TX_END_vect            _VECTOR(63)
2580#define TRX24_TX_END_vect_num        63
2581
2582/* TRX24 AWAKE - tranceiver is reaching state TRX_OFF */
2583#define TRX24_AWAKE_vect            _VECTOR(64)
2584#define TRX24_AWAKE_vect_num        64
2585
2586/* Symbol counter - compare match 1 interrupt */
2587#define SCNT_CMP1_vect            _VECTOR(65)
2588#define SCNT_CMP1_vect_num        65
2589
2590/* Symbol counter - compare match 2 interrupt */
2591#define SCNT_CMP2_vect            _VECTOR(66)
2592#define SCNT_CMP2_vect_num        66
2593
2594/* Symbol counter - compare match 3 interrupt */
2595#define SCNT_CMP3_vect            _VECTOR(67)
2596#define SCNT_CMP3_vect_num        67
2597
2598/* Symbol counter - overflow interrupt */
2599#define SCNT_OVFL_vect            _VECTOR(68)
2600#define SCNT_OVFL_vect_num        68
2601
2602/* Symbol counter - backoff interrupt */
2603#define SCNT_BACKOFF_vect            _VECTOR(69)
2604#define SCNT_BACKOFF_vect_num        69
2605
2606/* AES engine ready interrupt */
2607#define AES_READY_vect            _VECTOR(70)
2608#define AES_READY_vect_num        70
2609
2610/* Battery monitor indicates supply voltage below threshold */
2611#define BAT_LOW_vect            _VECTOR(71)
2612#define BAT_LOW_vect_num        71
2613
2614/* TRX24 TX start interrupt */
2615#define TRX24_TX_START_vect            _VECTOR(72)
2616#define TRX24_TX_START_vect_num        72
2617
2618/* Address match interrupt of address filter 0 */
2619#define TRX24_AMI0_vect            _VECTOR(73)
2620#define TRX24_AMI0_vect_num        73
2621
2622/* Address match interrupt of address filter 1 */
2623#define TRX24_AMI1_vect            _VECTOR(74)
2624#define TRX24_AMI1_vect_num        74
2625
2626/* Address match interrupt of address filter 2 */
2627#define TRX24_AMI2_vect            _VECTOR(75)
2628#define TRX24_AMI2_vect_num        75
2629
2630/* Address match interrupt of address filter 3 */
2631#define TRX24_AMI3_vect            _VECTOR(76)
2632#define TRX24_AMI3_vect_num        76
2633
2634#define _VECTORS_SIZE 308
2635
2636
2637/* Constants */
2638
2639#define SPM_PAGESIZE 256
2640#define FLASHSTART   0x0000
2641#define FLASHEND     0xFFFF
2642#define RAMSTART     0x0200
2643#define RAMSIZE      8192
2644#define RAMEND       0x21FF
2645#define E2START     0
2646#define E2SIZE      2048
2647#define E2PAGESIZE  8
2648#define E2END       0x07FF
2649#define XRAMEND      RAMEND
2650
2651
2652/* Fuses */
2653
2654#define FUSE_MEMORY_SIZE 3
2655
2656/* Low Fuse Byte */
2657#define FUSE_CKSEL_SUT0  (unsigned char)~_BV(0)
2658#define FUSE_CKSEL_SUT1  (unsigned char)~_BV(1)
2659#define FUSE_CKSEL_SUT2  (unsigned char)~_BV(2)
2660#define FUSE_CKSEL_SUT3  (unsigned char)~_BV(3)
2661#define FUSE_CKSEL_SUT4  (unsigned char)~_BV(4)
2662#define FUSE_CKSEL_SUT5  (unsigned char)~_BV(5)
2663#define FUSE_CKOUT       (unsigned char)~_BV(6)
2664#define FUSE_CKDIV8      (unsigned char)~_BV(7)
2665#define LFUSE_DEFAULT    (FUSE_CKSEL_SUT0 & FUSE_CKSEL_SUT2 & FUSE_CKSEL_SUT3 & FUSE_CKSEL_SUT4 & FUSE_CKDIV8)
2666
2667
2668/* High Fuse Byte */
2669#define FUSE_BOOTRST     (unsigned char)~_BV(0)
2670#define FUSE_BOOTSZ0     (unsigned char)~_BV(1)
2671#define FUSE_BOOTSZ1     (unsigned char)~_BV(2)
2672#define FUSE_EESAVE      (unsigned char)~_BV(3)
2673#define FUSE_WDTON       (unsigned char)~_BV(4)
2674#define FUSE_SPIEN       (unsigned char)~_BV(5)
2675#define FUSE_JTAGEN      (unsigned char)~_BV(6)
2676#define FUSE_OCDEN       (unsigned char)~_BV(7)
2677#define HFUSE_DEFAULT    (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
2678
2679
2680/* Extended Fuse Byte */
2681#define FUSE_BODLEVEL0   (unsigned char)~_BV(0)
2682#define FUSE_BODLEVEL1   (unsigned char)~_BV(1)
2683#define FUSE_BODLEVEL2   (unsigned char)~_BV(2)
2684#define EFUSE_DEFAULT    (FUSE_BODLEVEL0)
2685
2686
2687
2688/* Lock Bits */
2689#define __LOCK_BITS_EXIST
2690#define __BOOT_LOCK_BITS_0_EXIST
2691#define __BOOT_LOCK_BITS_1_EXIST
2692
2693
2694/* Signature */
2695#define SIGNATURE_0 0x1E
2696#define SIGNATURE_1 0xA6
2697#define SIGNATURE_2 0x02
2698
2699
2700#endif /* #ifdef _AVR_ATMEGA64RFR2_H_INCLUDED */
2701
Note: See TracBrowser for help on using the repository browser.