1
/* Copyright (c) 2002, Peter Jansen
2
Copyright (c) 2007, Atmel Corporation
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are met:
8
* Redistributions of source code must retain the above copyright
9
notice, this list of conditions and the following disclaimer.
11
* Redistributions in binary form must reproduce the above copyright
12
notice, this list of conditions and the following disclaimer in
13
the documentation and/or other materials provided with the
16
* Neither the name of the copyright holders nor the names of
17
contributors may be used to endorse or promote products derived
18
from this software without specific prior written permission.
20
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
POSSIBILITY OF SUCH DAMAGE. */
32
/* $Id: iom128.h 2456 2014-11-19 09:57:29Z saaadhu $ */
34
/* avr/iom128.h - defines for ATmega128
37
- This should be up to date with data sheet 2467E-AVR-05/02 */
39
#ifndef _AVR_IOM128_H_
40
#define _AVR_IOM128_H_ 1
42
/* This file should only be included from <avr/io.h>, never directly. */
45
# error "Include <avr/io.h> instead of this file."
49
# define _AVR_IOXXX_H_ "iom128.h"
51
# error "Attempt to include more than one <avr/ioXXX.h> file."
56
/* Input Pins, Port F */
57
#define PINF _SFR_IO8(0x00)
59
/* Input Pins, Port E */
60
#define PINE _SFR_IO8(0x01)
62
/* Data Direction Register, Port E */
63
#define DDRE _SFR_IO8(0x02)
65
/* Data Register, Port E */
66
#define PORTE _SFR_IO8(0x03)
68
/* ADC Data Register */
69
#define ADCW _SFR_IO16(0x04)
71
#define ADC _SFR_IO16(0x04)
73
#define ADCL _SFR_IO8(0x04)
74
#define ADCH _SFR_IO8(0x05)
76
/* ADC Control and status register */
77
#define ADCSR _SFR_IO8(0x06)
78
#define ADCSRA _SFR_IO8(0x06) /* new name in datasheet (2467E-AVR-05/02) */
80
/* ADC Multiplexer select */
81
#define ADMUX _SFR_IO8(0x07)
83
/* Analog Comparator Control and Status Register */
84
#define ACSR _SFR_IO8(0x08)
86
/* USART0 Baud Rate Register Low */
87
#define UBRR0L _SFR_IO8(0x09)
89
/* USART0 Control and Status Register B */
90
#define UCSR0B _SFR_IO8(0x0A)
92
/* USART0 Control and Status Register A */
93
#define UCSR0A _SFR_IO8(0x0B)
95
/* USART0 I/O Data Register */
96
#define UDR0 _SFR_IO8(0x0C)
98
/* SPI Control Register */
99
#define SPCR _SFR_IO8(0x0D)
101
/* SPI Status Register */
102
#define SPSR _SFR_IO8(0x0E)
104
/* SPI I/O Data Register */
105
#define SPDR _SFR_IO8(0x0F)
107
/* Input Pins, Port D */
108
#define PIND _SFR_IO8(0x10)
110
/* Data Direction Register, Port D */
111
#define DDRD _SFR_IO8(0x11)
113
/* Data Register, Port D */
114
#define PORTD _SFR_IO8(0x12)
116
/* Input Pins, Port C */
117
#define PINC _SFR_IO8(0x13)
119
/* Data Direction Register, Port C */
120
#define DDRC _SFR_IO8(0x14)
122
/* Data Register, Port C */
123
#define PORTC _SFR_IO8(0x15)
125
/* Input Pins, Port B */
126
#define PINB _SFR_IO8(0x16)
128
/* Data Direction Register, Port B */
129
#define DDRB _SFR_IO8(0x17)
131
/* Data Register, Port B */
132
#define PORTB _SFR_IO8(0x18)
134
/* Input Pins, Port A */
135
#define PINA _SFR_IO8(0x19)
137
/* Data Direction Register, Port A */
138
#define DDRA _SFR_IO8(0x1A)
140
/* Data Register, Port A */
141
#define PORTA _SFR_IO8(0x1B)
143
/* EEPROM Control Register */
144
#define EECR _SFR_IO8(0x1C)
146
/* EEPROM Data Register */
147
#define EEDR _SFR_IO8(0x1D)
149
/* EEPROM Address Register */
150
#define EEAR _SFR_IO16(0x1E)
151
#define EEARL _SFR_IO8(0x1E)
152
#define EEARH _SFR_IO8(0x1F)
154
/* Special Function I/O Register */
155
#define SFIOR _SFR_IO8(0x20)
157
/* Watchdog Timer Control Register */
158
#define WDTCR _SFR_IO8(0x21)
160
/* On-chip Debug Register */
161
#define OCDR _SFR_IO8(0x22)
163
/* Timer2 Output Compare Register */
164
#define OCR2 _SFR_IO8(0x23)
166
/* Timer/Counter 2 */
167
#define TCNT2 _SFR_IO8(0x24)
169
/* Timer/Counter 2 Control register */
170
#define TCCR2 _SFR_IO8(0x25)
172
/* T/C 1 Input Capture Register */
173
#define ICR1 _SFR_IO16(0x26)
174
#define ICR1L _SFR_IO8(0x26)
175
#define ICR1H _SFR_IO8(0x27)
177
/* Timer/Counter1 Output Compare Register B */
178
#define OCR1B _SFR_IO16(0x28)
179
#define OCR1BL _SFR_IO8(0x28)
180
#define OCR1BH _SFR_IO8(0x29)
182
/* Timer/Counter1 Output Compare Register A */
183
#define OCR1A _SFR_IO16(0x2A)
184
#define OCR1AL _SFR_IO8(0x2A)
185
#define OCR1AH _SFR_IO8(0x2B)
187
/* Timer/Counter 1 */
188
#define TCNT1 _SFR_IO16(0x2C)
189
#define TCNT1L _SFR_IO8(0x2C)
190
#define TCNT1H _SFR_IO8(0x2D)
192
/* Timer/Counter 1 Control and Status Register */
193
#define TCCR1B _SFR_IO8(0x2E)
195
/* Timer/Counter 1 Control Register */
196
#define TCCR1A _SFR_IO8(0x2F)
198
/* Timer/Counter 0 Asynchronous Control & Status Register */
199
#define ASSR _SFR_IO8(0x30)
201
/* Output Compare Register 0 */
202
#define OCR0 _SFR_IO8(0x31)
204
/* Timer/Counter 0 */
205
#define TCNT0 _SFR_IO8(0x32)
207
/* Timer/Counter 0 Control Register */
208
#define TCCR0 _SFR_IO8(0x33)
210
/* MCU Status Register */
211
#define MCUSR _SFR_IO8(0x34)
212
#define MCUCSR _SFR_IO8(0x34) /* new name in datasheet (2467E-AVR-05/02) */
214
/* MCU general Control Register */
215
#define MCUCR _SFR_IO8(0x35)
217
/* Timer/Counter Interrupt Flag Register */
218
#define TIFR _SFR_IO8(0x36)
220
/* Timer/Counter Interrupt MaSK register */
221
#define TIMSK _SFR_IO8(0x37)
223
/* External Interrupt Flag Register */
224
#define EIFR _SFR_IO8(0x38)
226
/* External Interrupt MaSK register */
227
#define EIMSK _SFR_IO8(0x39)
229
/* External Interrupt Control Register B */
230
#define EICRB _SFR_IO8(0x3A)
232
/* RAM Page Z select register */
233
#define RAMPZ _SFR_IO8(0x3B)
235
/* XDIV Divide control register */
236
#define XDIV _SFR_IO8(0x3C)
242
/* Extended I/O registers */
244
/* Data Direction Register, Port F */
245
#define DDRF _SFR_MEM8(0x61)
247
/* Data Register, Port F */
248
#define PORTF _SFR_MEM8(0x62)
250
/* Input Pins, Port G */
251
#define PING _SFR_MEM8(0x63)
253
/* Data Direction Register, Port G */
254
#define DDRG _SFR_MEM8(0x64)
256
/* Data Register, Port G */
257
#define PORTG _SFR_MEM8(0x65)
259
/* Store Program Memory Control and Status Register */
260
#define SPMCR _SFR_MEM8(0x68)
261
#define SPMCSR _SFR_MEM8(0x68) /* new name in datasheet (2467E-AVR-05/02) */
263
/* External Interrupt Control Register A */
264
#define EICRA _SFR_MEM8(0x6A)
266
/* External Memory Control Register B */
267
#define XMCRB _SFR_MEM8(0x6C)
269
/* External Memory Control Register A */
270
#define XMCRA _SFR_MEM8(0x6D)
272
/* Oscillator Calibration Register */
273
#define OSCCAL _SFR_MEM8(0x6F)
275
/* 2-wire Serial Interface Bit Rate Register */
276
#define TWBR _SFR_MEM8(0x70)
278
/* 2-wire Serial Interface Status Register */
279
#define TWSR _SFR_MEM8(0x71)
281
/* 2-wire Serial Interface Address Register */
282
#define TWAR _SFR_MEM8(0x72)
284
/* 2-wire Serial Interface Data Register */
285
#define TWDR _SFR_MEM8(0x73)
287
/* 2-wire Serial Interface Control Register */
288
#define TWCR _SFR_MEM8(0x74)
290
/* Time Counter 1 Output Compare Register C */
291
#define OCR1C _SFR_MEM16(0x78)
292
#define OCR1CL _SFR_MEM8(0x78)
293
#define OCR1CH _SFR_MEM8(0x79)
295
/* Timer/Counter 1 Control Register C */
296
#define TCCR1C _SFR_MEM8(0x7A)
298
/* Extended Timer Interrupt Flag Register */
299
#define ETIFR _SFR_MEM8(0x7C)
301
/* Extended Timer Interrupt Mask Register */
302
#define ETIMSK _SFR_MEM8(0x7D)
304
/* Timer/Counter 3 Input Capture Register */
305
#define ICR3 _SFR_MEM16(0x80)
306
#define ICR3L _SFR_MEM8(0x80)
307
#define ICR3H _SFR_MEM8(0x81)
309
/* Timer/Counter 3 Output Compare Register C */
310
#define OCR3C _SFR_MEM16(0x82)
311
#define OCR3CL _SFR_MEM8(0x82)
312
#define OCR3CH _SFR_MEM8(0x83)
314
/* Timer/Counter 3 Output Compare Register B */
315
#define OCR3B _SFR_MEM16(0x84)
316
#define OCR3BL _SFR_MEM8(0x84)
317
#define OCR3BH _SFR_MEM8(0x85)
319
/* Timer/Counter 3 Output Compare Register A */
320
#define OCR3A _SFR_MEM16(0x86)
321
#define OCR3AL _SFR_MEM8(0x86)
322
#define OCR3AH _SFR_MEM8(0x87)
324
/* Timer/Counter 3 Counter Register */
325
#define TCNT3 _SFR_MEM16(0x88)
326
#define TCNT3L _SFR_MEM8(0x88)
327
#define TCNT3H _SFR_MEM8(0x89)
329
/* Timer/Counter 3 Control Register B */
330
#define TCCR3B _SFR_MEM8(0x8A)
332
/* Timer/Counter 3 Control Register A */
333
#define TCCR3A _SFR_MEM8(0x8B)
335
/* Timer/Counter 3 Control Register C */
336
#define TCCR3C _SFR_MEM8(0x8C)
338
/* USART0 Baud Rate Register High */
339
#define UBRR0H _SFR_MEM8(0x90)
341
/* USART0 Control and Status Register C */
342
#define UCSR0C _SFR_MEM8(0x95)
344
/* USART1 Baud Rate Register High */
345
#define UBRR1H _SFR_MEM8(0x98)
347
/* USART1 Baud Rate Register Low*/
348
#define UBRR1L _SFR_MEM8(0x99)
350
/* USART1 Control and Status Register B */
351
#define UCSR1B _SFR_MEM8(0x9A)
353
/* USART1 Control and Status Register A */
354
#define UCSR1A _SFR_MEM8(0x9B)
356
/* USART1 I/O Data Register */
357
#define UDR1 _SFR_MEM8(0x9C)
359
/* USART1 Control and Status Register C */
360
#define UCSR1C _SFR_MEM8(0x9D)
362
/* Interrupt vectors */
364
/* External Interrupt Request 0 */
365
#define INT0_vect_num 1
366
#define INT0_vect _VECTOR(1)
367
#define SIG_INTERRUPT0 _VECTOR(1)
369
/* External Interrupt Request 1 */
370
#define INT1_vect_num 2
371
#define INT1_vect _VECTOR(2)
372
#define SIG_INTERRUPT1 _VECTOR(2)
374
/* External Interrupt Request 2 */
375
#define INT2_vect_num 3
376
#define INT2_vect _VECTOR(3)
377
#define SIG_INTERRUPT2 _VECTOR(3)
379
/* External Interrupt Request 3 */
380
#define INT3_vect_num 4
381
#define INT3_vect _VECTOR(4)
382
#define SIG_INTERRUPT3 _VECTOR(4)
384
/* External Interrupt Request 4 */
385
#define INT4_vect_num 5
386
#define INT4_vect _VECTOR(5)
387
#define SIG_INTERRUPT4 _VECTOR(5)
389
/* External Interrupt Request 5 */
390
#define INT5_vect_num 6
391
#define INT5_vect _VECTOR(6)
392
#define SIG_INTERRUPT5 _VECTOR(6)
394
/* External Interrupt Request 6 */
395
#define INT6_vect_num 7
396
#define INT6_vect _VECTOR(7)
397
#define SIG_INTERRUPT6 _VECTOR(7)
399
/* External Interrupt Request 7 */
400
#define INT7_vect_num 8
401
#define INT7_vect _VECTOR(8)
402
#define SIG_INTERRUPT7 _VECTOR(8)
404
/* Timer/Counter2 Compare Match */
405
#define TIMER2_COMP_vect_num 9
406
#define TIMER2_COMP_vect _VECTOR(9)
407
#define SIG_OUTPUT_COMPARE2 _VECTOR(9)
409
/* Timer/Counter2 Overflow */
410
#define TIMER2_OVF_vect_num 10
411
#define TIMER2_OVF_vect _VECTOR(10)
412
#define SIG_OVERFLOW2 _VECTOR(10)
414
/* Timer/Counter1 Capture Event */
415
#define TIMER1_CAPT_vect_num 11
416
#define TIMER1_CAPT_vect _VECTOR(11)
417
#define SIG_INPUT_CAPTURE1 _VECTOR(11)
419
/* Timer/Counter1 Compare Match A */
420
#define TIMER1_COMPA_vect_num 12
421
#define TIMER1_COMPA_vect _VECTOR(12)
422
#define SIG_OUTPUT_COMPARE1A _VECTOR(12)
424
/* Timer/Counter Compare Match B */
425
#define TIMER1_COMPB_vect_num 13
426
#define TIMER1_COMPB_vect _VECTOR(13)
427
#define SIG_OUTPUT_COMPARE1B _VECTOR(13)
429
/* Timer/Counter1 Overflow */
430
#define TIMER1_OVF_vect_num 14
431
#define TIMER1_OVF_vect _VECTOR(14)
432
#define SIG_OVERFLOW1 _VECTOR(14)
434
/* Timer/Counter0 Compare Match */
435
#define TIMER0_COMP_vect_num 15
436
#define TIMER0_COMP_vect _VECTOR(15)
437
#define SIG_OUTPUT_COMPARE0 _VECTOR(15)
439
/* Timer/Counter0 Overflow */
440
#define TIMER0_OVF_vect_num 16
441
#define TIMER0_OVF_vect _VECTOR(16)
442
#define SIG_OVERFLOW0 _VECTOR(16)
444
/* SPI Serial Transfer Complete */
445
#define SPI_STC_vect_num 17
446
#define SPI_STC_vect _VECTOR(17)
447
#define SIG_SPI _VECTOR(17)
449
/* USART0, Rx Complete */
450
#define USART0_RX_vect_num 18
451
#define USART0_RX_vect _VECTOR(18)
452
#define SIG_USART0_RECV _VECTOR(18)
453
#define SIG_UART0_RECV _VECTOR(18)
455
/* USART0 Data Register Empty */
456
#define USART0_UDRE_vect_num 19
457
#define USART0_UDRE_vect _VECTOR(19)
458
#define SIG_USART0_DATA _VECTOR(19)
459
#define SIG_UART0_DATA _VECTOR(19)
461
/* USART0, Tx Complete */
462
#define USART0_TX_vect_num 20
463
#define USART0_TX_vect _VECTOR(20)
464
#define SIG_USART0_TRANS _VECTOR(20)
465
#define SIG_UART0_TRANS _VECTOR(20)
467
/* ADC Conversion Complete */
468
#define ADC_vect_num 21
469
#define ADC_vect _VECTOR(21)
470
#define SIG_ADC _VECTOR(21)
473
#define EE_READY_vect _VECTOR(22)
474
#define EE_READY_vect _VECTOR(22)
475
#define SIG_EEPROM_READY _VECTOR(22)
477
/* Analog Comparator */
478
#define ANALOG_COMP_vect_num 23
479
#define ANALOG_COMP_vect _VECTOR(23)
480
#define SIG_COMPARATOR _VECTOR(23)
482
/* Timer/Counter1 Compare Match C */
483
#define TIMER1_COMPC_vect_num 24
484
#define TIMER1_COMPC_vect _VECTOR(24)
485
#define SIG_OUTPUT_COMPARE1C _VECTOR(24)
487
/* Timer/Counter3 Capture Event */
488
#define TIMER3_CAPT_vect_num 25
489
#define TIMER3_CAPT_vect _VECTOR(25)
490
#define SIG_INPUT_CAPTURE3 _VECTOR(25)
492
/* Timer/Counter3 Compare Match A */
493
#define TIMER3_COMPA_vect_num 26
494
#define TIMER3_COMPA_vect _VECTOR(26)
495
#define SIG_OUTPUT_COMPARE3A _VECTOR(26)
497
/* Timer/Counter3 Compare Match B */
498
#define TIMER3_COMPB_vect_num 27
499
#define TIMER3_COMPB_vect _VECTOR(27)
500
#define SIG_OUTPUT_COMPARE3B _VECTOR(27)
502
/* Timer/Counter3 Compare Match C */
503
#define TIMER3_COMPC_vect_num 28
504
#define TIMER3_COMPC_vect _VECTOR(28)
505
#define SIG_OUTPUT_COMPARE3C _VECTOR(28)
507
/* Timer/Counter3 Overflow */
508
#define TIMER3_OVF_vect_num 29
509
#define TIMER3_OVF_vect _VECTOR(29)
510
#define SIG_OVERFLOW3 _VECTOR(29)
512
/* USART1, Rx Complete */
513
#define USART1_RX_vect_num 30
514
#define USART1_RX_vect _VECTOR(30)
515
#define SIG_USART1_RECV _VECTOR(30)
516
#define SIG_UART1_RECV _VECTOR(30)
518
/* USART1, Data Register Empty */
519
#define USART1_UDRE_vect_num 31
520
#define USART1_UDRE_vect _VECTOR(31)
521
#define SIG_USART1_DATA _VECTOR(31)
522
#define SIG_UART1_DATA _VECTOR(31)
524
/* USART1, Tx Complete */
525
#define USART1_TX_vect_num 32
526
#define USART1_TX_vect _VECTOR(32)
527
#define SIG_USART1_TRANS _VECTOR(32)
528
#define SIG_UART1_TRANS _VECTOR(32)
530
/* 2-wire Serial Interface */
531
#define TWI_vect_num 33
532
#define TWI_vect _VECTOR(33)
533
#define SIG_2WIRE_SERIAL _VECTOR(33)
535
/* Store Program Memory Read */
536
#define SPM_READY_vect_num 34
537
#define SPM_READY_vect _VECTOR(34)
538
#define SPM_READY_vect _VECTOR(34)
539
#define SIG_SPM_READY _VECTOR(34)
541
#define _VECTORS_SIZE 140
544
The Register Bit names are represented by their bit number (0-7).
547
/* 2-wire Control Register - TWCR */
556
/* 2-wire Address Register - TWAR */
566
/* 2-wire Status Register - TWSR */
575
/* External Memory Control Register A - XMCRA */
583
/* External Memory Control Register B - XMCRA */
589
/* XDIV Divide control register - XDIV */
599
/* RAM Page Z select register - RAMPZ */
602
/* External Interrupt Control Register A - EICRA */
612
/* External Interrupt Control Register B - EICRB */
622
/* Store Program Memory Control Register - SPMCSR, SPMCR */
631
/* External Interrupt MaSK register - EIMSK */
641
/* External Interrupt Flag Register - EIFR */
651
/* Timer/Counter Interrupt MaSK register - TIMSK */
661
/* Timer/Counter Interrupt Flag Register - TIFR */
671
/* Extended Timer Interrupt MaSK register - ETIMSK */
679
/* Extended Timer Interrupt Flag Register - ETIFR */
687
/* MCU general Control Register - MCUCR */
690
#define SRW10 6 /* new name in datasheet (2467E-AVR-05/02) */
698
/* MCU Status Register - MCUSR, MCUCSR */
706
/* Timer/Counter Control Register (generic) */
716
/* Timer/Counter 0 Control Register - TCCR0 */
726
/* Timer/Counter 2 Control Register - TCCR2 */
736
/* Timer/Counter 0 Asynchronous Control & Status Register - ASSR */
742
/* Timer/Counter Control Register A (generic) */
752
/* Timer/Counter 1 Control and Status Register A - TCCR1A */
762
/* Timer/Counter 3 Control and Status Register A - TCCR3A */
772
/* Timer/Counter Control and Status Register B (generic) */
781
/* Timer/Counter 1 Control and Status Register B - TCCR1B */
790
/* Timer/Counter 3 Control and Status Register B - TCCR3B */
799
/* Timer/Counter Control Register C (generic) */
804
/* Timer/Counter 3 Control Register C - TCCR3C */
809
/* Timer/Counter 1 Control Register C - TCCR1C */
814
/* On-chip Debug Register - OCDR */
825
/* Watchdog Timer Control Register - WDTCR */
833
The ADHSM bit has been removed from all documentation,
834
as being not needed at all since the comparator has proven
835
to be fast enough even without feeding it more power.
838
/* Special Function I/O Register - SFIOR */
845
/* SPI Status Register - SPSR */
850
/* SPI Control Register - SPCR */
860
/* USART Register C (generic) */
869
/* USART1 Register C - UCSR1C */
878
/* USART0 Register C - UCSR0C */
887
/* USART Status Register A (generic) */
897
/* USART1 Status Register A - UCSR1A */
907
/* USART0 Status Register A - UCSR0A */
917
/* USART Control Register B (generic) */
924
#define UCSZ2 2 /* new name in datasheet (2467E-AVR-05/02) */
928
/* USART1 Control Register B - UCSR1B */
938
/* USART0 Control Register B - UCSR0B */
948
/* Analog Comparator Control and Status Register - ACSR */
958
/* ADC Control and status register - ADCSRA */
968
/* ADC Multiplexer select - ADMUX */
978
/* Port A Data Register - PORTA */
988
/* Port A Data Direction Register - DDRA */
998
/* Port A Input Pins - PINA */
1008
/* Port B Data Register - PORTB */
1018
/* Port B Data Direction Register - DDRB */
1028
/* Port B Input Pins - PINB */
1038
/* Port C Data Register - PORTC */
1048
/* Port C Data Direction Register - DDRC */
1058
/* Port C Input Pins - PINC */
1068
/* Port D Data Register - PORTD */
1078
/* Port D Data Direction Register - DDRD */
1088
/* Port D Input Pins - PIND */
1098
/* Port E Data Register - PORTE */
1108
/* Port E Data Direction Register - DDRE */
1118
/* Port E Input Pins - PINE */
1128
/* Port F Data Register - PORTF */
1138
/* Port F Data Direction Register - DDRF */
1148
/* Port F Input Pins - PINF */
1158
/* Port G Data Register - PORTG */
1165
/* Port G Data Direction Register - DDRG */
1172
/* Port G Input Pins - PING */
1179
/* EEPROM Control Register */
1186
#define SPM_PAGESIZE 256
1187
#define RAMSTART 0x100
1188
#define RAMEND 0x10FF /* Last On-Chip SRAM Location */
1189
#define XRAMEND 0xFFFF
1190
#define E2END 0x0FFF
1191
#define E2PAGESIZE 8
1192
#define FLASHEND 0x1FFFF
1197
#define FUSE_MEMORY_SIZE 3
1200
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
1201
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
1202
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
1203
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
1204
#define FUSE_SUT0 (unsigned char)~_BV(4)
1205
#define FUSE_SUT1 (unsigned char)~_BV(5)
1206
#define FUSE_BODEN (unsigned char)~_BV(6)
1207
#define FUSE_BODLEVEL (unsigned char)~_BV(7)
1208
#define LFUSE_DEFAULT (FUSE_CKSEL1 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0)
1210
/* High Fuse Byte */
1211
#define FUSE_BOOTRST (unsigned char)~_BV(0)
1212
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
1213
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
1214
#define FUSE_EESAVE (unsigned char)~_BV(3)
1215
#define FUSE_CKOPT (unsigned char)~_BV(4)
1216
#define FUSE_SPIEN (unsigned char)~_BV(5)
1217
#define FUSE_JTAGEN (unsigned char)~_BV(6)
1218
#define FUSE_OCDEN (unsigned char)~_BV(7)
1219
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
1221
/* Extended Fuse Byte */
1222
#define FUSE_WDTON (unsigned char)~_BV(0)
1223
#define FUSE_M103C (unsigned char)~_BV(1)
1224
#define EFUSE_DEFAULT (FUSE_M103C)
1228
#define __LOCK_BITS_EXIST
1229
#define __BOOT_LOCK_BITS_0_EXIST
1230
#define __BOOT_LOCK_BITS_1_EXIST
1234
#define SIGNATURE_0 0x1E
1235
#define SIGNATURE_1 0x97
1236
#define SIGNATURE_2 0x02
1240
/* Deprecated items */
1241
#if !defined(__AVR_LIBC_DEPRECATED_ENABLE__)
1243
#pragma GCC system_header
1245
#pragma GCC poison MCUSR
1246
#pragma GCC poison SPMCR
1248
#pragma GCC poison SIG_INTERRUPT0
1249
#pragma GCC poison SIG_INTERRUPT1
1250
#pragma GCC poison SIG_INTERRUPT2
1251
#pragma GCC poison SIG_INTERRUPT3
1252
#pragma GCC poison SIG_INTERRUPT4
1253
#pragma GCC poison SIG_INTERRUPT5
1254
#pragma GCC poison SIG_INTERRUPT6
1255
#pragma GCC poison SIG_INTERRUPT7
1256
#pragma GCC poison SIG_OUTPUT_COMPARE2
1257
#pragma GCC poison SIG_OVERFLOW2
1258
#pragma GCC poison SIG_INPUT_CAPTURE1
1259
#pragma GCC poison SIG_OUTPUT_COMPARE1A
1260
#pragma GCC poison SIG_OUTPUT_COMPARE1B
1261
#pragma GCC poison SIG_OVERFLOW1
1262
#pragma GCC poison SIG_OUTPUT_COMPARE0
1263
#pragma GCC poison SIG_OVERFLOW0
1264
#pragma GCC poison SIG_SPI
1265
#pragma GCC poison SIG_USART0_RECV
1266
#pragma GCC poison SIG_UART0_RECV
1267
#pragma GCC poison SIG_USART0_DATA
1268
#pragma GCC poison SIG_UART0_DATA
1269
#pragma GCC poison SIG_USART0_TRANS
1270
#pragma GCC poison SIG_UART0_TRANS
1271
#pragma GCC poison SIG_ADC
1272
#pragma GCC poison SIG_EEPROM_READY
1273
#pragma GCC poison SIG_COMPARATOR
1274
#pragma GCC poison SIG_OUTPUT_COMPARE1C
1275
#pragma GCC poison SIG_INPUT_CAPTURE3
1276
#pragma GCC poison SIG_OUTPUT_COMPARE3A
1277
#pragma GCC poison SIG_OUTPUT_COMPARE3B
1278
#pragma GCC poison SIG_OUTPUT_COMPARE3C
1279
#pragma GCC poison SIG_OVERFLOW3
1280
#pragma GCC poison SIG_USART1_RECV
1281
#pragma GCC poison SIG_UART1_RECV
1282
#pragma GCC poison SIG_USART1_DATA
1283
#pragma GCC poison SIG_UART1_DATA
1284
#pragma GCC poison SIG_USART1_TRANS
1285
#pragma GCC poison SIG_UART1_TRANS
1286
#pragma GCC poison SIG_2WIRE_SERIAL
1287
#pragma GCC poison SIG_SPM_READY
1290
#endif /* !defined(__AVR_LIBC_DEPRECATED_ENABLE__) */
1294
#define SLEEP_MODE_IDLE (0x00<<2)
1295
#define SLEEP_MODE_ADC (0x02<<2)
1296
#define SLEEP_MODE_PWR_DOWN (0x04<<2)
1297
#define SLEEP_MODE_PWR_SAVE (0x06<<2)
1298
#define SLEEP_MODE_STANDBY (0x05<<2)
1299
#define SLEEP_MODE_EXT_STANDBY (0x07<<2)
1302
#endif /* _AVR_IOM128_H_ */