1
/* Copyright (c) 2008 Atmel Corporation
4
Redistribution and use in source and binary forms, with or without
5
modification, are permitted provided that the following conditions are met:
7
* Redistributions of source code must retain the above copyright
8
notice, this list of conditions and the following disclaimer.
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
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.
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.
32
/* $Id: iom32c1.h,v 1.1.2.3 2008/04/28 17:06:22 arcanum Exp $ */
34
/* avr/iom32c1.h - definitions for ATmega32C1. */
36
/* This file should only be included from <avr/io.h>, never directly. */
39
# error "Include <avr/io.h> instead of this file."
43
# define _AVR_IOXXX_H_ "iom32c1.h"
45
# error "Attempt to include more than one <avr/ioXXX.h> file."
49
#ifndef _AVR_IOM32C1_H_
50
#define _AVR_IOM32C1_H_ 1
52
/* Registers and associated bit numbers */
54
#define PINB _SFR_IO8(0x03)
64
#define DDRB _SFR_IO8(0x04)
74
#define PORTB _SFR_IO8(0x05)
84
#define PINC _SFR_IO8(0x06)
94
#define DDRC _SFR_IO8(0x07)
104
#define PORTC _SFR_IO8(0x08)
114
#define PIND _SFR_IO8(0x09)
124
#define DDRD _SFR_IO8(0x0A)
134
#define PORTD _SFR_IO8(0x0B)
144
#define PINE _SFR_IO8(0x0C)
149
#define DDRE _SFR_IO8(0x0D)
154
#define PORTE _SFR_IO8(0x0E)
159
#define TIFR0 _SFR_IO8(0x15)
164
#define TIFR1 _SFR_IO8(0x16)
170
#define GPIOR1 _SFR_IO8(0x19)
180
#define GPIOR2 _SFR_IO8(0x1A)
190
#define PCIFR _SFR_IO8(0x1B)
192
#define EIFR _SFR_IO8(0x1C)
198
#define EIMSK _SFR_IO8(0x1D)
204
#define GPIOR0 _SFR_IO8(0x1E)
214
#define EECR _SFR_IO8(0x1F)
222
#define EEDR _SFR_IO8(0x20)
232
#define EEAR _SFR_IO16(0x21)
234
#define EEARL _SFR_IO8(0x21)
244
#define EEARH _SFR_IO8(0x22)
248
#define GTCCR _SFR_IO8(0x23)
254
#define TCCR0A _SFR_IO8(0x24)
262
#define TCCR0B _SFR_IO8(0x25)
270
#define TCNT0 _SFR_IO8(0x26)
280
#define OCR0A _SFR_IO8(0x27)
290
#define OCR0B _SFR_IO8(0x28)
300
#define PLLCSR _SFR_IO8(0x29)
305
#define SPCR _SFR_IO8(0x2C)
315
#define SPSR _SFR_IO8(0x2D)
320
#define SPDR _SFR_IO8(0x2E)
330
#define ACSR _SFR_IO8(0x30)
340
#define DWDR _SFR_IO8(0x31)
342
#define SMCR _SFR_IO8(0x33)
348
#define MCUSR _SFR_IO8(0x34)
354
#define MCUCR _SFR_IO8(0x35)
360
#define SPMCSR _SFR_IO8(0x37)
369
#define WDTCSR _SFR_MEM8(0x60)
379
#define CLKPR _SFR_MEM8(0x61)
386
#define PRR _SFR_MEM8(0x64)
395
#define OSCCAL _SFR_MEM8(0x66)
404
#define EICRA _SFR_MEM8(0x69)
414
#define PCMSK0 _SFR_MEM8(0x6A)
416
#define PCMSK1 _SFR_MEM8(0x6B)
418
#define PCMSK2 _SFR_MEM8(0x6C)
420
#define PCMSK3 _SFR_MEM8(0x6D)
422
#define TIMSK0 _SFR_MEM8(0x6E)
427
#define TIMSK1 _SFR_MEM8(0x6F)
433
#define AMP0CSR _SFR_MEM8(0x75)
443
#define AMP1CSR _SFR_MEM8(0x76)
453
#define AMP2CSR _SFR_MEM8(0x77)
463
#ifndef __ASSEMBLER__
464
#define ADC _SFR_MEM16(0x78)
466
#define ADCW _SFR_MEM16(0x78)
468
#define ADCL _SFR_MEM8(0x78)
478
#define ADCH _SFR_MEM8(0x79)
488
#define ADCSRA _SFR_MEM8(0x7A)
498
#define ADCSRB _SFR_MEM8(0x7B)
507
#define ADMUX _SFR_MEM8(0x7C)
516
#define DIDR0 _SFR_MEM8(0x7E)
526
#define DIDR1 _SFR_MEM8(0x7F)
535
#define TCCR1A _SFR_MEM8(0x80)
543
#define TCCR1B _SFR_MEM8(0x81)
552
#define TCCR1C _SFR_MEM8(0x82)
556
#define TCNT1 _SFR_MEM16(0x84)
558
#define TCNT1L _SFR_MEM8(0x84)
568
#define TCNT1H _SFR_MEM8(0x85)
578
#define ICR1 _SFR_MEM16(0x86)
580
#define ICR1L _SFR_MEM8(0x86)
590
#define ICR1H _SFR_MEM8(0x87)
600
#define OCR1A _SFR_MEM16(0x89)
602
#define OCR1AL _SFR_MEM8(0x88)
612
#define OCR1AH _SFR_MEM8(0x89)
622
#define OCR1B _SFR_MEM16(0x8A)
624
#define OCR1BL _SFR_MEM8(0x8A)
634
#define OCR1BH _SFR_MEM8(0x8B)
644
#define DACON _SFR_MEM8(0x90)
653
#define DAC _SFR_MEM16(0x91)
655
#define DACL _SFR_MEM8(0x91)
665
#define DACH _SFR_MEM8(0x92)
675
#define AC0CON _SFR_MEM8(0x94)
685
#define AC1CON _SFR_MEM8(0x95)
695
#define AC2CON _SFR_MEM8(0x96)
704
#define AC3CON _SFR_MEM8(0x97)
713
#define LINCR _SFR_MEM8(0xC8)
723
#define LINSIR _SFR_MEM8(0xC9)
733
#define LINENIR _SFR_MEM8(0xCA)
739
#define LINERR _SFR_MEM8(0xCB)
749
#define LINBTR _SFR_MEM8(0xCC)
758
#define LINBRR _SFR_MEM16(0xCD)
760
#define LINBRRL _SFR_MEM8(0xCD)
770
#define LINBRRH _SFR_MEM8(0xCE)
776
#define LINDLR _SFR_MEM8(0xCF)
786
#define LINIDR _SFR_MEM8(0xD0)
796
#define LINSEL _SFR_MEM8(0xD1)
802
#define LINDAT _SFR_MEM8(0xD2)
812
#define CANGCON _SFR_MEM8(0xD8)
822
#define CANGSTA _SFR_MEM8(0xD9)
830
#define CANGIT _SFR_MEM8(0xDA)
840
#define CANGIE _SFR_MEM8(0xDB)
850
#define CANEN2 _SFR_MEM8(0xDC)
858
#define CANEN1 _SFR_MEM8(0xDD)
860
#define CANIE2 _SFR_MEM8(0xDE)
868
#define CANIE1 _SFR_MEM8(0xDF)
870
#define CANSIT2 _SFR_MEM8(0xE0)
878
#define CANSIT1 _SFR_MEM8(0xE1)
880
#define CANBT1 _SFR_MEM8(0xE2)
888
#define CANBT2 _SFR_MEM8(0xE3)
895
#define CANBT3 _SFR_MEM8(0xE4)
904
#define CANTCON _SFR_MEM8(0xE5)
906
#define CANTIM _SFR_MEM16(0xE6)
908
#define CANTIML _SFR_MEM8(0xE6)
910
#define CANTIMH _SFR_MEM8(0xE7)
912
#define CANTTC _SFR_MEM16(0xE8)
914
#define CANTTCL _SFR_MEM8(0xE8)
916
#define CANTTCH _SFR_MEM8(0xE9)
918
#define CANTEC _SFR_MEM8(0xEA)
920
#define CANREC _SFR_MEM8(0xEB)
922
#define CANHPMOB _SFR_MEM8(0xEC)
932
#define CANPAGE _SFR_MEM8(0xED)
942
#define CANSTMOB _SFR_MEM8(0xEE)
952
#define CANCDMOB _SFR_MEM8(0xEF)
962
#define CANIDT4 _SFR_MEM8(0xF0)
972
#define CANIDT3 _SFR_MEM8(0xF1)
982
#define CANIDT2 _SFR_MEM8(0xF2)
992
#define CANIDT1 _SFR_MEM8(0xF3)
1002
#define CANIDM4 _SFR_MEM8(0xF4)
1011
#define CANIDM3 _SFR_MEM8(0xF5)
1021
#define CANIDM2 _SFR_MEM8(0xF6)
1031
#define CANIDM1 _SFR_MEM8(0xF7)
1041
#define CANSTM _SFR_MEM16(0xF8)
1043
#define CANSTML _SFR_MEM8(0xF8)
1045
#define CANSTMH _SFR_MEM8(0xF9)
1047
#define CANMSG _SFR_MEM8(0xFA)
1051
/* Interrupt Vectors */
1052
/* Interrupt Vector 0 is the reset vector. */
1053
#define ANACOMP0_vect _VECTOR(1) /* Analog Comparator 0 */
1054
#define ANACOMP1_vect _VECTOR(2) /* Analog Comparator 1 */
1055
#define ANACOMP2_vect _VECTOR(3) /* Analog Comparator 2 */
1056
#define ANACOMP3_vect _VECTOR(4) /* Analog Comparator 3 */
1057
#define PSC_FAULT_vect _VECTOR(5) /* PSC Fault */
1058
#define PSC_EC_vect _VECTOR(6) /* PSC End of Cycle */
1059
#define INT0_vect _VECTOR(7) /* External Interrupt Request 0 */
1060
#define INT1_vect _VECTOR(8) /* External Interrupt Request 1 */
1061
#define INT2_vect _VECTOR(9) /* External Interrupt Request 2 */
1062
#define INT3_vect _VECTOR(10) /* External Interrupt Request 3 */
1063
#define TIMER1_CAPT_vect _VECTOR(11) /* Timer/Counter1 Capture Event */
1064
#define TIMER1_COMPA_vect _VECTOR(12) /* Timer/Counter1 Compare Match A */
1065
#define TIMER1_COMPB_vect _VECTOR(13) /* Timer/Counter1 Compare Match B */
1066
#define TIMER1_OVF_vect _VECTOR(14) /* Timer1/Counter1 Overflow */
1067
#define TIMER0_COMPA_vect _VECTOR(15) /* Timer/Counter0 Compare Match A */
1068
#define TIMER0_COMPB_vect _VECTOR(16) /* Timer/Counter0 Compare Match B */
1069
#define TIMER0_OVF_vect _VECTOR(17) /* Timer/Counter0 Overflow */
1070
#define CAN_INT_vect _VECTOR(18) /* CAN MOB, Burst, General Errors */
1071
#define CAN_TOVF_vect _VECTOR(19) /* CAN Timer Overflow */
1072
#define LIN_TC_vect _VECTOR(20) /* LIN Transfer Complete */
1073
#define LIN_ERR_vect _VECTOR(21) /* LIN Error */
1074
#define PCINT0_vect _VECTOR(22) /* Pin Change Interrupt Request 0 */
1075
#define PCINT1_vect _VECTOR(23) /* Pin Change Interrupt Request 1 */
1076
#define PCINT2_vect _VECTOR(24) /* Pin Change Interrupt Request 2 */
1077
#define PCINT3_vect _VECTOR(25) /* Pin Change Interrupt Request 3 */
1078
#define SPI_STC_vect _VECTOR(26) /* SPI Serial Transfer Complete */
1079
#define ADC_vect _VECTOR(27) /* ADC Conversion Complete */
1080
#define WDT_vect _VECTOR(28) /* Watchdog Time-Out Interrupt */
1081
#define EE_READY_vect _VECTOR(29) /* EEPROM Ready */
1082
#define SPM_READY_vect _VECTOR(30) /* Store Program Memory Read */
1084
#define _VECTORS_SIZE (31 * 4)
1088
#define SPM_PAGESIZE (64)
1089
#define RAMSTART (0x100)
1090
#define RAMSIZE (0x800)
1091
#define RAMEND (RAMSTART + RAMSIZE - 1) /* Last On-Chip SRAM Location */
1092
#define XRAMSIZE (0x800)
1093
#define XRAMEND (RAMEND + XRAMSIZE)
1094
#define E2END (0x3FF)
1095
#define FLASHEND (0x7FFF)
1099
#define FUSE_MEMORY_SIZE 3
1102
#define FUSE_CKSEL0 ~_BV(0) /* Select Clock Source */
1103
#define FUSE_CKSEL1 ~_BV(1) /* Select Clock Source */
1104
#define FUSE_CKSEL2 ~_BV(2) /* Select Clock Source */
1105
#define FUSE_CKSEL3 ~_BV(3) /* Select Clock Source */
1106
#define FUSE_SUT0 ~_BV(4) /* Select start-up time */
1107
#define FUSE_SUT1 ~_BV(5) /* Select start-up time */
1108
#define FUSE_CKOUT ~_BV(6) /* Oscillator output option */
1109
#define FUSE_CKDIV8 ~_BV(7) /* Divide clock by 8 */
1110
#define LFUSE_DEFAULT (FUSE_CKSEL1 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_SUT1 & FUSE_CKDIV8)
1112
/* High Fuse Byte */
1113
#define FUSE_BOOTRST ~_BV(0) /* Select Reset Vector */
1114
#define FUSE_BOOTSZ0 ~_BV(1) /* Select Boot Size */
1115
#define FUSE_BOOTSZ1 ~_BV(2) /* Select Boot Size */
1116
#define FUSE_EESAVE ~_BV(3) /* EEPROM memory is preserved through chip erase */
1117
#define FUSE_WDTON ~_BV(4) /* Watchdog timer always on */
1118
#define FUSE_SPIEN ~_BV(5) /* Enable Serial programming and Data Downloading */
1119
#define FUSE_DWEN ~_BV(6) /* debugWIRE Enable */
1120
#define FUSE_RSTDISBL ~_BV(7) /* External Reset Disable */
1121
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN)
1123
/* Extended Fuse Byte */
1124
#define FUSE_BODLEVEL0 ~_BV(0) /* Brown-out Detector Trigger Level */
1125
#define FUSE_BODLEVEL1 ~_BV(1) /* Brown-out Detector Trigger Level */
1126
#define FUSE_BODLEVEL2 ~_BV(2) /* Brown-out Detector Trigger Level */
1127
#define FUSE_PSCRVB ~_BV(3) /* PSC Outputs xB Reset Value */
1128
#define FUSE_PSCRVA ~_BV(4) /* PSC Outputs xA Reset Value */
1129
#define FUSE_PSCRB ~_BV(5) /* PSC Reset Behavior */
1130
#define EFUSE_DEFAULT (FUSE_BODLEVEL1 & FUSE_BODLEVEL2)
1134
#define __LOCK_BITS_EXIST
1135
#define __BOOT_LOCK_BITS_0_EXIST
1136
#define __BOOT_LOCK_BITS_1_EXIST
1139
#endif /* _AVR_IOM32C1_H_ */
1
/* Copyright (c) 2009 Atmel Corporation
4
Redistribution and use in source and binary forms, with or without
5
modification, are permitted provided that the following conditions are met:
7
* Redistributions of source code must retain the above copyright
8
notice, this list of conditions and the following disclaimer.
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
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.
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. */
31
/* $Id: iom32c1.h,v 1.1.2.8 2009/01/26 18:05:49 arcanum Exp $ */
33
/* avr/iom32c1.h - definitions for ATmega32C1 */
35
/* This file should only be included from <avr/io.h>, never directly. */
38
# error "Include <avr/io.h> instead of this file."
42
# define _AVR_IOXXX_H_ "iom32c1.h"
44
# error "Attempt to include more than one <avr/ioXXX.h> file."
48
#ifndef _AVR_ATmega32C1_H_
49
#define _AVR_ATmega32C1_H_ 1
52
/* Registers and associated bit numbers. */
54
#define PINB _SFR_IO8(0x03)
64
#define DDRB _SFR_IO8(0x04)
74
#define PORTB _SFR_IO8(0x05)
84
#define PINC _SFR_IO8(0x06)
94
#define DDRC _SFR_IO8(0x07)
104
#define PORTC _SFR_IO8(0x08)
114
#define PIND _SFR_IO8(0x09)
124
#define DDRD _SFR_IO8(0x0A)
134
#define PORTD _SFR_IO8(0x0B)
144
#define PINE _SFR_IO8(0x0C)
149
#define DDRE _SFR_IO8(0x0D)
154
#define PORTE _SFR_IO8(0x0E)
159
#define TIFR0 _SFR_IO8(0x15)
164
#define TIFR1 _SFR_IO8(0x16)
170
#define GPIOR1 _SFR_IO8(0x19)
180
#define GPIOR2 _SFR_IO8(0x1A)
190
#define PCIFR _SFR_IO8(0x1B)
196
#define EIFR _SFR_IO8(0x1C)
202
#define EIMSK _SFR_IO8(0x1D)
208
#define GPIOR0 _SFR_IO8(0x1E)
218
#define EECR _SFR_IO8(0x1F)
226
#define EEDR _SFR_IO8(0x20)
236
#define EEAR _SFR_IO16(0x21)
238
#define EEARL _SFR_IO8(0x21)
248
#define EEARH _SFR_IO8(0x22)
252
#define GTCCR _SFR_IO8(0x23)
258
#define TCCR0A _SFR_IO8(0x24)
266
#define TCCR0B _SFR_IO8(0x25)
274
#define TCNT0 _SFR_IO8(0x26)
284
#define OCR0A _SFR_IO8(0x27)
294
#define OCR0B _SFR_IO8(0x28)
304
#define PLLCSR _SFR_IO8(0x29)
309
#define SPCR _SFR_IO8(0x2C)
319
#define SPSR _SFR_IO8(0x2D)
324
#define SPDR _SFR_IO8(0x2E)
334
#define ACSR _SFR_IO8(0x30)
344
#define DWDR _SFR_IO8(0x31)
346
#define SMCR _SFR_IO8(0x33)
352
#define MCUSR _SFR_IO8(0x34)
358
#define MCUCR _SFR_IO8(0x35)
364
#define SPMCSR _SFR_IO8(0x37)
374
#define WDTCSR _SFR_MEM8(0x60)
384
#define CLKPR _SFR_MEM8(0x61)
391
#define PRR _SFR_MEM8(0x64)
400
#define OSCCAL _SFR_MEM8(0x66)
409
#define PCICR _SFR_MEM8(0x68)
415
#define EICRA _SFR_MEM8(0x69)
425
#define PCMSK0 _SFR_MEM8(0x6A)
435
#define PCMSK1 _SFR_MEM8(0x6B)
445
#define PCMSK2 _SFR_MEM8(0x6C)
455
#define PCMSK3 _SFR_MEM8(0x6D)
460
#define TIMSK0 _SFR_MEM8(0x6E)
465
#define TIMSK1 _SFR_MEM8(0x6F)
471
#define AMP0CSR _SFR_MEM8(0x75)
481
#define AMP1CSR _SFR_MEM8(0x76)
491
#define AMP2CSR _SFR_MEM8(0x77)
501
#ifndef __ASSEMBLER__
502
#define ADC _SFR_MEM16(0x78)
504
#define ADCW _SFR_MEM16(0x78)
506
#define ADCL _SFR_MEM8(0x78)
516
#define ADCH _SFR_MEM8(0x79)
526
#define ADCSRA _SFR_MEM8(0x7A)
536
#define ADCSRB _SFR_MEM8(0x7B)
545
#define ADMUX _SFR_MEM8(0x7C)
555
#define DIDR0 _SFR_MEM8(0x7E)
565
#define DIDR1 _SFR_MEM8(0x7F)
574
#define TCCR1A _SFR_MEM8(0x80)
582
#define TCCR1B _SFR_MEM8(0x81)
591
#define TCCR1C _SFR_MEM8(0x82)
595
#define TCNT1 _SFR_MEM16(0x84)
597
#define TCNT1L _SFR_MEM8(0x84)
607
#define TCNT1H _SFR_MEM8(0x85)
617
#define ICR1 _SFR_MEM16(0x86)
619
#define ICR1L _SFR_MEM8(0x86)
629
#define ICR1H _SFR_MEM8(0x87)
639
#define OCR1A _SFR_MEM16(0x88)
641
#define OCR1AL _SFR_MEM8(0x88)
651
#define OCR1AH _SFR_MEM8(0x89)
661
#define OCR1B _SFR_MEM16(0x8A)
663
#define OCR1BL _SFR_MEM8(0x8A)
673
#define OCR1BH _SFR_MEM8(0x8B)
683
#define DACON _SFR_MEM8(0x90)
691
#define DAC _SFR_MEM16(0x91)
693
#define DACL _SFR_MEM8(0x91)
703
#define DACH _SFR_MEM8(0x92)
713
#define AC0CON _SFR_MEM8(0x94)
723
#define AC1CON _SFR_MEM8(0x95)
733
#define AC2CON _SFR_MEM8(0x96)
742
#define AC3CON _SFR_MEM8(0x97)
751
#define LINCR _SFR_MEM8(0xC8)
761
#define LINSIR _SFR_MEM8(0xC9)
771
#define LINENIR _SFR_MEM8(0xCA)
777
#define LINERR _SFR_MEM8(0xCB)
787
#define LINBTR _SFR_MEM8(0xCC)
796
#define LINBRR _SFR_MEM16(0xCD)
798
#define LINBRRL _SFR_MEM8(0xCD)
808
#define LINBRRH _SFR_MEM8(0xCE)
814
#define LINDLR _SFR_MEM8(0xCF)
824
#define LINIDR _SFR_MEM8(0xD0)
834
#define LINSEL _SFR_MEM8(0xD1)
840
#define LINDAT _SFR_MEM8(0xD2)
850
#define CANGCON _SFR_MEM8(0xD8)
860
#define CANGSTA _SFR_MEM8(0xD9)
868
#define CANGIT _SFR_MEM8(0xDA)
878
#define CANGIE _SFR_MEM8(0xDB)
888
#define CANEN2 _SFR_MEM8(0xDC)
896
#define CANEN1 _SFR_MEM8(0xDD)
898
#define CANIE2 _SFR_MEM8(0xDE)
906
#define CANIE1 _SFR_MEM8(0xDF)
908
#define CANSIT2 _SFR_MEM8(0xE0)
916
#define CANSIT1 _SFR_MEM8(0xE1)
918
#define CANBT1 _SFR_MEM8(0xE2)
926
#define CANBT2 _SFR_MEM8(0xE3)
933
#define CANBT3 _SFR_MEM8(0xE4)
942
#define CANTCON _SFR_MEM8(0xE5)
952
#define CANTIM _SFR_MEM16(0xE6)
954
#define CANTIML _SFR_MEM8(0xE6)
964
#define CANTIMH _SFR_MEM8(0xE7)
974
#define CANTTC _SFR_MEM16(0xE8)
976
#define CANTTCL _SFR_MEM8(0xE8)
986
#define CANTTCH _SFR_MEM8(0xE9)
996
#define CANTEC _SFR_MEM8(0xEA)
1006
#define CANREC _SFR_MEM8(0xEB)
1016
#define CANHPMOB _SFR_MEM8(0xEC)
1026
#define CANPAGE _SFR_MEM8(0xED)
1036
#define CANSTMOB _SFR_MEM8(0xEE)
1046
#define CANCDMOB _SFR_MEM8(0xEF)
1056
#define CANIDT4 _SFR_MEM8(0xF0)
1066
#define CANIDT3 _SFR_MEM8(0xF1)
1076
#define CANIDT2 _SFR_MEM8(0xF2)
1086
#define CANIDT1 _SFR_MEM8(0xF3)
1096
#define CANIDM4 _SFR_MEM8(0xF4)
1105
#define CANIDM3 _SFR_MEM8(0xF5)
1115
#define CANIDM2 _SFR_MEM8(0xF6)
1125
#define CANIDM1 _SFR_MEM8(0xF7)
1135
#define CANSTM _SFR_MEM16(0xF8)
1137
#define CANSTML _SFR_MEM8(0xF8)
1147
#define CANSTMH _SFR_MEM8(0xF9)
1157
#define CANMSG _SFR_MEM8(0xFA)
1168
/* Interrupt vectors */
1169
/* Vector 0 is the reset vector */
1170
#define ANACOMP0_vect_num 1
1171
#define ANACOMP0_vect _VECTOR(1) /* Analog Comparator 0 */
1172
#define ANACOMP1_vect_num 2
1173
#define ANACOMP1_vect _VECTOR(2) /* Analog Comparator 1 */
1174
#define ANACOMP2_vect_num 3
1175
#define ANACOMP2_vect _VECTOR(3) /* Analog Comparator 2 */
1176
#define ANACOMP3_vect_num 4
1177
#define ANACOMP3_vect _VECTOR(4) /* Analog Comparator 3 */
1178
#define PSC_FAULT_vect_num 5
1179
#define PSC_FAULT_vect _VECTOR(5) /* PSC Fault */
1180
#define PSC_EC_vect_num 6
1181
#define PSC_EC_vect _VECTOR(6) /* PSC End of Cycle */
1182
#define INT0_vect_num 7
1183
#define INT0_vect _VECTOR(7) /* External Interrupt Request 0 */
1184
#define INT1_vect_num 8
1185
#define INT1_vect _VECTOR(8) /* External Interrupt Request 1 */
1186
#define INT2_vect_num 9
1187
#define INT2_vect _VECTOR(9) /* External Interrupt Request 2 */
1188
#define INT3_vect_num 10
1189
#define INT3_vect _VECTOR(10) /* External Interrupt Request 3 */
1190
#define TIMER1_CAPT_vect_num 11
1191
#define TIMER1_CAPT_vect _VECTOR(11) /* Timer/Counter1 Capture Event */
1192
#define TIMER1_COMPA_vect_num 12
1193
#define TIMER1_COMPA_vect _VECTOR(12) /* Timer/Counter1 Compare Match A */
1194
#define TIMER1_COMPB_vect_num 13
1195
#define TIMER1_COMPB_vect _VECTOR(13) /* Timer/Counter1 Compare Match B */
1196
#define TIMER1_OVF_vect_num 14
1197
#define TIMER1_OVF_vect _VECTOR(14) /* Timer1/Counter1 Overflow */
1198
#define TIMER0_COMPA_vect_num 15
1199
#define TIMER0_COMPA_vect _VECTOR(15) /* Timer/Counter0 Compare Match A */
1200
#define TIMER0_COMPB_vect_num 16
1201
#define TIMER0_COMPB_vect _VECTOR(16) /* Timer/Counter0 Compare Match B */
1202
#define TIMER0_OVF_vect_num 17
1203
#define TIMER0_OVF_vect _VECTOR(17) /* Timer/Counter0 Overflow */
1204
#define CAN_INT_vect_num 18
1205
#define CAN_INT_vect _VECTOR(18) /* CAN MOB, Burst, General Errors */
1206
#define CAN_TOVF_vect_num 19
1207
#define CAN_TOVF_vect _VECTOR(19) /* CAN Timer Overflow */
1208
#define LIN_TC_vect_num 20
1209
#define LIN_TC_vect _VECTOR(20) /* LIN Transfer Complete */
1210
#define LIN_ERR_vect_num 21
1211
#define LIN_ERR_vect _VECTOR(21) /* LIN Error */
1212
#define PCINT0_vect_num 22
1213
#define PCINT0_vect _VECTOR(22) /* Pin Change Interrupt Request 0 */
1214
#define PCINT1_vect_num 23
1215
#define PCINT1_vect _VECTOR(23) /* Pin Change Interrupt Request 1 */
1216
#define PCINT2_vect_num 24
1217
#define PCINT2_vect _VECTOR(24) /* Pin Change Interrupt Request 2 */
1218
#define PCINT3_vect_num 25
1219
#define PCINT3_vect _VECTOR(25) /* Pin Change Interrupt Request 3 */
1220
#define SPI_STC_vect_num 26
1221
#define SPI_STC_vect _VECTOR(26) /* SPI Serial Transfer Complete */
1222
#define ADC_vect_num 27
1223
#define ADC_vect _VECTOR(27) /* ADC Conversion Complete */
1224
#define WDT_vect_num 28
1225
#define WDT_vect _VECTOR(28) /* Watchdog Time-Out Interrupt */
1226
#define EE_READY_vect_num 29
1227
#define EE_READY_vect _VECTOR(29) /* EEPROM Ready */
1228
#define SPM_READY_vect_num 30
1229
#define SPM_READY_vect _VECTOR(30) /* Store Program Memory Read */
1231
#define _VECTOR_SIZE 4 /* Size of individual vector. */
1232
#define _VECTORS_SIZE (31 * _VECTOR_SIZE)
1236
#define SPM_PAGESIZE (128)
1237
#define RAMSTART (0x0100)
1238
#define RAMSIZE (2048)
1239
#define RAMEND (RAMSTART + RAMSIZE - 1)
1240
#define XRAMSTART (0x0)
1241
#define XRAMSIZE (0)
1242
#define XRAMEND (RAMEND)
1243
#define E2END (0x3FF)
1244
#define E2PAGESIZE (4)
1245
#define FLASHEND (0x7FFF)
1249
#define FUSE_MEMORY_SIZE 3
1252
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
1253
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
1254
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
1255
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
1256
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
1257
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
1258
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Oscillator output option */
1259
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
1260
#define LFUSE_DEFAULT (FUSE_CKDIV8 & FUSE_SUT1 & FUSE_SUT0 & FUSE_CKSEL3 & FUSE_CKSEL2 & FUSE_CKSEL1)
1262
/* High Fuse Byte */
1263
#define FUSE_BOOTRST (unsigned char)~_BV(0) /* Select Reset Vector */
1264
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1) /* Select Boot Size */
1265
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2) /* Select Boot Size */
1266
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
1267
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog timer always on */
1268
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
1269
#define FUSE_DWEN (unsigned char)~_BV(6) /* DebugWIRE Enable */
1270
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Disable */
1271
#define HFUSE_DEFAULT (FUSE_SPIEN & FUSE_BOOTSZ1 & FUSE_BOOTSZ0)
1273
/* Extended Fuse Byte */
1274
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector Trigger Level */
1275
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector Trigger Level */
1276
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector Trigger Level */
1277
#define FUSE_PSCRVB (unsigned char)~_BV(3) /* PSC Outputs xB Reset Value */
1278
#define FUSE_PSCRVA (unsigned char)~_BV(4) /* PSC Outputs xA Reset Value */
1279
#define FUSE_PSCRB (unsigned char)~_BV(5) /* PSC Reset Behavior */
1280
#define EFUSE_DEFAULT (FUSE_BODLEVEL2 & FUSE_BODLEVEL1)
1284
#define __LOCK_BITS_EXIST
1285
#define __BOOT_LOCK_BITS_0_EXIST
1286
#define __BOOT_LOCK_BITS_1_EXIST
1290
#define SIGNATURE_0 0x1E
1291
#define SIGNATURE_1 0x95
1292
#define SIGNATURE_2 0x86
1295
#endif /* _AVR_ATmega32C1_H_ */