/***************************************************************************** * * Copyright (C) 2015 Atmel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the name of the copyright holders nor the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ #ifndef _AVR_ATTINY441_H_INCLUDED #define _AVR_ATTINY441_H_INCLUDED #ifndef _AVR_IO_H_ # error "Include instead of this file." #endif #ifndef _AVR_IOXXX_H_ # define _AVR_IOXXX_H_ "iotn441.h" #else # error "Attempt to include more than one file." #endif /* Registers and associated bit numbers */ #define ADCSRB _SFR_IO8(0x04) #define ADTS0 0 #define ADTS1 1 #define ADTS2 2 #define ADLAR 3 #define ADCSRA _SFR_IO8(0x05) #define ADPS0 0 #define ADPS1 1 #define ADPS2 2 #define ADIE 3 #define ADIF 4 #define ADATE 5 #define ADSC 6 #define ADEN 7 /* Combine ADCL and ADCH */ #ifndef __ASSEMBLER__ #define ADC _SFR_IO16(0x06) #endif #define ADCW _SFR_IO16(0x06) #define ADCL _SFR_IO8(0x06) #define ADCH _SFR_IO8(0x07) #define ADMUXB _SFR_IO8(0x08) #define GSEL0 0 #define GSEL1 1 #define REFS0 5 #define REFS1 6 #define REFS2 7 #define ADMUXA _SFR_IO8(0x09) #define MUX0 0 #define MUX1 1 #define MUX2 2 #define MUX3 3 #define MUX4 4 #define MUX5 5 #define ACSR0A _SFR_IO8(0x0A) #define ACIS00 0 #define ACIS01 1 #define ACIC0 2 #define ACIE0 3 #define ACI0 4 #define ACO0 5 #define ACPMUX2 6 #define ACD0 7 #define ACSR0B _SFR_IO8(0x0B) #define ACPMUX0 0 #define ACPMUX1 1 #define ACNMUX0 2 #define ACNMUX1 3 #define ACOE0 4 #define HLEV0 6 #define HSEL0 7 #define ACSR1A _SFR_IO8(0x0C) #define ACIS10 0 #define ACIS11 1 #define ACIC1 2 #define ACIE1 3 #define ACI1 4 #define ACO1 5 #define ACBG1 6 #define ACD1 7 #define ACSR1B _SFR_IO8(0x0D) #define ACME1 2 #define ACOE1 4 #define HLEV1 6 #define HSEL1 7 #define TIFR1 _SFR_IO8(0x0E) #define TOV1 0 #define OCF1A 1 #define OCF1B 2 #define ICF1 5 #define TIMSK1 _SFR_IO8(0x0F) #define TOIE1 0 #define OCIE1A 1 #define OCIE1B 2 #define ICIE1 5 #define TIFR2 _SFR_IO8(0x10) #define TOV2 0 #define OCF2A 1 #define OCF2B 2 #define ICF2 5 #define TIMSK2 _SFR_IO8(0x11) #define TOIE2 0 #define OCIE2A 1 #define OCIE2B 2 #define ICIE2 5 #define PCMSK0 _SFR_IO8(0x12) #define PCINT0 0 #define PCINT1 1 #define PCINT2 2 #define PCINT3 3 #define PCINT4 4 #define PCINT5 5 #define PCINT6 6 #define PCINT7 7 #define GPIOR0 _SFR_IO8(0x13) #define GPIOR1 _SFR_IO8(0x14) #define GPIOR2 _SFR_IO8(0x15) #define PINB _SFR_IO8(0x16) #define PINB3 3 #define PINB2 2 #define PINB1 1 #define PINB0 0 #define DDRB _SFR_IO8(0x17) #define DDRB3 3 // Inserted "DDB3" from "DDRB3" due to compatibility #define DDB3 3 #define DDRB2 2 // Inserted "DDB2" from "DDRB2" due to compatibility #define DDB2 2 #define DDRB1 1 // Inserted "DDB1" from "DDRB1" due to compatibility #define DDB1 1 #define DDRB0 0 // Inserted "DDB0" from "DDRB0" due to compatibility #define DDB0 0 #define PORTB _SFR_IO8(0x18) #define PORTB3 3 #define PORTB2 2 #define PORTB1 1 #define PORTB0 0 #define PINA _SFR_IO8(0x19) #define PINA7 7 #define PINA6 6 #define PINA5 5 #define PINA4 4 #define PINA3 3 #define PINA2 2 #define PINA1 1 #define PINA0 0 #define DDRA _SFR_IO8(0x1A) #define DDRA7 7 // Inserted "DDA7" from "DDRA7" due to compatibility #define DDA7 7 #define DDRA6 6 // Inserted "DDA6" from "DDRA6" due to compatibility #define DDA6 6 #define DDRA5 5 // Inserted "DDA5" from "DDRA5" due to compatibility #define DDA5 5 #define DDRA4 4 // Inserted "DDA4" from "DDRA4" due to compatibility #define DDA4 4 #define DDRA3 3 // Inserted "DDA3" from "DDRA3" due to compatibility #define DDA3 3 #define DDRA2 2 // Inserted "DDA2" from "DDRA2" due to compatibility #define DDA2 2 #define DDRA1 1 // Inserted "DDA1" from "DDRA1" due to compatibility #define DDA1 1 #define DDRA0 0 // Inserted "DDA0" from "DDRA0" due to compatibility #define DDA0 0 #define PORTA _SFR_IO8(0x1B) #define PORTA7 7 #define PORTA6 6 #define PORTA5 5 #define PORTA4 4 #define PORTA3 3 #define PORTA2 2 #define PORTA1 1 #define PORTA0 0 #define EECR _SFR_IO8(0x1C) #define EERE 0 #define EEPE 1 #define EEMPE 2 #define EERIE 3 #define EEPM0 4 #define EEPM1 5 #define EEDR _SFR_IO8(0x1D) /* Combine EEARL and EEARH */ #define EEAR _SFR_IO16(0x1E) #define EEARL _SFR_IO8(0x1E) #define EEARH _SFR_IO8(0x1F) #define PCMSK1 _SFR_IO8(0x20) #define PCINT8 0 #define PCINT9 1 #define PCINT10 2 #define PCINT11 3 #define WDTCSR _SFR_IO8(0x21) #define WDE 3 #define WDP0 0 #define WDP1 1 #define WDP2 2 #define WDP3 5 #define WDIE 6 #define WDIF 7 #define TCCR1C _SFR_IO8(0x22) #define FOC1B 6 #define FOC1A 7 #define GTCCR _SFR_IO8(0x23) #define PSR 0 #define TSM 7 /* Combine ICR1L and ICR1H */ #define ICR1 _SFR_IO16(0x24) #define ICR1L _SFR_IO8(0x24) #define ICR1H _SFR_IO8(0x25) /* Reserved [0x26..0x27] */ /* Combine OCR1BL and OCR1BH */ #define OCR1B _SFR_IO16(0x28) #define OCR1BL _SFR_IO8(0x28) #define OCR1BH _SFR_IO8(0x29) /* Combine OCR1AL and OCR1AH */ #define OCR1A _SFR_IO16(0x2A) #define OCR1AL _SFR_IO8(0x2A) #define OCR1AH _SFR_IO8(0x2B) /* Combine TCNT1L and TCNT1H */ #define TCNT1 _SFR_IO16(0x2C) #define TCNT1L _SFR_IO8(0x2C) #define TCNT1H _SFR_IO8(0x2D) #define TCCR1B _SFR_IO8(0x2E) #define CS10 0 #define CS11 1 #define CS12 2 #define WGM12 3 #define WGM13 4 #define ICES1 6 #define ICNC1 7 #define TCCR1A _SFR_IO8(0x2F) #define WGM10 0 #define WGM11 1 #define COM1B0 4 #define COM1B1 5 #define COM1A0 6 #define COM1A1 7 #define TCCR0A _SFR_IO8(0x30) #define WGM00 0 #define WGM01 1 #define COM0B0 4 #define COM0B1 5 #define COM0A0 6 #define COM0A1 7 /* Reserved [0x31] */ #define TCNT0 _SFR_IO8(0x32) #define TCCR0B _SFR_IO8(0x33) #define CS00 0 #define CS01 1 #define CS02 2 #define WGM02 3 #define FOC0B 6 #define FOC0A 7 #define MCUSR _SFR_IO8(0x34) #define PORF 0 #define EXTRF 1 #define BORF 2 #define WDRF 3 #define MCUCR _SFR_IO8(0x35) #define ISC00 0 #define ISC01 1 #define SM0 3 #define SM1 4 #define SE 5 #define OCR0A _SFR_IO8(0x36) #define SPMCSR _SFR_IO8(0x37) #define SPMEN 0 #define PGERS 1 #define PGWRT 2 #define RFLB 3 #define CTPB 4 #define RSIG 5 #define TIFR0 _SFR_IO8(0x38) #define TOV0 0 #define OCF0A 1 #define OCF0B 2 #define TIMSK0 _SFR_IO8(0x39) #define TOIE0 0 #define OCIE0A 1 #define OCIE0B 2 #define GIFR _SFR_IO8(0x3A) #define PCIF0 4 #define PCIF1 5 #define INTF0 6 #define GIMSK _SFR_IO8(0x3B) #define PCIE0 4 #define PCIE1 5 #define INT0 6 #define OCR0B _SFR_IO8(0x3C) /* SP [0x3D..0x3E] */ /* SREG [0x3F] */ #define DIDR0 _SFR_MEM8(0x60) #define ADC0D 0 #define ADC1D 1 #define ADC2D 2 #define ADC3D 3 #define ADC4D 4 #define ADC5D 5 #define ADC6D 6 #define ADC7D 7 #define DIDR1 _SFR_MEM8(0x61) #define ADC11D 0 #define ADC10D 1 #define ADC8D 2 #define ADC9D 3 #define PUEB _SFR_MEM8(0x62) #define PUEA _SFR_MEM8(0x63) #define PORTCR _SFR_MEM8(0x64) #define BBMB 1 #define BBMA 0 #define REMAP _SFR_MEM8(0x65) #define U0MAP 0 #define SPIMAP 1 #define TOCPMCOE _SFR_MEM8(0x66) #define TOCC0OE 0 #define TOCC1OE 1 #define TOCC2OE 2 #define TOCC3OE 3 #define TOCC4OE 4 #define TOCC5OE 5 #define TOCC6OE 6 #define TOCC7OE 7 #define TOCPMSA0 _SFR_MEM8(0x67) #define TOCC0S0 0 #define TOCC0S1 1 #define TOCC1S0 2 #define TOCC1S1 3 #define TOCC2S0 4 #define TOCC2S1 5 #define TOCC3S0 6 #define TOCC3S1 7 #define TOCPMSA1 _SFR_MEM8(0x68) #define TOCC4S0 0 #define TOCC4S1 1 #define TOCC5S0 2 #define TOCC5S1 3 #define TOCC6S0 4 #define TOCC6S1 5 #define TOCC7S0 6 #define TOCC7S1 7 /* Reserved [0x69] */ #define PHDE _SFR_MEM8(0x6A) #define PHDEA0 0 #define PHDEA1 1 /* Reserved [0x6B..0x6F] */ #define PRR _SFR_MEM8(0x70) #define PRADC 0 #define PRTIM0 1 #define PRTIM1 2 #define PRTIM2 3 #define PRSPI 4 #define PRUSART0 5 #define PRUSART1 6 #define PRTWI 7 #define __AVR_HAVE_PRR ((1<