/***************************************************************************** * * 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_ATTINY1634_H_INCLUDED #define _AVR_ATTINY1634_H_INCLUDED #ifndef _AVR_IO_H_ # error "Include instead of this file." #endif #ifndef _AVR_IOXXX_H_ # define _AVR_IOXXX_H_ "iotn1634.h" #else # error "Attempt to include more than one file." #endif /* Registers and associated bit numbers */ /* Combine ADCL and ADCH */ #ifndef __ASSEMBLER__ #define ADC _SFR_IO16(0x00) #endif #define ADCW _SFR_IO16(0x00) #define ADCL _SFR_IO8(0x00) #define ADCH _SFR_IO8(0x01) #define ADCSRB _SFR_IO8(0x02) #define ADTS0 0 #define ADTS1 1 #define ADTS2 2 #define ADLAR 3 #define VDPD 6 #define VDEN 7 #define ADCSRA _SFR_IO8(0x03) #define ADPS0 0 #define ADPS1 1 #define ADPS2 2 #define ADIE 3 #define ADIF 4 #define ADATE 5 #define ADSC 6 #define ADEN 7 #define ADMUX _SFR_IO8(0x04) #define MUX0 0 #define MUX1 1 #define MUX2 2 #define MUX3 3 #define ADC0EN 4 #define REFEN 5 #define REFS0 6 #define REFS1 7 #define ACSRB _SFR_IO8(0x05) #define ACIRS0 0 #define ACIRS1 1 #define ACME 2 #define ACCE 3 #define ACLP 5 #define HLEV 6 #define HSEL 7 #define ACSRA _SFR_IO8(0x06) #define ACIS0 0 #define ACIS1 1 #define ACIC 2 #define ACIE 3 #define ACI 4 #define ACO 5 #define ACBG 6 #define ACD 7 #define PINC _SFR_IO8(0x07) #define PINC5 5 #define PINC4 4 #define PINC3 3 #define PINC2 2 #define PINC1 1 #define PINC0 0 #define DDRC _SFR_IO8(0x08) #define DDRC5 5 // Inserted "DDC5" from "DDRC5" due to compatibility #define DDC5 5 #define DDRC4 4 // Inserted "DDC4" from "DDRC4" due to compatibility #define DDC4 4 #define DDRC3 3 // Inserted "DDC3" from "DDRC3" due to compatibility #define DDC3 3 #define DDRC2 2 // Inserted "DDC2" from "DDRC2" due to compatibility #define DDC2 2 #define DDRC1 1 // Inserted "DDC1" from "DDRC1" due to compatibility #define DDC1 1 #define DDRC0 0 // Inserted "DDC0" from "DDRC0" due to compatibility #define DDC0 0 #define PORTC _SFR_IO8(0x09) #define PORTC5 5 #define PORTC4 4 #define PORTC3 3 #define PORTC2 2 #define PORTC1 1 #define PORTC0 0 #define PUEC _SFR_IO8(0x0A) #define PUEC0 0 #define PUEC1 1 #define PUEC2 2 #define PUEC3 3 #define PUEC4 4 #define PUEC5 5 #define PINB _SFR_IO8(0x0B) #define PINB3 3 #define PINB2 2 #define PINB1 1 #define PINB0 0 #define DDRB _SFR_IO8(0x0C) #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(0x0D) #define PORTB3 3 #define PORTB2 2 #define PORTB1 1 #define PORTB0 0 #define PUEB _SFR_IO8(0x0E) #define PUEB0 0 #define PUEB1 1 #define PUEB2 2 #define PUEB3 3 #define PINA _SFR_IO8(0x0F) #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(0x10) #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(0x11) #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 PUEA _SFR_IO8(0x12) #define PUEA0 0 #define PUEA1 1 #define PUEA2 2 #define PUEA3 3 #define PUEA4 4 #define PUEA5 5 #define PUEA6 6 #define PUEA7 7 #define PORTCR _SFR_IO8(0x13) #define BBMB 1 #define BBMC 2 #define BBMA 0 #define GPIOR0 _SFR_IO8(0x14) #define GPIOR1 _SFR_IO8(0x15) #define GPIOR2 _SFR_IO8(0x16) #define OCR0B _SFR_IO8(0x17) #define OCR0A _SFR_IO8(0x18) #define TCNT0 _SFR_IO8(0x19) #define TCCR0B _SFR_IO8(0x1A) #define CS00 0 #define CS01 1 #define CS02 2 #define WGM02 3 #define FOC0B 6 #define FOC0A 7 #define TCCR0A _SFR_IO8(0x1B) #define WGM00 0 #define WGM01 1 #define COM0B0 4 #define COM0B1 5 #define COM0A0 6 #define COM0A1 7 #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 UDR0 _SFR_IO8(0x20) /* Combine UBRR0L and UBRR0H */ #define UBRR0 _SFR_IO16(0x21) #define UBRR0L _SFR_IO8(0x21) #define UBRR0H _SFR_IO8(0x22) #define UCSR0D _SFR_IO8(0x23) #define SFDE0 5 #define RXS0 6 #define RXSIE0 7 #define UCSR0C _SFR_IO8(0x24) #define UCPOL0 0 #define UCSZ00 1 #define UCSZ01 2 #define USBS0 3 #define UPM00 4 #define UPM01 5 #define UMSEL00 6 #define UMSEL01 7 #define UCSR0B _SFR_IO8(0x25) #define TXB80 0 #define RXB80 1 #define UCSZ02 2 #define TXEN0 3 #define RXEN0 4 #define UDRIE0 5 #define TXCIE0 6 #define RXCIE0 7 #define UCSR0A _SFR_IO8(0x26) #define MPCM0 0 #define U2X0 1 #define UPE0 2 #define DOR0 3 #define FE0 4 #define UDRE0 5 #define TXC0 6 #define RXC0 7 #define PCMSK0 _SFR_IO8(0x27) #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 PCMSK1 _SFR_IO8(0x28) #define PCINT8 0 #define PCINT9 1 #define PCINT10 2 #define PCINT11 3 #define PCMSK2 _SFR_IO8(0x29) #define PCINT12 0 #define PCINT13 1 #define PCINT14 2 #define PCINT15 3 #define PCINT16 4 #define PCINT17 5 #define USICR _SFR_IO8(0x2A) #define USITC 0 #define USICLK 1 #define USICS0 2 #define USICS1 3 #define USIWM0 4 #define USIWM1 5 #define USIOIE 6 #define USISIE 7 #define USISR _SFR_IO8(0x2B) #define USICNT0 0 #define USICNT1 1 #define USICNT2 2 #define USICNT3 3 #define USIDC 4 #define USIPF 5 #define USIOIF 6 #define USISIF 7 #define USIDR _SFR_IO8(0x2C) #define USIBR _SFR_IO8(0x2D) /* Reserved [0x2E] */ #define CCP _SFR_IO8(0x2F) #define WDTCSR _SFR_IO8(0x30) #define WDE 3 #define WDP0 0 #define WDP1 1 #define WDP2 2 #define WDP3 5 #define WDIE 6 #define WDIF 7 /* Reserved [0x31] */ #define CLKSR _SFR_IO8(0x32) #define CKSEL0 0 #define CKSEL1 1 #define CKSEL2 2 #define CKSEL3 3 #define SUT 4 #define CKOUT_IO 5 #define CSTR 6 #define OSCRDY 7 #define CLKPR _SFR_IO8(0x33) #define CLKPS0 0 #define CLKPS1 1 #define CLKPS2 2 #define CLKPS3 3 #define PRR _SFR_IO8(0x34) #define PRADC 0 #define PRUSART0 1 #define PRUSART1 2 #define PRUSI 3 #define PRTIM0 4 #define PRTIM1 5 #define PRTWI 6 #define __AVR_HAVE_PRR ((1<