Archive original Arduino development files (part 5)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +6 -0
- hardware/tools/avr/avr/include/avr/iotn5.h +512 -0
- hardware/tools/avr/avr/include/avr/iotn804.h +0 -0
- hardware/tools/avr/avr/include/avr/iotn806.h +0 -0
- hardware/tools/avr/avr/include/avr/iotn807.h +0 -0
- hardware/tools/avr/avr/include/avr/iotn814.h +0 -0
- hardware/tools/avr/avr/include/avr/iotn816.h +0 -0
- hardware/tools/avr/avr/include/avr/iotn817.h +0 -0
- hardware/tools/avr/avr/include/avr/iotn828.h +911 -0
- hardware/tools/avr/avr/include/avr/iotn84.h +94 -0
- hardware/tools/avr/avr/include/avr/iotn841.h +903 -0
- hardware/tools/avr/avr/include/avr/iotn84a.h +844 -0
- hardware/tools/avr/avr/include/avr/iotn85.h +93 -0
- hardware/tools/avr/avr/include/avr/iotn861.h +94 -0
- hardware/tools/avr/avr/include/avr/iotn861a.h +988 -0
- hardware/tools/avr/avr/include/avr/iotn87.h +859 -0
- hardware/tools/avr/avr/include/avr/iotn88.h +806 -0
- hardware/tools/avr/avr/include/avr/iotn9.h +477 -0
- hardware/tools/avr/avr/include/avr/iotnx4.h +482 -0
- hardware/tools/avr/avr/include/avr/iotnx5.h +442 -0
- hardware/tools/avr/avr/include/avr/iotnx61.h +541 -0
- hardware/tools/avr/avr/include/avr/iousb1286.h +101 -0
- hardware/tools/avr/avr/include/avr/iousb1287.h +101 -0
- hardware/tools/avr/avr/include/avr/iousb162.h +101 -0
- hardware/tools/avr/avr/include/avr/iousb646.h +102 -0
- hardware/tools/avr/avr/include/avr/iousb647.h +102 -0
- hardware/tools/avr/avr/include/avr/iousb82.h +95 -0
- hardware/tools/avr/avr/include/avr/iousbxx2.h +807 -0
- hardware/tools/avr/avr/include/avr/iousbxx6_7.h +1336 -0
- hardware/tools/avr/avr/include/avr/iox128a1.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128a1u.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128a3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128a3u.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128a4u.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128b1.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128b3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128c3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128d3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox128d4.h +0 -0
- hardware/tools/avr/avr/include/avr/iox16a4.h +0 -0
- hardware/tools/avr/avr/include/avr/iox16a4u.h +0 -0
- hardware/tools/avr/avr/include/avr/iox16c4.h +0 -0
- hardware/tools/avr/avr/include/avr/iox16d4.h +0 -0
- hardware/tools/avr/avr/include/avr/iox16e5.h +0 -0
- hardware/tools/avr/avr/include/avr/iox192a3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox192a3u.h +0 -0
- hardware/tools/avr/avr/include/avr/iox192c3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox192d3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox256a3.h +0 -0
- hardware/tools/avr/avr/include/avr/iox256a3b.h +0 -0
.gitattributes
CHANGED
|
@@ -128,3 +128,9 @@ hardware/tools/avr/avr/bin/objdump.exe filter=lfs diff=lfs merge=lfs -text
|
|
| 128 |
hardware/tools/avr/avr/bin/ranlib.exe filter=lfs diff=lfs merge=lfs -text
|
| 129 |
hardware/tools/avr/avr/bin/readelf.exe filter=lfs diff=lfs merge=lfs -text
|
| 130 |
hardware/tools/avr/avr/bin/strip.exe filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
hardware/tools/avr/avr/bin/ranlib.exe filter=lfs diff=lfs merge=lfs -text
|
| 129 |
hardware/tools/avr/avr/bin/readelf.exe filter=lfs diff=lfs merge=lfs -text
|
| 130 |
hardware/tools/avr/avr/bin/strip.exe filter=lfs diff=lfs merge=lfs -text
|
| 131 |
+
hardware/tools/avr/avr/lib/avr25/libc.a filter=lfs diff=lfs merge=lfs -text
|
| 132 |
+
hardware/tools/avr/avr/lib/avr25/tiny-stack/libc.a filter=lfs diff=lfs merge=lfs -text
|
| 133 |
+
hardware/tools/avr/avr/lib/avr3/libc.a filter=lfs diff=lfs merge=lfs -text
|
| 134 |
+
hardware/tools/avr/avr/lib/avr31/libc.a filter=lfs diff=lfs merge=lfs -text
|
| 135 |
+
hardware/tools/avr/avr/lib/avr35/libc.a filter=lfs diff=lfs merge=lfs -text
|
| 136 |
+
hardware/tools/avr/avr/lib/avr4/libc.a filter=lfs diff=lfs merge=lfs -text
|
hardware/tools/avr/avr/include/avr/iotn5.h
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2009 Atmel Corporation
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn5.h 2063 2009-11-18 22:06:28Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn5.h - definitions for ATtiny5 */
|
| 34 |
+
|
| 35 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 36 |
+
|
| 37 |
+
#ifndef _AVR_IO_H_
|
| 38 |
+
# error "Include <avr/io.h> instead of this file."
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IOXXX_H_
|
| 42 |
+
# define _AVR_IOXXX_H_ "iotn5.h"
|
| 43 |
+
#else
|
| 44 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
#ifndef _AVR_ATtiny5_H_
|
| 49 |
+
#define _AVR_ATtiny5_H_ 1
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
/* Registers and associated bit numbers. */
|
| 53 |
+
|
| 54 |
+
#define PINB _SFR_IO8(0x00)
|
| 55 |
+
#define PINB0 0
|
| 56 |
+
#define PINB1 1
|
| 57 |
+
#define PINB2 2
|
| 58 |
+
#define PINB3 3
|
| 59 |
+
|
| 60 |
+
#define DDRB _SFR_IO8(0x01)
|
| 61 |
+
#define DDB0 0
|
| 62 |
+
#define DDB1 1
|
| 63 |
+
#define DDB2 2
|
| 64 |
+
#define DDB3 3
|
| 65 |
+
|
| 66 |
+
#define PORTB _SFR_IO8(0x02)
|
| 67 |
+
#define PORTB0 0
|
| 68 |
+
#define PORTB1 1
|
| 69 |
+
#define PORTB2 2
|
| 70 |
+
#define PORTB3 3
|
| 71 |
+
|
| 72 |
+
#define PUEB _SFR_IO8(0x03)
|
| 73 |
+
#define PUEB0 0
|
| 74 |
+
#define PUEB1 1
|
| 75 |
+
#define PUEB2 2
|
| 76 |
+
#define PUEB3 3
|
| 77 |
+
|
| 78 |
+
#define PORTCR _SFR_IO8(0x0C)
|
| 79 |
+
#define BBMB 1
|
| 80 |
+
|
| 81 |
+
#define PCMSK _SFR_IO8(0x10)
|
| 82 |
+
#define PCINT0 0
|
| 83 |
+
#define PCINT1 1
|
| 84 |
+
#define PCINT2 2
|
| 85 |
+
#define PCINT3 3
|
| 86 |
+
|
| 87 |
+
#define PCIFR _SFR_IO8(0x11)
|
| 88 |
+
#define PCIF0 0
|
| 89 |
+
|
| 90 |
+
#define PCICR _SFR_IO8(0x12)
|
| 91 |
+
#define PCIE0 0
|
| 92 |
+
|
| 93 |
+
#define EIMSK _SFR_IO8(0x13)
|
| 94 |
+
#define INT0 0
|
| 95 |
+
|
| 96 |
+
#define EIFR _SFR_IO8(0x14)
|
| 97 |
+
#define INTF0 0
|
| 98 |
+
|
| 99 |
+
#define EICRA _SFR_IO8(0x15)
|
| 100 |
+
#define ISC00 0
|
| 101 |
+
#define ISC01 1
|
| 102 |
+
|
| 103 |
+
#define DIDR0 _SFR_IO8(0x17)
|
| 104 |
+
#define ADC0D 0
|
| 105 |
+
#define AIN0D 0
|
| 106 |
+
#define ADC1D 1
|
| 107 |
+
#define AIN1D 1
|
| 108 |
+
#define ADC2D 2
|
| 109 |
+
#define ADC3D 3
|
| 110 |
+
|
| 111 |
+
#define ADCL _SFR_IO8(0x19)
|
| 112 |
+
#define ADC0 0
|
| 113 |
+
#define ADC1 1
|
| 114 |
+
#define ADC2 2
|
| 115 |
+
#define ADC3 3
|
| 116 |
+
#define ADC4 4
|
| 117 |
+
#define ADC5 5
|
| 118 |
+
#define ADC6 6
|
| 119 |
+
#define ADC7 7
|
| 120 |
+
|
| 121 |
+
#define ADMUX _SFR_IO8(0x1B)
|
| 122 |
+
#define MUX0 0
|
| 123 |
+
#define MUX1 1
|
| 124 |
+
|
| 125 |
+
#define ADCSRB _SFR_IO8(0x1C)
|
| 126 |
+
#define ADTS0 0
|
| 127 |
+
#define ADTS1 1
|
| 128 |
+
#define ADTS2 2
|
| 129 |
+
|
| 130 |
+
#define ADCSRA _SFR_IO8(0x1D)
|
| 131 |
+
#define ADPS0 0
|
| 132 |
+
#define ADPS1 1
|
| 133 |
+
#define ADPS2 2
|
| 134 |
+
#define ADIE 3
|
| 135 |
+
#define ADIF 4
|
| 136 |
+
#define ADATE 5
|
| 137 |
+
#define ADSC 6
|
| 138 |
+
#define ADEN 7
|
| 139 |
+
|
| 140 |
+
#define ACSR _SFR_IO8(0x1F)
|
| 141 |
+
#define ACIS0 0
|
| 142 |
+
#define ACIS1 1
|
| 143 |
+
#define ACIC 2
|
| 144 |
+
#define ACIE 3
|
| 145 |
+
#define ACI 4
|
| 146 |
+
#define ACO 5
|
| 147 |
+
#define ACD 7
|
| 148 |
+
|
| 149 |
+
#define ICR0 _SFR_IO16(0x22)
|
| 150 |
+
|
| 151 |
+
#define ICR0L _SFR_IO8(0x22)
|
| 152 |
+
#define ICR0_0 0
|
| 153 |
+
#define ICR0_1 1
|
| 154 |
+
#define ICR0_2 2
|
| 155 |
+
#define ICR0_3 3
|
| 156 |
+
#define ICR0_4 4
|
| 157 |
+
#define ICR0_5 5
|
| 158 |
+
#define ICR0_6 6
|
| 159 |
+
#define ICR0_7 7
|
| 160 |
+
|
| 161 |
+
#define ICR0H _SFR_IO8(0x23)
|
| 162 |
+
#define ICR0_8 0
|
| 163 |
+
#define ICR0_9 1
|
| 164 |
+
#define ICR0_10 2
|
| 165 |
+
#define ICR0_11 3
|
| 166 |
+
#define ICR0_12 4
|
| 167 |
+
#define ICR0_13 5
|
| 168 |
+
#define ICR0_14 6
|
| 169 |
+
#define ICR0_15 7
|
| 170 |
+
|
| 171 |
+
#define OCR0B _SFR_IO16(0x24)
|
| 172 |
+
|
| 173 |
+
#define OCR0BL _SFR_IO8(0x24)
|
| 174 |
+
#define OCR0B0 0
|
| 175 |
+
#define OCR0B1 1
|
| 176 |
+
#define OCR0B2 2
|
| 177 |
+
#define OCR0B3 3
|
| 178 |
+
#define OCR0B4 4
|
| 179 |
+
#define OCR0B5 5
|
| 180 |
+
#define OCR0B6 6
|
| 181 |
+
#define OCR0B7 7
|
| 182 |
+
|
| 183 |
+
#define OCR0BH _SFR_IO8(0x25)
|
| 184 |
+
#define OCR0B8 0
|
| 185 |
+
#define OCR0B9 1
|
| 186 |
+
#define OCR0B10 2
|
| 187 |
+
#define OCR0B11 3
|
| 188 |
+
#define OCR0B12 4
|
| 189 |
+
#define OCR0B13 5
|
| 190 |
+
#define OCR0B14 6
|
| 191 |
+
#define OCR0B15 7
|
| 192 |
+
|
| 193 |
+
#define OCR0A _SFR_IO16(0x26)
|
| 194 |
+
|
| 195 |
+
#define OCR0AL _SFR_IO8(0x26)
|
| 196 |
+
#define OCR0A0 0
|
| 197 |
+
#define OCR0A1 1
|
| 198 |
+
#define OCR0A2 2
|
| 199 |
+
#define OCR0A3 3
|
| 200 |
+
#define OCR0A4 4
|
| 201 |
+
#define OCR0A5 5
|
| 202 |
+
#define OCR0A6 6
|
| 203 |
+
#define OCR0A7 7
|
| 204 |
+
|
| 205 |
+
#define OCR0AH _SFR_IO8(0x27)
|
| 206 |
+
#define OCR0A8 0
|
| 207 |
+
#define OCR0A9 1
|
| 208 |
+
#define OCR0A10 2
|
| 209 |
+
#define OCR0A11 3
|
| 210 |
+
#define OCR0A12 4
|
| 211 |
+
#define OCR0A13 5
|
| 212 |
+
#define OCR0A14 6
|
| 213 |
+
#define OCR0A15 7
|
| 214 |
+
|
| 215 |
+
#define TCNT0 _SFR_IO16(0x28)
|
| 216 |
+
|
| 217 |
+
#define TCNT0L _SFR_IO8(0x28)
|
| 218 |
+
#define TCNT0_0 0
|
| 219 |
+
#define TCNT0_1 1
|
| 220 |
+
#define TCNT0_2 2
|
| 221 |
+
#define TCNT0_3 3
|
| 222 |
+
#define TCNT0_4 4
|
| 223 |
+
#define TCNT0_5 5
|
| 224 |
+
#define TCNT0_6 6
|
| 225 |
+
#define TCNT0_7 7
|
| 226 |
+
|
| 227 |
+
#define TCNT0H _SFR_IO8(0x29)
|
| 228 |
+
#define TCNT0_8 0
|
| 229 |
+
#define TCNT0_9 1
|
| 230 |
+
#define TCNT0_10 2
|
| 231 |
+
#define TCNT0_11 3
|
| 232 |
+
#define TCNT0_12 4
|
| 233 |
+
#define TCNT0_13 5
|
| 234 |
+
#define TCNT0_14 6
|
| 235 |
+
#define TCNT0_15 7
|
| 236 |
+
|
| 237 |
+
#define TIFR0 _SFR_IO8(0x2A)
|
| 238 |
+
#define TOV0 0
|
| 239 |
+
#define OCF0A 1
|
| 240 |
+
#define OCF0B 2
|
| 241 |
+
#define ICF0 5
|
| 242 |
+
|
| 243 |
+
#define TIMSK0 _SFR_IO8(0x2B)
|
| 244 |
+
#define TOIE0 0
|
| 245 |
+
#define OCIE0A 1
|
| 246 |
+
#define OCIE0B 2
|
| 247 |
+
#define ICIE0 5
|
| 248 |
+
|
| 249 |
+
#define TCCR0C _SFR_IO8(0x2C)
|
| 250 |
+
#define FOC0B 6
|
| 251 |
+
#define FOC0A 7
|
| 252 |
+
|
| 253 |
+
#define TCCR0B _SFR_IO8(0x2D)
|
| 254 |
+
#define CS00 0
|
| 255 |
+
#define CS01 1
|
| 256 |
+
#define CS02 2
|
| 257 |
+
#define WGM02 3
|
| 258 |
+
#define WGM03 4
|
| 259 |
+
#define ICES0 6
|
| 260 |
+
#define ICNC0 7
|
| 261 |
+
|
| 262 |
+
#define TCCR0A _SFR_IO8(0x2E)
|
| 263 |
+
#define WGM00 0
|
| 264 |
+
#define WGM01 1
|
| 265 |
+
#define COM0B0 4
|
| 266 |
+
#define COM0B1 5
|
| 267 |
+
#define COM0A0 6
|
| 268 |
+
#define COM0A1 7
|
| 269 |
+
|
| 270 |
+
#define GTCCR _SFR_IO8(0x2F)
|
| 271 |
+
#define PSR 0
|
| 272 |
+
#define TSM 7
|
| 273 |
+
|
| 274 |
+
#define WDTCSR _SFR_IO8(0x31)
|
| 275 |
+
#define WDP0 0
|
| 276 |
+
#define WDP1 1
|
| 277 |
+
#define WDP2 2
|
| 278 |
+
#define WDE 3
|
| 279 |
+
#define WDP3 5
|
| 280 |
+
#define WDIE 6
|
| 281 |
+
#define WDIF 7
|
| 282 |
+
|
| 283 |
+
#define NVMCSR _SFR_IO8(0x32)
|
| 284 |
+
#define NVMBSY 7
|
| 285 |
+
|
| 286 |
+
#define NVMCMD _SFR_IO8(0x33)
|
| 287 |
+
#define NVMCMD0 0
|
| 288 |
+
#define NVMCMD1 1
|
| 289 |
+
#define NVMCMD2 2
|
| 290 |
+
#define NVMCMD3 3
|
| 291 |
+
#define NVMCMD4 4
|
| 292 |
+
#define NVMCMD5 5
|
| 293 |
+
|
| 294 |
+
#define VLMCSR _SFR_IO8(0x34)
|
| 295 |
+
#define VLM0 0
|
| 296 |
+
#define VLM1 1
|
| 297 |
+
#define VLM2 2
|
| 298 |
+
#define VLMIE 6
|
| 299 |
+
#define VLMF 7
|
| 300 |
+
|
| 301 |
+
#define PRR _SFR_IO8(0x35)
|
| 302 |
+
#define PRTIM0 0
|
| 303 |
+
#define PRADC 1
|
| 304 |
+
|
| 305 |
+
#define __AVR_HAVE_PRR ((1<<PRTIM0)|(1<<PRADC))
|
| 306 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 307 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 308 |
+
|
| 309 |
+
#define CLKPSR _SFR_IO8(0x36)
|
| 310 |
+
#define CLKPS0 0
|
| 311 |
+
#define CLKPS1 1
|
| 312 |
+
#define CLKPS2 2
|
| 313 |
+
#define CLKPS3 3
|
| 314 |
+
|
| 315 |
+
#define CLKMSR _SFR_IO8(0x37)
|
| 316 |
+
#define CLKMS0 0
|
| 317 |
+
#define CLKMS1 1
|
| 318 |
+
|
| 319 |
+
#define OSCCAL _SFR_IO8(0x39)
|
| 320 |
+
#define CAL0 0
|
| 321 |
+
#define CAL1 1
|
| 322 |
+
#define CAL2 2
|
| 323 |
+
#define CAL3 3
|
| 324 |
+
#define CAL4 4
|
| 325 |
+
#define CAL5 5
|
| 326 |
+
#define CAL6 6
|
| 327 |
+
#define CAL7 7
|
| 328 |
+
|
| 329 |
+
#define SMCR _SFR_IO8(0x3A)
|
| 330 |
+
#define SE 0
|
| 331 |
+
#define SM0 1
|
| 332 |
+
#define SM1 2
|
| 333 |
+
#define SM2 3
|
| 334 |
+
|
| 335 |
+
#define RSTFLR _SFR_IO8(0x3B)
|
| 336 |
+
#define PORF 0
|
| 337 |
+
#define EXTRF 1
|
| 338 |
+
#define WDRF 3
|
| 339 |
+
|
| 340 |
+
#define CCP _SFR_IO8(0x3C)
|
| 341 |
+
#define CCP0 0
|
| 342 |
+
#define CCP1 1
|
| 343 |
+
#define CCP2 2
|
| 344 |
+
#define CCP3 3
|
| 345 |
+
#define CCP4 4
|
| 346 |
+
#define CCP5 5
|
| 347 |
+
#define CCP6 6
|
| 348 |
+
#define CCP7 7
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
/* Interrupt vectors */
|
| 352 |
+
/* Vector 0 is the reset vector */
|
| 353 |
+
#define INT0_vect_num 1
|
| 354 |
+
#define INT0_vect _VECTOR(1) /* External Interrupt Request 0 */
|
| 355 |
+
#define PCINT0_vect_num 2
|
| 356 |
+
#define PCINT0_vect _VECTOR(2) /* Pin Change Interrupt Request 0 */
|
| 357 |
+
#define TIM0_CAPT_vect_num 3
|
| 358 |
+
#define TIM0_CAPT_vect _VECTOR(3) /* Timer/Counter0 Input Capture */
|
| 359 |
+
#define TIM0_OVF_vect_num 4
|
| 360 |
+
#define TIM0_OVF_vect _VECTOR(4) /* Timer/Counter0 Overflow */
|
| 361 |
+
#define TIM0_COMPA_vect_num 5
|
| 362 |
+
#define TIM0_COMPA_vect _VECTOR(5) /* Timer/Counter Compare Match A */
|
| 363 |
+
#define TIM0_COMPB_vect_num 6
|
| 364 |
+
#define TIM0_COMPB_vect _VECTOR(6) /* Timer/Counter Compare Match B */
|
| 365 |
+
#define ANA_COMP_vect_num 7
|
| 366 |
+
#define ANA_COMP_vect _VECTOR(7) /* Analog Comparator */
|
| 367 |
+
#define WDT_vect_num 8
|
| 368 |
+
#define WDT_vect _VECTOR(8) /* Watchdog Time-out */
|
| 369 |
+
#define VLM_vect_num 9
|
| 370 |
+
#define VLM_vect _VECTOR(9) /* Vcc Voltage Level Monitor */
|
| 371 |
+
#define ADC_vect_num 10
|
| 372 |
+
#define ADC_vect _VECTOR(10) /* ADC Conversion Complete */
|
| 373 |
+
|
| 374 |
+
#define _VECTOR_SIZE 2 /* Size of individual vector. */
|
| 375 |
+
#define _VECTORS_SIZE (11 * _VECTOR_SIZE)
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
/* Constants */
|
| 379 |
+
#define SPM_PAGESIZE (32)
|
| 380 |
+
#define RAMSTART (0x40)
|
| 381 |
+
#define RAMSIZE (32)
|
| 382 |
+
#define RAMEND (RAMSTART + RAMSIZE - 1)
|
| 383 |
+
#define XRAMSTART (NA)
|
| 384 |
+
#define XRAMSIZE (0)
|
| 385 |
+
#define XRAMEND (RAMEND)
|
| 386 |
+
#define E2END (0x0)
|
| 387 |
+
#define E2PAGESIZE (0)
|
| 388 |
+
#define FLASHEND (0x1FF)
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
/* Fuses */
|
| 392 |
+
#define FUSE_MEMORY_SIZE 0
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
/* Lock Bits */
|
| 396 |
+
#define __LOCK_BITS_EXIST
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
/* Signature */
|
| 400 |
+
#define SIGNATURE_0 0x1E
|
| 401 |
+
#define SIGNATURE_1 0x90
|
| 402 |
+
#define SIGNATURE_2 0x09
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
/* Device Pin Definitions */
|
| 406 |
+
#define SPDATA_DDR DDRCINT
|
| 407 |
+
#define SPDATA_PORT PORTCINT
|
| 408 |
+
#define SPDATA_PIN PINCINT
|
| 409 |
+
#define SPDATA_BIT INT0
|
| 410 |
+
|
| 411 |
+
#define OC0A_DDR DDRCINT
|
| 412 |
+
#define OC0A_PORT PORTCINT
|
| 413 |
+
#define OC0A_PIN PINCINT
|
| 414 |
+
#define OC0A_BIT INT0
|
| 415 |
+
|
| 416 |
+
#define ADC0_DDR DDRCINT
|
| 417 |
+
#define ADC0_PORT PORTCINT
|
| 418 |
+
#define ADC0_PIN PINCINT
|
| 419 |
+
#define ADC0_BIT INT0
|
| 420 |
+
|
| 421 |
+
#define AIN0_DDR DDRCINT
|
| 422 |
+
#define AIN0_PORT PORTCINT
|
| 423 |
+
#define AIN0_PIN PINCINT
|
| 424 |
+
#define AIN0_BIT INT0
|
| 425 |
+
|
| 426 |
+
#define PB0_DDR DDRCINT
|
| 427 |
+
#define PB0_PORT PORTCINT
|
| 428 |
+
#define PB0_PIN PINCINT
|
| 429 |
+
#define PB0_BIT INT0
|
| 430 |
+
|
| 431 |
+
#define SPCLK_DDR DDRCINT
|
| 432 |
+
#define SPCLK_PORT PORTCINT
|
| 433 |
+
#define SPCLK_PIN PINCINT
|
| 434 |
+
#define SPCLK_BIT INT1
|
| 435 |
+
|
| 436 |
+
#define CLKI_DDR DDRCINT
|
| 437 |
+
#define CLKI_PORT PORTCINT
|
| 438 |
+
#define CLKI_PIN PINCINT
|
| 439 |
+
#define CLKI_BIT INT1
|
| 440 |
+
|
| 441 |
+
#define ICP0_DDR DDRCINT
|
| 442 |
+
#define ICP0_PORT PORTCINT
|
| 443 |
+
#define ICP0_PIN PINCINT
|
| 444 |
+
#define ICP0_BIT INT1
|
| 445 |
+
|
| 446 |
+
#define OC0B_DDR DDRCINT
|
| 447 |
+
#define OC0B_PORT PORTCINT
|
| 448 |
+
#define OC0B_PIN PINCINT
|
| 449 |
+
#define OC0B_BIT INT1
|
| 450 |
+
|
| 451 |
+
#define ADC1_DDR DDRCINT
|
| 452 |
+
#define ADC1_PORT PORTCINT
|
| 453 |
+
#define ADC1_PIN PINCINT
|
| 454 |
+
#define ADC1_BIT INT1
|
| 455 |
+
|
| 456 |
+
#define AIN1_DDR DDRCINT
|
| 457 |
+
#define AIN1_PORT PORTCINT
|
| 458 |
+
#define AIN1_PIN PINCINT
|
| 459 |
+
#define AIN1_BIT INT1
|
| 460 |
+
|
| 461 |
+
#define PB1_DDR DDRCINT
|
| 462 |
+
#define PB1_PORT PORTCINT
|
| 463 |
+
#define PB1_PIN PINCINT
|
| 464 |
+
#define PB1_BIT INT1
|
| 465 |
+
|
| 466 |
+
#define CLKO_DDR DDRT
|
| 467 |
+
#define CLKO_PORT PORTT
|
| 468 |
+
#define CLKO_PIN PINT
|
| 469 |
+
#define CLKO_BIT T0
|
| 470 |
+
|
| 471 |
+
#define PCINT2_DDR DDRT
|
| 472 |
+
#define PCINT2_PORT PORTT
|
| 473 |
+
#define PCINT2_PIN PINT
|
| 474 |
+
#define PCINT2_BIT T0
|
| 475 |
+
|
| 476 |
+
#define INT0_DDR DDRT
|
| 477 |
+
#define INT0_PORT PORTT
|
| 478 |
+
#define INT0_PIN PINT
|
| 479 |
+
#define INT0_BIT T0
|
| 480 |
+
|
| 481 |
+
#define ADC2_DDR DDRT
|
| 482 |
+
#define ADC2_PORT PORTT
|
| 483 |
+
#define ADC2_PIN PINT
|
| 484 |
+
#define ADC2_BIT T0
|
| 485 |
+
|
| 486 |
+
#define PB2_DDR DDRT
|
| 487 |
+
#define PB2_PORT PORTT
|
| 488 |
+
#define PB2_PIN PINT
|
| 489 |
+
#define PB2_BIT T0
|
| 490 |
+
|
| 491 |
+
#define PCINT3_DDR DDRRESET
|
| 492 |
+
#define PCINT3_PORT PORTRESET
|
| 493 |
+
#define PCINT3_PIN PINRESET
|
| 494 |
+
#define PCINT3_BIT RESET
|
| 495 |
+
|
| 496 |
+
#define ADC3_DDR DDRRESET
|
| 497 |
+
#define ADC3_PORT PORTRESET
|
| 498 |
+
#define ADC3_PIN PINRESET
|
| 499 |
+
#define ADC3_BIT RESET
|
| 500 |
+
|
| 501 |
+
#define PB3_DDR DDRRESET
|
| 502 |
+
#define PB3_PORT PORTRESET
|
| 503 |
+
#define PB3_PIN PINRESET
|
| 504 |
+
#define PB3_BIT RESET
|
| 505 |
+
|
| 506 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 507 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 508 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 509 |
+
#define SLEEP_MODE_STANDBY (0x04<<1)
|
| 510 |
+
|
| 511 |
+
#endif /* _AVR_ATtiny5_H_ */
|
| 512 |
+
|
hardware/tools/avr/avr/include/avr/iotn804.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iotn806.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iotn807.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iotn814.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iotn816.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iotn817.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iotn828.h
ADDED
|
@@ -0,0 +1,911 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*****************************************************************************
|
| 2 |
+
*
|
| 3 |
+
* Copyright (C) 2015 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_ATTINY828_H_INCLUDED
|
| 36 |
+
#define _AVR_ATTINY828_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_ "iotn828.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 PUEA _SFR_IO8(0x03)
|
| 98 |
+
|
| 99 |
+
#define PINB _SFR_IO8(0x04)
|
| 100 |
+
#define PINB7 7
|
| 101 |
+
#define PINB6 6
|
| 102 |
+
#define PINB5 5
|
| 103 |
+
#define PINB4 4
|
| 104 |
+
#define PINB3 3
|
| 105 |
+
#define PINB2 2
|
| 106 |
+
#define PINB1 1
|
| 107 |
+
#define PINB0 0
|
| 108 |
+
|
| 109 |
+
#define DDRB _SFR_IO8(0x05)
|
| 110 |
+
#define DDRB7 7
|
| 111 |
+
// Inserted "DDB7" from "DDRB7" due to compatibility
|
| 112 |
+
#define DDB7 7
|
| 113 |
+
#define DDRB6 6
|
| 114 |
+
// Inserted "DDB6" from "DDRB6" due to compatibility
|
| 115 |
+
#define DDB6 6
|
| 116 |
+
#define DDRB5 5
|
| 117 |
+
// Inserted "DDB5" from "DDRB5" due to compatibility
|
| 118 |
+
#define DDB5 5
|
| 119 |
+
#define DDRB4 4
|
| 120 |
+
// Inserted "DDB4" from "DDRB4" due to compatibility
|
| 121 |
+
#define DDB4 4
|
| 122 |
+
#define DDRB3 3
|
| 123 |
+
// Inserted "DDB3" from "DDRB3" due to compatibility
|
| 124 |
+
#define DDB3 3
|
| 125 |
+
#define DDRB2 2
|
| 126 |
+
// Inserted "DDB2" from "DDRB2" due to compatibility
|
| 127 |
+
#define DDB2 2
|
| 128 |
+
#define DDRB1 1
|
| 129 |
+
// Inserted "DDB1" from "DDRB1" due to compatibility
|
| 130 |
+
#define DDB1 1
|
| 131 |
+
#define DDRB0 0
|
| 132 |
+
// Inserted "DDB0" from "DDRB0" due to compatibility
|
| 133 |
+
#define DDB0 0
|
| 134 |
+
|
| 135 |
+
#define PORTB _SFR_IO8(0x06)
|
| 136 |
+
#define PORTB7 7
|
| 137 |
+
#define PORTB6 6
|
| 138 |
+
#define PORTB5 5
|
| 139 |
+
#define PORTB4 4
|
| 140 |
+
#define PORTB3 3
|
| 141 |
+
#define PORTB2 2
|
| 142 |
+
#define PORTB1 1
|
| 143 |
+
#define PORTB0 0
|
| 144 |
+
|
| 145 |
+
#define PUEB _SFR_IO8(0x07)
|
| 146 |
+
|
| 147 |
+
#define PINC _SFR_IO8(0x08)
|
| 148 |
+
#define PINC7 7
|
| 149 |
+
#define PINC6 6
|
| 150 |
+
#define PINC5 5
|
| 151 |
+
#define PINC4 4
|
| 152 |
+
#define PINC3 3
|
| 153 |
+
#define PINC2 2
|
| 154 |
+
#define PINC1 1
|
| 155 |
+
#define PINC0 0
|
| 156 |
+
|
| 157 |
+
#define DDRC _SFR_IO8(0x09)
|
| 158 |
+
#define DDRC7 7
|
| 159 |
+
// Inserted "DDC7" from "DDRC7" due to compatibility
|
| 160 |
+
#define DDC7 7
|
| 161 |
+
#define DDRC6 6
|
| 162 |
+
// Inserted "DDC6" from "DDRC6" due to compatibility
|
| 163 |
+
#define DDC6 6
|
| 164 |
+
#define DDRC5 5
|
| 165 |
+
// Inserted "DDC5" from "DDRC5" due to compatibility
|
| 166 |
+
#define DDC5 5
|
| 167 |
+
#define DDRC4 4
|
| 168 |
+
// Inserted "DDC4" from "DDRC4" due to compatibility
|
| 169 |
+
#define DDC4 4
|
| 170 |
+
#define DDRC3 3
|
| 171 |
+
// Inserted "DDC3" from "DDRC3" due to compatibility
|
| 172 |
+
#define DDC3 3
|
| 173 |
+
#define DDRC2 2
|
| 174 |
+
// Inserted "DDC2" from "DDRC2" due to compatibility
|
| 175 |
+
#define DDC2 2
|
| 176 |
+
#define DDRC1 1
|
| 177 |
+
// Inserted "DDC1" from "DDRC1" due to compatibility
|
| 178 |
+
#define DDC1 1
|
| 179 |
+
#define DDRC0 0
|
| 180 |
+
// Inserted "DDC0" from "DDRC0" due to compatibility
|
| 181 |
+
#define DDC0 0
|
| 182 |
+
|
| 183 |
+
#define PORTC _SFR_IO8(0x0A)
|
| 184 |
+
#define PORTC7 7
|
| 185 |
+
#define PORTC6 6
|
| 186 |
+
#define PORTC5 5
|
| 187 |
+
#define PORTC4 4
|
| 188 |
+
#define PORTC3 3
|
| 189 |
+
#define PORTC2 2
|
| 190 |
+
#define PORTC1 1
|
| 191 |
+
#define PORTC0 0
|
| 192 |
+
|
| 193 |
+
#define PUEC _SFR_IO8(0x0B)
|
| 194 |
+
|
| 195 |
+
#define PIND _SFR_IO8(0x0C)
|
| 196 |
+
#define PIND3 3
|
| 197 |
+
#define PIND2 2
|
| 198 |
+
#define PIND1 1
|
| 199 |
+
#define PIND0 0
|
| 200 |
+
|
| 201 |
+
#define DDRD _SFR_IO8(0x0D)
|
| 202 |
+
#define DDRD3 3
|
| 203 |
+
// Inserted "DDD3" from "DDRD3" due to compatibility
|
| 204 |
+
#define DDD3 3
|
| 205 |
+
#define DDRD2 2
|
| 206 |
+
// Inserted "DDD2" from "DDRD2" due to compatibility
|
| 207 |
+
#define DDD2 2
|
| 208 |
+
#define DDRD1 1
|
| 209 |
+
// Inserted "DDD1" from "DDRD1" due to compatibility
|
| 210 |
+
#define DDD1 1
|
| 211 |
+
#define DDRD0 0
|
| 212 |
+
// Inserted "DDD0" from "DDRD0" due to compatibility
|
| 213 |
+
#define DDD0 0
|
| 214 |
+
|
| 215 |
+
#define PORTD _SFR_IO8(0x0E)
|
| 216 |
+
#define PORTD3 3
|
| 217 |
+
#define PORTD2 2
|
| 218 |
+
#define PORTD1 1
|
| 219 |
+
#define PORTD0 0
|
| 220 |
+
|
| 221 |
+
#define PUED _SFR_IO8(0x0F)
|
| 222 |
+
|
| 223 |
+
/* Reserved [0x10..0x13] */
|
| 224 |
+
|
| 225 |
+
#define PHDE _SFR_IO8(0x14)
|
| 226 |
+
#define PHDEC 2
|
| 227 |
+
|
| 228 |
+
#define TIFR0 _SFR_IO8(0x15)
|
| 229 |
+
#define TOV0 0
|
| 230 |
+
#define OCF0A 1
|
| 231 |
+
#define OCF0B 2
|
| 232 |
+
|
| 233 |
+
#define TIFR1 _SFR_IO8(0x16)
|
| 234 |
+
#define TOV1 0
|
| 235 |
+
#define OCF1A 1
|
| 236 |
+
#define OCF1B 2
|
| 237 |
+
#define ICF1 5
|
| 238 |
+
|
| 239 |
+
/* Reserved [0x17..0x1A] */
|
| 240 |
+
|
| 241 |
+
#define PCIFR _SFR_IO8(0x1B)
|
| 242 |
+
#define PCIF0 0
|
| 243 |
+
#define PCIF1 1
|
| 244 |
+
#define PCIF2 2
|
| 245 |
+
#define PCIF3 3
|
| 246 |
+
|
| 247 |
+
#define EIFR _SFR_IO8(0x1C)
|
| 248 |
+
#define INTF0 0
|
| 249 |
+
#define INTF1 1
|
| 250 |
+
|
| 251 |
+
#define EIMSK _SFR_IO8(0x1D)
|
| 252 |
+
#define INT0 0
|
| 253 |
+
#define INT1 1
|
| 254 |
+
|
| 255 |
+
#define GPIOR0 _SFR_IO8(0x1E)
|
| 256 |
+
|
| 257 |
+
#define EECR _SFR_IO8(0x1F)
|
| 258 |
+
#define EERE 0
|
| 259 |
+
#define EEPE 1
|
| 260 |
+
#define EEMPE 2
|
| 261 |
+
#define EERIE 3
|
| 262 |
+
#define EEPM0 4
|
| 263 |
+
#define EEPM1 5
|
| 264 |
+
|
| 265 |
+
#define EEDR _SFR_IO8(0x20)
|
| 266 |
+
|
| 267 |
+
#define EEAR _SFR_IO8(0x21)
|
| 268 |
+
|
| 269 |
+
/* Reserved [0x22] */
|
| 270 |
+
|
| 271 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 272 |
+
#define PSRSYNC 0
|
| 273 |
+
#define TSM 7
|
| 274 |
+
|
| 275 |
+
#define TCCR0A _SFR_IO8(0x24)
|
| 276 |
+
#define WGM00 0
|
| 277 |
+
#define WGM01 1
|
| 278 |
+
#define COM0B0 4
|
| 279 |
+
#define COM0B1 5
|
| 280 |
+
#define COM0A0 6
|
| 281 |
+
#define COM0A1 7
|
| 282 |
+
|
| 283 |
+
#define TCCR0B _SFR_IO8(0x25)
|
| 284 |
+
#define CS00 0
|
| 285 |
+
#define CS01 1
|
| 286 |
+
#define CS02 2
|
| 287 |
+
#define WGM02 3
|
| 288 |
+
#define FOC0B 6
|
| 289 |
+
#define FOC0A 7
|
| 290 |
+
|
| 291 |
+
#define TCNT0 _SFR_IO8(0x26)
|
| 292 |
+
|
| 293 |
+
#define OCR0A _SFR_IO8(0x27)
|
| 294 |
+
|
| 295 |
+
#define OCR0B _SFR_IO8(0x28)
|
| 296 |
+
|
| 297 |
+
/* Reserved [0x29] */
|
| 298 |
+
|
| 299 |
+
#define GPIOR1 _SFR_IO8(0x2A)
|
| 300 |
+
|
| 301 |
+
#define GPIOR2 _SFR_IO8(0x2B)
|
| 302 |
+
|
| 303 |
+
#define SPCR _SFR_IO8(0x2C)
|
| 304 |
+
#define SPR0 0
|
| 305 |
+
#define SPR1 1
|
| 306 |
+
#define CPHA 2
|
| 307 |
+
#define CPOL 3
|
| 308 |
+
#define MSTR 4
|
| 309 |
+
#define DORD 5
|
| 310 |
+
#define SPE 6
|
| 311 |
+
#define SPIE 7
|
| 312 |
+
|
| 313 |
+
#define SPSR _SFR_IO8(0x2D)
|
| 314 |
+
#define SPI2X 0
|
| 315 |
+
#define WCOL 6
|
| 316 |
+
#define SPIF 7
|
| 317 |
+
|
| 318 |
+
#define SPDR _SFR_IO8(0x2E)
|
| 319 |
+
|
| 320 |
+
#define ACSRB _SFR_IO8(0x2F)
|
| 321 |
+
#define ACPMUX0 0
|
| 322 |
+
#define ACPMUX1 1
|
| 323 |
+
#define ACNMUX0 2
|
| 324 |
+
#define ACNMUX1 3
|
| 325 |
+
#define HLEV 6
|
| 326 |
+
#define HSEL 7
|
| 327 |
+
|
| 328 |
+
#define ACSRA _SFR_IO8(0x30)
|
| 329 |
+
#define ACIS0 0
|
| 330 |
+
#define ACIS1 1
|
| 331 |
+
#define ACIC 2
|
| 332 |
+
#define ACIE 3
|
| 333 |
+
#define ACI 4
|
| 334 |
+
#define ACO 5
|
| 335 |
+
#define ACPMUX2 6
|
| 336 |
+
#define ACD 7
|
| 337 |
+
|
| 338 |
+
/* Reserved [0x31..0x32] */
|
| 339 |
+
|
| 340 |
+
#define SMCR _SFR_IO8(0x33)
|
| 341 |
+
#define SE 0
|
| 342 |
+
#define SM0 1
|
| 343 |
+
#define SM1 2
|
| 344 |
+
|
| 345 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 346 |
+
#define PORF 0
|
| 347 |
+
#define EXTRF 1
|
| 348 |
+
#define BORF 2
|
| 349 |
+
#define WDRF 3
|
| 350 |
+
|
| 351 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 352 |
+
#define IVSEL 1
|
| 353 |
+
|
| 354 |
+
#define CCP _SFR_IO8(0x36)
|
| 355 |
+
|
| 356 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 357 |
+
#define SPMEN 0
|
| 358 |
+
#define PGERS 1
|
| 359 |
+
#define PGWRT 2
|
| 360 |
+
#define RWFLB 3
|
| 361 |
+
#define RWWSRE 4
|
| 362 |
+
#define RSIG 5
|
| 363 |
+
#define RWWSB 6
|
| 364 |
+
#define SPMIE 7
|
| 365 |
+
|
| 366 |
+
/* Reserved [0x38..0x3C] */
|
| 367 |
+
|
| 368 |
+
/* SP [0x3D..0x3E] */
|
| 369 |
+
|
| 370 |
+
/* SREG [0x3F] */
|
| 371 |
+
|
| 372 |
+
#define WDTCSR _SFR_MEM8(0x60)
|
| 373 |
+
#define WDE 3
|
| 374 |
+
#define WDP0 0
|
| 375 |
+
#define WDP1 1
|
| 376 |
+
#define WDP2 2
|
| 377 |
+
#define WDP3 5
|
| 378 |
+
#define WDIE 6
|
| 379 |
+
#define WDIF 7
|
| 380 |
+
|
| 381 |
+
#define CLKPR _SFR_MEM8(0x61)
|
| 382 |
+
#define CLKPS0 0
|
| 383 |
+
#define CLKPS1 1
|
| 384 |
+
#define CLKPS2 2
|
| 385 |
+
#define CLKPS3 3
|
| 386 |
+
|
| 387 |
+
/* Reserved [0x62..0x63] */
|
| 388 |
+
|
| 389 |
+
#define PRR _SFR_MEM8(0x64)
|
| 390 |
+
#define PRADC 0
|
| 391 |
+
#define PRUSART0 1
|
| 392 |
+
#define PRSPI 2
|
| 393 |
+
#define PRTIM1 3
|
| 394 |
+
#define PRTIM0 5
|
| 395 |
+
#define PRTWI 7
|
| 396 |
+
|
| 397 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSART0)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0)|(1<<PRTWI))
|
| 398 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 399 |
+
#define __AVR_HAVE_PRR_PRUSART0
|
| 400 |
+
#define __AVR_HAVE_PRR_PRSPI
|
| 401 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 402 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 403 |
+
#define __AVR_HAVE_PRR_PRTWI
|
| 404 |
+
|
| 405 |
+
/* Reserved [0x65] */
|
| 406 |
+
|
| 407 |
+
#define OSCCAL0 _SFR_MEM8(0x66)
|
| 408 |
+
|
| 409 |
+
#define OSCCAL1 _SFR_MEM8(0x67)
|
| 410 |
+
|
| 411 |
+
#define PCICR _SFR_MEM8(0x68)
|
| 412 |
+
#define PCIE0 0
|
| 413 |
+
#define PCIE1 1
|
| 414 |
+
#define PCIE2 2
|
| 415 |
+
#define PCIE3 3
|
| 416 |
+
|
| 417 |
+
#define EICRA _SFR_MEM8(0x69)
|
| 418 |
+
#define ISC00 0
|
| 419 |
+
#define ISC01 1
|
| 420 |
+
#define ISC10 2
|
| 421 |
+
#define ISC11 3
|
| 422 |
+
|
| 423 |
+
/* Reserved [0x6A] */
|
| 424 |
+
|
| 425 |
+
#define PCMSK0 _SFR_MEM8(0x6B)
|
| 426 |
+
#define PCINT0 0
|
| 427 |
+
#define PCINT1 1
|
| 428 |
+
#define PCINT2 2
|
| 429 |
+
#define PCINT3 3
|
| 430 |
+
#define PCINT4 4
|
| 431 |
+
#define PCINT5 5
|
| 432 |
+
#define PCINT6 6
|
| 433 |
+
#define PCINT7 7
|
| 434 |
+
|
| 435 |
+
#define PCMSK1 _SFR_MEM8(0x6C)
|
| 436 |
+
#define PCINT8 0
|
| 437 |
+
#define PCINT9 1
|
| 438 |
+
#define PCINT10 2
|
| 439 |
+
#define PCINT11 3
|
| 440 |
+
#define PCINT12 4
|
| 441 |
+
#define PCINT13 5
|
| 442 |
+
#define PCINT14 6
|
| 443 |
+
#define PCINT15 7
|
| 444 |
+
|
| 445 |
+
#define PCMSK2 _SFR_MEM8(0x6D)
|
| 446 |
+
#define PCINT16 0
|
| 447 |
+
#define PCINT17 1
|
| 448 |
+
#define PCINT18 2
|
| 449 |
+
#define PCINT19 3
|
| 450 |
+
#define PCINT20 4
|
| 451 |
+
#define PCINT21 5
|
| 452 |
+
#define PCINT22 6
|
| 453 |
+
#define PCINT23 7
|
| 454 |
+
|
| 455 |
+
#define TIMSK0 _SFR_MEM8(0x6E)
|
| 456 |
+
#define TOIE0 0
|
| 457 |
+
#define OCIE0A 1
|
| 458 |
+
#define OCIE0B 2
|
| 459 |
+
|
| 460 |
+
#define TIMSK1 _SFR_MEM8(0x6F)
|
| 461 |
+
#define TOIE1 0
|
| 462 |
+
#define OCIE1A 1
|
| 463 |
+
#define OCIE1B 2
|
| 464 |
+
#define ICIE1 5
|
| 465 |
+
|
| 466 |
+
/* Reserved [0x70..0x72] */
|
| 467 |
+
|
| 468 |
+
#define PCMSK3 _SFR_MEM8(0x73)
|
| 469 |
+
#define PCINT24 0
|
| 470 |
+
#define PCINT25 1
|
| 471 |
+
#define PCINT26 2
|
| 472 |
+
#define PCINT27 3
|
| 473 |
+
|
| 474 |
+
/* Reserved [0x74..0x77] */
|
| 475 |
+
|
| 476 |
+
/* Combine ADCL and ADCH */
|
| 477 |
+
#ifndef __ASSEMBLER__
|
| 478 |
+
#define ADC _SFR_MEM16(0x78)
|
| 479 |
+
#endif
|
| 480 |
+
#define ADCW _SFR_MEM16(0x78)
|
| 481 |
+
|
| 482 |
+
#define ADCL _SFR_MEM8(0x78)
|
| 483 |
+
#define ADCH _SFR_MEM8(0x79)
|
| 484 |
+
|
| 485 |
+
#define ADCSRA _SFR_MEM8(0x7A)
|
| 486 |
+
#define ADPS0 0
|
| 487 |
+
#define ADPS1 1
|
| 488 |
+
#define ADPS2 2
|
| 489 |
+
#define ADIE 3
|
| 490 |
+
#define ADIF 4
|
| 491 |
+
#define ADATE 5
|
| 492 |
+
#define ADSC 6
|
| 493 |
+
#define ADEN 7
|
| 494 |
+
|
| 495 |
+
#define ADCSRB _SFR_MEM8(0x7B)
|
| 496 |
+
#define ADTS0 0
|
| 497 |
+
#define ADTS1 1
|
| 498 |
+
#define ADTS2 2
|
| 499 |
+
#define ADLAR 3
|
| 500 |
+
|
| 501 |
+
#define ADMUXA _SFR_MEM8(0x7C)
|
| 502 |
+
#define MUX0 0
|
| 503 |
+
#define MUX1 1
|
| 504 |
+
#define MUX2 2
|
| 505 |
+
#define MUX3 3
|
| 506 |
+
#define MUX4 4
|
| 507 |
+
|
| 508 |
+
#define ADMUXB _SFR_MEM8(0x7D)
|
| 509 |
+
#define MUX5 0
|
| 510 |
+
#define REFS 5
|
| 511 |
+
|
| 512 |
+
#define DIDR0 _SFR_MEM8(0x7E)
|
| 513 |
+
#define ADC0D 0
|
| 514 |
+
#define ADC1D 1
|
| 515 |
+
#define ADC2D 2
|
| 516 |
+
#define ADC3D 3
|
| 517 |
+
#define ADC4D 4
|
| 518 |
+
#define ADC5D 5
|
| 519 |
+
#define ADC6D 6
|
| 520 |
+
#define ADC7D 7
|
| 521 |
+
|
| 522 |
+
#define DIDR1 _SFR_MEM8(0x7F)
|
| 523 |
+
#define ADC8D 0
|
| 524 |
+
#define ADC9D 1
|
| 525 |
+
#define ADC10D 2
|
| 526 |
+
#define ADC11D 3
|
| 527 |
+
#define ADC12D 4
|
| 528 |
+
#define ADC13D 5
|
| 529 |
+
#define ADC14D 6
|
| 530 |
+
#define ADC15D 7
|
| 531 |
+
|
| 532 |
+
#define TCCR1A _SFR_MEM8(0x80)
|
| 533 |
+
#define WGM10 0
|
| 534 |
+
#define WGM11 1
|
| 535 |
+
#define COM1B0 4
|
| 536 |
+
#define COM1B1 5
|
| 537 |
+
#define COM1A0 6
|
| 538 |
+
#define COM1A1 7
|
| 539 |
+
|
| 540 |
+
#define TCCR1B _SFR_MEM8(0x81)
|
| 541 |
+
#define CS10 0
|
| 542 |
+
#define CS11 1
|
| 543 |
+
#define CS12 2
|
| 544 |
+
#define WGM12 3
|
| 545 |
+
#define WGM13 4
|
| 546 |
+
#define ICES1 6
|
| 547 |
+
#define ICNC1 7
|
| 548 |
+
|
| 549 |
+
#define TCCR1C _SFR_MEM8(0x82)
|
| 550 |
+
#define FOC1B 6
|
| 551 |
+
#define FOC1A 7
|
| 552 |
+
|
| 553 |
+
/* Reserved [0x83] */
|
| 554 |
+
|
| 555 |
+
/* Combine TCNT1L and TCNT1H */
|
| 556 |
+
#define TCNT1 _SFR_MEM16(0x84)
|
| 557 |
+
|
| 558 |
+
#define TCNT1L _SFR_MEM8(0x84)
|
| 559 |
+
#define TCNT1H _SFR_MEM8(0x85)
|
| 560 |
+
|
| 561 |
+
/* Combine ICR1L and ICR1H */
|
| 562 |
+
#define ICR1 _SFR_MEM16(0x86)
|
| 563 |
+
|
| 564 |
+
#define ICR1L _SFR_MEM8(0x86)
|
| 565 |
+
#define ICR1H _SFR_MEM8(0x87)
|
| 566 |
+
|
| 567 |
+
/* Combine OCR1AL and OCR1AH */
|
| 568 |
+
#define OCR1A _SFR_MEM16(0x88)
|
| 569 |
+
|
| 570 |
+
#define OCR1AL _SFR_MEM8(0x88)
|
| 571 |
+
#define OCR1AH _SFR_MEM8(0x89)
|
| 572 |
+
|
| 573 |
+
/* Combine OCR1BL and OCR1BH */
|
| 574 |
+
#define OCR1B _SFR_MEM16(0x8A)
|
| 575 |
+
|
| 576 |
+
#define OCR1BL _SFR_MEM8(0x8A)
|
| 577 |
+
#define OCR1BH _SFR_MEM8(0x8B)
|
| 578 |
+
|
| 579 |
+
/* Reserved [0x8C..0xB7] */
|
| 580 |
+
|
| 581 |
+
#define TWSCRA _SFR_MEM8(0xB8)
|
| 582 |
+
#define TWSME 0
|
| 583 |
+
#define TWPME 1
|
| 584 |
+
#define TWSIE 2
|
| 585 |
+
#define TWEN 3
|
| 586 |
+
#define TWASIE 4
|
| 587 |
+
#define TWDIE 5
|
| 588 |
+
#define TWSHE 7
|
| 589 |
+
|
| 590 |
+
#define TWSCRB _SFR_MEM8(0xB9)
|
| 591 |
+
#define TWCMD0 0
|
| 592 |
+
#define TWCMD1 1
|
| 593 |
+
#define TWAA 2
|
| 594 |
+
#define TWHNM 3
|
| 595 |
+
|
| 596 |
+
#define TWSSRA _SFR_MEM8(0xBA)
|
| 597 |
+
#define TWAS 0
|
| 598 |
+
#define TWDIR 1
|
| 599 |
+
#define TWBE 2
|
| 600 |
+
#define TWC 3
|
| 601 |
+
#define TWRA 4
|
| 602 |
+
#define TWCH 5
|
| 603 |
+
#define TWASIF 6
|
| 604 |
+
#define TWDIF 7
|
| 605 |
+
|
| 606 |
+
#define TWSAM _SFR_MEM8(0xBB)
|
| 607 |
+
#define TWAE 0
|
| 608 |
+
#define TWSAM1 1
|
| 609 |
+
#define TWSAM2 2
|
| 610 |
+
#define TWSAM3 3
|
| 611 |
+
#define TWSAM4 4
|
| 612 |
+
#define TWSAM5 5
|
| 613 |
+
#define TWSAM6 6
|
| 614 |
+
#define TWSAM7 7
|
| 615 |
+
|
| 616 |
+
#define TWSA _SFR_MEM8(0xBC)
|
| 617 |
+
|
| 618 |
+
#define TWSD _SFR_MEM8(0xBD)
|
| 619 |
+
#define TWSD0 0
|
| 620 |
+
#define TWSD1 1
|
| 621 |
+
#define TWSD2 2
|
| 622 |
+
#define TWSD3 3
|
| 623 |
+
#define TWSD4 4
|
| 624 |
+
#define TWSD5 5
|
| 625 |
+
#define TWSD6 6
|
| 626 |
+
#define TWSD7 7
|
| 627 |
+
|
| 628 |
+
/* Reserved [0xBE..0xBF] */
|
| 629 |
+
|
| 630 |
+
#define UCSRA _SFR_MEM8(0xC0)
|
| 631 |
+
#define MPCM 0
|
| 632 |
+
#define U2X 1
|
| 633 |
+
#define UPE 2
|
| 634 |
+
#define DOR 3
|
| 635 |
+
#define FE 4
|
| 636 |
+
#define UDRE 5
|
| 637 |
+
#define TXC 6
|
| 638 |
+
#define RXC 7
|
| 639 |
+
|
| 640 |
+
#define UCSRB _SFR_MEM8(0xC1)
|
| 641 |
+
#define TXB8 0
|
| 642 |
+
#define RXB8 1
|
| 643 |
+
#define UCSZ2 2
|
| 644 |
+
#define TXEN 3
|
| 645 |
+
#define RXEN 4
|
| 646 |
+
#define UDRIE 5
|
| 647 |
+
#define TXCIE 6
|
| 648 |
+
#define RXCIE 7
|
| 649 |
+
|
| 650 |
+
#define UCSRC _SFR_MEM8(0xC2)
|
| 651 |
+
#define UCPOL 0
|
| 652 |
+
#define UCSZ0 1
|
| 653 |
+
#define UCSZ1 2
|
| 654 |
+
#define USBS 3
|
| 655 |
+
#define UPM0 4
|
| 656 |
+
#define UPM1 5
|
| 657 |
+
#define UMSEL0 6
|
| 658 |
+
#define UMSEL1 7
|
| 659 |
+
|
| 660 |
+
#define UCSRD _SFR_MEM8(0xC3)
|
| 661 |
+
#define SFDE 5
|
| 662 |
+
#define RXS 6
|
| 663 |
+
#define RXSIE 7
|
| 664 |
+
|
| 665 |
+
/* Combine UBRRL and UBRRH */
|
| 666 |
+
#define UBRR _SFR_MEM16(0xC4)
|
| 667 |
+
|
| 668 |
+
#define UBRRL _SFR_MEM8(0xC4)
|
| 669 |
+
#define UBRRH _SFR_MEM8(0xC5)
|
| 670 |
+
|
| 671 |
+
#define UDR _SFR_MEM8(0xC6)
|
| 672 |
+
|
| 673 |
+
/* Reserved [0xC7..0xDD] */
|
| 674 |
+
|
| 675 |
+
#define DIDR2 _SFR_MEM8(0xDE)
|
| 676 |
+
#define ADC16D 0
|
| 677 |
+
#define ADC17D 1
|
| 678 |
+
#define ADC18D 2
|
| 679 |
+
#define ADC19D 3
|
| 680 |
+
#define ADC20D 4
|
| 681 |
+
#define ADC21D 5
|
| 682 |
+
#define ADC22D 6
|
| 683 |
+
#define ADC23D 7
|
| 684 |
+
|
| 685 |
+
#define DIDR3 _SFR_MEM8(0xDF)
|
| 686 |
+
#define ADC24D 0
|
| 687 |
+
#define ADC25D 1
|
| 688 |
+
#define ADC26D 2
|
| 689 |
+
#define ADC27D 3
|
| 690 |
+
|
| 691 |
+
/* Reserved [0xE0..0xE1] */
|
| 692 |
+
|
| 693 |
+
#define TOCPMCOE _SFR_MEM8(0xE2)
|
| 694 |
+
#define TOCC0OE 0
|
| 695 |
+
#define TOCC1OE 1
|
| 696 |
+
#define TOCC2OE 2
|
| 697 |
+
#define TOCC3OE 3
|
| 698 |
+
#define TOCC4OE 4
|
| 699 |
+
#define TOCC5OE 5
|
| 700 |
+
#define TOCC6OE 6
|
| 701 |
+
#define TOCC7OE 7
|
| 702 |
+
|
| 703 |
+
/* Reserved [0xE3..0xE7] */
|
| 704 |
+
|
| 705 |
+
#define TOCPMSA0 _SFR_MEM8(0xE8)
|
| 706 |
+
#define TOCC0S0 0
|
| 707 |
+
#define TOCC0S1 1
|
| 708 |
+
#define TOCC1S0 2
|
| 709 |
+
#define TOCC1S1 3
|
| 710 |
+
#define TOCC2S0 4
|
| 711 |
+
#define TOCC2S1 5
|
| 712 |
+
#define TOCC3S0 6
|
| 713 |
+
#define TOCC3S1 7
|
| 714 |
+
|
| 715 |
+
#define TOCPMSA1 _SFR_MEM8(0xE9)
|
| 716 |
+
#define TOCC4S0 0
|
| 717 |
+
#define TOCC4S1 1
|
| 718 |
+
#define TOCC5S0 2
|
| 719 |
+
#define TOCC5S1 3
|
| 720 |
+
#define TOCC6S0 4
|
| 721 |
+
#define TOCC6S1 5
|
| 722 |
+
#define TOCC7S0 6
|
| 723 |
+
#define TOCC7S1 7
|
| 724 |
+
|
| 725 |
+
/* Reserved [0xEA..0xEF] */
|
| 726 |
+
|
| 727 |
+
#define OSCTCAL0A _SFR_MEM8(0xF0)
|
| 728 |
+
|
| 729 |
+
#define OSCTCAL0B _SFR_MEM8(0xF1)
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
|
| 733 |
+
/* Values and associated defines */
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 737 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 738 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 739 |
+
|
| 740 |
+
/* Interrupt vectors */
|
| 741 |
+
/* Vector 0 is the reset vector */
|
| 742 |
+
/* External Interrupt Request 0 */
|
| 743 |
+
#define INT0_vect _VECTOR(1)
|
| 744 |
+
#define INT0_vect_num 1
|
| 745 |
+
|
| 746 |
+
/* External Interrupt Request 1 */
|
| 747 |
+
#define INT1_vect _VECTOR(2)
|
| 748 |
+
#define INT1_vect_num 2
|
| 749 |
+
|
| 750 |
+
/* Pin Change Interrupt Request 0 */
|
| 751 |
+
#define PCINT0_vect _VECTOR(3)
|
| 752 |
+
#define PCINT0_vect_num 3
|
| 753 |
+
|
| 754 |
+
/* Pin Change Interrupt Request 1 */
|
| 755 |
+
#define PCINT1_vect _VECTOR(4)
|
| 756 |
+
#define PCINT1_vect_num 4
|
| 757 |
+
|
| 758 |
+
/* Pin Change Interrupt Request 2 */
|
| 759 |
+
#define PCINT2_vect _VECTOR(5)
|
| 760 |
+
#define PCINT2_vect_num 5
|
| 761 |
+
|
| 762 |
+
/* Pin Change Interrupt Request 3 */
|
| 763 |
+
#define PCINT3_vect _VECTOR(6)
|
| 764 |
+
#define PCINT3_vect_num 6
|
| 765 |
+
|
| 766 |
+
/* Watchdog Time-out Interrupt */
|
| 767 |
+
#define WDT_vect _VECTOR(7)
|
| 768 |
+
#define WDT_vect_num 7
|
| 769 |
+
|
| 770 |
+
/* Timer/Counter1 Capture Event */
|
| 771 |
+
#define TIMER1_CAPT_vect _VECTOR(8)
|
| 772 |
+
#define TIMER1_CAPT_vect_num 8
|
| 773 |
+
|
| 774 |
+
/* Timer/Counter1 Compare Match A */
|
| 775 |
+
#define TIMER1_COMPA_vect _VECTOR(9)
|
| 776 |
+
#define TIMER1_COMPA_vect_num 9
|
| 777 |
+
|
| 778 |
+
/* Timer/Counter1 Compare Match B */
|
| 779 |
+
#define TIMER1_COMPB_vect _VECTOR(10)
|
| 780 |
+
#define TIMER1_COMPB_vect_num 10
|
| 781 |
+
|
| 782 |
+
/* Timer/Counter1 Overflow */
|
| 783 |
+
#define TIMER1_OVF_vect _VECTOR(11)
|
| 784 |
+
#define TIMER1_OVF_vect_num 11
|
| 785 |
+
|
| 786 |
+
/* Timer/Counter0 Compare Match A */
|
| 787 |
+
#define TIMER0_COMPA_vect _VECTOR(12)
|
| 788 |
+
#define TIMER0_COMPA_vect_num 12
|
| 789 |
+
|
| 790 |
+
/* Timer/Counter0 Compare Match B */
|
| 791 |
+
#define TIMER0_COMPB_vect _VECTOR(13)
|
| 792 |
+
#define TIMER0_COMPB_vect_num 13
|
| 793 |
+
|
| 794 |
+
/* Timer/Counter0 Overflow */
|
| 795 |
+
#define TIMER0_OVF_vect _VECTOR(14)
|
| 796 |
+
#define TIMER0_OVF_vect_num 14
|
| 797 |
+
|
| 798 |
+
/* SPI Serial Transfer Complete */
|
| 799 |
+
#define SPI_STC_vect _VECTOR(15)
|
| 800 |
+
#define SPI_STC_vect_num 15
|
| 801 |
+
|
| 802 |
+
/* USART, Start */
|
| 803 |
+
#define USART_START_vect _VECTOR(16)
|
| 804 |
+
#define USART_START_vect_num 16
|
| 805 |
+
|
| 806 |
+
/* USART Rx Complete */
|
| 807 |
+
#define USART_RX_vect _VECTOR(17)
|
| 808 |
+
#define USART_RX_vect_num 17
|
| 809 |
+
|
| 810 |
+
/* USART, Data Register Empty */
|
| 811 |
+
#define USART_UDRE_vect _VECTOR(18)
|
| 812 |
+
#define USART_UDRE_vect_num 18
|
| 813 |
+
|
| 814 |
+
/* USART Tx Complete */
|
| 815 |
+
#define USART_TX_vect _VECTOR(19)
|
| 816 |
+
#define USART_TX_vect_num 19
|
| 817 |
+
|
| 818 |
+
/* ADC Conversion Complete */
|
| 819 |
+
#define ADC_vect _VECTOR(20)
|
| 820 |
+
#define ADC_vect_num 20
|
| 821 |
+
|
| 822 |
+
/* EEPROM Ready */
|
| 823 |
+
#define EE_READY_vect _VECTOR(21)
|
| 824 |
+
#define EE_READY_vect_num 21
|
| 825 |
+
|
| 826 |
+
/* Analog Comparator */
|
| 827 |
+
#define ANALOG_COMP_vect _VECTOR(22)
|
| 828 |
+
#define ANALOG_COMP_vect_num 22
|
| 829 |
+
|
| 830 |
+
/* Two-wire Serial Interface */
|
| 831 |
+
#define TWI_SLAVE_vect _VECTOR(23)
|
| 832 |
+
#define TWI_SLAVE_vect_num 23
|
| 833 |
+
|
| 834 |
+
/* Store Program Memory Read */
|
| 835 |
+
#define SPM_Ready_vect _VECTOR(24)
|
| 836 |
+
#define SPM_Ready_vect_num 24
|
| 837 |
+
|
| 838 |
+
/* Touch Sensing */
|
| 839 |
+
#define QTRIP_vect _VECTOR(25)
|
| 840 |
+
#define QTRIP_vect_num 25
|
| 841 |
+
|
| 842 |
+
#define _VECTORS_SIZE 52
|
| 843 |
+
|
| 844 |
+
|
| 845 |
+
/* Constants */
|
| 846 |
+
|
| 847 |
+
#define SPM_PAGESIZE 64
|
| 848 |
+
#define FLASHSTART 0x0000
|
| 849 |
+
#define FLASHEND 0x1FFF
|
| 850 |
+
#define RAMSTART 0x0100
|
| 851 |
+
#define RAMSIZE 512
|
| 852 |
+
#define RAMEND 0x02FF
|
| 853 |
+
#define E2START 0
|
| 854 |
+
#define E2SIZE 256
|
| 855 |
+
#define E2PAGESIZE 4
|
| 856 |
+
#define E2END 0x00FF
|
| 857 |
+
#define XRAMEND RAMEND
|
| 858 |
+
|
| 859 |
+
|
| 860 |
+
/* Fuses */
|
| 861 |
+
|
| 862 |
+
#define FUSE_MEMORY_SIZE 3
|
| 863 |
+
|
| 864 |
+
/* Low Fuse Byte */
|
| 865 |
+
#define FUSE_SUT_CKSEL0 (unsigned char)~_BV(0)
|
| 866 |
+
#define FUSE_SUT_CKSEL1 (unsigned char)~_BV(1)
|
| 867 |
+
#define FUSE_SUT_CKSEL2 (unsigned char)~_BV(4)
|
| 868 |
+
#define FUSE_SUT_CKSEL3 (unsigned char)~_BV(5)
|
| 869 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 870 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 871 |
+
#define LFUSE_DEFAULT (FUSE_SUT_CKSEL0 & FUSE_SUT_CKSEL2 & FUSE_CKDIV8)
|
| 872 |
+
|
| 873 |
+
|
| 874 |
+
/* High Fuse Byte */
|
| 875 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 876 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 877 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 878 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 879 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 880 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 881 |
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
| 882 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
| 883 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 884 |
+
|
| 885 |
+
|
| 886 |
+
/* Extended Fuse Byte */
|
| 887 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 888 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 889 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 890 |
+
#define FUSE_BODACT0 (unsigned char)~_BV(4)
|
| 891 |
+
#define FUSE_BODACT1 (unsigned char)~_BV(5)
|
| 892 |
+
#define FUSE_BODPD0 (unsigned char)~_BV(6)
|
| 893 |
+
#define FUSE_BODPD1 (unsigned char)~_BV(7)
|
| 894 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 895 |
+
|
| 896 |
+
|
| 897 |
+
|
| 898 |
+
/* Lock Bits */
|
| 899 |
+
#define __LOCK_BITS_EXIST
|
| 900 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 901 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 902 |
+
|
| 903 |
+
|
| 904 |
+
/* Signature */
|
| 905 |
+
#define SIGNATURE_0 0x1E
|
| 906 |
+
#define SIGNATURE_1 0x93
|
| 907 |
+
#define SIGNATURE_2 0x14
|
| 908 |
+
|
| 909 |
+
|
| 910 |
+
#endif /* #ifdef _AVR_ATTINY828_H_INCLUDED */
|
| 911 |
+
|
hardware/tools/avr/avr/include/avr/iotn84.h
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2005, Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn84.h 2417 2014-04-16 11:34:47Z pitchumani $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn84.h - definitions for ATtiny84 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_IOTN84_H_
|
| 36 |
+
#define _AVR_IOTN84_H_ 1
|
| 37 |
+
|
| 38 |
+
#include <avr/iotnx4.h>
|
| 39 |
+
|
| 40 |
+
/* Constants */
|
| 41 |
+
#define SPM_PAGESIZE 64
|
| 42 |
+
#define RAMSTART (0x60)
|
| 43 |
+
#define RAMEND 0x25F
|
| 44 |
+
#define XRAMEND RAMEND
|
| 45 |
+
#define E2END 0x1FF
|
| 46 |
+
#define E2PAGESIZE 4
|
| 47 |
+
#define FLASHEND 0x1FFF
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
/* Fuses */
|
| 51 |
+
#define FUSE_MEMORY_SIZE 3
|
| 52 |
+
|
| 53 |
+
/* Low Fuse Byte */
|
| 54 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 55 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 56 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 57 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 58 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 59 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 60 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 61 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 62 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 63 |
+
|
| 64 |
+
/* High Fuse Byte */
|
| 65 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 66 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 67 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 68 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 69 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 70 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 71 |
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
| 72 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
| 73 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 74 |
+
|
| 75 |
+
/* Extended Fuse Byte */
|
| 76 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
| 77 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
/* Lock Bits */
|
| 81 |
+
#define __LOCK_BITS_EXIST
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Signature */
|
| 85 |
+
#define SIGNATURE_0 0x1E
|
| 86 |
+
#define SIGNATURE_1 0x93
|
| 87 |
+
#define SIGNATURE_2 0x0C
|
| 88 |
+
|
| 89 |
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
| 90 |
+
#define SLEEP_MODE_ADC (0x01<<3)
|
| 91 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
| 92 |
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
| 93 |
+
|
| 94 |
+
#endif /* _AVR_IOTN84_H_ */
|
hardware/tools/avr/avr/include/avr/iotn841.h
ADDED
|
@@ -0,0 +1,903 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*****************************************************************************
|
| 2 |
+
*
|
| 3 |
+
* Copyright (C) 2015 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_ATTINY841_H_INCLUDED
|
| 36 |
+
#define _AVR_ATTINY841_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_ "iotn841.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 ADCSRB _SFR_IO8(0x04)
|
| 52 |
+
#define ADTS0 0
|
| 53 |
+
#define ADTS1 1
|
| 54 |
+
#define ADTS2 2
|
| 55 |
+
#define ADLAR 3
|
| 56 |
+
|
| 57 |
+
#define ADCSRA _SFR_IO8(0x05)
|
| 58 |
+
#define ADPS0 0
|
| 59 |
+
#define ADPS1 1
|
| 60 |
+
#define ADPS2 2
|
| 61 |
+
#define ADIE 3
|
| 62 |
+
#define ADIF 4
|
| 63 |
+
#define ADATE 5
|
| 64 |
+
#define ADSC 6
|
| 65 |
+
#define ADEN 7
|
| 66 |
+
|
| 67 |
+
/* Combine ADCL and ADCH */
|
| 68 |
+
#ifndef __ASSEMBLER__
|
| 69 |
+
#define ADC _SFR_IO16(0x06)
|
| 70 |
+
#endif
|
| 71 |
+
#define ADCW _SFR_IO16(0x06)
|
| 72 |
+
|
| 73 |
+
#define ADCL _SFR_IO8(0x06)
|
| 74 |
+
#define ADCH _SFR_IO8(0x07)
|
| 75 |
+
|
| 76 |
+
#define ADMUXB _SFR_IO8(0x08)
|
| 77 |
+
#define GSEL0 0
|
| 78 |
+
#define GSEL1 1
|
| 79 |
+
#define REFS0 5
|
| 80 |
+
#define REFS1 6
|
| 81 |
+
#define REFS2 7
|
| 82 |
+
|
| 83 |
+
#define ADMUXA _SFR_IO8(0x09)
|
| 84 |
+
#define MUX0 0
|
| 85 |
+
#define MUX1 1
|
| 86 |
+
#define MUX2 2
|
| 87 |
+
#define MUX3 3
|
| 88 |
+
#define MUX4 4
|
| 89 |
+
#define MUX5 5
|
| 90 |
+
|
| 91 |
+
#define ACSR0A _SFR_IO8(0x0A)
|
| 92 |
+
#define ACIS00 0
|
| 93 |
+
#define ACIS01 1
|
| 94 |
+
#define ACIC0 2
|
| 95 |
+
#define ACIE0 3
|
| 96 |
+
#define ACI0 4
|
| 97 |
+
#define ACO0 5
|
| 98 |
+
#define ACPMUX2 6
|
| 99 |
+
#define ACD0 7
|
| 100 |
+
|
| 101 |
+
#define ACSR0B _SFR_IO8(0x0B)
|
| 102 |
+
#define ACPMUX0 0
|
| 103 |
+
#define ACPMUX1 1
|
| 104 |
+
#define ACNMUX0 2
|
| 105 |
+
#define ACNMUX1 3
|
| 106 |
+
#define ACOE0 4
|
| 107 |
+
#define HLEV0 6
|
| 108 |
+
#define HSEL0 7
|
| 109 |
+
|
| 110 |
+
#define ACSR1A _SFR_IO8(0x0C)
|
| 111 |
+
#define ACIS10 0
|
| 112 |
+
#define ACIS11 1
|
| 113 |
+
#define ACIC1 2
|
| 114 |
+
#define ACIE1 3
|
| 115 |
+
#define ACI1 4
|
| 116 |
+
#define ACO1 5
|
| 117 |
+
#define ACBG1 6
|
| 118 |
+
#define ACD1 7
|
| 119 |
+
|
| 120 |
+
#define ACSR1B _SFR_IO8(0x0D)
|
| 121 |
+
#define ACME1 2
|
| 122 |
+
#define ACOE1 4
|
| 123 |
+
#define HLEV1 6
|
| 124 |
+
#define HSEL1 7
|
| 125 |
+
|
| 126 |
+
#define TIFR1 _SFR_IO8(0x0E)
|
| 127 |
+
#define TOV1 0
|
| 128 |
+
#define OCF1A 1
|
| 129 |
+
#define OCF1B 2
|
| 130 |
+
#define ICF1 5
|
| 131 |
+
|
| 132 |
+
#define TIMSK1 _SFR_IO8(0x0F)
|
| 133 |
+
#define TOIE1 0
|
| 134 |
+
#define OCIE1A 1
|
| 135 |
+
#define OCIE1B 2
|
| 136 |
+
#define ICIE1 5
|
| 137 |
+
|
| 138 |
+
#define TIFR2 _SFR_IO8(0x10)
|
| 139 |
+
#define TOV2 0
|
| 140 |
+
#define OCF2A 1
|
| 141 |
+
#define OCF2B 2
|
| 142 |
+
#define ICF2 5
|
| 143 |
+
|
| 144 |
+
#define TIMSK2 _SFR_IO8(0x11)
|
| 145 |
+
#define TOIE2 0
|
| 146 |
+
#define OCIE2A 1
|
| 147 |
+
#define OCIE2B 2
|
| 148 |
+
#define ICIE2 5
|
| 149 |
+
|
| 150 |
+
#define PCMSK0 _SFR_IO8(0x12)
|
| 151 |
+
#define PCINT0 0
|
| 152 |
+
#define PCINT1 1
|
| 153 |
+
#define PCINT2 2
|
| 154 |
+
#define PCINT3 3
|
| 155 |
+
#define PCINT4 4
|
| 156 |
+
#define PCINT5 5
|
| 157 |
+
#define PCINT6 6
|
| 158 |
+
#define PCINT7 7
|
| 159 |
+
|
| 160 |
+
#define GPIOR0 _SFR_IO8(0x13)
|
| 161 |
+
|
| 162 |
+
#define GPIOR1 _SFR_IO8(0x14)
|
| 163 |
+
|
| 164 |
+
#define GPIOR2 _SFR_IO8(0x15)
|
| 165 |
+
|
| 166 |
+
#define PINB _SFR_IO8(0x16)
|
| 167 |
+
#define PINB3 3
|
| 168 |
+
#define PINB2 2
|
| 169 |
+
#define PINB1 1
|
| 170 |
+
#define PINB0 0
|
| 171 |
+
|
| 172 |
+
#define DDRB _SFR_IO8(0x17)
|
| 173 |
+
#define DDRB3 3
|
| 174 |
+
// Inserted "DDB3" from "DDRB3" due to compatibility
|
| 175 |
+
#define DDB3 3
|
| 176 |
+
#define DDRB2 2
|
| 177 |
+
// Inserted "DDB2" from "DDRB2" due to compatibility
|
| 178 |
+
#define DDB2 2
|
| 179 |
+
#define DDRB1 1
|
| 180 |
+
// Inserted "DDB1" from "DDRB1" due to compatibility
|
| 181 |
+
#define DDB1 1
|
| 182 |
+
#define DDRB0 0
|
| 183 |
+
// Inserted "DDB0" from "DDRB0" due to compatibility
|
| 184 |
+
#define DDB0 0
|
| 185 |
+
|
| 186 |
+
#define PORTB _SFR_IO8(0x18)
|
| 187 |
+
#define PORTB3 3
|
| 188 |
+
#define PORTB2 2
|
| 189 |
+
#define PORTB1 1
|
| 190 |
+
#define PORTB0 0
|
| 191 |
+
|
| 192 |
+
#define PINA _SFR_IO8(0x19)
|
| 193 |
+
#define PINA7 7
|
| 194 |
+
#define PINA6 6
|
| 195 |
+
#define PINA5 5
|
| 196 |
+
#define PINA4 4
|
| 197 |
+
#define PINA3 3
|
| 198 |
+
#define PINA2 2
|
| 199 |
+
#define PINA1 1
|
| 200 |
+
#define PINA0 0
|
| 201 |
+
|
| 202 |
+
#define DDRA _SFR_IO8(0x1A)
|
| 203 |
+
#define DDRA7 7
|
| 204 |
+
// Inserted "DDA7" from "DDRA7" due to compatibility
|
| 205 |
+
#define DDA7 7
|
| 206 |
+
#define DDRA6 6
|
| 207 |
+
// Inserted "DDA6" from "DDRA6" due to compatibility
|
| 208 |
+
#define DDA6 6
|
| 209 |
+
#define DDRA5 5
|
| 210 |
+
// Inserted "DDA5" from "DDRA5" due to compatibility
|
| 211 |
+
#define DDA5 5
|
| 212 |
+
#define DDRA4 4
|
| 213 |
+
// Inserted "DDA4" from "DDRA4" due to compatibility
|
| 214 |
+
#define DDA4 4
|
| 215 |
+
#define DDRA3 3
|
| 216 |
+
// Inserted "DDA3" from "DDRA3" due to compatibility
|
| 217 |
+
#define DDA3 3
|
| 218 |
+
#define DDRA2 2
|
| 219 |
+
// Inserted "DDA2" from "DDRA2" due to compatibility
|
| 220 |
+
#define DDA2 2
|
| 221 |
+
#define DDRA1 1
|
| 222 |
+
// Inserted "DDA1" from "DDRA1" due to compatibility
|
| 223 |
+
#define DDA1 1
|
| 224 |
+
#define DDRA0 0
|
| 225 |
+
// Inserted "DDA0" from "DDRA0" due to compatibility
|
| 226 |
+
#define DDA0 0
|
| 227 |
+
|
| 228 |
+
#define PORTA _SFR_IO8(0x1B)
|
| 229 |
+
#define PORTA7 7
|
| 230 |
+
#define PORTA6 6
|
| 231 |
+
#define PORTA5 5
|
| 232 |
+
#define PORTA4 4
|
| 233 |
+
#define PORTA3 3
|
| 234 |
+
#define PORTA2 2
|
| 235 |
+
#define PORTA1 1
|
| 236 |
+
#define PORTA0 0
|
| 237 |
+
|
| 238 |
+
#define EECR _SFR_IO8(0x1C)
|
| 239 |
+
#define EERE 0
|
| 240 |
+
#define EEPE 1
|
| 241 |
+
#define EEMPE 2
|
| 242 |
+
#define EERIE 3
|
| 243 |
+
#define EEPM0 4
|
| 244 |
+
#define EEPM1 5
|
| 245 |
+
|
| 246 |
+
#define EEDR _SFR_IO8(0x1D)
|
| 247 |
+
|
| 248 |
+
/* Combine EEARL and EEARH */
|
| 249 |
+
#define EEAR _SFR_IO16(0x1E)
|
| 250 |
+
|
| 251 |
+
#define EEARL _SFR_IO8(0x1E)
|
| 252 |
+
#define EEARH _SFR_IO8(0x1F)
|
| 253 |
+
|
| 254 |
+
#define PCMSK1 _SFR_IO8(0x20)
|
| 255 |
+
#define PCINT8 0
|
| 256 |
+
#define PCINT9 1
|
| 257 |
+
#define PCINT10 2
|
| 258 |
+
#define PCINT11 3
|
| 259 |
+
|
| 260 |
+
#define WDTCSR _SFR_IO8(0x21)
|
| 261 |
+
#define WDE 3
|
| 262 |
+
#define WDP0 0
|
| 263 |
+
#define WDP1 1
|
| 264 |
+
#define WDP2 2
|
| 265 |
+
#define WDP3 5
|
| 266 |
+
#define WDIE 6
|
| 267 |
+
#define WDIF 7
|
| 268 |
+
|
| 269 |
+
#define TCCR1C _SFR_IO8(0x22)
|
| 270 |
+
#define FOC1B 6
|
| 271 |
+
#define FOC1A 7
|
| 272 |
+
|
| 273 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 274 |
+
#define PSR 0
|
| 275 |
+
#define TSM 7
|
| 276 |
+
|
| 277 |
+
/* Combine ICR1L and ICR1H */
|
| 278 |
+
#define ICR1 _SFR_IO16(0x24)
|
| 279 |
+
|
| 280 |
+
#define ICR1L _SFR_IO8(0x24)
|
| 281 |
+
#define ICR1H _SFR_IO8(0x25)
|
| 282 |
+
|
| 283 |
+
/* Reserved [0x26..0x27] */
|
| 284 |
+
|
| 285 |
+
/* Combine OCR1BL and OCR1BH */
|
| 286 |
+
#define OCR1B _SFR_IO16(0x28)
|
| 287 |
+
|
| 288 |
+
#define OCR1BL _SFR_IO8(0x28)
|
| 289 |
+
#define OCR1BH _SFR_IO8(0x29)
|
| 290 |
+
|
| 291 |
+
/* Combine OCR1AL and OCR1AH */
|
| 292 |
+
#define OCR1A _SFR_IO16(0x2A)
|
| 293 |
+
|
| 294 |
+
#define OCR1AL _SFR_IO8(0x2A)
|
| 295 |
+
#define OCR1AH _SFR_IO8(0x2B)
|
| 296 |
+
|
| 297 |
+
/* Combine TCNT1L and TCNT1H */
|
| 298 |
+
#define TCNT1 _SFR_IO16(0x2C)
|
| 299 |
+
|
| 300 |
+
#define TCNT1L _SFR_IO8(0x2C)
|
| 301 |
+
#define TCNT1H _SFR_IO8(0x2D)
|
| 302 |
+
|
| 303 |
+
#define TCCR1B _SFR_IO8(0x2E)
|
| 304 |
+
#define CS10 0
|
| 305 |
+
#define CS11 1
|
| 306 |
+
#define CS12 2
|
| 307 |
+
#define WGM12 3
|
| 308 |
+
#define WGM13 4
|
| 309 |
+
#define ICES1 6
|
| 310 |
+
#define ICNC1 7
|
| 311 |
+
|
| 312 |
+
#define TCCR1A _SFR_IO8(0x2F)
|
| 313 |
+
#define WGM10 0
|
| 314 |
+
#define WGM11 1
|
| 315 |
+
#define COM1B0 4
|
| 316 |
+
#define COM1B1 5
|
| 317 |
+
#define COM1A0 6
|
| 318 |
+
#define COM1A1 7
|
| 319 |
+
|
| 320 |
+
#define TCCR0A _SFR_IO8(0x30)
|
| 321 |
+
#define WGM00 0
|
| 322 |
+
#define WGM01 1
|
| 323 |
+
#define COM0B0 4
|
| 324 |
+
#define COM0B1 5
|
| 325 |
+
#define COM0A0 6
|
| 326 |
+
#define COM0A1 7
|
| 327 |
+
|
| 328 |
+
/* Reserved [0x31] */
|
| 329 |
+
|
| 330 |
+
#define TCNT0 _SFR_IO8(0x32)
|
| 331 |
+
|
| 332 |
+
#define TCCR0B _SFR_IO8(0x33)
|
| 333 |
+
#define CS00 0
|
| 334 |
+
#define CS01 1
|
| 335 |
+
#define CS02 2
|
| 336 |
+
#define WGM02 3
|
| 337 |
+
#define FOC0B 6
|
| 338 |
+
#define FOC0A 7
|
| 339 |
+
|
| 340 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 341 |
+
#define PORF 0
|
| 342 |
+
#define EXTRF 1
|
| 343 |
+
#define BORF 2
|
| 344 |
+
#define WDRF 3
|
| 345 |
+
|
| 346 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 347 |
+
#define ISC00 0
|
| 348 |
+
#define ISC01 1
|
| 349 |
+
#define SM0 3
|
| 350 |
+
#define SM1 4
|
| 351 |
+
#define SE 5
|
| 352 |
+
|
| 353 |
+
#define OCR0A _SFR_IO8(0x36)
|
| 354 |
+
|
| 355 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 356 |
+
#define SPMEN 0
|
| 357 |
+
#define PGERS 1
|
| 358 |
+
#define PGWRT 2
|
| 359 |
+
#define RFLB 3
|
| 360 |
+
#define CTPB 4
|
| 361 |
+
#define RSIG 5
|
| 362 |
+
|
| 363 |
+
#define TIFR0 _SFR_IO8(0x38)
|
| 364 |
+
#define TOV0 0
|
| 365 |
+
#define OCF0A 1
|
| 366 |
+
#define OCF0B 2
|
| 367 |
+
|
| 368 |
+
#define TIMSK0 _SFR_IO8(0x39)
|
| 369 |
+
#define TOIE0 0
|
| 370 |
+
#define OCIE0A 1
|
| 371 |
+
#define OCIE0B 2
|
| 372 |
+
|
| 373 |
+
#define GIFR _SFR_IO8(0x3A)
|
| 374 |
+
#define PCIF0 4
|
| 375 |
+
#define PCIF1 5
|
| 376 |
+
#define INTF0 6
|
| 377 |
+
|
| 378 |
+
#define GIMSK _SFR_IO8(0x3B)
|
| 379 |
+
#define PCIE0 4
|
| 380 |
+
#define PCIE1 5
|
| 381 |
+
#define INT0 6
|
| 382 |
+
|
| 383 |
+
#define OCR0B _SFR_IO8(0x3C)
|
| 384 |
+
|
| 385 |
+
/* SP [0x3D..0x3E] */
|
| 386 |
+
|
| 387 |
+
/* SREG [0x3F] */
|
| 388 |
+
|
| 389 |
+
#define DIDR0 _SFR_MEM8(0x60)
|
| 390 |
+
#define ADC0D 0
|
| 391 |
+
#define ADC1D 1
|
| 392 |
+
#define ADC2D 2
|
| 393 |
+
#define ADC3D 3
|
| 394 |
+
#define ADC4D 4
|
| 395 |
+
#define ADC5D 5
|
| 396 |
+
#define ADC6D 6
|
| 397 |
+
#define ADC7D 7
|
| 398 |
+
|
| 399 |
+
#define DIDR1 _SFR_MEM8(0x61)
|
| 400 |
+
#define ADC11D 0
|
| 401 |
+
#define ADC10D 1
|
| 402 |
+
#define ADC8D 2
|
| 403 |
+
#define ADC9D 3
|
| 404 |
+
|
| 405 |
+
#define PUEB _SFR_MEM8(0x62)
|
| 406 |
+
|
| 407 |
+
#define PUEA _SFR_MEM8(0x63)
|
| 408 |
+
|
| 409 |
+
#define PORTCR _SFR_MEM8(0x64)
|
| 410 |
+
#define BBMB 1
|
| 411 |
+
#define BBMA 0
|
| 412 |
+
|
| 413 |
+
#define REMAP _SFR_MEM8(0x65)
|
| 414 |
+
#define U0MAP 0
|
| 415 |
+
#define SPIMAP 1
|
| 416 |
+
|
| 417 |
+
#define TOCPMCOE _SFR_MEM8(0x66)
|
| 418 |
+
#define TOCC0OE 0
|
| 419 |
+
#define TOCC1OE 1
|
| 420 |
+
#define TOCC2OE 2
|
| 421 |
+
#define TOCC3OE 3
|
| 422 |
+
#define TOCC4OE 4
|
| 423 |
+
#define TOCC5OE 5
|
| 424 |
+
#define TOCC6OE 6
|
| 425 |
+
#define TOCC7OE 7
|
| 426 |
+
|
| 427 |
+
#define TOCPMSA0 _SFR_MEM8(0x67)
|
| 428 |
+
#define TOCC0S0 0
|
| 429 |
+
#define TOCC0S1 1
|
| 430 |
+
#define TOCC1S0 2
|
| 431 |
+
#define TOCC1S1 3
|
| 432 |
+
#define TOCC2S0 4
|
| 433 |
+
#define TOCC2S1 5
|
| 434 |
+
#define TOCC3S0 6
|
| 435 |
+
#define TOCC3S1 7
|
| 436 |
+
|
| 437 |
+
#define TOCPMSA1 _SFR_MEM8(0x68)
|
| 438 |
+
#define TOCC4S0 0
|
| 439 |
+
#define TOCC4S1 1
|
| 440 |
+
#define TOCC5S0 2
|
| 441 |
+
#define TOCC5S1 3
|
| 442 |
+
#define TOCC6S0 4
|
| 443 |
+
#define TOCC6S1 5
|
| 444 |
+
#define TOCC7S0 6
|
| 445 |
+
#define TOCC7S1 7
|
| 446 |
+
|
| 447 |
+
/* Reserved [0x69] */
|
| 448 |
+
|
| 449 |
+
#define PHDE _SFR_MEM8(0x6A)
|
| 450 |
+
#define PHDEA0 0
|
| 451 |
+
#define PHDEA1 1
|
| 452 |
+
|
| 453 |
+
/* Reserved [0x6B..0x6F] */
|
| 454 |
+
|
| 455 |
+
#define PRR _SFR_MEM8(0x70)
|
| 456 |
+
#define PRADC 0
|
| 457 |
+
#define PRTIM0 1
|
| 458 |
+
#define PRTIM1 2
|
| 459 |
+
#define PRTIM2 3
|
| 460 |
+
#define PRSPI 4
|
| 461 |
+
#define PRUSART0 5
|
| 462 |
+
#define PRUSART1 6
|
| 463 |
+
#define PRTWI 7
|
| 464 |
+
|
| 465 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRTIM2)|(1<<PRSPI)|(1<<PRUSART0)|(1<<PRUSART1)|(1<<PRTWI))
|
| 466 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 467 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 468 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 469 |
+
#define __AVR_HAVE_PRR_PRTIM2
|
| 470 |
+
#define __AVR_HAVE_PRR_PRSPI
|
| 471 |
+
#define __AVR_HAVE_PRR_PRUSART0
|
| 472 |
+
#define __AVR_HAVE_PRR_PRUSART1
|
| 473 |
+
#define __AVR_HAVE_PRR_PRTWI
|
| 474 |
+
|
| 475 |
+
#define CCP _SFR_MEM8(0x71)
|
| 476 |
+
|
| 477 |
+
#define CLKCR _SFR_MEM8(0x72)
|
| 478 |
+
#define CKSEL0 0
|
| 479 |
+
#define CKSEL1 1
|
| 480 |
+
#define CKSEL2 2
|
| 481 |
+
#define CKSEL3 3
|
| 482 |
+
#define SUT 4
|
| 483 |
+
#define CKOUTC 5
|
| 484 |
+
#define CSTR 6
|
| 485 |
+
#define OSCRDY 7
|
| 486 |
+
|
| 487 |
+
#define CLKPR _SFR_MEM8(0x73)
|
| 488 |
+
#define CLKPS0 0
|
| 489 |
+
#define CLKPS1 1
|
| 490 |
+
#define CLKPS2 2
|
| 491 |
+
#define CLKPS3 3
|
| 492 |
+
|
| 493 |
+
#define OSCCAL0 _SFR_MEM8(0x74)
|
| 494 |
+
|
| 495 |
+
#define OSCTCAL0A _SFR_MEM8(0x75)
|
| 496 |
+
|
| 497 |
+
#define OSCTCAL0B _SFR_MEM8(0x76)
|
| 498 |
+
|
| 499 |
+
#define OSCCAL1 _SFR_MEM8(0x77)
|
| 500 |
+
|
| 501 |
+
/* Reserved [0x78..0x7F] */
|
| 502 |
+
|
| 503 |
+
#define UDR0 _SFR_MEM8(0x80)
|
| 504 |
+
|
| 505 |
+
/* Combine UBRR0L and UBRR0H */
|
| 506 |
+
#define UBRR0 _SFR_MEM16(0x81)
|
| 507 |
+
|
| 508 |
+
#define UBRR0L _SFR_MEM8(0x81)
|
| 509 |
+
#define UBRR0H _SFR_MEM8(0x82)
|
| 510 |
+
|
| 511 |
+
#define UCSR0D _SFR_MEM8(0x83)
|
| 512 |
+
#define SFDE0 5
|
| 513 |
+
#define RXS0 6
|
| 514 |
+
#define RXSIE0 7
|
| 515 |
+
|
| 516 |
+
#define UCSR0C _SFR_MEM8(0x84)
|
| 517 |
+
#define UCPOL0 0
|
| 518 |
+
#define UCSZ00 1
|
| 519 |
+
#define UCSZ01 2
|
| 520 |
+
#define USBS0 3
|
| 521 |
+
#define UPM00 4
|
| 522 |
+
#define UPM01 5
|
| 523 |
+
#define UMSEL00 6
|
| 524 |
+
#define UMSEL01 7
|
| 525 |
+
|
| 526 |
+
#define UCSR0B _SFR_MEM8(0x85)
|
| 527 |
+
#define TXB80 0
|
| 528 |
+
#define RXB80 1
|
| 529 |
+
#define UCSZ02 2
|
| 530 |
+
#define TXEN0 3
|
| 531 |
+
#define RXEN0 4
|
| 532 |
+
#define UDRIE0 5
|
| 533 |
+
#define TXCIE0 6
|
| 534 |
+
#define RXCIE0 7
|
| 535 |
+
|
| 536 |
+
#define UCSR0A _SFR_MEM8(0x86)
|
| 537 |
+
#define MPCM0 0
|
| 538 |
+
#define U2X0 1
|
| 539 |
+
#define UPE0 2
|
| 540 |
+
#define DOR0 3
|
| 541 |
+
#define FE0 4
|
| 542 |
+
#define UDRE0 5
|
| 543 |
+
#define TXC0 6
|
| 544 |
+
#define RXC0 7
|
| 545 |
+
|
| 546 |
+
/* Reserved [0x87..0x8F] */
|
| 547 |
+
|
| 548 |
+
#define UDR1 _SFR_MEM8(0x90)
|
| 549 |
+
|
| 550 |
+
/* Combine UBRR1L and UBRR1H */
|
| 551 |
+
#define UBRR1 _SFR_MEM16(0x91)
|
| 552 |
+
|
| 553 |
+
#define UBRR1L _SFR_MEM8(0x91)
|
| 554 |
+
#define UBRR1H _SFR_MEM8(0x92)
|
| 555 |
+
|
| 556 |
+
#define UCSR1D _SFR_MEM8(0x93)
|
| 557 |
+
#define SFDE1 5
|
| 558 |
+
#define RXS1 6
|
| 559 |
+
#define RXSIE1 7
|
| 560 |
+
|
| 561 |
+
#define UCSR1C _SFR_MEM8(0x94)
|
| 562 |
+
#define UCPOL1 0
|
| 563 |
+
#define UCSZ10 1
|
| 564 |
+
#define UCSZ11 2
|
| 565 |
+
#define USBS1 3
|
| 566 |
+
#define UPM10 4
|
| 567 |
+
#define UPM11 5
|
| 568 |
+
#define UMSEL10 6
|
| 569 |
+
#define UMSEL11 7
|
| 570 |
+
|
| 571 |
+
#define UCSR1B _SFR_MEM8(0x95)
|
| 572 |
+
#define TXB81 0
|
| 573 |
+
#define RXB81 1
|
| 574 |
+
#define UCSZ12 2
|
| 575 |
+
#define TXEN1 3
|
| 576 |
+
#define RXEN1 4
|
| 577 |
+
#define UDRIE1 5
|
| 578 |
+
#define TXCIE1 6
|
| 579 |
+
#define RXCIE1 7
|
| 580 |
+
|
| 581 |
+
#define UCSR1A _SFR_MEM8(0x96)
|
| 582 |
+
#define MPCM1 0
|
| 583 |
+
#define U2X1 1
|
| 584 |
+
#define UPE1 2
|
| 585 |
+
#define DOR1 3
|
| 586 |
+
#define FE1 4
|
| 587 |
+
#define UDRE1 5
|
| 588 |
+
#define TXC1 6
|
| 589 |
+
#define RXC1 7
|
| 590 |
+
|
| 591 |
+
/* Reserved [0x97..0x9F] */
|
| 592 |
+
|
| 593 |
+
#define TWSD _SFR_MEM8(0xA0)
|
| 594 |
+
#define TWSD0 0
|
| 595 |
+
#define TWSD1 1
|
| 596 |
+
#define TWSD2 2
|
| 597 |
+
#define TWSD3 3
|
| 598 |
+
#define TWSD4 4
|
| 599 |
+
#define TWSD5 5
|
| 600 |
+
#define TWSD6 6
|
| 601 |
+
#define TWSD7 7
|
| 602 |
+
|
| 603 |
+
#define TWSAM _SFR_MEM8(0xA1)
|
| 604 |
+
#define TWAE 0
|
| 605 |
+
#define TWSAM1 1
|
| 606 |
+
#define TWSAM2 2
|
| 607 |
+
#define TWSAM3 3
|
| 608 |
+
#define TWSAM4 4
|
| 609 |
+
#define TWSAM5 5
|
| 610 |
+
#define TWSAM6 6
|
| 611 |
+
#define TWSAM7 7
|
| 612 |
+
|
| 613 |
+
#define TWSA _SFR_MEM8(0xA2)
|
| 614 |
+
|
| 615 |
+
#define TWSSRA _SFR_MEM8(0xA3)
|
| 616 |
+
#define TWAS 0
|
| 617 |
+
#define TWDIR 1
|
| 618 |
+
#define TWBE 2
|
| 619 |
+
#define TWC 3
|
| 620 |
+
#define TWRA 4
|
| 621 |
+
#define TWCH 5
|
| 622 |
+
#define TWASIF 6
|
| 623 |
+
#define TWDIF 7
|
| 624 |
+
|
| 625 |
+
#define TWSCRB _SFR_MEM8(0xA4)
|
| 626 |
+
#define TWCMD0 0
|
| 627 |
+
#define TWCMD1 1
|
| 628 |
+
#define TWAA 2
|
| 629 |
+
#define TWHNM 3
|
| 630 |
+
|
| 631 |
+
#define TWSCRA _SFR_MEM8(0xA5)
|
| 632 |
+
#define TWSME 0
|
| 633 |
+
#define TWPME 1
|
| 634 |
+
#define TWSIE 2
|
| 635 |
+
#define TWEN 3
|
| 636 |
+
#define TWASIE 4
|
| 637 |
+
#define TWDIE 5
|
| 638 |
+
#define TWSHE 7
|
| 639 |
+
|
| 640 |
+
/* Reserved [0xA6..0xAF] */
|
| 641 |
+
|
| 642 |
+
#define SPDR _SFR_MEM8(0xB0)
|
| 643 |
+
|
| 644 |
+
#define SPSR _SFR_MEM8(0xB1)
|
| 645 |
+
#define SPI2X 0
|
| 646 |
+
#define WCOL 6
|
| 647 |
+
#define SPIF 7
|
| 648 |
+
|
| 649 |
+
#define SPCR _SFR_MEM8(0xB2)
|
| 650 |
+
#define SPR0 0
|
| 651 |
+
#define SPR1 1
|
| 652 |
+
#define CPHA 2
|
| 653 |
+
#define CPOL 3
|
| 654 |
+
#define MSTR 4
|
| 655 |
+
#define DORD 5
|
| 656 |
+
#define SPE 6
|
| 657 |
+
#define SPIE 7
|
| 658 |
+
|
| 659 |
+
/* Reserved [0xB3..0xBF] */
|
| 660 |
+
|
| 661 |
+
/* Combine ICR2L and ICR2H */
|
| 662 |
+
#define ICR2 _SFR_MEM16(0xC0)
|
| 663 |
+
|
| 664 |
+
#define ICR2L _SFR_MEM8(0xC0)
|
| 665 |
+
#define ICR2H _SFR_MEM8(0xC1)
|
| 666 |
+
|
| 667 |
+
/* Combine OCR2BL and OCR2BH */
|
| 668 |
+
#define OCR2B _SFR_MEM16(0xC2)
|
| 669 |
+
|
| 670 |
+
#define OCR2BL _SFR_MEM8(0xC2)
|
| 671 |
+
#define OCR2BH _SFR_MEM8(0xC3)
|
| 672 |
+
|
| 673 |
+
/* Combine OCR2AL and OCR2AH */
|
| 674 |
+
#define OCR2A _SFR_MEM16(0xC4)
|
| 675 |
+
|
| 676 |
+
#define OCR2AL _SFR_MEM8(0xC4)
|
| 677 |
+
#define OCR2AH _SFR_MEM8(0xC5)
|
| 678 |
+
|
| 679 |
+
/* Combine TCNT2L and TCNT2H */
|
| 680 |
+
#define TCNT2 _SFR_MEM16(0xC6)
|
| 681 |
+
|
| 682 |
+
#define TCNT2L _SFR_MEM8(0xC6)
|
| 683 |
+
#define TCNT2H _SFR_MEM8(0xC7)
|
| 684 |
+
|
| 685 |
+
#define TCCR2C _SFR_MEM8(0xC8)
|
| 686 |
+
#define FOC2B 6
|
| 687 |
+
#define FOC2A 7
|
| 688 |
+
|
| 689 |
+
#define TCCR2B _SFR_MEM8(0xC9)
|
| 690 |
+
#define CS20 0
|
| 691 |
+
#define CS21 1
|
| 692 |
+
#define CS22 2
|
| 693 |
+
#define WGM22 3
|
| 694 |
+
#define WGM23 4
|
| 695 |
+
#define ICES2 6
|
| 696 |
+
#define ICNC2 7
|
| 697 |
+
|
| 698 |
+
#define TCCR2A _SFR_MEM8(0xCA)
|
| 699 |
+
#define WGM20 0
|
| 700 |
+
#define WGM21 1
|
| 701 |
+
#define COM2B0 4
|
| 702 |
+
#define COM2B1 5
|
| 703 |
+
#define COM2A0 6
|
| 704 |
+
#define COM2A1 7
|
| 705 |
+
|
| 706 |
+
|
| 707 |
+
|
| 708 |
+
/* Values and associated defines */
|
| 709 |
+
|
| 710 |
+
|
| 711 |
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
| 712 |
+
#define SLEEP_MODE_ADC (0x01<<3)
|
| 713 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
| 714 |
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
| 715 |
+
|
| 716 |
+
/* Interrupt vectors */
|
| 717 |
+
/* Vector 0 is the reset vector */
|
| 718 |
+
/* External Interrupt Request 0 */
|
| 719 |
+
#define INT0_vect _VECTOR(1)
|
| 720 |
+
#define INT0_vect_num 1
|
| 721 |
+
|
| 722 |
+
/* Pin Change Interrupt Request 0 */
|
| 723 |
+
#define PCINT0_vect _VECTOR(2)
|
| 724 |
+
#define PCINT0_vect_num 2
|
| 725 |
+
|
| 726 |
+
/* Pin Change Interrupt Request 1 */
|
| 727 |
+
#define PCINT1_vect _VECTOR(3)
|
| 728 |
+
#define PCINT1_vect_num 3
|
| 729 |
+
|
| 730 |
+
/* Watchdog Time-out Interrupt */
|
| 731 |
+
#define WDT_vect _VECTOR(4)
|
| 732 |
+
#define WDT_vect_num 4
|
| 733 |
+
|
| 734 |
+
/* Timer/Counter1 Capture Event */
|
| 735 |
+
#define TIMER1_CAPT_vect _VECTOR(5)
|
| 736 |
+
#define TIMER1_CAPT_vect_num 5
|
| 737 |
+
|
| 738 |
+
/* Timer/Counter1 Compare Match A */
|
| 739 |
+
#define TIMER1_COMPA_vect _VECTOR(6)
|
| 740 |
+
#define TIMER1_COMPA_vect_num 6
|
| 741 |
+
|
| 742 |
+
/* Timer/Counter1 Compare Match B */
|
| 743 |
+
#define TIMER1_COMPB_vect _VECTOR(7)
|
| 744 |
+
#define TIMER1_COMPB_vect_num 7
|
| 745 |
+
|
| 746 |
+
/* Timer/Counter1 Overflow */
|
| 747 |
+
#define TIMER1_OVF_vect _VECTOR(8)
|
| 748 |
+
#define TIMER1_OVF_vect_num 8
|
| 749 |
+
|
| 750 |
+
/* TimerCounter0 Compare Match A */
|
| 751 |
+
#define TIMER0_COMPA_vect _VECTOR(9)
|
| 752 |
+
#define TIMER0_COMPA_vect_num 9
|
| 753 |
+
|
| 754 |
+
/* TimerCounter0 Compare Match B */
|
| 755 |
+
#define TIMER0_COMPB_vect _VECTOR(10)
|
| 756 |
+
#define TIMER0_COMPB_vect_num 10
|
| 757 |
+
|
| 758 |
+
/* Timer/Couner0 Overflow */
|
| 759 |
+
#define TIMER0_OVF_vect _VECTOR(11)
|
| 760 |
+
#define TIMER0_OVF_vect_num 11
|
| 761 |
+
|
| 762 |
+
/* Analog Comparator 0 */
|
| 763 |
+
#define ANA_COMP0_vect _VECTOR(12)
|
| 764 |
+
#define ANA_COMP0_vect_num 12
|
| 765 |
+
|
| 766 |
+
/* ADC Conversion Complete */
|
| 767 |
+
#define ADC_vect _VECTOR(13)
|
| 768 |
+
#define ADC_vect_num 13
|
| 769 |
+
|
| 770 |
+
/* EEPROM Ready */
|
| 771 |
+
#define EE_RDY_vect _VECTOR(14)
|
| 772 |
+
#define EE_RDY_vect_num 14
|
| 773 |
+
|
| 774 |
+
/* Analog Comparator 1 */
|
| 775 |
+
#define ANA_COMP1_vect _VECTOR(15)
|
| 776 |
+
#define ANA_COMP1_vect_num 15
|
| 777 |
+
|
| 778 |
+
/* Timer/Counter2 Capture Event */
|
| 779 |
+
#define TIMER2_CAPT_vect _VECTOR(16)
|
| 780 |
+
#define TIMER2_CAPT_vect_num 16
|
| 781 |
+
|
| 782 |
+
/* Timer/Counter2 Compare Match A */
|
| 783 |
+
#define TIMER2_COMPA_vect _VECTOR(17)
|
| 784 |
+
#define TIMER2_COMPA_vect_num 17
|
| 785 |
+
|
| 786 |
+
/* Timer/Counter2 Compare Match B */
|
| 787 |
+
#define TIMER2_COMPB_vect _VECTOR(18)
|
| 788 |
+
#define TIMER2_COMPB_vect_num 18
|
| 789 |
+
|
| 790 |
+
/* Timer/Counter2 Overflow */
|
| 791 |
+
#define TIMER2_OVF_vect _VECTOR(19)
|
| 792 |
+
#define TIMER2_OVF_vect_num 19
|
| 793 |
+
|
| 794 |
+
/* Serial Peripheral Interface */
|
| 795 |
+
#define SPI_vect _VECTOR(20)
|
| 796 |
+
#define SPI_vect_num 20
|
| 797 |
+
|
| 798 |
+
/* USART0, Start */
|
| 799 |
+
#define USART0_START_vect _VECTOR(21)
|
| 800 |
+
#define USART0_START_vect_num 21
|
| 801 |
+
|
| 802 |
+
/* USART0, Rx Complete */
|
| 803 |
+
#define USART0_RX_vect _VECTOR(22)
|
| 804 |
+
#define USART0_RX_vect_num 22
|
| 805 |
+
|
| 806 |
+
/* USART0 Data Register Empty */
|
| 807 |
+
#define USART0_UDRE_vect _VECTOR(23)
|
| 808 |
+
#define USART0_UDRE_vect_num 23
|
| 809 |
+
|
| 810 |
+
/* USART0, Tx Complete */
|
| 811 |
+
#define USART0_TX_vect _VECTOR(24)
|
| 812 |
+
#define USART0_TX_vect_num 24
|
| 813 |
+
|
| 814 |
+
/* USART1, Start */
|
| 815 |
+
#define USART1_START_vect _VECTOR(25)
|
| 816 |
+
#define USART1_START_vect_num 25
|
| 817 |
+
|
| 818 |
+
/* USART1, Rx Complete */
|
| 819 |
+
#define USART1_RX_vect _VECTOR(26)
|
| 820 |
+
#define USART1_RX_vect_num 26
|
| 821 |
+
|
| 822 |
+
/* USART1 Data Register Empty */
|
| 823 |
+
#define USART1_UDRE_vect _VECTOR(27)
|
| 824 |
+
#define USART1_UDRE_vect_num 27
|
| 825 |
+
|
| 826 |
+
/* USART1, Tx Complete */
|
| 827 |
+
#define USART1_TX_vect _VECTOR(28)
|
| 828 |
+
#define USART1_TX_vect_num 28
|
| 829 |
+
|
| 830 |
+
/* Two-wire Serial Interface */
|
| 831 |
+
#define TWI_SLAVE_vect _VECTOR(29)
|
| 832 |
+
#define TWI_SLAVE_vect_num 29
|
| 833 |
+
|
| 834 |
+
#define _VECTORS_SIZE 60
|
| 835 |
+
|
| 836 |
+
|
| 837 |
+
/* Constants */
|
| 838 |
+
|
| 839 |
+
#define SPM_PAGESIZE 16
|
| 840 |
+
#define FLASHSTART 0x0000
|
| 841 |
+
#define FLASHEND 0x1FFF
|
| 842 |
+
#define RAMSTART 0x0100
|
| 843 |
+
#define RAMSIZE 512
|
| 844 |
+
#define RAMEND 0x02FF
|
| 845 |
+
#define E2START 0
|
| 846 |
+
#define E2SIZE 512
|
| 847 |
+
#define E2PAGESIZE 4
|
| 848 |
+
#define E2END 0x01FF
|
| 849 |
+
#define XRAMEND RAMEND
|
| 850 |
+
|
| 851 |
+
|
| 852 |
+
/* Fuses */
|
| 853 |
+
|
| 854 |
+
#define FUSE_MEMORY_SIZE 3
|
| 855 |
+
|
| 856 |
+
/* Low Fuse Byte */
|
| 857 |
+
#define FUSE_SUT_CKSEL0 (unsigned char)~_BV(0)
|
| 858 |
+
#define FUSE_SUT_CKSEL1 (unsigned char)~_BV(1)
|
| 859 |
+
#define FUSE_SUT_CKSEL2 (unsigned char)~_BV(2)
|
| 860 |
+
#define FUSE_SUT_CKSEL3 (unsigned char)~_BV(3)
|
| 861 |
+
#define FUSE_SUT_CKSEL4 (unsigned char)~_BV(4)
|
| 862 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 863 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 864 |
+
#define LFUSE_DEFAULT (FUSE_SUT_CKSEL0 & FUSE_SUT_CKSEL2 & FUSE_SUT_CKSEL3 & FUSE_SUT_CKSEL4 & FUSE_CKDIV8)
|
| 865 |
+
|
| 866 |
+
|
| 867 |
+
/* High Fuse Byte */
|
| 868 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 869 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 870 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 871 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 872 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 873 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 874 |
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
| 875 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
| 876 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 877 |
+
|
| 878 |
+
|
| 879 |
+
/* Extended Fuse Byte */
|
| 880 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
| 881 |
+
#define FUSE_BODACT0 (unsigned char)~_BV(1)
|
| 882 |
+
#define FUSE_BODACT1 (unsigned char)~_BV(2)
|
| 883 |
+
#define FUSE_BODPD0 (unsigned char)~_BV(3)
|
| 884 |
+
#define FUSE_BODPD1 (unsigned char)~_BV(4)
|
| 885 |
+
#define FUSE_ULPOSCSEL0 (unsigned char)~_BV(5)
|
| 886 |
+
#define FUSE_ULPOSCSEL1 (unsigned char)~_BV(6)
|
| 887 |
+
#define FUSE_ULPOSCSEL2 (unsigned char)~_BV(7)
|
| 888 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 889 |
+
|
| 890 |
+
|
| 891 |
+
|
| 892 |
+
/* Lock Bits */
|
| 893 |
+
#define __LOCK_BITS_EXIST
|
| 894 |
+
|
| 895 |
+
|
| 896 |
+
/* Signature */
|
| 897 |
+
#define SIGNATURE_0 0x1E
|
| 898 |
+
#define SIGNATURE_1 0x93
|
| 899 |
+
#define SIGNATURE_2 0x15
|
| 900 |
+
|
| 901 |
+
|
| 902 |
+
#endif /* #ifdef _AVR_ATTINY841_H_INCLUDED */
|
| 903 |
+
|
hardware/tools/avr/avr/include/avr/iotn84a.h
ADDED
|
@@ -0,0 +1,844 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2010 Atmel Corporation
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn84a.h 2435 2014-08-11 10:31:52Z joerg_wunsch $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn84a.h - definitions for ATtiny84A */
|
| 34 |
+
|
| 35 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 36 |
+
|
| 37 |
+
#ifndef _AVR_IO_H_
|
| 38 |
+
# error "Include <avr/io.h> instead of this file."
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IOXXX_H_
|
| 42 |
+
# define _AVR_IOXXX_H_ "iotn84a.h"
|
| 43 |
+
#else
|
| 44 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
#ifndef _AVR_ATtiny84A_H_
|
| 49 |
+
#define _AVR_ATtiny84A_H_ 1
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
/* Registers and associated bit numbers. */
|
| 53 |
+
|
| 54 |
+
#define PRR _SFR_IO8(0x00)
|
| 55 |
+
#define PRADC 0
|
| 56 |
+
#define PRUSI 1
|
| 57 |
+
#define PRTIM0 2
|
| 58 |
+
#define PRTIM1 3
|
| 59 |
+
|
| 60 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1))
|
| 61 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 62 |
+
#define __AVR_HAVE_PRR_PRUSI
|
| 63 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 64 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 65 |
+
|
| 66 |
+
#define DIDR0 _SFR_IO8(0x01)
|
| 67 |
+
#define ADC0D 0
|
| 68 |
+
#define ADC1D 1
|
| 69 |
+
#define ADC2D 2
|
| 70 |
+
#define ADC3D 3
|
| 71 |
+
#define ADC4D 4
|
| 72 |
+
#define ADC5D 5
|
| 73 |
+
#define ADC6D 6
|
| 74 |
+
#define ADC7D 7
|
| 75 |
+
|
| 76 |
+
#define ADCSRB _SFR_IO8(0x03)
|
| 77 |
+
#define ADTS0 0
|
| 78 |
+
#define ADTS1 1
|
| 79 |
+
#define ADTS2 2
|
| 80 |
+
#define ADLAR 4
|
| 81 |
+
#define ACME 6
|
| 82 |
+
#define BIN 7
|
| 83 |
+
|
| 84 |
+
#ifndef __ASSEMBLER__
|
| 85 |
+
#define ADC _SFR_IO16(0x04)
|
| 86 |
+
#endif
|
| 87 |
+
#define ADCW _SFR_IO16(0x04)
|
| 88 |
+
|
| 89 |
+
#define ADCL _SFR_IO8(0x04)
|
| 90 |
+
#define ADCL0 0
|
| 91 |
+
#define ADCL1 1
|
| 92 |
+
#define ADCL2 2
|
| 93 |
+
#define ADCL3 3
|
| 94 |
+
#define ADCL4 4
|
| 95 |
+
#define ADCL5 5
|
| 96 |
+
#define ADCL6 6
|
| 97 |
+
#define ADCL7 7
|
| 98 |
+
|
| 99 |
+
#define ADCH _SFR_IO8(0x05)
|
| 100 |
+
#define ADCH0 0
|
| 101 |
+
#define ADCH1 1
|
| 102 |
+
#define ADCH2 2
|
| 103 |
+
#define ADCH3 3
|
| 104 |
+
#define ADCH4 4
|
| 105 |
+
#define ADCH5 5
|
| 106 |
+
#define ADCH6 6
|
| 107 |
+
#define ADCH7 7
|
| 108 |
+
|
| 109 |
+
#define ADCSRA _SFR_IO8(0x06)
|
| 110 |
+
#define ADPS0 0
|
| 111 |
+
#define ADPS1 1
|
| 112 |
+
#define ADPS2 2
|
| 113 |
+
#define ADIE 3
|
| 114 |
+
#define ADIF 4
|
| 115 |
+
#define ADATE 5
|
| 116 |
+
#define ADSC 6
|
| 117 |
+
#define ADEN 7
|
| 118 |
+
|
| 119 |
+
#define ADMUX _SFR_IO8(0x07)
|
| 120 |
+
#define MUX0 0
|
| 121 |
+
#define MUX1 1
|
| 122 |
+
#define MUX2 2
|
| 123 |
+
#define MUX3 3
|
| 124 |
+
#define MUX4 4
|
| 125 |
+
#define MUX5 5
|
| 126 |
+
#define REFS0 6
|
| 127 |
+
#define REFS1 7
|
| 128 |
+
|
| 129 |
+
#define ACSR _SFR_IO8(0x08)
|
| 130 |
+
#define ACIS0 0
|
| 131 |
+
#define ACIS1 1
|
| 132 |
+
#define ACIC 2
|
| 133 |
+
#define ACIE 3
|
| 134 |
+
#define ACI 4
|
| 135 |
+
#define ACO 5
|
| 136 |
+
#define ACBG 6
|
| 137 |
+
#define ACD 7
|
| 138 |
+
|
| 139 |
+
#define TIFR1 _SFR_IO8(0x0B)
|
| 140 |
+
#define TOV1 0
|
| 141 |
+
#define OCF1A 1
|
| 142 |
+
#define OCF1B 2
|
| 143 |
+
#define ICF1 5
|
| 144 |
+
|
| 145 |
+
#define TIMSK1 _SFR_IO8(0x0C)
|
| 146 |
+
#define TOIE1 0
|
| 147 |
+
#define OCIE1A 1
|
| 148 |
+
#define OCIE1B 2
|
| 149 |
+
#define ICIE1 5
|
| 150 |
+
|
| 151 |
+
#define USICR _SFR_IO8(0x0D)
|
| 152 |
+
#define USITC 0
|
| 153 |
+
#define USICLK 1
|
| 154 |
+
#define USICS0 2
|
| 155 |
+
#define USICS1 3
|
| 156 |
+
#define USIWM0 4
|
| 157 |
+
#define USIWM1 5
|
| 158 |
+
#define USIOIE 6
|
| 159 |
+
#define USISIE 7
|
| 160 |
+
|
| 161 |
+
#define USISR _SFR_IO8(0x0E)
|
| 162 |
+
#define USICNT0 0
|
| 163 |
+
#define USICNT1 1
|
| 164 |
+
#define USICNT2 2
|
| 165 |
+
#define USICNT3 3
|
| 166 |
+
#define USIDC 4
|
| 167 |
+
#define USIPF 5
|
| 168 |
+
#define USIOIF 6
|
| 169 |
+
#define USISIF 7
|
| 170 |
+
|
| 171 |
+
#define USIDR _SFR_IO8(0x0F)
|
| 172 |
+
#define USIDR0 0
|
| 173 |
+
#define USIDR1 1
|
| 174 |
+
#define USIDR2 2
|
| 175 |
+
#define USIDR3 3
|
| 176 |
+
#define USIDR4 4
|
| 177 |
+
#define USIDR5 5
|
| 178 |
+
#define USIDR6 6
|
| 179 |
+
#define USIDR7 7
|
| 180 |
+
|
| 181 |
+
#define USIBR _SFR_IO8(0x10)
|
| 182 |
+
#define USIBR0 0
|
| 183 |
+
#define USIBR1 1
|
| 184 |
+
#define USIBR2 2
|
| 185 |
+
#define USIBR3 3
|
| 186 |
+
#define USIBR4 4
|
| 187 |
+
#define USIBR5 5
|
| 188 |
+
#define USIBR6 6
|
| 189 |
+
#define USIBR7 7
|
| 190 |
+
|
| 191 |
+
#define PCMSK0 _SFR_IO8(0x12)
|
| 192 |
+
#define PCINT0 0
|
| 193 |
+
#define PCINT1 1
|
| 194 |
+
#define PCINT2 2
|
| 195 |
+
#define PCINT3 3
|
| 196 |
+
#define PCINT4 4
|
| 197 |
+
#define PCINT5 5
|
| 198 |
+
#define PCINT6 6
|
| 199 |
+
#define PCINT7 7
|
| 200 |
+
|
| 201 |
+
#define GPIOR0 _SFR_IO8(0x13)
|
| 202 |
+
#define GPIOR00 0
|
| 203 |
+
#define GPIOR01 1
|
| 204 |
+
#define GPIOR02 2
|
| 205 |
+
#define GPIOR03 3
|
| 206 |
+
#define GPIOR04 4
|
| 207 |
+
#define GPIOR05 5
|
| 208 |
+
#define GPIOR06 6
|
| 209 |
+
#define GPIOR07 7
|
| 210 |
+
|
| 211 |
+
#define GPIOR1 _SFR_IO8(0x14)
|
| 212 |
+
#define GPIOR10 0
|
| 213 |
+
#define GPIOR11 1
|
| 214 |
+
#define GPIOR12 2
|
| 215 |
+
#define GPIOR13 3
|
| 216 |
+
#define GPIOR14 4
|
| 217 |
+
#define GPIOR15 5
|
| 218 |
+
#define GPIOR16 6
|
| 219 |
+
#define GPIOR17 7
|
| 220 |
+
|
| 221 |
+
#define GPIOR2 _SFR_IO8(0x15)
|
| 222 |
+
#define GPIOR20 0
|
| 223 |
+
#define GPIOR21 1
|
| 224 |
+
#define GPIOR22 2
|
| 225 |
+
#define GPIOR23 3
|
| 226 |
+
#define GPIOR24 4
|
| 227 |
+
#define GPIOR25 5
|
| 228 |
+
#define GPIOR26 6
|
| 229 |
+
#define GPIOR27 7
|
| 230 |
+
|
| 231 |
+
#define PINB _SFR_IO8(0x16)
|
| 232 |
+
#define PINB0 0
|
| 233 |
+
#define PINB1 1
|
| 234 |
+
#define PINB2 2
|
| 235 |
+
#define PINB3 3
|
| 236 |
+
|
| 237 |
+
#define DDRB _SFR_IO8(0x17)
|
| 238 |
+
#define DDB0 0
|
| 239 |
+
#define DDB1 1
|
| 240 |
+
#define DDB2 2
|
| 241 |
+
#define DDB3 3
|
| 242 |
+
|
| 243 |
+
#define PORTB _SFR_IO8(0x18)
|
| 244 |
+
#define PORTB0 0
|
| 245 |
+
#define PORTB1 1
|
| 246 |
+
#define PORTB2 2
|
| 247 |
+
#define PORTB3 3
|
| 248 |
+
|
| 249 |
+
#define PINA _SFR_IO8(0x19)
|
| 250 |
+
#define PINA0 0
|
| 251 |
+
#define PINA1 1
|
| 252 |
+
#define PINA2 2
|
| 253 |
+
#define PINA3 3
|
| 254 |
+
#define PINA4 4
|
| 255 |
+
#define PINA5 5
|
| 256 |
+
#define PINA6 6
|
| 257 |
+
#define PINA7 7
|
| 258 |
+
|
| 259 |
+
#define DDRA _SFR_IO8(0x1A)
|
| 260 |
+
#define DDA0 0
|
| 261 |
+
#define DDA1 1
|
| 262 |
+
#define DDA2 2
|
| 263 |
+
#define DDA3 3
|
| 264 |
+
#define DDA4 4
|
| 265 |
+
#define DDA5 5
|
| 266 |
+
#define DDA6 6
|
| 267 |
+
#define DDA7 7
|
| 268 |
+
|
| 269 |
+
#define PORTA _SFR_IO8(0x1B)
|
| 270 |
+
#define PORTA0 0
|
| 271 |
+
#define PORTA1 1
|
| 272 |
+
#define PORTA2 2
|
| 273 |
+
#define PORTA3 3
|
| 274 |
+
#define PORTA4 4
|
| 275 |
+
#define PORTA5 5
|
| 276 |
+
#define PORTA6 6
|
| 277 |
+
#define PORTA7 7
|
| 278 |
+
|
| 279 |
+
#define EECR _SFR_IO8(0x1C)
|
| 280 |
+
#define EERE 0
|
| 281 |
+
#define EEPE 1
|
| 282 |
+
#define EEMPE 2
|
| 283 |
+
#define EERIE 3
|
| 284 |
+
#define EEPM0 4
|
| 285 |
+
#define EEPM1 5
|
| 286 |
+
|
| 287 |
+
#define EEDR _SFR_IO8(0x1D)
|
| 288 |
+
#define EEDR0 0
|
| 289 |
+
#define EEDR1 1
|
| 290 |
+
#define EEDR2 2
|
| 291 |
+
#define EEDR3 3
|
| 292 |
+
#define EEDR4 4
|
| 293 |
+
#define EEDR5 5
|
| 294 |
+
#define EEDR6 6
|
| 295 |
+
#define EEDR7 7
|
| 296 |
+
|
| 297 |
+
#define EEAR _SFR_IO16(0x1E)
|
| 298 |
+
|
| 299 |
+
#define EEARL _SFR_IO8(0x1E)
|
| 300 |
+
#define EEAR0 0
|
| 301 |
+
#define EEAR1 1
|
| 302 |
+
#define EEAR2 2
|
| 303 |
+
#define EEAR3 3
|
| 304 |
+
#define EEAR4 4
|
| 305 |
+
#define EEAR5 5
|
| 306 |
+
#define EEAR6 6
|
| 307 |
+
#define EEAR7 7
|
| 308 |
+
|
| 309 |
+
#define EEARH _SFR_IO8(0x1F)
|
| 310 |
+
#define EEAR8 0
|
| 311 |
+
|
| 312 |
+
#define PCMSK1 _SFR_IO8(0x20)
|
| 313 |
+
#define PCINT8 0
|
| 314 |
+
#define PCINT9 1
|
| 315 |
+
#define PCINT10 2
|
| 316 |
+
#define PCINT11 3
|
| 317 |
+
|
| 318 |
+
#define WDTCSR _SFR_IO8(0x21)
|
| 319 |
+
#define WDP0 0
|
| 320 |
+
#define WDP1 1
|
| 321 |
+
#define WDP2 2
|
| 322 |
+
#define WDE 3
|
| 323 |
+
#define WDCE 4
|
| 324 |
+
#define WDP3 5
|
| 325 |
+
#define WDIE 6
|
| 326 |
+
#define WDIF 7
|
| 327 |
+
|
| 328 |
+
#define TCCR1C _SFR_IO8(0x22)
|
| 329 |
+
#define FOC1B 6
|
| 330 |
+
#define FOC1A 7
|
| 331 |
+
|
| 332 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 333 |
+
#define PSR10 0
|
| 334 |
+
#define TSM 7
|
| 335 |
+
|
| 336 |
+
#define ICR1 _SFR_IO16(0x24)
|
| 337 |
+
|
| 338 |
+
#define ICR1L _SFR_IO8(0x24)
|
| 339 |
+
#define ICR1L0 0
|
| 340 |
+
#define ICR1L1 1
|
| 341 |
+
#define ICR1L2 2
|
| 342 |
+
#define ICR1L3 3
|
| 343 |
+
#define ICR1L4 4
|
| 344 |
+
#define ICR1L5 5
|
| 345 |
+
#define ICR1L6 6
|
| 346 |
+
#define ICR1L7 7
|
| 347 |
+
|
| 348 |
+
#define ICR1H _SFR_IO8(0x25)
|
| 349 |
+
#define ICR1H0 0
|
| 350 |
+
#define ICR1H1 1
|
| 351 |
+
#define ICR1H2 2
|
| 352 |
+
#define ICR1H3 3
|
| 353 |
+
#define ICR1H4 4
|
| 354 |
+
#define ICR1H5 5
|
| 355 |
+
#define ICR1H6 6
|
| 356 |
+
#define ICR1H7 7
|
| 357 |
+
|
| 358 |
+
#define CLKPR _SFR_IO8(0x26)
|
| 359 |
+
#define CLKPS0 0
|
| 360 |
+
#define CLKPS1 1
|
| 361 |
+
#define CLKPS2 2
|
| 362 |
+
#define CLKPS3 3
|
| 363 |
+
#define CLKPCE 7
|
| 364 |
+
|
| 365 |
+
#define DWDR _SFR_IO8(0x27)
|
| 366 |
+
|
| 367 |
+
#define OCR1B _SFR_IO16(0x28)
|
| 368 |
+
|
| 369 |
+
#define OCR1BL _SFR_IO8(0x28)
|
| 370 |
+
#define OCR1BL0 0
|
| 371 |
+
#define OCR1BL1 1
|
| 372 |
+
#define OCR1BL2 2
|
| 373 |
+
#define OCR1BL3 3
|
| 374 |
+
#define OCR1BL4 4
|
| 375 |
+
#define OCR1BL5 5
|
| 376 |
+
#define OCR1BL6 6
|
| 377 |
+
#define OCR1BL7 7
|
| 378 |
+
|
| 379 |
+
#define OCR1BH _SFR_IO8(0x29)
|
| 380 |
+
#define OCR1BH0 0
|
| 381 |
+
#define OCR1BH1 1
|
| 382 |
+
#define OCR1BH2 2
|
| 383 |
+
#define OCR1BH3 3
|
| 384 |
+
#define OCR1BH4 4
|
| 385 |
+
#define OCR1BH5 5
|
| 386 |
+
#define OCR1BH6 6
|
| 387 |
+
#define OCR1BH7 7
|
| 388 |
+
|
| 389 |
+
#define OCR1A _SFR_IO16(0x2A)
|
| 390 |
+
|
| 391 |
+
#define OCR1AL _SFR_IO8(0x2A)
|
| 392 |
+
#define OCR1AL0 0
|
| 393 |
+
#define OCR1AL1 1
|
| 394 |
+
#define OCR1AL2 2
|
| 395 |
+
#define OCR1AL3 3
|
| 396 |
+
#define OCR1AL4 4
|
| 397 |
+
#define OCR1AL5 5
|
| 398 |
+
#define OCR1AL6 6
|
| 399 |
+
#define OCR1AL7 7
|
| 400 |
+
|
| 401 |
+
#define OCR1AH _SFR_IO8(0x2B)
|
| 402 |
+
#define OCR1AH0 0
|
| 403 |
+
#define OCR1AH1 1
|
| 404 |
+
#define OCR1AH2 2
|
| 405 |
+
#define OCR1AH3 3
|
| 406 |
+
#define OCR1AH4 4
|
| 407 |
+
#define OCR1AH5 5
|
| 408 |
+
#define OCR1AH6 6
|
| 409 |
+
#define OCR1AH7 7
|
| 410 |
+
|
| 411 |
+
#define TCNT1 _SFR_IO16(0x2C)
|
| 412 |
+
|
| 413 |
+
#define TCNT1L _SFR_IO8(0x2C)
|
| 414 |
+
#define TCNT1L0 0
|
| 415 |
+
#define TCNT1L1 1
|
| 416 |
+
#define TCNT1L2 2
|
| 417 |
+
#define TCNT1L3 3
|
| 418 |
+
#define TCNT1L4 4
|
| 419 |
+
#define TCNT1L5 5
|
| 420 |
+
#define TCNT1L6 6
|
| 421 |
+
#define TCNT1L7 7
|
| 422 |
+
|
| 423 |
+
#define TCNT1H _SFR_IO8(0x2D)
|
| 424 |
+
#define TCNT1H0 0
|
| 425 |
+
#define TCNT1H1 1
|
| 426 |
+
#define TCNT1H2 2
|
| 427 |
+
#define TCNT1H3 3
|
| 428 |
+
#define TCNT1H4 4
|
| 429 |
+
#define TCNT1H5 5
|
| 430 |
+
#define TCNT1H6 6
|
| 431 |
+
#define TCNT1H7 7
|
| 432 |
+
|
| 433 |
+
#define TCCR1B _SFR_IO8(0x2E)
|
| 434 |
+
#define CS10 0
|
| 435 |
+
#define CS11 1
|
| 436 |
+
#define CS12 2
|
| 437 |
+
#define WGM12 3
|
| 438 |
+
#define WGM13 4
|
| 439 |
+
#define ICES1 6
|
| 440 |
+
#define ICNC1 7
|
| 441 |
+
|
| 442 |
+
#define TCCR1A _SFR_IO8(0x2F)
|
| 443 |
+
#define WGM10 0
|
| 444 |
+
#define WGM11 1
|
| 445 |
+
#define COM1B0 4
|
| 446 |
+
#define COM1B1 5
|
| 447 |
+
#define COM1A0 6
|
| 448 |
+
#define COM1A1 7
|
| 449 |
+
|
| 450 |
+
#define TCCR0A _SFR_IO8(0x30)
|
| 451 |
+
#define WGM00 0
|
| 452 |
+
#define WGM01 1
|
| 453 |
+
#define COM0B0 4
|
| 454 |
+
#define COM0B1 5
|
| 455 |
+
#define COM0A0 6
|
| 456 |
+
#define COM0A1 7
|
| 457 |
+
|
| 458 |
+
#define OSCCAL _SFR_IO8(0x31)
|
| 459 |
+
#define CAL0 0
|
| 460 |
+
#define CAL1 1
|
| 461 |
+
#define CAL2 2
|
| 462 |
+
#define CAL3 3
|
| 463 |
+
#define CAL4 4
|
| 464 |
+
#define CAL5 5
|
| 465 |
+
#define CAL6 6
|
| 466 |
+
#define CAL7 7
|
| 467 |
+
|
| 468 |
+
#define TCNT0 _SFR_IO8(0x32)
|
| 469 |
+
#define TCNT0_0 0
|
| 470 |
+
#define TCNT0_1 1
|
| 471 |
+
#define TCNT0_2 2
|
| 472 |
+
#define TCNT0_3 3
|
| 473 |
+
#define TCNT0_4 4
|
| 474 |
+
#define TCNT0_5 5
|
| 475 |
+
#define TCNT0_6 6
|
| 476 |
+
#define TCNT0_7 7
|
| 477 |
+
|
| 478 |
+
#define TCCR0B _SFR_IO8(0x33)
|
| 479 |
+
#define CS00 0
|
| 480 |
+
#define CS01 1
|
| 481 |
+
#define CS02 2
|
| 482 |
+
#define WGM02 3
|
| 483 |
+
#define FOC0B 6
|
| 484 |
+
#define FOC0A 7
|
| 485 |
+
|
| 486 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 487 |
+
#define PORF 0
|
| 488 |
+
#define EXTRF 1
|
| 489 |
+
#define BORF 2
|
| 490 |
+
#define WDRF 3
|
| 491 |
+
|
| 492 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 493 |
+
#define ISC00 0
|
| 494 |
+
#define ISC01 1
|
| 495 |
+
#define BODSE 2
|
| 496 |
+
#define SM0 3
|
| 497 |
+
#define SM1 4
|
| 498 |
+
#define SE 5
|
| 499 |
+
#define PUD 6
|
| 500 |
+
#define BODS 7
|
| 501 |
+
|
| 502 |
+
#define OCR0A _SFR_IO8(0x36)
|
| 503 |
+
#define OCR0A_0 0
|
| 504 |
+
#define OCR0A_1 1
|
| 505 |
+
#define OCR0A_2 2
|
| 506 |
+
#define OCR0A_3 3
|
| 507 |
+
#define OCR0A_4 4
|
| 508 |
+
#define OCR0A_5 5
|
| 509 |
+
#define OCR0A_6 6
|
| 510 |
+
#define OCR0A_7 7
|
| 511 |
+
|
| 512 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 513 |
+
#define SPMEN 0
|
| 514 |
+
#define PGERS 1
|
| 515 |
+
#define PGWRT 2
|
| 516 |
+
#define RFLB 3
|
| 517 |
+
#define CTPB 4
|
| 518 |
+
|
| 519 |
+
#define TIFR0 _SFR_IO8(0x38)
|
| 520 |
+
#define TOV0 0
|
| 521 |
+
#define OCF0A 1
|
| 522 |
+
#define OCF0B 2
|
| 523 |
+
|
| 524 |
+
#define TIMSK0 _SFR_IO8(0x39)
|
| 525 |
+
#define TOIE0 0
|
| 526 |
+
#define OCIE0A 1
|
| 527 |
+
#define OCIE0B 2
|
| 528 |
+
|
| 529 |
+
#define GIFR _SFR_IO8(0x3A)
|
| 530 |
+
#define PCIF0 4
|
| 531 |
+
#define PCIF1 5
|
| 532 |
+
#define INTF0 6
|
| 533 |
+
|
| 534 |
+
#define GIMSK _SFR_IO8(0x3B)
|
| 535 |
+
#define PCIE0 4
|
| 536 |
+
#define PCIE1 5
|
| 537 |
+
#define INT0 6
|
| 538 |
+
|
| 539 |
+
#define OCR0B _SFR_IO8(0x3C)
|
| 540 |
+
#define OCR0_0 0
|
| 541 |
+
#define OCR0_1 1
|
| 542 |
+
#define OCR0_2 2
|
| 543 |
+
#define OCR0_3 3
|
| 544 |
+
#define OCR0_4 4
|
| 545 |
+
#define OCR0_5 5
|
| 546 |
+
#define OCR0_6 6
|
| 547 |
+
#define OCR0_7 7
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
/* Interrupt vectors */
|
| 551 |
+
/* Vector 0 is the reset vector */
|
| 552 |
+
#define EXT_INT0_vect_num 1
|
| 553 |
+
#define EXT_INT0_vect _VECTOR(1) /* External Interrupt Request 0 */
|
| 554 |
+
#define PCINT0_vect_num 2
|
| 555 |
+
#define PCINT0_vect _VECTOR(2) /* Pin Change Interrupt Request 0 */
|
| 556 |
+
#define PCINT1_vect_num 3
|
| 557 |
+
#define PCINT1_vect _VECTOR(3) /* Pin Change Interrupt Request 1 */
|
| 558 |
+
#define WATCHDOG_vect_num 4
|
| 559 |
+
#define WATCHDOG_vect _VECTOR(4) /* Watchdog Time-out */
|
| 560 |
+
#define TIM1_CAPT_vect_num 5
|
| 561 |
+
#define TIM1_CAPT_vect _VECTOR(5) /* Timer/Counter1 Capture Event */
|
| 562 |
+
#define TIM1_COMPA_vect_num 6
|
| 563 |
+
#define TIM1_COMPA_vect _VECTOR(6) /* Timer/Counter1 Compare Match A */
|
| 564 |
+
#define TIM1_COMPB_vect_num 7
|
| 565 |
+
#define TIM1_COMPB_vect _VECTOR(7) /* Timer/Counter1 Compare Match B */
|
| 566 |
+
#define TIM1_OVF_vect_num 8
|
| 567 |
+
#define TIM1_OVF_vect _VECTOR(8) /* Timer/Counter1 Overflow */
|
| 568 |
+
#define TIM0_COMPA_vect_num 9
|
| 569 |
+
#define TIM0_COMPA_vect _VECTOR(9) /* Timer/Counter0 Compare Match A */
|
| 570 |
+
#define TIM0_COMPB_vect_num 10
|
| 571 |
+
#define TIM0_COMPB_vect _VECTOR(10) /* Timer/Counter0 Compare Match B */
|
| 572 |
+
#define TIM0_OVF_vect_num 11
|
| 573 |
+
#define TIM0_OVF_vect _VECTOR(11) /* Timer/Counter0 Overflow */
|
| 574 |
+
#define ANA_COMP_vect_num 12
|
| 575 |
+
#define ANA_COMP_vect _VECTOR(12) /* Analog Comparator */
|
| 576 |
+
#define ADC_vect_num 13
|
| 577 |
+
#define ADC_vect _VECTOR(13) /* ADC Conversion Complete */
|
| 578 |
+
#define EE_RDY_vect_num 14
|
| 579 |
+
#define EE_RDY_vect _VECTOR(14) /* EEPROM Ready */
|
| 580 |
+
#define USI_STR_vect_num 15
|
| 581 |
+
#define USI_STR_vect _VECTOR(15) /* USI START */
|
| 582 |
+
#define USI_OVF_vect_num 16
|
| 583 |
+
#define USI_OVF_vect _VECTOR(16) /* USI Overflow */
|
| 584 |
+
|
| 585 |
+
#define _VECTOR_SIZE 2 /* Size of individual vector. */
|
| 586 |
+
#define _VECTORS_SIZE (17 * _VECTOR_SIZE)
|
| 587 |
+
|
| 588 |
+
|
| 589 |
+
/* Constants */
|
| 590 |
+
#define SPM_PAGESIZE (64)
|
| 591 |
+
#define RAMSTART (0x60)
|
| 592 |
+
#define RAMSIZE (512)
|
| 593 |
+
#define RAMEND (RAMSTART + RAMSIZE - 1)
|
| 594 |
+
#define XRAMSTART (NA)
|
| 595 |
+
#define XRAMSIZE (0)
|
| 596 |
+
#define XRAMEND (RAMEND)
|
| 597 |
+
#define E2END (0x1FF)
|
| 598 |
+
#define E2PAGESIZE (4)
|
| 599 |
+
#define FLASHEND (0x1FFF)
|
| 600 |
+
|
| 601 |
+
|
| 602 |
+
/* Fuses */
|
| 603 |
+
#define FUSE_MEMORY_SIZE 3
|
| 604 |
+
|
| 605 |
+
/* Low Fuse Byte */
|
| 606 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock source */
|
| 607 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock source */
|
| 608 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock source */
|
| 609 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock source */
|
| 610 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
|
| 611 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
|
| 612 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Clock Output Enable */
|
| 613 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
|
| 614 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 615 |
+
|
| 616 |
+
/* High Fuse Byte */
|
| 617 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
|
| 618 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
|
| 619 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
|
| 620 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through the Chip Erase */
|
| 621 |
+
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog Timer always on */
|
| 622 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial Program and Data Downloading */
|
| 623 |
+
#define FUSE_DWEN (unsigned char)~_BV(6) /* DebugWIRE Enable */
|
| 624 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset disable */
|
| 625 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 626 |
+
|
| 627 |
+
/* Extended Fuse Byte */
|
| 628 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0) /* Self-Programming Enable */
|
| 629 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
/* Lock Bits */
|
| 633 |
+
#define __LOCK_BITS_EXIST
|
| 634 |
+
|
| 635 |
+
|
| 636 |
+
/* Signature */
|
| 637 |
+
#define SIGNATURE_0 0x1E
|
| 638 |
+
#define SIGNATURE_1 0x93
|
| 639 |
+
#define SIGNATURE_2 0x0C
|
| 640 |
+
|
| 641 |
+
|
| 642 |
+
/* Device Pin Definitions */
|
| 643 |
+
#define ADC4_DDR DDRA
|
| 644 |
+
#define ADC4_PORT PORTA
|
| 645 |
+
#define ADC4_PIN PINA
|
| 646 |
+
#define ADC4_BIT 4
|
| 647 |
+
|
| 648 |
+
#define USCK_DDR DDRA
|
| 649 |
+
#define USCK_PORT PORTA
|
| 650 |
+
#define USCK_PIN PINA
|
| 651 |
+
#define USCK_BIT 4
|
| 652 |
+
|
| 653 |
+
#define SCL_DDR DDRA
|
| 654 |
+
#define SCL_PORT PORTA
|
| 655 |
+
#define SCL_PIN PINA
|
| 656 |
+
#define SCL_BIT 4
|
| 657 |
+
|
| 658 |
+
#define T1_DDR DDRA
|
| 659 |
+
#define T1_PORT PORTA
|
| 660 |
+
#define T1_PIN PINA
|
| 661 |
+
#define T1_BIT 4
|
| 662 |
+
|
| 663 |
+
#define PCINT4_DDR DDRA
|
| 664 |
+
#define PCINT4_PORT PORTA
|
| 665 |
+
#define PCINT4_PIN PINA
|
| 666 |
+
#define PCINT4_BIT 4
|
| 667 |
+
|
| 668 |
+
#define ADC3_DDR DDRA
|
| 669 |
+
#define ADC3_PORT PORTA
|
| 670 |
+
#define ADC3_PIN PINA
|
| 671 |
+
#define ADC3_BIT 3
|
| 672 |
+
|
| 673 |
+
#define T0_DDR DDRA
|
| 674 |
+
#define T0_PORT PORTA
|
| 675 |
+
#define T0_PIN PINA
|
| 676 |
+
#define T0_BIT 3
|
| 677 |
+
|
| 678 |
+
#define PCINT3_DDR DDRA
|
| 679 |
+
#define PCINT3_PORT PORTA
|
| 680 |
+
#define PCINT3_PIN PINA
|
| 681 |
+
#define PCINT3_BIT 3
|
| 682 |
+
|
| 683 |
+
#define ADC2_DDR DDRA
|
| 684 |
+
#define ADC2_PORT PORTA
|
| 685 |
+
#define ADC2_PIN PINA
|
| 686 |
+
#define ADC2_BIT 2
|
| 687 |
+
|
| 688 |
+
#define AIN1_DDR DDRA
|
| 689 |
+
#define AIN1_PORT PORTA
|
| 690 |
+
#define AIN1_PIN PINA
|
| 691 |
+
#define AIN1_BIT 2
|
| 692 |
+
|
| 693 |
+
#define PCINT2_DDR DDRA
|
| 694 |
+
#define PCINT2_PORT PORTA
|
| 695 |
+
#define PCINT2_PIN PINA
|
| 696 |
+
#define PCINT2_BIT 2
|
| 697 |
+
|
| 698 |
+
#define ADC1_DDR DDRA
|
| 699 |
+
#define ADC1_PORT PORTA
|
| 700 |
+
#define ADC1_PIN PINA
|
| 701 |
+
#define ADC1_BIT 1
|
| 702 |
+
|
| 703 |
+
#define AIN0_DDR DDRA
|
| 704 |
+
#define AIN0_PORT PORTA
|
| 705 |
+
#define AIN0_PIN PINA
|
| 706 |
+
#define AIN0_BIT 1
|
| 707 |
+
|
| 708 |
+
#define PCINT1_DDR DDRA
|
| 709 |
+
#define PCINT1_PORT PORTA
|
| 710 |
+
#define PCINT1_PIN PINA
|
| 711 |
+
#define PCINT1_BIT 1
|
| 712 |
+
|
| 713 |
+
#define ADC0_DDR DDRA
|
| 714 |
+
#define ADC0_PORT PORTA
|
| 715 |
+
#define ADC0_PIN PINA
|
| 716 |
+
#define ADC0_BIT 0
|
| 717 |
+
|
| 718 |
+
#define PCINT0_DDR DDRA
|
| 719 |
+
#define PCINT0_PORT PORTA
|
| 720 |
+
#define PCINT0_PIN PINA
|
| 721 |
+
#define PCINT0_BIT 0
|
| 722 |
+
|
| 723 |
+
#define PCINT8_DDR DDRB
|
| 724 |
+
#define PCINT8_PORT PORTB
|
| 725 |
+
#define PCINT8_PIN PINB
|
| 726 |
+
#define PCINT8_BIT 0
|
| 727 |
+
|
| 728 |
+
#define PCINT9_DDR DDRB
|
| 729 |
+
#define PCINT9_PORT PORTB
|
| 730 |
+
#define PCINT9_PIN PINB
|
| 731 |
+
#define PCINT9_BIT 1
|
| 732 |
+
|
| 733 |
+
#define PCINT11_DDR DDRB
|
| 734 |
+
#define PCINT11_PORT PORTB
|
| 735 |
+
#define PCINT11_PIN PINB
|
| 736 |
+
#define PCINT11_BIT 3
|
| 737 |
+
|
| 738 |
+
#define dW_DDR DDRB
|
| 739 |
+
#define dW_PORT PORTB
|
| 740 |
+
#define dW_PIN PINB
|
| 741 |
+
#define dW_BIT 3
|
| 742 |
+
|
| 743 |
+
#define PCINT10_DDR DDRB
|
| 744 |
+
#define PCINT10_PORT PORTB
|
| 745 |
+
#define PCINT10_PIN PINB
|
| 746 |
+
#define PCINT10_BIT 2
|
| 747 |
+
|
| 748 |
+
#define INT0_DDR DDRB
|
| 749 |
+
#define INT0_PORT PORTB
|
| 750 |
+
#define INT0_PIN PINB
|
| 751 |
+
#define INT0_BIT 2
|
| 752 |
+
|
| 753 |
+
#define OC0A_DDR DDRB
|
| 754 |
+
#define OC0A_PORT PORTB
|
| 755 |
+
#define OC0A_PIN PINB
|
| 756 |
+
#define OC0A_BIT 2
|
| 757 |
+
|
| 758 |
+
#define CKOUT_DDR DDRB
|
| 759 |
+
#define CKOUT_PORT PORTB
|
| 760 |
+
#define CKOUT_PIN PINB
|
| 761 |
+
#define CKOUT_BIT 2
|
| 762 |
+
|
| 763 |
+
#define PCINT7_DDR DDRA
|
| 764 |
+
#define PCINT7_PORT PORTA
|
| 765 |
+
#define PCINT7_PIN PINA
|
| 766 |
+
#define PCINT7_BIT 7
|
| 767 |
+
|
| 768 |
+
#define ICP1_DDR DDRA
|
| 769 |
+
#define ICP1_PORT PORTA
|
| 770 |
+
#define ICP1_PIN PINA
|
| 771 |
+
#define ICP1_BIT 7
|
| 772 |
+
|
| 773 |
+
#define OC0B_DDR DDRA
|
| 774 |
+
#define OC0B_PORT PORTA
|
| 775 |
+
#define OC0B_PIN PINA
|
| 776 |
+
#define OC0B_BIT 7
|
| 777 |
+
|
| 778 |
+
#define ADC7_DDR DDRA
|
| 779 |
+
#define ADC7_PORT PORTA
|
| 780 |
+
#define ADC7_PIN PINA
|
| 781 |
+
#define ADC7_BIT 7
|
| 782 |
+
|
| 783 |
+
#define PCINT6_DDR DDRA
|
| 784 |
+
#define PCINT6_PORT PORTA
|
| 785 |
+
#define PCINT6_PIN PINA
|
| 786 |
+
#define PCINT6_BIT 6
|
| 787 |
+
|
| 788 |
+
#define OC1A_DDR DDRA
|
| 789 |
+
#define OC1A_PORT PORTA
|
| 790 |
+
#define OC1A_PIN PINA
|
| 791 |
+
#define OC1A_BIT 6
|
| 792 |
+
|
| 793 |
+
#define DI_DDR DDRA
|
| 794 |
+
#define DI_PORT PORTA
|
| 795 |
+
#define DI_PIN PINA
|
| 796 |
+
#define DI_BIT 6
|
| 797 |
+
|
| 798 |
+
#define SDA_DDR DDRA
|
| 799 |
+
#define SDA_PORT PORTA
|
| 800 |
+
#define SDA_PIN PINA
|
| 801 |
+
#define SDA_BIT 6
|
| 802 |
+
|
| 803 |
+
#define MOSI_DDR DDRA
|
| 804 |
+
#define MOSI_PORT PORTA
|
| 805 |
+
#define MOSI_PIN PINA
|
| 806 |
+
#define MOSI_BIT 6
|
| 807 |
+
|
| 808 |
+
#define ADC6_DDR DDRA
|
| 809 |
+
#define ADC6_PORT PORTA
|
| 810 |
+
#define ADC6_PIN PINA
|
| 811 |
+
#define ADC6_BIT 6
|
| 812 |
+
|
| 813 |
+
#define ADC5_DDR DDRA
|
| 814 |
+
#define ADC5_PORT PORTA
|
| 815 |
+
#define ADC5_PIN PINA
|
| 816 |
+
#define ADC5_BIT 5
|
| 817 |
+
|
| 818 |
+
#define DO_DDR DDRA
|
| 819 |
+
#define DO_PORT PORTA
|
| 820 |
+
#define DO_PIN PINA
|
| 821 |
+
#define DO_BIT 5
|
| 822 |
+
|
| 823 |
+
#define MISO_DDR DDRA
|
| 824 |
+
#define MISO_PORT PORTA
|
| 825 |
+
#define MISO_PIN PINA
|
| 826 |
+
#define MISO_BIT 5
|
| 827 |
+
|
| 828 |
+
#define OC1B_DDR DDRA
|
| 829 |
+
#define OC1B_PORT PORTA
|
| 830 |
+
#define OC1B_PIN PINA
|
| 831 |
+
#define OC1B_BIT 5
|
| 832 |
+
|
| 833 |
+
#define PCINT5_DDR DDRA
|
| 834 |
+
#define PCINT5_PORT PORTA
|
| 835 |
+
#define PCINT5_PIN PINA
|
| 836 |
+
#define PCINT5_BIT 5
|
| 837 |
+
|
| 838 |
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
| 839 |
+
#define SLEEP_MODE_ADC (0x01<<3)
|
| 840 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
| 841 |
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
| 842 |
+
|
| 843 |
+
#endif /* _AVR_ATtiny84A_H_ */
|
| 844 |
+
|
hardware/tools/avr/avr/include/avr/iotn85.h
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2005, Joerg Wunsch
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn85.h 2115 2010-04-05 23:19:53Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn85.h - definitions for ATtiny85 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_IOTN85_H_
|
| 36 |
+
#define _AVR_IOTN85_H_ 1
|
| 37 |
+
|
| 38 |
+
#include <avr/iotnx5.h>
|
| 39 |
+
|
| 40 |
+
/* Constants */
|
| 41 |
+
#define SPM_PAGESIZE 64
|
| 42 |
+
#define RAMSTART (0x60)
|
| 43 |
+
#define RAMEND 0x25F
|
| 44 |
+
#define XRAMEND RAMEND
|
| 45 |
+
#define E2END 0x1FF
|
| 46 |
+
#define E2PAGESIZE 4
|
| 47 |
+
#define FLASHEND 0x1FFF
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
/* Fuses */
|
| 51 |
+
#define FUSE_MEMORY_SIZE 3
|
| 52 |
+
|
| 53 |
+
/* Low Fuse Byte */
|
| 54 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 55 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 56 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 57 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 58 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 59 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 60 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 61 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 62 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 63 |
+
|
| 64 |
+
/* High Fuse Byte */
|
| 65 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 66 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 67 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 68 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 69 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 70 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 71 |
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
| 72 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
| 73 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 74 |
+
|
| 75 |
+
/* Extended Fuse Byte */
|
| 76 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
| 77 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
/* Lock Bits */
|
| 81 |
+
#define __LOCK_BITS_EXIST
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Signature */
|
| 85 |
+
#define SIGNATURE_0 0x1E
|
| 86 |
+
#define SIGNATURE_1 0x93
|
| 87 |
+
#define SIGNATURE_2 0x0B
|
| 88 |
+
|
| 89 |
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
| 90 |
+
#define SLEEP_MODE_ADC (0x01<<3)
|
| 91 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
| 92 |
+
|
| 93 |
+
#endif /* _AVR_IOTN85_H_ */
|
hardware/tools/avr/avr/include/avr/iotn861.h
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006, Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn861.h 2115 2010-04-05 23:19:53Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn861.h - definitions for ATtiny861 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_IOTN861_H_
|
| 36 |
+
#define _AVR_IOTN861_H_ 1
|
| 37 |
+
|
| 38 |
+
#include <avr/iotnx61.h>
|
| 39 |
+
|
| 40 |
+
/* Constants */
|
| 41 |
+
#define SPM_PAGESIZE 64
|
| 42 |
+
#define RAMSTART (0x60)
|
| 43 |
+
#define RAMEND 0x25F
|
| 44 |
+
#define XRAMEND RAMEND
|
| 45 |
+
#define E2END 0x1FF
|
| 46 |
+
#define E2PAGESIZE 4
|
| 47 |
+
#define FLASHEND 0x1FFF
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
/* Fuses */
|
| 51 |
+
#define FUSE_MEMORY_SIZE 3
|
| 52 |
+
|
| 53 |
+
/* Low Fuse Byte */
|
| 54 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 55 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 56 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 57 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 58 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 59 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 60 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 61 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 62 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 63 |
+
|
| 64 |
+
/* High Fuse Byte */
|
| 65 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 66 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 67 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 68 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 69 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 70 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 71 |
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
| 72 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
| 73 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 74 |
+
|
| 75 |
+
/* Extended Fuse Byte */
|
| 76 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
| 77 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
/* Lock Bits */
|
| 81 |
+
#define __LOCK_BITS_EXIST
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Signature */
|
| 85 |
+
#define SIGNATURE_0 0x1E
|
| 86 |
+
#define SIGNATURE_1 0x93
|
| 87 |
+
#define SIGNATURE_2 0x0D
|
| 88 |
+
|
| 89 |
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
| 90 |
+
#define SLEEP_MODE_ADC (0x01<<3)
|
| 91 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
| 92 |
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
| 93 |
+
|
| 94 |
+
#endif /* _AVR_IOTN861_H_ */
|
hardware/tools/avr/avr/include/avr/iotn861a.h
ADDED
|
@@ -0,0 +1,988 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2009 Atmel Corporation
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn861a.h 2063 2009-11-18 22:06:28Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn861a.h - definitions for ATtiny861A */
|
| 34 |
+
|
| 35 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 36 |
+
|
| 37 |
+
#ifndef _AVR_IO_H_
|
| 38 |
+
# error "Include <avr/io.h> instead of this file."
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IOXXX_H_
|
| 42 |
+
# define _AVR_IOXXX_H_ "iotn861a.h"
|
| 43 |
+
#else
|
| 44 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
#ifndef _AVR_ATtiny861A_H_
|
| 49 |
+
#define _AVR_ATtiny861A_H_ 1
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
/* Registers and associated bit numbers. */
|
| 53 |
+
|
| 54 |
+
#define TCCR1E _SFR_IO8(0x00)
|
| 55 |
+
#define OC1OE0 0
|
| 56 |
+
#define OC1OE1 1
|
| 57 |
+
#define OC1OE2 2
|
| 58 |
+
#define OC1OE3 3
|
| 59 |
+
#define OC1OE4 4
|
| 60 |
+
#define OC1OE5 5
|
| 61 |
+
|
| 62 |
+
#define DIDR0 _SFR_IO8(0x01)
|
| 63 |
+
#define ADC0D 0
|
| 64 |
+
#define ADC1D 1
|
| 65 |
+
#define ADC2D 2
|
| 66 |
+
#define AREFD 3
|
| 67 |
+
#define ADC3D 4
|
| 68 |
+
#define ADC4D 5
|
| 69 |
+
#define ADC5D 6
|
| 70 |
+
#define ADC6D 7
|
| 71 |
+
|
| 72 |
+
#define DIDR1 _SFR_IO8(0x02)
|
| 73 |
+
#define ADC7D 4
|
| 74 |
+
#define ADC8D 5
|
| 75 |
+
#define ADC9D 6
|
| 76 |
+
#define ADC10D 7
|
| 77 |
+
|
| 78 |
+
#define ADCSRB _SFR_IO8(0x03)
|
| 79 |
+
#define ADTS0 0
|
| 80 |
+
#define ADTS1 1
|
| 81 |
+
#define ADTS2 2
|
| 82 |
+
#define MUX5 3
|
| 83 |
+
#define REFS2 4
|
| 84 |
+
#define IPR 5
|
| 85 |
+
#define GSEL 6
|
| 86 |
+
#define BIN 7
|
| 87 |
+
|
| 88 |
+
#ifndef __ASSEMBLER__
|
| 89 |
+
#define ADC _SFR_IO16(0x04)
|
| 90 |
+
#endif
|
| 91 |
+
#define ADCW _SFR_IO16(0x04)
|
| 92 |
+
|
| 93 |
+
#define ADCL _SFR_IO8(0x04)
|
| 94 |
+
#define ADCL0 0
|
| 95 |
+
#define ADCL1 1
|
| 96 |
+
#define ADCL2 2
|
| 97 |
+
#define ADCL3 3
|
| 98 |
+
#define ADCL4 4
|
| 99 |
+
#define ADCL5 5
|
| 100 |
+
#define ADCL6 6
|
| 101 |
+
#define ADCL7 7
|
| 102 |
+
|
| 103 |
+
#define ADCH _SFR_IO8(0x05)
|
| 104 |
+
#define ADCH0 0
|
| 105 |
+
#define ADCH1 1
|
| 106 |
+
#define ADCH2 2
|
| 107 |
+
#define ADCH3 3
|
| 108 |
+
#define ADCH4 4
|
| 109 |
+
#define ADCH5 5
|
| 110 |
+
#define ADCH6 6
|
| 111 |
+
#define ADCH7 7
|
| 112 |
+
|
| 113 |
+
#define ADCSRA _SFR_IO8(0x06)
|
| 114 |
+
#define ADPS0 0
|
| 115 |
+
#define ADPS1 1
|
| 116 |
+
#define ADPS2 2
|
| 117 |
+
#define ADIE 3
|
| 118 |
+
#define ADIF 4
|
| 119 |
+
#define ADATE 5
|
| 120 |
+
#define ADSC 6
|
| 121 |
+
#define ADEN 7
|
| 122 |
+
|
| 123 |
+
#define ADMUX _SFR_IO8(0x07)
|
| 124 |
+
#define MUX0 0
|
| 125 |
+
#define MUX1 1
|
| 126 |
+
#define MUX2 2
|
| 127 |
+
#define MUX3 3
|
| 128 |
+
#define MUX4 4
|
| 129 |
+
#define ADLAR 5
|
| 130 |
+
#define REFS0 6
|
| 131 |
+
#define REFS1 7
|
| 132 |
+
|
| 133 |
+
#define ACSRA _SFR_IO8(0x08)
|
| 134 |
+
#define ACIS0 0
|
| 135 |
+
#define ACIS1 1
|
| 136 |
+
#define ACME 2
|
| 137 |
+
#define ACIE 3
|
| 138 |
+
#define ACI 4
|
| 139 |
+
#define ACO 5
|
| 140 |
+
#define ACBG 6
|
| 141 |
+
#define ACD 7
|
| 142 |
+
|
| 143 |
+
#define ACSRB _SFR_IO8(0x09)
|
| 144 |
+
#define ACM0 0
|
| 145 |
+
#define ACM1 1
|
| 146 |
+
#define ACM2 2
|
| 147 |
+
#define HLEV 6
|
| 148 |
+
#define HSEL 7
|
| 149 |
+
|
| 150 |
+
#define GPIOR0 _SFR_IO8(0x0A)
|
| 151 |
+
#define GPIOR00 0
|
| 152 |
+
#define GPIOR01 1
|
| 153 |
+
#define GPIOR02 2
|
| 154 |
+
#define GPIOR03 3
|
| 155 |
+
#define GPIOR04 4
|
| 156 |
+
#define GPIOR05 5
|
| 157 |
+
#define GPIOR06 6
|
| 158 |
+
#define GPIOR07 7
|
| 159 |
+
|
| 160 |
+
#define GPIOR1 _SFR_IO8(0x0B)
|
| 161 |
+
#define GPIOR10 0
|
| 162 |
+
#define GPIOR11 1
|
| 163 |
+
#define GPIOR12 2
|
| 164 |
+
#define GPIOR13 3
|
| 165 |
+
#define GPIOR14 4
|
| 166 |
+
#define GPIOR15 5
|
| 167 |
+
#define GPIOR16 6
|
| 168 |
+
#define GPIOR17 7
|
| 169 |
+
|
| 170 |
+
#define GPIOR2 _SFR_IO8(0x0C)
|
| 171 |
+
#define GPIOR20 0
|
| 172 |
+
#define GPIOR21 1
|
| 173 |
+
#define GPIOR22 2
|
| 174 |
+
#define GPIOR23 3
|
| 175 |
+
#define GPIOR24 4
|
| 176 |
+
#define GPIOR25 5
|
| 177 |
+
#define GPIOR26 6
|
| 178 |
+
#define GPIOR27 7
|
| 179 |
+
|
| 180 |
+
#define USICR _SFR_IO8(0x0D)
|
| 181 |
+
#define USITC 0
|
| 182 |
+
#define USICLK 1
|
| 183 |
+
#define USICS0 2
|
| 184 |
+
#define USICS1 3
|
| 185 |
+
#define USIWM0 4
|
| 186 |
+
#define USIWM1 5
|
| 187 |
+
#define USIOIE 6
|
| 188 |
+
#define USISIE 7
|
| 189 |
+
|
| 190 |
+
#define USISR _SFR_IO8(0x0E)
|
| 191 |
+
#define USICNT0 0
|
| 192 |
+
#define USICNT1 1
|
| 193 |
+
#define USICNT2 2
|
| 194 |
+
#define USICNT3 3
|
| 195 |
+
#define USIDC 4
|
| 196 |
+
#define USIPF 5
|
| 197 |
+
#define USIOIF 6
|
| 198 |
+
#define USISIF 7
|
| 199 |
+
|
| 200 |
+
#define USIDR _SFR_IO8(0x0F)
|
| 201 |
+
#define USIDR0 0
|
| 202 |
+
#define USIDR1 1
|
| 203 |
+
#define USIDR2 2
|
| 204 |
+
#define USIDR3 3
|
| 205 |
+
#define USIDR4 4
|
| 206 |
+
#define USIDR5 5
|
| 207 |
+
#define USIDR6 6
|
| 208 |
+
#define USIDR7 7
|
| 209 |
+
|
| 210 |
+
#define USIBR _SFR_IO8(0x10)
|
| 211 |
+
#define USIBR0 0
|
| 212 |
+
#define USIBR1 1
|
| 213 |
+
#define USIBR2 2
|
| 214 |
+
#define USIBR3 3
|
| 215 |
+
#define USIBR4 4
|
| 216 |
+
#define USIBR5 5
|
| 217 |
+
#define USIBR6 6
|
| 218 |
+
#define USIBR7 7
|
| 219 |
+
|
| 220 |
+
#define USIPP _SFR_IO8(0x11)
|
| 221 |
+
#define USIPOS 0
|
| 222 |
+
|
| 223 |
+
#define OCR0B _SFR_IO8(0x12)
|
| 224 |
+
#define OCR0B_0 0
|
| 225 |
+
#define OCR0B_1 1
|
| 226 |
+
#define OCR0B_2 2
|
| 227 |
+
#define OCR0B_3 3
|
| 228 |
+
#define OCR0B_4 4
|
| 229 |
+
#define OCR0B_5 5
|
| 230 |
+
#define OCR0B_6 6
|
| 231 |
+
#define OCR0B_7 7
|
| 232 |
+
|
| 233 |
+
#define OCR0A _SFR_IO8(0x13)
|
| 234 |
+
#define OCR0A_0 0
|
| 235 |
+
#define OCR0A_1 1
|
| 236 |
+
#define OCR0A_2 2
|
| 237 |
+
#define OCR0A_3 3
|
| 238 |
+
#define OCR0A_4 4
|
| 239 |
+
#define OCR0A_5 5
|
| 240 |
+
#define OCR0A_6 6
|
| 241 |
+
#define OCR0A_7 7
|
| 242 |
+
|
| 243 |
+
#define TCNT0H _SFR_IO8(0x14)
|
| 244 |
+
#define TCNT0H_0 0
|
| 245 |
+
#define TCNT0H_1 1
|
| 246 |
+
#define TCNT0H_2 2
|
| 247 |
+
#define TCNT0H_3 3
|
| 248 |
+
#define TCNT0H_4 4
|
| 249 |
+
#define TCNT0H_5 5
|
| 250 |
+
#define TCNT0H_6 6
|
| 251 |
+
#define TCNT0H_7 7
|
| 252 |
+
|
| 253 |
+
#define TCCR0A _SFR_IO8(0x15)
|
| 254 |
+
#define WGM00 0
|
| 255 |
+
#define ACIC0 3
|
| 256 |
+
#define ICES0 4
|
| 257 |
+
#define ICNC0 5
|
| 258 |
+
#define ICEN0 6
|
| 259 |
+
#define TCW0 7
|
| 260 |
+
|
| 261 |
+
#define PINB _SFR_IO8(0x16)
|
| 262 |
+
#define PINB0 0
|
| 263 |
+
#define PINB1 1
|
| 264 |
+
#define PINB2 2
|
| 265 |
+
#define PINB3 3
|
| 266 |
+
#define PINB4 4
|
| 267 |
+
#define PINB5 5
|
| 268 |
+
#define PINB6 6
|
| 269 |
+
#define PINB7 7
|
| 270 |
+
|
| 271 |
+
#define DDRB _SFR_IO8(0x17)
|
| 272 |
+
#define DDB0 0
|
| 273 |
+
#define DDB1 1
|
| 274 |
+
#define DDB2 2
|
| 275 |
+
#define DDB3 3
|
| 276 |
+
#define DDB4 4
|
| 277 |
+
#define DDB5 5
|
| 278 |
+
#define DDB6 6
|
| 279 |
+
#define DDB7 7
|
| 280 |
+
|
| 281 |
+
#define PORTB _SFR_IO8(0x18)
|
| 282 |
+
#define PORTB0 0
|
| 283 |
+
#define PORTB1 1
|
| 284 |
+
#define PORTB2 2
|
| 285 |
+
#define PORTB3 3
|
| 286 |
+
#define PORTB4 4
|
| 287 |
+
#define PORTB5 5
|
| 288 |
+
#define PORTB6 6
|
| 289 |
+
#define PORTB7 7
|
| 290 |
+
|
| 291 |
+
#define PINA _SFR_IO8(0x19)
|
| 292 |
+
#define PINA0 0
|
| 293 |
+
#define PINA1 1
|
| 294 |
+
#define PINA2 2
|
| 295 |
+
#define PINA3 3
|
| 296 |
+
#define PINA4 4
|
| 297 |
+
#define PINA5 5
|
| 298 |
+
#define PINA6 6
|
| 299 |
+
#define PINA7 7
|
| 300 |
+
|
| 301 |
+
#define DDRA _SFR_IO8(0x1A)
|
| 302 |
+
#define DDA0 0
|
| 303 |
+
#define DDA1 1
|
| 304 |
+
#define DDA2 2
|
| 305 |
+
#define DDA3 3
|
| 306 |
+
#define DDA4 4
|
| 307 |
+
#define DDA5 5
|
| 308 |
+
#define DDA6 6
|
| 309 |
+
#define DDA7 7
|
| 310 |
+
|
| 311 |
+
#define PORTA _SFR_IO8(0x1B)
|
| 312 |
+
#define PORTA0 0
|
| 313 |
+
#define PORTA1 1
|
| 314 |
+
#define PORTA2 2
|
| 315 |
+
#define PORTA3 3
|
| 316 |
+
#define PORTA4 4
|
| 317 |
+
#define PORTA5 5
|
| 318 |
+
#define PORTA6 6
|
| 319 |
+
#define PORTA7 7
|
| 320 |
+
|
| 321 |
+
#define EECR _SFR_IO8(0x1C)
|
| 322 |
+
#define EERE 0
|
| 323 |
+
#define EEPE 1
|
| 324 |
+
#define EEMPE 2
|
| 325 |
+
#define EERIE 3
|
| 326 |
+
#define EEPM0 4
|
| 327 |
+
#define EEPM1 5
|
| 328 |
+
|
| 329 |
+
#define EEDR _SFR_IO8(0x1D)
|
| 330 |
+
#define EEDR0 0
|
| 331 |
+
#define EEDR1 1
|
| 332 |
+
#define EEDR2 2
|
| 333 |
+
#define EEDR3 3
|
| 334 |
+
#define EEDR4 4
|
| 335 |
+
#define EEDR5 5
|
| 336 |
+
#define EEDR6 6
|
| 337 |
+
#define EEDR7 7
|
| 338 |
+
|
| 339 |
+
#define EEAR _SFR_IO16(0x1E)
|
| 340 |
+
|
| 341 |
+
#define EEARL _SFR_IO8(0x1E)
|
| 342 |
+
#define EEAR0 0
|
| 343 |
+
#define EEAR1 1
|
| 344 |
+
#define EEAR2 2
|
| 345 |
+
#define EEAR3 3
|
| 346 |
+
#define EEAR4 4
|
| 347 |
+
#define EEAR5 5
|
| 348 |
+
#define EEAR6 6
|
| 349 |
+
#define EEAR7 7
|
| 350 |
+
|
| 351 |
+
#define EEARH _SFR_IO8(0x1F)
|
| 352 |
+
#define EEAR8 0
|
| 353 |
+
|
| 354 |
+
#define DWDR _SFR_IO8(0x20)
|
| 355 |
+
#define DWDR0 0
|
| 356 |
+
#define DWDR1 1
|
| 357 |
+
#define DWDR2 2
|
| 358 |
+
#define DWDR3 3
|
| 359 |
+
#define DWDR4 4
|
| 360 |
+
#define DWDR5 5
|
| 361 |
+
#define DWDR6 6
|
| 362 |
+
#define DWDR7 7
|
| 363 |
+
|
| 364 |
+
#define WDTCR _SFR_IO8(0x21)
|
| 365 |
+
#define WDP0 0
|
| 366 |
+
#define WDP1 1
|
| 367 |
+
#define WDP2 2
|
| 368 |
+
#define WDE 3
|
| 369 |
+
#define WDCE 4
|
| 370 |
+
#define WDP3 5
|
| 371 |
+
#define WDIE 6
|
| 372 |
+
#define WDIF 7
|
| 373 |
+
|
| 374 |
+
#define PCMSK1 _SFR_IO8(0x22)
|
| 375 |
+
#define PCINT8 0
|
| 376 |
+
#define PCINT9 1
|
| 377 |
+
#define PCINT10 2
|
| 378 |
+
#define PCINT11 3
|
| 379 |
+
#define PCINT12 4
|
| 380 |
+
#define PCINT13 5
|
| 381 |
+
#define PCINT14 6
|
| 382 |
+
#define PCINT15 7
|
| 383 |
+
|
| 384 |
+
#define PCMSK0 _SFR_IO8(0x23)
|
| 385 |
+
#define PCINT0 0
|
| 386 |
+
#define PCINT1 1
|
| 387 |
+
#define PCINT2 2
|
| 388 |
+
#define PCINT3 3
|
| 389 |
+
#define PCINT4 4
|
| 390 |
+
#define PCINT5 5
|
| 391 |
+
#define PCINT6 6
|
| 392 |
+
#define PCINT7 7
|
| 393 |
+
|
| 394 |
+
#define DT1 _SFR_IO8(0x24)
|
| 395 |
+
#define DT1L0 0
|
| 396 |
+
#define DT1L1 1
|
| 397 |
+
#define DT1L2 2
|
| 398 |
+
#define DT1L3 3
|
| 399 |
+
#define DT1H0 4
|
| 400 |
+
#define DT1H1 5
|
| 401 |
+
#define DT1H2 6
|
| 402 |
+
#define DT1H3 7
|
| 403 |
+
|
| 404 |
+
#define TC1H _SFR_IO8(0x25)
|
| 405 |
+
#define TC18 0
|
| 406 |
+
#define TC19 1
|
| 407 |
+
|
| 408 |
+
#define TCCR1D _SFR_IO8(0x26)
|
| 409 |
+
#define WGM10 0
|
| 410 |
+
#define WGM11 1
|
| 411 |
+
#define FPF1 2
|
| 412 |
+
#define FPAC1 3
|
| 413 |
+
#define FPES1 4
|
| 414 |
+
#define FPNC1 5
|
| 415 |
+
#define FPEN1 6
|
| 416 |
+
#define FPIE1 7
|
| 417 |
+
|
| 418 |
+
#define TCCR1C _SFR_IO8(0x27)
|
| 419 |
+
#define PWM1D 0
|
| 420 |
+
#define FOC1D 1
|
| 421 |
+
#define COM1D0 2
|
| 422 |
+
#define COM1D1 3
|
| 423 |
+
#define COM1B0S 4
|
| 424 |
+
#define COM1B1S 5
|
| 425 |
+
#define COM1A0S 6
|
| 426 |
+
#define COM1A1S 7
|
| 427 |
+
|
| 428 |
+
#define CLKPR _SFR_IO8(0x28)
|
| 429 |
+
#define CLKPS0 0
|
| 430 |
+
#define CLKPS1 1
|
| 431 |
+
#define CLKPS2 2
|
| 432 |
+
#define CLKPS3 3
|
| 433 |
+
#define CLKPCE 7
|
| 434 |
+
|
| 435 |
+
#define PLLCSR _SFR_IO8(0x29)
|
| 436 |
+
#define PLOCK 0
|
| 437 |
+
#define PLLE 1
|
| 438 |
+
#define PCKE 2
|
| 439 |
+
#define LSM 7
|
| 440 |
+
|
| 441 |
+
#define OCR1D _SFR_IO8(0x2A)
|
| 442 |
+
#define OCR1D0 0
|
| 443 |
+
#define OCR1D1 1
|
| 444 |
+
#define OCR1D2 2
|
| 445 |
+
#define OCR1D3 3
|
| 446 |
+
#define OCR1D4 4
|
| 447 |
+
#define OCR1D5 5
|
| 448 |
+
#define OCR1D6 6
|
| 449 |
+
#define OCR1D7 7
|
| 450 |
+
|
| 451 |
+
#define OCR1C _SFR_IO8(0x2B)
|
| 452 |
+
#define OCR1C0 0
|
| 453 |
+
#define OCR1C1 1
|
| 454 |
+
#define OCR1C2 2
|
| 455 |
+
#define OCR1C3 3
|
| 456 |
+
#define OCR1C4 4
|
| 457 |
+
#define OCR1C5 5
|
| 458 |
+
#define OCR1C6 6
|
| 459 |
+
#define OCR1C7 7
|
| 460 |
+
|
| 461 |
+
#define OCR1B _SFR_IO8(0x2C)
|
| 462 |
+
#define OCR1B0 0
|
| 463 |
+
#define OCR1B1 1
|
| 464 |
+
#define OCR1B2 2
|
| 465 |
+
#define OCR1B3 3
|
| 466 |
+
#define OCR1B4 4
|
| 467 |
+
#define OCR1B5 5
|
| 468 |
+
#define OCR1B6 6
|
| 469 |
+
#define OCR1B7 7
|
| 470 |
+
|
| 471 |
+
#define OCR1A _SFR_IO8(0x2D)
|
| 472 |
+
#define OCR1A0 0
|
| 473 |
+
#define OCR1A1 1
|
| 474 |
+
#define OCR1A2 2
|
| 475 |
+
#define OCR1A3 3
|
| 476 |
+
#define OCR1A4 4
|
| 477 |
+
#define OCR1A5 5
|
| 478 |
+
#define OCR1A6 6
|
| 479 |
+
#define OCR1A7 7
|
| 480 |
+
|
| 481 |
+
#define TCNT1 _SFR_IO8(0x2E)
|
| 482 |
+
#define TC1H_0 0
|
| 483 |
+
#define TC1H_1 1
|
| 484 |
+
#define TC1H_2 2
|
| 485 |
+
#define TC1H_3 3
|
| 486 |
+
#define TC1H_4 4
|
| 487 |
+
#define TC1H_5 5
|
| 488 |
+
#define TC1H_6 6
|
| 489 |
+
#define TC1H_7 7
|
| 490 |
+
|
| 491 |
+
#define TCCR1B _SFR_IO8(0x2F)
|
| 492 |
+
#define CS10 0
|
| 493 |
+
#define CS11 1
|
| 494 |
+
#define CS12 2
|
| 495 |
+
#define CS13 3
|
| 496 |
+
#define DTPS10 4
|
| 497 |
+
#define DTPS11 5
|
| 498 |
+
#define PSR1 6
|
| 499 |
+
#define PWM1X 7
|
| 500 |
+
|
| 501 |
+
#define TCCR1A _SFR_IO8(0x30)
|
| 502 |
+
#define PWM1B 0
|
| 503 |
+
#define PWM1A 1
|
| 504 |
+
#define FOC1B 2
|
| 505 |
+
#define FOC1A 3
|
| 506 |
+
#define COM1B0 4
|
| 507 |
+
#define COM1B1 5
|
| 508 |
+
#define COM1A0 6
|
| 509 |
+
#define COM1A1 7
|
| 510 |
+
|
| 511 |
+
#define OSCCAL _SFR_IO8(0x31)
|
| 512 |
+
#define CAL0 0
|
| 513 |
+
#define CAL1 1
|
| 514 |
+
#define CAL2 2
|
| 515 |
+
#define CAL3 3
|
| 516 |
+
#define CAL4 4
|
| 517 |
+
#define CAL5 5
|
| 518 |
+
#define CAL6 6
|
| 519 |
+
#define CAL7 7
|
| 520 |
+
|
| 521 |
+
#define TCNT0L _SFR_IO8(0x32)
|
| 522 |
+
#define TCNT0L_0 0
|
| 523 |
+
#define TCNT0L_1 1
|
| 524 |
+
#define TCNT0L_2 2
|
| 525 |
+
#define TCNT0L_3 3
|
| 526 |
+
#define TCNT0L_4 4
|
| 527 |
+
#define TCNT0L_5 5
|
| 528 |
+
#define TCNT0L_6 6
|
| 529 |
+
#define TCNT0L_7 7
|
| 530 |
+
|
| 531 |
+
#define TCCR0B _SFR_IO8(0x33)
|
| 532 |
+
#define CS00 0
|
| 533 |
+
#define CS01 1
|
| 534 |
+
#define CS02 2
|
| 535 |
+
#define PSR0 3
|
| 536 |
+
#define TSM 4
|
| 537 |
+
|
| 538 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 539 |
+
#define PORF 0
|
| 540 |
+
#define EXTRF 1
|
| 541 |
+
#define BORF 2
|
| 542 |
+
#define WDRF 3
|
| 543 |
+
|
| 544 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 545 |
+
#define ISC00 0
|
| 546 |
+
#define ISC01 1
|
| 547 |
+
#define BODSE 2
|
| 548 |
+
#define SM0 3
|
| 549 |
+
#define SM1 4
|
| 550 |
+
#define SE 5
|
| 551 |
+
#define PUD 6
|
| 552 |
+
#define BODS 7
|
| 553 |
+
|
| 554 |
+
#define PRR _SFR_IO8(0x36)
|
| 555 |
+
#define PRADC 0
|
| 556 |
+
#define PRUSI 1
|
| 557 |
+
#define PRTIM0 2
|
| 558 |
+
#define PRTIM1 3
|
| 559 |
+
|
| 560 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1))
|
| 561 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 562 |
+
#define __AVR_HAVE_PRR_PRUSI
|
| 563 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 564 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 565 |
+
|
| 566 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 567 |
+
#define SPMEN 0
|
| 568 |
+
#define PGERS 1
|
| 569 |
+
#define PGWRT 2
|
| 570 |
+
#define RFLB 3
|
| 571 |
+
#define CTPB 4
|
| 572 |
+
|
| 573 |
+
#define TIFR _SFR_IO8(0x38)
|
| 574 |
+
#define ICF0 0
|
| 575 |
+
#define TOV0 1
|
| 576 |
+
#define TOV1 2
|
| 577 |
+
#define OCF0B 3
|
| 578 |
+
#define OCF0A 4
|
| 579 |
+
#define OCF1B 5
|
| 580 |
+
#define OCF1A 6
|
| 581 |
+
#define OCF1D 7
|
| 582 |
+
|
| 583 |
+
#define TIMSK _SFR_IO8(0x39)
|
| 584 |
+
#define TICIE0 0
|
| 585 |
+
#define TOIE0 1
|
| 586 |
+
#define TOIE1 2
|
| 587 |
+
#define OCIE0B 3
|
| 588 |
+
#define OCIE0A 4
|
| 589 |
+
#define OCIE1B 5
|
| 590 |
+
#define OCIE1A 6
|
| 591 |
+
#define OCIE1D 7
|
| 592 |
+
|
| 593 |
+
#define GIFR _SFR_IO8(0x3A)
|
| 594 |
+
#define PCIF 5
|
| 595 |
+
#define INTF0 6
|
| 596 |
+
#define INTF1 7
|
| 597 |
+
|
| 598 |
+
#define GIMSK _SFR_IO8(0x3B)
|
| 599 |
+
#define PCIE0 4
|
| 600 |
+
#define PCIE1 5
|
| 601 |
+
#define INT0 6
|
| 602 |
+
#define INT1 7
|
| 603 |
+
|
| 604 |
+
|
| 605 |
+
/* Interrupt vectors */
|
| 606 |
+
/* Vector 0 is the reset vector */
|
| 607 |
+
#define INT0_vect_num 1
|
| 608 |
+
#define INT0_vect _VECTOR(1) /* External Interrupt 0 */
|
| 609 |
+
#define PCINT_vect_num 2
|
| 610 |
+
#define PCINT_vect _VECTOR(2) /* Pin Change Interrupt */
|
| 611 |
+
#define TIMER1_COMPA_vect_num 3
|
| 612 |
+
#define TIMER1_COMPA_vect _VECTOR(3) /* Timer/Counter1 Compare Match 1A */
|
| 613 |
+
#define TIMER1_COMPB_vect_num 4
|
| 614 |
+
#define TIMER1_COMPB_vect _VECTOR(4) /* Timer/Counter1 Compare Match 1B */
|
| 615 |
+
#define TIMER1_OVF_vect_num 5
|
| 616 |
+
#define TIMER1_OVF_vect _VECTOR(5) /* Timer/Counter1 Overflow */
|
| 617 |
+
#define TIMER0_OVF_vect_num 6
|
| 618 |
+
#define TIMER0_OVF_vect _VECTOR(6) /* Timer/Counter0 Overflow */
|
| 619 |
+
#define USI_START_vect_num 7
|
| 620 |
+
#define USI_START_vect _VECTOR(7) /* USI Start */
|
| 621 |
+
#define USI_OVF_vect_num 8
|
| 622 |
+
#define USI_OVF_vect _VECTOR(8) /* USI Overflow */
|
| 623 |
+
#define EE_RDY_vect_num 9
|
| 624 |
+
#define EE_RDY_vect _VECTOR(9) /* EEPROM Ready */
|
| 625 |
+
#define ANA_COMP_vect_num 10
|
| 626 |
+
#define ANA_COMP_vect _VECTOR(10) /* Analog Comparator */
|
| 627 |
+
#define ADC_vect_num 11
|
| 628 |
+
#define ADC_vect _VECTOR(11) /* ADC Conversion Complete */
|
| 629 |
+
#define WDT_vect_num 12
|
| 630 |
+
#define WDT_vect _VECTOR(12) /* Watchdog Time-Out */
|
| 631 |
+
#define INT1_vect_num 13
|
| 632 |
+
#define INT1_vect _VECTOR(13) /* External Interrupt 1 */
|
| 633 |
+
#define TIMER0_COMPA_vect_num 14
|
| 634 |
+
#define TIMER0_COMPA_vect _VECTOR(14) /* Timer/Counter0 Compare Match A */
|
| 635 |
+
#define TIMER0_COMPB_vect_num 15
|
| 636 |
+
#define TIMER0_COMPB_vect _VECTOR(15) /* Timer/Counter0 Compare Match B */
|
| 637 |
+
#define TIMER0_CAPT_vect_num 16
|
| 638 |
+
#define TIMER0_CAPT_vect _VECTOR(16) /* ADC Conversion Complete */
|
| 639 |
+
#define TIMER1_COMPD_vect_num 17
|
| 640 |
+
#define TIMER1_COMPD_vect _VECTOR(17) /* Timer/Counter1 Compare Match D */
|
| 641 |
+
#define FAULT_PROTECTION_vect_num 18
|
| 642 |
+
#define FAULT_PROTECTION_vect _VECTOR(18) /* Timer/Counter1 Fault Protection */
|
| 643 |
+
|
| 644 |
+
#define _VECTOR_SIZE 2 /* Size of individual vector. */
|
| 645 |
+
#define _VECTORS_SIZE (19 * _VECTOR_SIZE)
|
| 646 |
+
|
| 647 |
+
|
| 648 |
+
/* Constants */
|
| 649 |
+
#define SPM_PAGESIZE (64)
|
| 650 |
+
#define RAMSTART (0x60)
|
| 651 |
+
#define RAMSIZE (512)
|
| 652 |
+
#define RAMEND (RAMSTART + RAMSIZE - 1)
|
| 653 |
+
#define XRAMSTART (NA)
|
| 654 |
+
#define XRAMSIZE (0)
|
| 655 |
+
#define XRAMEND (RAMEND)
|
| 656 |
+
#define E2END (0x1FF)
|
| 657 |
+
#define E2PAGESIZE (4)
|
| 658 |
+
#define FLASHEND (0x1FFF)
|
| 659 |
+
|
| 660 |
+
|
| 661 |
+
/* Fuses */
|
| 662 |
+
#define FUSE_MEMORY_SIZE 3
|
| 663 |
+
|
| 664 |
+
/* Low Fuse Byte */
|
| 665 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock source */
|
| 666 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock source */
|
| 667 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock source */
|
| 668 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock source */
|
| 669 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
|
| 670 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
|
| 671 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Clock Output Enable */
|
| 672 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
|
| 673 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 674 |
+
|
| 675 |
+
/* High Fuse Byte */
|
| 676 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
|
| 677 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
|
| 678 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
|
| 679 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through the Chip Erase */
|
| 680 |
+
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog Timer always on */
|
| 681 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial Program and Data Downloading */
|
| 682 |
+
#define FUSE_DWEN (unsigned char)~_BV(6) /* DebugWIRE Enable */
|
| 683 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset disable */
|
| 684 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 685 |
+
|
| 686 |
+
/* Extended Fuse Byte */
|
| 687 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0) /* Self-Programming Enable */
|
| 688 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 689 |
+
|
| 690 |
+
|
| 691 |
+
/* Lock Bits */
|
| 692 |
+
#define __LOCK_BITS_EXIST
|
| 693 |
+
|
| 694 |
+
|
| 695 |
+
/* Signature */
|
| 696 |
+
#define SIGNATURE_0 0x1E
|
| 697 |
+
#define SIGNATURE_1 0x93
|
| 698 |
+
#define SIGNATURE_2 0x0D
|
| 699 |
+
|
| 700 |
+
|
| 701 |
+
/* Device Pin Definitions */
|
| 702 |
+
#define DI_B_DDR DDRMOSI
|
| 703 |
+
#define DI_B_PORT PORTMOSI
|
| 704 |
+
#define DI_B_PIN PINMOSI
|
| 705 |
+
#define DI_B_BIT MOSI
|
| 706 |
+
|
| 707 |
+
#define SDA_B_DDR DDRMOSI
|
| 708 |
+
#define SDA_B_PORT PORTMOSI
|
| 709 |
+
#define SDA_B_PIN PINMOSI
|
| 710 |
+
#define SDA_B_BIT MOSI
|
| 711 |
+
|
| 712 |
+
#define _OC1A_DDR DDRMOSI
|
| 713 |
+
#define _OC1A_PORT PORTMOSI
|
| 714 |
+
#define _OC1A_PIN PINMOSI
|
| 715 |
+
#define _OC1A_BIT MOSI
|
| 716 |
+
|
| 717 |
+
#define PCINT8_DDR DDRMOSI
|
| 718 |
+
#define PCINT8_PORT PORTMOSI
|
| 719 |
+
#define PCINT8_PIN PINMOSI
|
| 720 |
+
#define PCINT8_BIT MOSI
|
| 721 |
+
|
| 722 |
+
#define PB0_DDR DDRMOSI
|
| 723 |
+
#define PB0_PORT PORTMOSI
|
| 724 |
+
#define PB0_PIN PINMOSI
|
| 725 |
+
#define PB0_BIT MOSI
|
| 726 |
+
|
| 727 |
+
#define DO_B_DDR DDRMISO
|
| 728 |
+
#define DO_B_PORT PORTMISO
|
| 729 |
+
#define DO_B_PIN PINMISO
|
| 730 |
+
#define DO_B_BIT MISO
|
| 731 |
+
|
| 732 |
+
#define OC1A_DDR DDRMISO
|
| 733 |
+
#define OC1A_PORT PORTMISO
|
| 734 |
+
#define OC1A_PIN PINMISO
|
| 735 |
+
#define OC1A_BIT MISO
|
| 736 |
+
|
| 737 |
+
#define PCINT9_DDR DDRMISO
|
| 738 |
+
#define PCINT9_PORT PORTMISO
|
| 739 |
+
#define PCINT9_PIN PINMISO
|
| 740 |
+
#define PCINT9_BIT MISO
|
| 741 |
+
|
| 742 |
+
#define PB1_DDR DDRMISO
|
| 743 |
+
#define PB1_PORT PORTMISO
|
| 744 |
+
#define PB1_PIN PINMISO
|
| 745 |
+
#define PB1_BIT MISO
|
| 746 |
+
|
| 747 |
+
#define USCK_B_DDR DDRSCK
|
| 748 |
+
#define USCK_B_PORT PORTSCK
|
| 749 |
+
#define USCK_B_PIN PINSCK
|
| 750 |
+
#define USCK_B_BIT SCK
|
| 751 |
+
|
| 752 |
+
#define SCL_B_DDR DDRSCK
|
| 753 |
+
#define SCL_B_PORT PORTSCK
|
| 754 |
+
#define SCL_B_PIN PINSCK
|
| 755 |
+
#define SCL_B_BIT SCK
|
| 756 |
+
|
| 757 |
+
#define OC1B_DDR DDRSCK
|
| 758 |
+
#define OC1B_PORT PORTSCK
|
| 759 |
+
#define OC1B_PIN PINSCK
|
| 760 |
+
#define OC1B_BIT SCK
|
| 761 |
+
|
| 762 |
+
#define PCINT10_DDR DDRSCK
|
| 763 |
+
#define PCINT10_PORT PORTSCK
|
| 764 |
+
#define PCINT10_PIN PINSCK
|
| 765 |
+
#define PCINT10_BIT SCK
|
| 766 |
+
|
| 767 |
+
#define PB2_DDR DDRSCK
|
| 768 |
+
#define PB2_PORT PORTSCK
|
| 769 |
+
#define PB2_PIN PINSCK
|
| 770 |
+
#define PB2_BIT SCK
|
| 771 |
+
|
| 772 |
+
#define PCINT11_DDR DDROC1B
|
| 773 |
+
#define PCINT11_PORT PORTOC1B
|
| 774 |
+
#define PCINT11_PIN PINOC1B
|
| 775 |
+
#define PCINT11_BIT OC1B
|
| 776 |
+
|
| 777 |
+
#define PB3_DDR DDROC1B
|
| 778 |
+
#define PB3_PORT PORTOC1B
|
| 779 |
+
#define PB3_PIN PINOC1B
|
| 780 |
+
#define PB3_BIT OC1B
|
| 781 |
+
|
| 782 |
+
#define PCINT12_DDR DDRADC
|
| 783 |
+
#define PCINT12_PORT PORTADC
|
| 784 |
+
#define PCINT12_PIN PINADC
|
| 785 |
+
#define PCINT12_BIT ADC7
|
| 786 |
+
|
| 787 |
+
#define _OC1D_DDR DDRADC
|
| 788 |
+
#define _OC1D_PORT PORTADC
|
| 789 |
+
#define _OC1D_PIN PINADC
|
| 790 |
+
#define _OC1D_BIT ADC7
|
| 791 |
+
|
| 792 |
+
#define CLKI_DDR DDRADC
|
| 793 |
+
#define CLKI_PORT PORTADC
|
| 794 |
+
#define CLKI_PIN PINADC
|
| 795 |
+
#define CLKI_BIT ADC7
|
| 796 |
+
|
| 797 |
+
#define PB4_DDR DDRADC
|
| 798 |
+
#define PB4_PORT PORTADC
|
| 799 |
+
#define PB4_PIN PINADC
|
| 800 |
+
#define PB4_BIT ADC7
|
| 801 |
+
|
| 802 |
+
#define PCINT13_DDR DDRADC
|
| 803 |
+
#define PCINT13_PORT PORTADC
|
| 804 |
+
#define PCINT13_PIN PINADC
|
| 805 |
+
#define PCINT13_BIT ADC8
|
| 806 |
+
|
| 807 |
+
#define OC1D_DDR DDRADC
|
| 808 |
+
#define OC1D_PORT PORTADC
|
| 809 |
+
#define OC1D_PIN PINADC
|
| 810 |
+
#define OC1D_BIT ADC8
|
| 811 |
+
|
| 812 |
+
#define CKLO_DDR DDRADC
|
| 813 |
+
#define CKLO_PORT PORTADC
|
| 814 |
+
#define CKLO_PIN PINADC
|
| 815 |
+
#define CKLO_BIT ADC8
|
| 816 |
+
|
| 817 |
+
#define PB5_DDR DDRADC
|
| 818 |
+
#define PB5_PORT PORTADC
|
| 819 |
+
#define PB5_PIN PINADC
|
| 820 |
+
#define PB5_BIT ADC8
|
| 821 |
+
|
| 822 |
+
#define INT0_DDR DDRADC
|
| 823 |
+
#define INT0_PORT PORTADC
|
| 824 |
+
#define INT0_PIN PINADC
|
| 825 |
+
#define INT0_BIT ADC9
|
| 826 |
+
|
| 827 |
+
#define T0_DDR DDRADC
|
| 828 |
+
#define T0_PORT PORTADC
|
| 829 |
+
#define T0_PIN PINADC
|
| 830 |
+
#define T0_BIT ADC9
|
| 831 |
+
|
| 832 |
+
#define PCINT14_DDR DDRADC
|
| 833 |
+
#define PCINT14_PORT PORTADC
|
| 834 |
+
#define PCINT14_PIN PINADC
|
| 835 |
+
#define PCINT14_BIT ADC9
|
| 836 |
+
|
| 837 |
+
#define PB6_DDR DDRADC
|
| 838 |
+
#define PB6_PORT PORTADC
|
| 839 |
+
#define PB6_PIN PINADC
|
| 840 |
+
#define PB6_BIT ADC9
|
| 841 |
+
|
| 842 |
+
#define PCINT15_DDR DDRADC1
|
| 843 |
+
#define PCINT15_PORT PORTADC1
|
| 844 |
+
#define PCINT15_PIN PINADC1
|
| 845 |
+
#define PCINT15_BIT ADC10
|
| 846 |
+
|
| 847 |
+
#define PB7_DDR DDRADC1
|
| 848 |
+
#define PB7_PORT PORTADC1
|
| 849 |
+
#define PB7_PIN PINADC1
|
| 850 |
+
#define PB7_BIT ADC10
|
| 851 |
+
|
| 852 |
+
#define AIN1_DDR DDRADC
|
| 853 |
+
#define AIN1_PORT PORTADC
|
| 854 |
+
#define AIN1_PIN PINADC
|
| 855 |
+
#define AIN1_BIT ADC6
|
| 856 |
+
|
| 857 |
+
#define PCINT7_DDR DDRADC
|
| 858 |
+
#define PCINT7_PORT PORTADC
|
| 859 |
+
#define PCINT7_PIN PINADC
|
| 860 |
+
#define PCINT7_BIT ADC6
|
| 861 |
+
|
| 862 |
+
#define PA7_DDR DDRADC
|
| 863 |
+
#define PA7_PORT PORTADC
|
| 864 |
+
#define PA7_PIN PINADC
|
| 865 |
+
#define PA7_BIT ADC6
|
| 866 |
+
|
| 867 |
+
#define AIN0_DDR DDRADC
|
| 868 |
+
#define AIN0_PORT PORTADC
|
| 869 |
+
#define AIN0_PIN PINADC
|
| 870 |
+
#define AIN0_BIT ADC5
|
| 871 |
+
|
| 872 |
+
#define PCINT6_DDR DDRADC
|
| 873 |
+
#define PCINT6_PORT PORTADC
|
| 874 |
+
#define PCINT6_PIN PINADC
|
| 875 |
+
#define PCINT6_BIT ADC5
|
| 876 |
+
|
| 877 |
+
#define PA6_DDR DDRADC
|
| 878 |
+
#define PA6_PORT PORTADC
|
| 879 |
+
#define PA6_PIN PINADC
|
| 880 |
+
#define PA6_BIT ADC5
|
| 881 |
+
|
| 882 |
+
#define AIN2_DDR DDRADC
|
| 883 |
+
#define AIN2_PORT PORTADC
|
| 884 |
+
#define AIN2_PIN PINADC
|
| 885 |
+
#define AIN2_BIT ADC4
|
| 886 |
+
|
| 887 |
+
#define PCINT5_DDR DDRADC
|
| 888 |
+
#define PCINT5_PORT PORTADC
|
| 889 |
+
#define PCINT5_PIN PINADC
|
| 890 |
+
#define PCINT5_BIT ADC4
|
| 891 |
+
|
| 892 |
+
#define PA5_DDR DDRADC
|
| 893 |
+
#define PA5_PORT PORTADC
|
| 894 |
+
#define PA5_PIN PINADC
|
| 895 |
+
#define PA5_BIT ADC4
|
| 896 |
+
|
| 897 |
+
#define ICP0_DDR DDRADC
|
| 898 |
+
#define ICP0_PORT PORTADC
|
| 899 |
+
#define ICP0_PIN PINADC
|
| 900 |
+
#define ICP0_BIT ADC3
|
| 901 |
+
|
| 902 |
+
#define PCINT4_DDR DDRADC
|
| 903 |
+
#define PCINT4_PORT PORTADC
|
| 904 |
+
#define PCINT4_PIN PINADC
|
| 905 |
+
#define PCINT4_BIT ADC3
|
| 906 |
+
|
| 907 |
+
#define PA4_DDR DDRADC
|
| 908 |
+
#define PA4_PORT PORTADC
|
| 909 |
+
#define PA4_PIN PINADC
|
| 910 |
+
#define PA4_BIT ADC3
|
| 911 |
+
|
| 912 |
+
#define PCINT3_DDR DDRAREF
|
| 913 |
+
#define PCINT3_PORT PORTAREF
|
| 914 |
+
#define PCINT3_PIN PINAREF
|
| 915 |
+
#define PCINT3_BIT AREF
|
| 916 |
+
|
| 917 |
+
#define PA3_DDR DDRAREF
|
| 918 |
+
#define PA3_PORT PORTAREF
|
| 919 |
+
#define PA3_PIN PINAREF
|
| 920 |
+
#define PA3_BIT AREF
|
| 921 |
+
|
| 922 |
+
#define INT1_DDR DDRADC
|
| 923 |
+
#define INT1_PORT PORTADC
|
| 924 |
+
#define INT1_PIN PINADC
|
| 925 |
+
#define INT1_BIT ADC2
|
| 926 |
+
|
| 927 |
+
#define USCK_A_DDR DDRADC
|
| 928 |
+
#define USCK_A_PORT PORTADC
|
| 929 |
+
#define USCK_A_PIN PINADC
|
| 930 |
+
#define USCK_A_BIT ADC2
|
| 931 |
+
|
| 932 |
+
#define SCL_A_DDR DDRADC
|
| 933 |
+
#define SCL_A_PORT PORTADC
|
| 934 |
+
#define SCL_A_PIN PINADC
|
| 935 |
+
#define SCL_A_BIT ADC2
|
| 936 |
+
|
| 937 |
+
#define PCINT2_DDR DDRADC
|
| 938 |
+
#define PCINT2_PORT PORTADC
|
| 939 |
+
#define PCINT2_PIN PINADC
|
| 940 |
+
#define PCINT2_BIT ADC2
|
| 941 |
+
|
| 942 |
+
#define PA2_DDR DDRADC
|
| 943 |
+
#define PA2_PORT PORTADC
|
| 944 |
+
#define PA2_PIN PINADC
|
| 945 |
+
#define PA2_BIT ADC2
|
| 946 |
+
|
| 947 |
+
#define DO_A_DDR DDRADC
|
| 948 |
+
#define DO_A_PORT PORTADC
|
| 949 |
+
#define DO_A_PIN PINADC
|
| 950 |
+
#define DO_A_BIT ADC1
|
| 951 |
+
|
| 952 |
+
#define PCINT1_DDR DDRADC
|
| 953 |
+
#define PCINT1_PORT PORTADC
|
| 954 |
+
#define PCINT1_PIN PINADC
|
| 955 |
+
#define PCINT1_BIT ADC1
|
| 956 |
+
|
| 957 |
+
#define PA1_DDR DDRADC
|
| 958 |
+
#define PA1_PORT PORTADC
|
| 959 |
+
#define PA1_PIN PINADC
|
| 960 |
+
#define PA1_BIT ADC1
|
| 961 |
+
|
| 962 |
+
#define DI_A_DDR DDRADC
|
| 963 |
+
#define DI_A_PORT PORTADC
|
| 964 |
+
#define DI_A_PIN PINADC
|
| 965 |
+
#define DI_A_BIT ADC0
|
| 966 |
+
|
| 967 |
+
#define SDA_A_DDR DDRADC
|
| 968 |
+
#define SDA_A_PORT PORTADC
|
| 969 |
+
#define SDA_A_PIN PINADC
|
| 970 |
+
#define SDA_A_BIT ADC0
|
| 971 |
+
|
| 972 |
+
#define PCINT0_DDR DDRADC
|
| 973 |
+
#define PCINT0_PORT PORTADC
|
| 974 |
+
#define PCINT0_PIN PINADC
|
| 975 |
+
#define PCINT0_BIT ADC0
|
| 976 |
+
|
| 977 |
+
#define PA0_DDR DDRADC
|
| 978 |
+
#define PA0_PORT PORTADC
|
| 979 |
+
#define PA0_PIN PINADC
|
| 980 |
+
#define PA0_BIT ADC0
|
| 981 |
+
|
| 982 |
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
| 983 |
+
#define SLEEP_MODE_ADC (0x01<<3)
|
| 984 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
| 985 |
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
| 986 |
+
|
| 987 |
+
#endif /* _AVR_ATtiny861A_H_ */
|
| 988 |
+
|
hardware/tools/avr/avr/include/avr/iotn87.h
ADDED
|
@@ -0,0 +1,859 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2009-2010 Atmel Corporation
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn87.h 2181 2010-08-23 03:46:23Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn87.h - definitions for ATtiny87 */
|
| 34 |
+
|
| 35 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 36 |
+
|
| 37 |
+
#ifndef _AVR_IO_H_
|
| 38 |
+
# error "Include <avr/io.h> instead of this file."
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IOXXX_H_
|
| 42 |
+
# define _AVR_IOXXX_H_ "iotn87.h"
|
| 43 |
+
#else
|
| 44 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
#ifndef _AVR_ATtiny87_H_
|
| 49 |
+
#define _AVR_ATtiny87_H_ 1
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
/* Registers and associated bit numbers. */
|
| 53 |
+
|
| 54 |
+
#define PINA _SFR_IO8(0x00)
|
| 55 |
+
#define PINA0 0
|
| 56 |
+
#define PINA1 1
|
| 57 |
+
#define PINA2 2
|
| 58 |
+
#define PINA3 3
|
| 59 |
+
#define PINA4 4
|
| 60 |
+
#define PINA5 5
|
| 61 |
+
#define PINA6 6
|
| 62 |
+
#define PINA7 7
|
| 63 |
+
|
| 64 |
+
#define DDRA _SFR_IO8(0x01)
|
| 65 |
+
#define DDA0 0
|
| 66 |
+
#define DDA1 1
|
| 67 |
+
#define DDA2 2
|
| 68 |
+
#define DDA3 3
|
| 69 |
+
#define DDA4 4
|
| 70 |
+
#define DDA5 5
|
| 71 |
+
#define DDA6 6
|
| 72 |
+
#define DDA7 7
|
| 73 |
+
|
| 74 |
+
#define PORTA _SFR_IO8(0x02)
|
| 75 |
+
#define PORTA0 0
|
| 76 |
+
#define PORTA1 1
|
| 77 |
+
#define PORTA2 2
|
| 78 |
+
#define PORTA3 3
|
| 79 |
+
#define PORTA4 4
|
| 80 |
+
#define PORTA5 5
|
| 81 |
+
#define PORTA6 6
|
| 82 |
+
#define PORTA7 7
|
| 83 |
+
|
| 84 |
+
#define PINB _SFR_IO8(0x03)
|
| 85 |
+
#define PINB0 0
|
| 86 |
+
#define PINB1 1
|
| 87 |
+
#define PINB2 2
|
| 88 |
+
#define PINB3 3
|
| 89 |
+
#define PINB4 4
|
| 90 |
+
#define PINB5 5
|
| 91 |
+
#define PINB6 6
|
| 92 |
+
#define PINB7 7
|
| 93 |
+
|
| 94 |
+
#define DDRB _SFR_IO8(0x04)
|
| 95 |
+
#define DDB0 0
|
| 96 |
+
#define DDB1 1
|
| 97 |
+
#define DDB2 2
|
| 98 |
+
#define DDB3 3
|
| 99 |
+
#define DDB4 4
|
| 100 |
+
#define DDB5 5
|
| 101 |
+
#define DDB6 6
|
| 102 |
+
#define DDB7 7
|
| 103 |
+
|
| 104 |
+
#define PORTB _SFR_IO8(0x05)
|
| 105 |
+
#define PORTB0 0
|
| 106 |
+
#define PORTB1 1
|
| 107 |
+
#define PORTB2 2
|
| 108 |
+
#define PORTB3 3
|
| 109 |
+
#define PORTB4 4
|
| 110 |
+
#define PORTB5 5
|
| 111 |
+
#define PORTB6 6
|
| 112 |
+
#define PORTB7 7
|
| 113 |
+
|
| 114 |
+
#define PORTCR _SFR_IO8(0x12)
|
| 115 |
+
#define PUDA 0
|
| 116 |
+
#define PUDB 2
|
| 117 |
+
#define BBMA 4
|
| 118 |
+
#define BBMB 5
|
| 119 |
+
|
| 120 |
+
#define TIFR0 _SFR_IO8(0x15)
|
| 121 |
+
#define TOV0 0
|
| 122 |
+
#define OCF0A 1
|
| 123 |
+
|
| 124 |
+
#define TIFR1 _SFR_IO8(0x16)
|
| 125 |
+
#define TOV1 0
|
| 126 |
+
#define OCF1A 1
|
| 127 |
+
#define OCF1B 2
|
| 128 |
+
#define ICF1 5
|
| 129 |
+
|
| 130 |
+
#define PCIFR _SFR_IO8(0x1B)
|
| 131 |
+
#define PCIF0 0
|
| 132 |
+
#define PCIF1 1
|
| 133 |
+
|
| 134 |
+
#define EIFR _SFR_IO8(0x1C)
|
| 135 |
+
#define INTF0 0
|
| 136 |
+
#define INTF1 1
|
| 137 |
+
|
| 138 |
+
#define EIMSK _SFR_IO8(0x1D)
|
| 139 |
+
#define INT0 0
|
| 140 |
+
#define INT1 1
|
| 141 |
+
|
| 142 |
+
#define GPIOR0 _SFR_IO8(0x1E)
|
| 143 |
+
#define GPIOR00 0
|
| 144 |
+
#define GPIOR01 1
|
| 145 |
+
#define GPIOR02 2
|
| 146 |
+
#define GPIOR03 3
|
| 147 |
+
#define GPIOR04 4
|
| 148 |
+
#define GPIOR05 5
|
| 149 |
+
#define GPIOR06 6
|
| 150 |
+
#define GPIOR07 7
|
| 151 |
+
|
| 152 |
+
#define EECR _SFR_IO8(0x1F)
|
| 153 |
+
#define EERE 0
|
| 154 |
+
#define EEPE 1
|
| 155 |
+
#define EEMPE 2
|
| 156 |
+
#define EERIE 3
|
| 157 |
+
#define EEPM0 4
|
| 158 |
+
#define EEPM1 5
|
| 159 |
+
|
| 160 |
+
#define EEDR _SFR_IO8(0x20)
|
| 161 |
+
#define EEDR0 0
|
| 162 |
+
#define EEDR1 1
|
| 163 |
+
#define EEDR2 2
|
| 164 |
+
#define EEDR3 3
|
| 165 |
+
#define EEDR4 4
|
| 166 |
+
#define EEDR5 5
|
| 167 |
+
#define EEDR6 6
|
| 168 |
+
#define EEDR7 7
|
| 169 |
+
|
| 170 |
+
#define EEAR _SFR_IO16(0x21)
|
| 171 |
+
|
| 172 |
+
#define EEARL _SFR_IO8(0x21)
|
| 173 |
+
#define EEAR0 0
|
| 174 |
+
#define EEAR1 1
|
| 175 |
+
#define EEAR2 2
|
| 176 |
+
#define EEAR3 3
|
| 177 |
+
#define EEAR4 4
|
| 178 |
+
#define EEAR5 5
|
| 179 |
+
#define EEAR6 6
|
| 180 |
+
#define EEAR7 7
|
| 181 |
+
|
| 182 |
+
#define EEARH _SFR_IO8(0x22)
|
| 183 |
+
#define EEAR8 0
|
| 184 |
+
|
| 185 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 186 |
+
#define PSR1 0
|
| 187 |
+
#define PSR0 1
|
| 188 |
+
#define TSM 7
|
| 189 |
+
|
| 190 |
+
#define TCCR0A _SFR_IO8(0x25)
|
| 191 |
+
#define WGM00 0
|
| 192 |
+
#define WGM01 1
|
| 193 |
+
#define COM0A0 6
|
| 194 |
+
#define COM0A1 7
|
| 195 |
+
|
| 196 |
+
#define TCCR0B _SFR_IO8(0x26)
|
| 197 |
+
#define CS00 0
|
| 198 |
+
#define CS01 1
|
| 199 |
+
#define CS02 2
|
| 200 |
+
#define FOC0A 7
|
| 201 |
+
|
| 202 |
+
#define TCNT0 _SFR_IO8(0x27)
|
| 203 |
+
#define TCNT00 0
|
| 204 |
+
#define TCNT01 1
|
| 205 |
+
#define TCNT02 2
|
| 206 |
+
#define TCNT03 3
|
| 207 |
+
#define TCNT04 4
|
| 208 |
+
#define TCNT05 5
|
| 209 |
+
#define TCNT06 6
|
| 210 |
+
#define TCNT07 7
|
| 211 |
+
|
| 212 |
+
#define OCR0A _SFR_IO8(0x28)
|
| 213 |
+
#define OCR00 0
|
| 214 |
+
#define OCR01 1
|
| 215 |
+
#define OCR02 2
|
| 216 |
+
#define OCR03 3
|
| 217 |
+
#define OCR04 4
|
| 218 |
+
#define OCR05 5
|
| 219 |
+
#define OCR06 6
|
| 220 |
+
#define OCR07 7
|
| 221 |
+
|
| 222 |
+
#define GPIOR1 _SFR_IO8(0x2A)
|
| 223 |
+
#define GPIOR10 0
|
| 224 |
+
#define GPIOR11 1
|
| 225 |
+
#define GPIOR12 2
|
| 226 |
+
#define GPIOR13 3
|
| 227 |
+
#define GPIOR14 4
|
| 228 |
+
#define GPIOR15 5
|
| 229 |
+
#define GPIOR16 6
|
| 230 |
+
#define GPIOR17 7
|
| 231 |
+
|
| 232 |
+
#define GPIOR2 _SFR_IO8(0x2B)
|
| 233 |
+
#define GPIOR20 0
|
| 234 |
+
#define GPIOR21 1
|
| 235 |
+
#define GPIOR22 2
|
| 236 |
+
#define GPIOR23 3
|
| 237 |
+
#define GPIOR24 4
|
| 238 |
+
#define GPIOR25 5
|
| 239 |
+
#define GPIOR26 6
|
| 240 |
+
#define GPIOR27 7
|
| 241 |
+
|
| 242 |
+
#define SPCR _SFR_IO8(0x2C)
|
| 243 |
+
#define SPR0 0
|
| 244 |
+
#define SPR1 1
|
| 245 |
+
#define CPHA 2
|
| 246 |
+
#define CPOL 3
|
| 247 |
+
#define MSTR 4
|
| 248 |
+
#define DORD 5
|
| 249 |
+
#define SPE 6
|
| 250 |
+
#define SPIE 7
|
| 251 |
+
|
| 252 |
+
#define SPSR _SFR_IO8(0x2D)
|
| 253 |
+
#define SPI2X 0
|
| 254 |
+
#define WCOL 6
|
| 255 |
+
#define SPIF 7
|
| 256 |
+
|
| 257 |
+
#define SPDR _SFR_IO8(0x2E)
|
| 258 |
+
#define SPDR0 0
|
| 259 |
+
#define SPDR1 1
|
| 260 |
+
#define SPDR2 2
|
| 261 |
+
#define SPDR3 3
|
| 262 |
+
#define SPDR4 4
|
| 263 |
+
#define SPDR5 5
|
| 264 |
+
#define SPDR6 6
|
| 265 |
+
#define SPDR7 7
|
| 266 |
+
|
| 267 |
+
#define ACSR _SFR_IO8(0x30)
|
| 268 |
+
#define ACIS0 0
|
| 269 |
+
#define ACIS1 1
|
| 270 |
+
#define ACIC 2
|
| 271 |
+
#define ACIE 3
|
| 272 |
+
#define ACI 4
|
| 273 |
+
#define ACO 5
|
| 274 |
+
#define ACIRS 6
|
| 275 |
+
#define ACD 7
|
| 276 |
+
|
| 277 |
+
#define DWDR _SFR_IO8(0x31)
|
| 278 |
+
#define DWDR0 0
|
| 279 |
+
#define DWDR1 1
|
| 280 |
+
#define DWDR2 2
|
| 281 |
+
#define DWDR3 3
|
| 282 |
+
#define DWDR4 4
|
| 283 |
+
#define DWDR5 5
|
| 284 |
+
#define DWDR6 6
|
| 285 |
+
#define DWDR7 7
|
| 286 |
+
|
| 287 |
+
#define SMCR _SFR_IO8(0x33)
|
| 288 |
+
#define SE 0
|
| 289 |
+
#define SM0 1
|
| 290 |
+
#define SM1 2
|
| 291 |
+
|
| 292 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 293 |
+
#define PORF 0
|
| 294 |
+
#define EXTRF 1
|
| 295 |
+
#define BORF 2
|
| 296 |
+
#define WDRF 3
|
| 297 |
+
|
| 298 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 299 |
+
#define PUD 4
|
| 300 |
+
#define BODSE 5
|
| 301 |
+
#define BODS 6
|
| 302 |
+
|
| 303 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 304 |
+
#define SPMEN 0
|
| 305 |
+
#define PGERS 1
|
| 306 |
+
#define PGWRT 2
|
| 307 |
+
#define RFLB 3
|
| 308 |
+
#define CTPB 4
|
| 309 |
+
#define SIGRD 5
|
| 310 |
+
#define RWWSB 6
|
| 311 |
+
|
| 312 |
+
#define WDTCR _SFR_MEM8(0x60)
|
| 313 |
+
#define WDP0 0
|
| 314 |
+
#define WDP1 1
|
| 315 |
+
#define WDP2 2
|
| 316 |
+
#define WDE 3
|
| 317 |
+
#define WDCE 4
|
| 318 |
+
#define WDP3 5
|
| 319 |
+
#define WDIE 6
|
| 320 |
+
#define WDIF 7
|
| 321 |
+
|
| 322 |
+
#define CLKPR _SFR_MEM8(0x61)
|
| 323 |
+
#define CLKPS0 0
|
| 324 |
+
#define CLKPS1 1
|
| 325 |
+
#define CLKPS2 2
|
| 326 |
+
#define CLKPS3 3
|
| 327 |
+
#define CLKPCE 7
|
| 328 |
+
|
| 329 |
+
#define CLKCSR _SFR_MEM8(0x62)
|
| 330 |
+
#define CLKC0 0
|
| 331 |
+
#define CLKC1 1
|
| 332 |
+
#define CLKC2 2
|
| 333 |
+
#define CLKC3 3
|
| 334 |
+
#define CLKRDY 4
|
| 335 |
+
#define CLKCCE 7
|
| 336 |
+
|
| 337 |
+
#define CLKSELR _SFR_MEM8(0x63)
|
| 338 |
+
#define CSEL0 0
|
| 339 |
+
#define CSEL1 1
|
| 340 |
+
#define CSEL2 2
|
| 341 |
+
#define CSEL3 3
|
| 342 |
+
#define CSUT0 4
|
| 343 |
+
#define CSUT1 5
|
| 344 |
+
#define COUT 6
|
| 345 |
+
|
| 346 |
+
#define PRR _SFR_MEM8(0x64)
|
| 347 |
+
#define PRADC 0
|
| 348 |
+
#define PRUSI 1
|
| 349 |
+
#define PRTIM0 2
|
| 350 |
+
#define PRTIM1 3
|
| 351 |
+
#define PRSPI 4
|
| 352 |
+
#define PRLIN 5
|
| 353 |
+
|
| 354 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRSPI)|(1<<PRLIN))
|
| 355 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 356 |
+
#define __AVR_HAVE_PRR_PRUSI
|
| 357 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 358 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 359 |
+
#define __AVR_HAVE_PRR_PRSPI
|
| 360 |
+
#define __AVR_HAVE_PRR_PRLIN
|
| 361 |
+
|
| 362 |
+
#define OSCCAL _SFR_MEM8(0x66)
|
| 363 |
+
#define CAL0 0
|
| 364 |
+
#define CAL1 1
|
| 365 |
+
#define CAL2 2
|
| 366 |
+
#define CAL3 3
|
| 367 |
+
#define CAL4 4
|
| 368 |
+
#define CAL5 5
|
| 369 |
+
#define CAL6 6
|
| 370 |
+
#define CAL7 7
|
| 371 |
+
|
| 372 |
+
#define PCICR _SFR_MEM8(0x68)
|
| 373 |
+
#define PCIE0 0
|
| 374 |
+
#define PCIE1 1
|
| 375 |
+
|
| 376 |
+
#define EICRA _SFR_MEM8(0x69)
|
| 377 |
+
#define ISC00 0
|
| 378 |
+
#define ISC01 1
|
| 379 |
+
#define ISC10 2
|
| 380 |
+
#define ISC11 3
|
| 381 |
+
|
| 382 |
+
#define PCMSK0 _SFR_MEM8(0x6B)
|
| 383 |
+
#define PCINT0 0
|
| 384 |
+
#define PCINT1 1
|
| 385 |
+
#define PCINT2 2
|
| 386 |
+
#define PCINT3 3
|
| 387 |
+
#define PCINT4 4
|
| 388 |
+
#define PCINT5 5
|
| 389 |
+
#define PCINT6 6
|
| 390 |
+
#define PCINT7 7
|
| 391 |
+
|
| 392 |
+
#define PCMSK1 _SFR_MEM8(0x6C)
|
| 393 |
+
#define PCINT8 0
|
| 394 |
+
#define PCINT9 1
|
| 395 |
+
#define PCINT10 2
|
| 396 |
+
#define PCINT11 3
|
| 397 |
+
#define PCINT12 4
|
| 398 |
+
#define PCINT13 5
|
| 399 |
+
#define PCINT14 6
|
| 400 |
+
#define PCINT15 7
|
| 401 |
+
|
| 402 |
+
#define TIMSK0 _SFR_MEM8(0x6E)
|
| 403 |
+
#define TOIE0 0
|
| 404 |
+
#define OCIE0A 1
|
| 405 |
+
|
| 406 |
+
#define TIMSK1 _SFR_MEM8(0x6F)
|
| 407 |
+
#define TOIE1 0
|
| 408 |
+
#define OCIE1A 1
|
| 409 |
+
#define OCIE1B 2
|
| 410 |
+
#define ICIE1 5
|
| 411 |
+
|
| 412 |
+
#define AMISCR _SFR_MEM8(0x77)
|
| 413 |
+
#define ISRCEN 0
|
| 414 |
+
#define XREFEN 1
|
| 415 |
+
#define AREFEN 2
|
| 416 |
+
|
| 417 |
+
#ifndef __ASSEMBLER__
|
| 418 |
+
#define ADC _SFR_MEM16(0x78)
|
| 419 |
+
#endif
|
| 420 |
+
#define ADCW _SFR_MEM16(0x78)
|
| 421 |
+
|
| 422 |
+
#define ADCL _SFR_MEM8(0x78)
|
| 423 |
+
#define ADCL0 0
|
| 424 |
+
#define ADCL1 1
|
| 425 |
+
#define ADCL2 2
|
| 426 |
+
#define ADCL3 3
|
| 427 |
+
#define ADCL4 4
|
| 428 |
+
#define ADCL5 5
|
| 429 |
+
#define ADCL6 6
|
| 430 |
+
#define ADCL7 7
|
| 431 |
+
|
| 432 |
+
#define ADCH _SFR_MEM8(0x79)
|
| 433 |
+
#define ADCH0 0
|
| 434 |
+
#define ADCH1 1
|
| 435 |
+
#define ADCH2 2
|
| 436 |
+
#define ADCH3 3
|
| 437 |
+
#define ADCH4 4
|
| 438 |
+
#define ADCH5 5
|
| 439 |
+
#define ADCH6 6
|
| 440 |
+
#define ADCH7 7
|
| 441 |
+
|
| 442 |
+
#define ADCSRA _SFR_MEM8(0x7A)
|
| 443 |
+
#define ADPS0 0
|
| 444 |
+
#define ADPS1 1
|
| 445 |
+
#define ADPS2 2
|
| 446 |
+
#define ADIE 3
|
| 447 |
+
#define ADIF 4
|
| 448 |
+
#define ADATE 5
|
| 449 |
+
#define ADSC 6
|
| 450 |
+
#define ADEN 7
|
| 451 |
+
|
| 452 |
+
#define ADCSRB _SFR_MEM8(0x7B)
|
| 453 |
+
#define ADTS0 0
|
| 454 |
+
#define ADTS1 1
|
| 455 |
+
#define ADTS2 2
|
| 456 |
+
#define ACIR0 4
|
| 457 |
+
#define ACIR1 5
|
| 458 |
+
#define ACME 6
|
| 459 |
+
#define BIN 7
|
| 460 |
+
|
| 461 |
+
#define ADMUX _SFR_MEM8(0x7C)
|
| 462 |
+
#define MUX0 0
|
| 463 |
+
#define MUX1 1
|
| 464 |
+
#define MUX2 2
|
| 465 |
+
#define MUX3 3
|
| 466 |
+
#define MUX4 4
|
| 467 |
+
#define ADLAR 5
|
| 468 |
+
#define REFS0 6
|
| 469 |
+
#define REFS1 7
|
| 470 |
+
|
| 471 |
+
#define DIDR0 _SFR_MEM8(0x7E)
|
| 472 |
+
#define ADC0D 0
|
| 473 |
+
#define ADC1D 1
|
| 474 |
+
#define ADC2D 2
|
| 475 |
+
#define ADC3D 3
|
| 476 |
+
#define ADC4D 4
|
| 477 |
+
#define ADC5D 5
|
| 478 |
+
#define ADC6D 6
|
| 479 |
+
#define ADC7D 7
|
| 480 |
+
|
| 481 |
+
#define DIDR1 _SFR_MEM8(0x7F)
|
| 482 |
+
#define ADC8D 4
|
| 483 |
+
#define ADC9D 5
|
| 484 |
+
#define ADC10D 6
|
| 485 |
+
|
| 486 |
+
#define TCCR1A _SFR_MEM8(0x80)
|
| 487 |
+
#define WGM10 0
|
| 488 |
+
#define WGM11 1
|
| 489 |
+
#define COM1B0 4
|
| 490 |
+
#define COM1B1 5
|
| 491 |
+
#define COM1A0 6
|
| 492 |
+
#define COM1A1 7
|
| 493 |
+
|
| 494 |
+
#define TCCR1B _SFR_MEM8(0x81)
|
| 495 |
+
#define CS10 0
|
| 496 |
+
#define CS11 1
|
| 497 |
+
#define CS12 2
|
| 498 |
+
#define WGM12 3
|
| 499 |
+
#define WGM13 4
|
| 500 |
+
#define ICES1 6
|
| 501 |
+
#define ICNC1 7
|
| 502 |
+
|
| 503 |
+
#define TCCR1C _SFR_MEM8(0x82)
|
| 504 |
+
#define FOC1B 6
|
| 505 |
+
#define FOC1A 7
|
| 506 |
+
|
| 507 |
+
#define TCCR1D _SFR_MEM8(0x83)
|
| 508 |
+
#define OC1AU 0
|
| 509 |
+
#define OC1AV 1
|
| 510 |
+
#define OC1AW 2
|
| 511 |
+
#define OC1AX 3
|
| 512 |
+
#define OC1BU 4
|
| 513 |
+
#define OC1BV 5
|
| 514 |
+
#define OC1BW 6
|
| 515 |
+
#define OC1BX 7
|
| 516 |
+
|
| 517 |
+
#define TCNT1 _SFR_MEM16(0x84)
|
| 518 |
+
|
| 519 |
+
#define TCNT1L _SFR_MEM8(0x84)
|
| 520 |
+
#define TCNT1L0 0
|
| 521 |
+
#define TCNT1L1 1
|
| 522 |
+
#define TCNT1L2 2
|
| 523 |
+
#define TCNT1L3 3
|
| 524 |
+
#define TCNT1L4 4
|
| 525 |
+
#define TCNT1L5 5
|
| 526 |
+
#define TCNT1L6 6
|
| 527 |
+
#define TCNT1L7 7
|
| 528 |
+
|
| 529 |
+
#define TCNT1H _SFR_MEM8(0x85)
|
| 530 |
+
#define TCNT1H0 0
|
| 531 |
+
#define TCNT1H1 1
|
| 532 |
+
#define TCNT1H2 2
|
| 533 |
+
#define TCNT1H3 3
|
| 534 |
+
#define TCNT1H4 4
|
| 535 |
+
#define TCNT1H5 5
|
| 536 |
+
#define TCNT1H6 6
|
| 537 |
+
#define TCNT1H7 7
|
| 538 |
+
|
| 539 |
+
#define ICR1 _SFR_MEM16(0x86)
|
| 540 |
+
|
| 541 |
+
#define ICR1L _SFR_MEM8(0x86)
|
| 542 |
+
#define ICR1L0 0
|
| 543 |
+
#define ICR1L1 1
|
| 544 |
+
#define ICR1L2 2
|
| 545 |
+
#define ICR1L3 3
|
| 546 |
+
#define ICR1L4 4
|
| 547 |
+
#define ICR1L5 5
|
| 548 |
+
#define ICR1L6 6
|
| 549 |
+
#define ICR1L7 7
|
| 550 |
+
|
| 551 |
+
#define ICR1H _SFR_MEM8(0x87)
|
| 552 |
+
#define ICR1H0 0
|
| 553 |
+
#define ICR1H1 1
|
| 554 |
+
#define ICR1H2 2
|
| 555 |
+
#define ICR1H3 3
|
| 556 |
+
#define ICR1H4 4
|
| 557 |
+
#define ICR1H5 5
|
| 558 |
+
#define ICR1H6 6
|
| 559 |
+
#define ICR1H7 7
|
| 560 |
+
|
| 561 |
+
#define OCR1A _SFR_MEM16(0x88)
|
| 562 |
+
|
| 563 |
+
#define OCR1AL _SFR_MEM8(0x88)
|
| 564 |
+
#define OCR1AL0 0
|
| 565 |
+
#define OCR1AL1 1
|
| 566 |
+
#define OCR1AL2 2
|
| 567 |
+
#define OCR1AL3 3
|
| 568 |
+
#define OCR1AL4 4
|
| 569 |
+
#define OCR1AL5 5
|
| 570 |
+
#define OCR1AL6 6
|
| 571 |
+
#define OCR1AL7 7
|
| 572 |
+
|
| 573 |
+
#define OCR1AH _SFR_MEM8(0x89)
|
| 574 |
+
#define OCR1AH0 0
|
| 575 |
+
#define OCR1AH1 1
|
| 576 |
+
#define OCR1AH2 2
|
| 577 |
+
#define OCR1AH3 3
|
| 578 |
+
#define OCR1AH4 4
|
| 579 |
+
#define OCR1AH5 5
|
| 580 |
+
#define OCR1AH6 6
|
| 581 |
+
#define OCR1AH7 7
|
| 582 |
+
|
| 583 |
+
#define OCR1B _SFR_MEM16(0x8A)
|
| 584 |
+
|
| 585 |
+
#define OCR1BL _SFR_MEM8(0x8A)
|
| 586 |
+
#define OCR1BL0 0
|
| 587 |
+
#define OCR1BL1 1
|
| 588 |
+
#define OCR1BL2 2
|
| 589 |
+
#define OCR1BL3 3
|
| 590 |
+
#define OCR1BL4 4
|
| 591 |
+
#define OCR1BL5 5
|
| 592 |
+
#define OCR1BL6 6
|
| 593 |
+
#define OCR1BL7 7
|
| 594 |
+
|
| 595 |
+
#define OCR1BH _SFR_MEM8(0x8B)
|
| 596 |
+
#define OCR1BH0 0
|
| 597 |
+
#define OCR1BH1 1
|
| 598 |
+
#define OCR1BH2 2
|
| 599 |
+
#define OCR1BH3 3
|
| 600 |
+
#define OCR1BH4 4
|
| 601 |
+
#define OCR1BH5 5
|
| 602 |
+
#define OCR1BH6 6
|
| 603 |
+
#define OCR1BH7 7
|
| 604 |
+
|
| 605 |
+
#define ASSR _SFR_MEM8(0xB6)
|
| 606 |
+
#define TCR0BUB 0
|
| 607 |
+
#define TCR0AUB 1
|
| 608 |
+
#define OCR0AUB 3
|
| 609 |
+
#define TCN0UB 4
|
| 610 |
+
#define AS0 5
|
| 611 |
+
#define EXCLK 6
|
| 612 |
+
|
| 613 |
+
#define USICR _SFR_MEM8(0xB8)
|
| 614 |
+
#define USITC 0
|
| 615 |
+
#define USICLK 1
|
| 616 |
+
#define USICS0 2
|
| 617 |
+
#define USICS1 3
|
| 618 |
+
#define USIWM0 4
|
| 619 |
+
#define USIWM1 5
|
| 620 |
+
#define USIOIE 6
|
| 621 |
+
#define USISIE 7
|
| 622 |
+
|
| 623 |
+
#define USISR _SFR_MEM8(0xB9)
|
| 624 |
+
#define USICNT0 0
|
| 625 |
+
#define USICNT1 1
|
| 626 |
+
#define USICNT2 2
|
| 627 |
+
#define USICNT3 3
|
| 628 |
+
#define USIDC 4
|
| 629 |
+
#define USIPF 5
|
| 630 |
+
#define USIOIF 6
|
| 631 |
+
#define USISIF 7
|
| 632 |
+
|
| 633 |
+
#define USIDR _SFR_MEM8(0xBA)
|
| 634 |
+
#define USIDR0 0
|
| 635 |
+
#define USIDR1 1
|
| 636 |
+
#define USIDR2 2
|
| 637 |
+
#define USIDR3 3
|
| 638 |
+
#define USIDR4 4
|
| 639 |
+
#define USIDR5 5
|
| 640 |
+
#define USIDR6 6
|
| 641 |
+
#define USIDR7 7
|
| 642 |
+
|
| 643 |
+
#define USIBR _SFR_MEM8(0xBB)
|
| 644 |
+
#define USIBR0 0
|
| 645 |
+
#define USIBR1 1
|
| 646 |
+
#define USIBR2 2
|
| 647 |
+
#define USIBR3 3
|
| 648 |
+
#define USIBR4 4
|
| 649 |
+
#define USIBR5 5
|
| 650 |
+
#define USIBR6 6
|
| 651 |
+
#define USIBR7 7
|
| 652 |
+
|
| 653 |
+
#define USIPP _SFR_MEM8(0xBC)
|
| 654 |
+
#define USIPOS 0
|
| 655 |
+
|
| 656 |
+
#define LINCR _SFR_MEM8(0xC8)
|
| 657 |
+
#define LCMD0 0
|
| 658 |
+
#define LCMD1 1
|
| 659 |
+
#define LCMD2 2
|
| 660 |
+
#define LENA 3
|
| 661 |
+
#define LCONF0 4
|
| 662 |
+
#define LCONF1 5
|
| 663 |
+
#define LIN13 6
|
| 664 |
+
#define LSWRES 7
|
| 665 |
+
|
| 666 |
+
#define LINSIR _SFR_MEM8(0xC9)
|
| 667 |
+
#define LRXOK 0
|
| 668 |
+
#define LTXOK 1
|
| 669 |
+
#define LIDOK 2
|
| 670 |
+
#define LERR 3
|
| 671 |
+
#define LBUSY 4
|
| 672 |
+
#define LIDST0 5
|
| 673 |
+
#define LIDST1 6
|
| 674 |
+
#define LIDST2 7
|
| 675 |
+
|
| 676 |
+
#define LINENIR _SFR_MEM8(0xCA)
|
| 677 |
+
#define LENRXOK 0
|
| 678 |
+
#define LENTXOK 1
|
| 679 |
+
#define LENIDOK 2
|
| 680 |
+
#define LENERR 3
|
| 681 |
+
|
| 682 |
+
#define LINERR _SFR_MEM8(0xCB)
|
| 683 |
+
#define LBERR 0
|
| 684 |
+
#define LCERR 1
|
| 685 |
+
#define LPERR 2
|
| 686 |
+
#define LSERR 3
|
| 687 |
+
#define LFERR 4
|
| 688 |
+
#define LOVERR 5
|
| 689 |
+
#define LTOERR 6
|
| 690 |
+
#define LABORT 7
|
| 691 |
+
|
| 692 |
+
#define LINBTR _SFR_MEM8(0xCC)
|
| 693 |
+
#define LBT0 0
|
| 694 |
+
#define LBT1 1
|
| 695 |
+
#define LBT2 2
|
| 696 |
+
#define LBT3 3
|
| 697 |
+
#define LBT4 4
|
| 698 |
+
#define LBT5 5
|
| 699 |
+
#define LDISR 7
|
| 700 |
+
|
| 701 |
+
#define LINBRR _SFR_MEM16(0xCD)
|
| 702 |
+
|
| 703 |
+
#define LINBRRL _SFR_MEM8(0xCD)
|
| 704 |
+
#define LDIV0 0
|
| 705 |
+
#define LDIV1 1
|
| 706 |
+
#define LDIV2 2
|
| 707 |
+
#define LDIV3 3
|
| 708 |
+
#define LDIV4 4
|
| 709 |
+
#define LDIV5 5
|
| 710 |
+
#define LDIV6 6
|
| 711 |
+
#define LDIV7 7
|
| 712 |
+
|
| 713 |
+
#define LINBRRH _SFR_MEM8(0xCE)
|
| 714 |
+
#define LDIV8 0
|
| 715 |
+
#define LDIV9 1
|
| 716 |
+
#define LDIV10 2
|
| 717 |
+
#define LDIV11 3
|
| 718 |
+
|
| 719 |
+
#define LINDLR _SFR_MEM8(0xCF)
|
| 720 |
+
#define LRXDL0 0
|
| 721 |
+
#define LRXDL1 1
|
| 722 |
+
#define LRXDL2 2
|
| 723 |
+
#define LRXDL3 3
|
| 724 |
+
#define LTXDL0 4
|
| 725 |
+
#define LTXDL1 5
|
| 726 |
+
#define LTXDL2 6
|
| 727 |
+
#define LTXDL3 7
|
| 728 |
+
|
| 729 |
+
#define LINIDR _SFR_MEM8(0xD0)
|
| 730 |
+
#define LID0 0
|
| 731 |
+
#define LID1 1
|
| 732 |
+
#define LID2 2
|
| 733 |
+
#define LID3 3
|
| 734 |
+
#define LID4 4
|
| 735 |
+
#define LID5 5
|
| 736 |
+
#define LP0 6
|
| 737 |
+
#define LP1 7
|
| 738 |
+
|
| 739 |
+
#define LINSEL _SFR_MEM8(0xD1)
|
| 740 |
+
#define LINDX0 0
|
| 741 |
+
#define LINDX1 1
|
| 742 |
+
#define LINDX2 2
|
| 743 |
+
#define LAINC 3
|
| 744 |
+
|
| 745 |
+
#define LINDAT _SFR_MEM8(0xD2)
|
| 746 |
+
#define LDATA0 0
|
| 747 |
+
#define LDATA1 1
|
| 748 |
+
#define LDATA2 2
|
| 749 |
+
#define LDATA3 3
|
| 750 |
+
#define LDATA4 4
|
| 751 |
+
#define LDATA5 5
|
| 752 |
+
#define LDATA6 6
|
| 753 |
+
#define LDATA7 7
|
| 754 |
+
|
| 755 |
+
|
| 756 |
+
/* Interrupt vectors */
|
| 757 |
+
/* Vector 0 is the reset vector */
|
| 758 |
+
#define INT0_vect_num 1
|
| 759 |
+
#define INT0_vect _VECTOR(1) /* External Interrupt Request 0 */
|
| 760 |
+
#define USI_OVF_vect_num 19
|
| 761 |
+
#define USI_OVF_vect _VECTOR(19) /* USI Overflow */
|
| 762 |
+
#define INT1_vect_num 2
|
| 763 |
+
#define INT1_vect _VECTOR(2) /* External Interrupt Request 1 */
|
| 764 |
+
#define PCINT0_vect_num 3
|
| 765 |
+
#define PCINT0_vect _VECTOR(3) /* Pin Change Interrupt Request 0 */
|
| 766 |
+
#define PCINT1_vect_num 4
|
| 767 |
+
#define PCINT1_vect _VECTOR(4) /* Pin Change Interrupt Request 1 */
|
| 768 |
+
#define WDT_vect_num 5
|
| 769 |
+
#define WDT_vect _VECTOR(5) /* Watchdog Time-Out Interrupt */
|
| 770 |
+
#define TIMER1_CAPT_vect_num 6
|
| 771 |
+
#define TIMER1_CAPT_vect _VECTOR(6) /* Timer/Counter1 Capture Event */
|
| 772 |
+
#define TIMER1_COMPA_vect_num 7
|
| 773 |
+
#define TIMER1_COMPA_vect _VECTOR(7) /* Timer/Counter1 Compare Match 1A */
|
| 774 |
+
#define TIMER1_COMPB_vect_num 8
|
| 775 |
+
#define TIMER1_COMPB_vect _VECTOR(8) /* Timer/Counter1 Compare Match 1B */
|
| 776 |
+
#define TIMER1_OVF_vect_num 9
|
| 777 |
+
#define TIMER1_OVF_vect _VECTOR(9) /* Timer/Counter1 Overflow */
|
| 778 |
+
#define TIMER0_COMPA_vect_num 10
|
| 779 |
+
#define TIMER0_COMPA_vect _VECTOR(10) /* Timer/Counter0 Compare Match 0A */
|
| 780 |
+
#define TIMER0_OVF_vect_num 11
|
| 781 |
+
#define TIMER0_OVF_vect _VECTOR(11) /* Timer/Counter0 Overflow */
|
| 782 |
+
#define LIN_TC_vect_num 12
|
| 783 |
+
#define LIN_TC_vect _VECTOR(12) /* LIN Transfer Complete */
|
| 784 |
+
#define LIN_ERR_vect_num 13
|
| 785 |
+
#define LIN_ERR_vect _VECTOR(13) /* LIN Error */
|
| 786 |
+
#define SPI_STC_vect_num 14
|
| 787 |
+
#define SPI_STC_vect _VECTOR(14) /* SPI Serial Transfer Complete */
|
| 788 |
+
#define ADC_vect_num 15
|
| 789 |
+
#define ADC_vect _VECTOR(15) /* ADC Conversion Complete */
|
| 790 |
+
#define EE_RDY_vect_num 16
|
| 791 |
+
#define EE_RDY_vect _VECTOR(16) /* EEPROM Ready */
|
| 792 |
+
#define ANA_COMP_vect_num 17
|
| 793 |
+
#define ANA_COMP_vect _VECTOR(17) /* Analog Comparator */
|
| 794 |
+
#define USI_START_vect_num 18
|
| 795 |
+
#define USI_START_vect _VECTOR(18) /* USI Start */
|
| 796 |
+
|
| 797 |
+
#define _VECTOR_SIZE 2 /* Size of individual vector. */
|
| 798 |
+
#define _VECTORS_SIZE (20 * _VECTOR_SIZE)
|
| 799 |
+
|
| 800 |
+
|
| 801 |
+
/* Constants */
|
| 802 |
+
#define SPM_PAGESIZE (128)
|
| 803 |
+
#define RAMSTART (0x0100)
|
| 804 |
+
#define RAMSIZE (512)
|
| 805 |
+
#define RAMEND (RAMSTART + RAMSIZE - 1)
|
| 806 |
+
#define XRAMSTART (NA)
|
| 807 |
+
#define XRAMSIZE (0)
|
| 808 |
+
#define XRAMEND (RAMEND)
|
| 809 |
+
#define E2END (0x1FF)
|
| 810 |
+
#define E2PAGESIZE (4)
|
| 811 |
+
#define FLASHEND (0x1FFF)
|
| 812 |
+
|
| 813 |
+
|
| 814 |
+
/* Fuses */
|
| 815 |
+
#define FUSE_MEMORY_SIZE 3
|
| 816 |
+
|
| 817 |
+
/* Low Fuse Byte */
|
| 818 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock source */
|
| 819 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock source */
|
| 820 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock source */
|
| 821 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock source */
|
| 822 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
|
| 823 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
|
| 824 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Clock Output Enable */
|
| 825 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
|
| 826 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 827 |
+
|
| 828 |
+
/* High Fuse Byte */
|
| 829 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
|
| 830 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
|
| 831 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
|
| 832 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through the Chip Erase */
|
| 833 |
+
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog Timer always ON */
|
| 834 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial Program and Data Downloading */
|
| 835 |
+
#define FUSE_DWEN (unsigned char)~_BV(6) /* DebugWIRE Enable */
|
| 836 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset disable */
|
| 837 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 838 |
+
|
| 839 |
+
/* Extended Fuse Byte */
|
| 840 |
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0) /* Self-Programming Enable */
|
| 841 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 842 |
+
|
| 843 |
+
|
| 844 |
+
/* Lock Bits */
|
| 845 |
+
#define __LOCK_BITS_EXIST
|
| 846 |
+
|
| 847 |
+
|
| 848 |
+
/* Signature */
|
| 849 |
+
#define SIGNATURE_0 0x1E
|
| 850 |
+
#define SIGNATURE_1 0x93
|
| 851 |
+
#define SIGNATURE_2 0x87
|
| 852 |
+
|
| 853 |
+
|
| 854 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 855 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 856 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 857 |
+
|
| 858 |
+
#endif /* _AVR_ATtiny87_H_ */
|
| 859 |
+
|
hardware/tools/avr/avr/include/avr/iotn88.h
ADDED
|
@@ -0,0 +1,806 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2007 Atmel Corporation
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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.
|
| 30 |
+
*/
|
| 31 |
+
|
| 32 |
+
/* $Id: iotn88.h 2225 2011-03-02 16:27:26Z arcanum $ */
|
| 33 |
+
|
| 34 |
+
/* avr/iotn88.h - definitions for ATtiny88 */
|
| 35 |
+
|
| 36 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 37 |
+
|
| 38 |
+
#ifndef _AVR_IO_H_
|
| 39 |
+
# error "Include <avr/io.h> instead of this file."
|
| 40 |
+
#endif
|
| 41 |
+
|
| 42 |
+
#ifndef _AVR_IOXXX_H_
|
| 43 |
+
# define _AVR_IOXXX_H_ "iotn88.h"
|
| 44 |
+
#else
|
| 45 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 46 |
+
#endif
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
#ifndef _AVR_IOTN88_H_
|
| 50 |
+
#define _AVR_IOTN88_H_ 1
|
| 51 |
+
|
| 52 |
+
/* Registers and associated bit numbers */
|
| 53 |
+
|
| 54 |
+
#define PINB _SFR_IO8(0x03)
|
| 55 |
+
#define PINB0 0
|
| 56 |
+
#define PINB1 1
|
| 57 |
+
#define PINB2 2
|
| 58 |
+
#define PINB3 3
|
| 59 |
+
#define PINB4 4
|
| 60 |
+
#define PINB5 5
|
| 61 |
+
#define PINB6 6
|
| 62 |
+
#define PINB7 7
|
| 63 |
+
|
| 64 |
+
#define DDRB _SFR_IO8(0x04)
|
| 65 |
+
#define DDB0 0
|
| 66 |
+
#define DDB1 1
|
| 67 |
+
#define DDB2 2
|
| 68 |
+
#define DDB3 3
|
| 69 |
+
#define DDB4 4
|
| 70 |
+
#define DDB5 5
|
| 71 |
+
#define DDB6 6
|
| 72 |
+
#define DDB7 7
|
| 73 |
+
|
| 74 |
+
#define PORTB _SFR_IO8(0x05)
|
| 75 |
+
#define PORTB0 0
|
| 76 |
+
#define PORTB1 1
|
| 77 |
+
#define PORTB2 2
|
| 78 |
+
#define PORTB3 3
|
| 79 |
+
#define PORTB4 4
|
| 80 |
+
#define PORTB5 5
|
| 81 |
+
#define PORTB6 6
|
| 82 |
+
#define PORTB7 7
|
| 83 |
+
|
| 84 |
+
#define PINC _SFR_IO8(0x06)
|
| 85 |
+
#define PINC0 0
|
| 86 |
+
#define PINC1 1
|
| 87 |
+
#define PINC2 2
|
| 88 |
+
#define PINC3 3
|
| 89 |
+
#define PINC4 4
|
| 90 |
+
#define PINC5 5
|
| 91 |
+
#define PINC6 6
|
| 92 |
+
#define PINC7 7
|
| 93 |
+
|
| 94 |
+
#define DDRC _SFR_IO8(0x07)
|
| 95 |
+
#define DDC0 0
|
| 96 |
+
#define DDC1 1
|
| 97 |
+
#define DDC2 2
|
| 98 |
+
#define DDC3 3
|
| 99 |
+
#define DDC4 4
|
| 100 |
+
#define DDC5 5
|
| 101 |
+
#define DDC6 6
|
| 102 |
+
#define DDC7 7
|
| 103 |
+
|
| 104 |
+
#define PORTC _SFR_IO8(0x08)
|
| 105 |
+
#define PORTC0 0
|
| 106 |
+
#define PORTC1 1
|
| 107 |
+
#define PORTC2 2
|
| 108 |
+
#define PORTC3 3
|
| 109 |
+
#define PORTC4 4
|
| 110 |
+
#define PORTC5 5
|
| 111 |
+
#define PORTC6 6
|
| 112 |
+
#define PORTC7 7
|
| 113 |
+
|
| 114 |
+
#define PIND _SFR_IO8(0x09)
|
| 115 |
+
#define PIND0 0
|
| 116 |
+
#define PIND1 1
|
| 117 |
+
#define PIND2 2
|
| 118 |
+
#define PIND3 3
|
| 119 |
+
#define PIND4 4
|
| 120 |
+
#define PIND5 5
|
| 121 |
+
#define PIND6 6
|
| 122 |
+
#define PIND7 7
|
| 123 |
+
|
| 124 |
+
#define DDRD _SFR_IO8(0x0A)
|
| 125 |
+
#define DDD0 0
|
| 126 |
+
#define DDD1 1
|
| 127 |
+
#define DDD2 2
|
| 128 |
+
#define DDD3 3
|
| 129 |
+
#define DDD4 4
|
| 130 |
+
#define DDD5 5
|
| 131 |
+
#define DDD6 6
|
| 132 |
+
#define DDD7 7
|
| 133 |
+
|
| 134 |
+
#define PORTD _SFR_IO8(0x0B)
|
| 135 |
+
#define PORTD0 0
|
| 136 |
+
#define PORTD1 1
|
| 137 |
+
#define PORTD2 2
|
| 138 |
+
#define PORTD3 3
|
| 139 |
+
#define PORTD4 4
|
| 140 |
+
#define PORTD5 5
|
| 141 |
+
#define PORTD6 6
|
| 142 |
+
#define PORTD7 7
|
| 143 |
+
|
| 144 |
+
#define PINA _SFR_IO8(0x0C)
|
| 145 |
+
#define PINA0 0
|
| 146 |
+
#define PINA1 1
|
| 147 |
+
#define PINA2 2
|
| 148 |
+
#define PINA3 3
|
| 149 |
+
|
| 150 |
+
#define DDRA _SFR_IO8(0x0D)
|
| 151 |
+
#define DDA0 0
|
| 152 |
+
#define DDA1 1
|
| 153 |
+
#define DDA2 2
|
| 154 |
+
#define DDA3 3
|
| 155 |
+
|
| 156 |
+
#define PORTA _SFR_IO8(0x0E)
|
| 157 |
+
#define PORTA0 0
|
| 158 |
+
#define PORTA1 1
|
| 159 |
+
#define PORTA2 2
|
| 160 |
+
#define PORTA3 3
|
| 161 |
+
|
| 162 |
+
#define PORTCR _SFR_IO8(0x12)
|
| 163 |
+
#define PUDA 0
|
| 164 |
+
#define PUDB 1
|
| 165 |
+
#define PUDC 2
|
| 166 |
+
#define PUDD 3
|
| 167 |
+
#define BBMA 4
|
| 168 |
+
#define BBMB 5
|
| 169 |
+
#define BBMC 6
|
| 170 |
+
#define BBMD 7
|
| 171 |
+
|
| 172 |
+
#define TIFR0 _SFR_IO8(0x15)
|
| 173 |
+
#define TOV0 0
|
| 174 |
+
#define OCF0A 1
|
| 175 |
+
#define OCF0B 2
|
| 176 |
+
|
| 177 |
+
#define TIFR1 _SFR_IO8(0x16)
|
| 178 |
+
#define TOV1 0
|
| 179 |
+
#define OCF1A 1
|
| 180 |
+
#define OCF1B 2
|
| 181 |
+
#define ICF1 5
|
| 182 |
+
|
| 183 |
+
#define PCIFR _SFR_IO8(0x1B)
|
| 184 |
+
#define PCIF0 0
|
| 185 |
+
#define PCIF1 1
|
| 186 |
+
#define PCIF2 2
|
| 187 |
+
#define PCIF3 3
|
| 188 |
+
|
| 189 |
+
#define EIFR _SFR_IO8(0x1C)
|
| 190 |
+
#define INTF0 0
|
| 191 |
+
#define INTF1 1
|
| 192 |
+
|
| 193 |
+
#define EIMSK _SFR_IO8(0x1D)
|
| 194 |
+
#define INT0 0
|
| 195 |
+
#define INT1 1
|
| 196 |
+
|
| 197 |
+
#define GPIOR0 _SFR_IO8(0x1E)
|
| 198 |
+
#define GPIOR00 0
|
| 199 |
+
#define GPIOR01 1
|
| 200 |
+
#define GPIOR02 2
|
| 201 |
+
#define GPIOR03 3
|
| 202 |
+
#define GPIOR04 4
|
| 203 |
+
#define GPIOR05 5
|
| 204 |
+
#define GPIOR06 6
|
| 205 |
+
#define GPIOR07 7
|
| 206 |
+
|
| 207 |
+
#define EECR _SFR_IO8(0x1F)
|
| 208 |
+
#define EERE 0
|
| 209 |
+
#define EEPE 1
|
| 210 |
+
#define EEMPE 2
|
| 211 |
+
#define EERIE 3
|
| 212 |
+
#define EEPM0 4
|
| 213 |
+
#define EEPM1 5
|
| 214 |
+
|
| 215 |
+
#define EEDR _SFR_IO8(0x20)
|
| 216 |
+
#define EEDR0 0
|
| 217 |
+
#define EEDR1 1
|
| 218 |
+
#define EEDR2 2
|
| 219 |
+
#define EEDR3 3
|
| 220 |
+
#define EEDR4 4
|
| 221 |
+
#define EEDR5 5
|
| 222 |
+
#define EEDR6 6
|
| 223 |
+
#define EEDR7 7
|
| 224 |
+
|
| 225 |
+
#define EEARL _SFR_IO8(0x21)
|
| 226 |
+
#define EEAR0 0
|
| 227 |
+
#define EEAR1 1
|
| 228 |
+
#define EEAR2 2
|
| 229 |
+
#define EEAR3 3
|
| 230 |
+
#define EEAR4 4
|
| 231 |
+
#define EEAR5 5
|
| 232 |
+
#define EEAR6 6
|
| 233 |
+
#define EEAR7 7
|
| 234 |
+
|
| 235 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 236 |
+
#define PSRSYNC 0
|
| 237 |
+
#define TSM 7
|
| 238 |
+
|
| 239 |
+
#define TCCR0A _SFR_IO8(0x25)
|
| 240 |
+
#define CS00 0
|
| 241 |
+
#define CS01 1
|
| 242 |
+
#define CS02 2
|
| 243 |
+
#define CTC0 3
|
| 244 |
+
|
| 245 |
+
#define TCNT0 _SFR_IO8(0x26)
|
| 246 |
+
#define TCNT0_0 0
|
| 247 |
+
#define TCNT0_1 1
|
| 248 |
+
#define TCNT0_2 2
|
| 249 |
+
#define TCNT0_3 3
|
| 250 |
+
#define TCNT0_4 4
|
| 251 |
+
#define TCNT0_5 5
|
| 252 |
+
#define TCNT0_6 6
|
| 253 |
+
#define TCNT0_7 7
|
| 254 |
+
|
| 255 |
+
#define OCR0A _SFR_IO8(0x27)
|
| 256 |
+
#define OCR0A_0 0
|
| 257 |
+
#define OCR0A_1 1
|
| 258 |
+
#define OCR0A_2 2
|
| 259 |
+
#define OCR0A_3 3
|
| 260 |
+
#define OCR0A_4 4
|
| 261 |
+
#define OCR0A_5 5
|
| 262 |
+
#define OCR0A_6 6
|
| 263 |
+
#define OCR0A_7 7
|
| 264 |
+
|
| 265 |
+
#define OCR0B _SFR_IO8(0x28)
|
| 266 |
+
#define OCR0B_0 0
|
| 267 |
+
#define OCR0B_1 1
|
| 268 |
+
#define OCR0B_2 2
|
| 269 |
+
#define OCR0B_3 3
|
| 270 |
+
#define OCR0B_4 4
|
| 271 |
+
#define OCR0B_5 5
|
| 272 |
+
#define OCR0B_6 6
|
| 273 |
+
#define OCR0B_7 7
|
| 274 |
+
|
| 275 |
+
#define GPIOR1 _SFR_IO8(0x2A)
|
| 276 |
+
#define GPIOR10 0
|
| 277 |
+
#define GPIOR11 1
|
| 278 |
+
#define GPIOR12 2
|
| 279 |
+
#define GPIOR13 3
|
| 280 |
+
#define GPIOR14 4
|
| 281 |
+
#define GPIOR15 5
|
| 282 |
+
#define GPIOR16 6
|
| 283 |
+
#define GPIOR17 7
|
| 284 |
+
|
| 285 |
+
#define GPIOR2 _SFR_IO8(0x2B)
|
| 286 |
+
#define GPIOR20 0
|
| 287 |
+
#define GPIOR21 1
|
| 288 |
+
#define GPIOR22 2
|
| 289 |
+
#define GPIOR23 3
|
| 290 |
+
#define GPIOR24 4
|
| 291 |
+
#define GPIOR25 5
|
| 292 |
+
#define GPIOR26 6
|
| 293 |
+
#define GPIOR27 7
|
| 294 |
+
|
| 295 |
+
#define SPCR _SFR_IO8(0x2C)
|
| 296 |
+
#define SPR0 0
|
| 297 |
+
#define SPR1 1
|
| 298 |
+
#define CPHA 2
|
| 299 |
+
#define CPOL 3
|
| 300 |
+
#define MSTR 4
|
| 301 |
+
#define DORD 5
|
| 302 |
+
#define SPE 6
|
| 303 |
+
#define SPIE 7
|
| 304 |
+
|
| 305 |
+
#define SPSR _SFR_IO8(0x2D)
|
| 306 |
+
#define SPI2X 0
|
| 307 |
+
#define WCOL 6
|
| 308 |
+
#define SPIF 7
|
| 309 |
+
|
| 310 |
+
#define SPDR _SFR_IO8(0x2E)
|
| 311 |
+
#define SPDR0 0
|
| 312 |
+
#define SPDR1 1
|
| 313 |
+
#define SPDR2 2
|
| 314 |
+
#define SPDR3 3
|
| 315 |
+
#define SPDR4 4
|
| 316 |
+
#define SPDR5 5
|
| 317 |
+
#define SPDR6 6
|
| 318 |
+
#define SPDR7 7
|
| 319 |
+
|
| 320 |
+
#define ACSR _SFR_IO8(0x30)
|
| 321 |
+
#define ACIS0 0
|
| 322 |
+
#define ACIS1 1
|
| 323 |
+
#define ACIC 2
|
| 324 |
+
#define ACIE 3
|
| 325 |
+
#define ACI 4
|
| 326 |
+
#define ACO 5
|
| 327 |
+
#define ACBG 6
|
| 328 |
+
#define ACD 7
|
| 329 |
+
|
| 330 |
+
#define SMCR _SFR_IO8(0x33)
|
| 331 |
+
#define SE 0
|
| 332 |
+
#define SM0 1
|
| 333 |
+
#define SM1 2
|
| 334 |
+
|
| 335 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 336 |
+
#define PORF 0
|
| 337 |
+
#define EXTRF 1
|
| 338 |
+
#define BORF 2
|
| 339 |
+
#define WDRF 3
|
| 340 |
+
|
| 341 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 342 |
+
#define PUD 4
|
| 343 |
+
#define BODSE 5
|
| 344 |
+
#define BODS 6
|
| 345 |
+
|
| 346 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 347 |
+
#define SELFPRGEN 0
|
| 348 |
+
#define PGERS 1
|
| 349 |
+
#define PGWRT 2
|
| 350 |
+
#define RFLB 3
|
| 351 |
+
#define CTPB 4
|
| 352 |
+
#define RWWSB 6
|
| 353 |
+
|
| 354 |
+
#define WDTCSR _SFR_MEM8(0x60)
|
| 355 |
+
#define WDP0 0
|
| 356 |
+
#define WDP1 1
|
| 357 |
+
#define WDP2 2
|
| 358 |
+
#define WDE 3
|
| 359 |
+
#define WDCE 4
|
| 360 |
+
#define WDP3 5
|
| 361 |
+
#define WDIE 6
|
| 362 |
+
#define WDIF 7
|
| 363 |
+
|
| 364 |
+
#define CLKPR _SFR_MEM8(0x61)
|
| 365 |
+
#define CLKPS0 0
|
| 366 |
+
#define CLKPS1 1
|
| 367 |
+
#define CLKPS2 2
|
| 368 |
+
#define CLKPS3 3
|
| 369 |
+
#define CLKPCE 7
|
| 370 |
+
|
| 371 |
+
#define PRR _SFR_MEM8(0x64)
|
| 372 |
+
#define PRADC 0
|
| 373 |
+
#define PRSPI 2
|
| 374 |
+
#define PRTIM1 3
|
| 375 |
+
#define PRTIM0 5
|
| 376 |
+
#define PRTWI 7
|
| 377 |
+
|
| 378 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0)|(1<<PRTWI))
|
| 379 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 380 |
+
#define __AVR_HAVE_PRR_PRSPI
|
| 381 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 382 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 383 |
+
#define __AVR_HAVE_PRR_PRTWI
|
| 384 |
+
|
| 385 |
+
#define OSCCAL _SFR_MEM8(0x66)
|
| 386 |
+
#define CAL0 0
|
| 387 |
+
#define CAL1 1
|
| 388 |
+
#define CAL2 2
|
| 389 |
+
#define CAL3 3
|
| 390 |
+
#define CAL4 4
|
| 391 |
+
#define CAL5 5
|
| 392 |
+
#define CAL6 6
|
| 393 |
+
#define CAL7 7
|
| 394 |
+
|
| 395 |
+
#define PCICR _SFR_MEM8(0x68)
|
| 396 |
+
#define PCIE0 0
|
| 397 |
+
#define PCIE1 1
|
| 398 |
+
#define PCIE2 2
|
| 399 |
+
#define PCIE3 3
|
| 400 |
+
|
| 401 |
+
#define EICRA _SFR_MEM8(0x69)
|
| 402 |
+
#define ISC00 0
|
| 403 |
+
#define ISC01 1
|
| 404 |
+
#define ISC10 2
|
| 405 |
+
#define ISC11 3
|
| 406 |
+
|
| 407 |
+
#define PCMSK3 _SFR_MEM8(0x6A)
|
| 408 |
+
#define PCINT24 0
|
| 409 |
+
#define PCINT25 1
|
| 410 |
+
#define PCINT26 2
|
| 411 |
+
#define PCINT27 3
|
| 412 |
+
|
| 413 |
+
#define PCMSK0 _SFR_MEM8(0x6B)
|
| 414 |
+
#define PCINT0 0
|
| 415 |
+
#define PCINT1 1
|
| 416 |
+
#define PCINT2 2
|
| 417 |
+
#define PCINT3 3
|
| 418 |
+
#define PCINT4 4
|
| 419 |
+
#define PCINT5 5
|
| 420 |
+
#define PCINT6 6
|
| 421 |
+
#define PCINT7 7
|
| 422 |
+
|
| 423 |
+
#define PCMSK1 _SFR_MEM8(0x6C)
|
| 424 |
+
#define PCINT8 0
|
| 425 |
+
#define PCINT9 1
|
| 426 |
+
#define PCINT10 2
|
| 427 |
+
#define PCINT11 3
|
| 428 |
+
#define PCINT12 4
|
| 429 |
+
#define PCINT13 5
|
| 430 |
+
#define PCINT14 6
|
| 431 |
+
#define PCINT15 7
|
| 432 |
+
|
| 433 |
+
#define PCMSK2 _SFR_MEM8(0x6D)
|
| 434 |
+
#define PCINT16 0
|
| 435 |
+
#define PCINT17 1
|
| 436 |
+
#define PCINT18 2
|
| 437 |
+
#define PCINT19 3
|
| 438 |
+
#define PCINT20 4
|
| 439 |
+
#define PCINT21 5
|
| 440 |
+
#define PCINT22 6
|
| 441 |
+
#define PCINT23 7
|
| 442 |
+
|
| 443 |
+
#define TIMSK0 _SFR_MEM8(0x6E)
|
| 444 |
+
#define TOIE0 0
|
| 445 |
+
#define OCIE0A 1
|
| 446 |
+
#define OCIE0B 2
|
| 447 |
+
|
| 448 |
+
#define TIMSK1 _SFR_MEM8(0x6F)
|
| 449 |
+
#define TOIE1 0
|
| 450 |
+
#define OCIE1A 1
|
| 451 |
+
#define OCIE1B 2
|
| 452 |
+
#define ICIE1 5
|
| 453 |
+
|
| 454 |
+
#ifndef __ASSEMBLER__
|
| 455 |
+
#define ADC _SFR_MEM16(0x78)
|
| 456 |
+
#endif
|
| 457 |
+
#define ADCW _SFR_MEM16(0x78)
|
| 458 |
+
|
| 459 |
+
#define ADCL _SFR_MEM8(0x78)
|
| 460 |
+
#define ADCL0 0
|
| 461 |
+
#define ADCL1 1
|
| 462 |
+
#define ADCL2 2
|
| 463 |
+
#define ADCL3 3
|
| 464 |
+
#define ADCL4 4
|
| 465 |
+
#define ADCL5 5
|
| 466 |
+
#define ADCL6 6
|
| 467 |
+
#define ADCL7 7
|
| 468 |
+
|
| 469 |
+
#define ADCH _SFR_MEM8(0x79)
|
| 470 |
+
#define ADCH0 0
|
| 471 |
+
#define ADCH1 1
|
| 472 |
+
#define ADCH2 2
|
| 473 |
+
#define ADCH3 3
|
| 474 |
+
#define ADCH4 4
|
| 475 |
+
#define ADCH5 5
|
| 476 |
+
#define ADCH6 6
|
| 477 |
+
#define ADCH7 7
|
| 478 |
+
|
| 479 |
+
#define ADCSRA _SFR_MEM8(0x7A)
|
| 480 |
+
#define ADPS0 0
|
| 481 |
+
#define ADPS1 1
|
| 482 |
+
#define ADPS2 2
|
| 483 |
+
#define ADIE 3
|
| 484 |
+
#define ADIF 4
|
| 485 |
+
#define ADATE 5
|
| 486 |
+
#define ADSC 6
|
| 487 |
+
#define ADEN 7
|
| 488 |
+
|
| 489 |
+
#define ADCSRB _SFR_MEM8(0x7B)
|
| 490 |
+
#define ADTS0 0
|
| 491 |
+
#define ADTS1 1
|
| 492 |
+
#define ADTS2 2
|
| 493 |
+
#define ACME 6
|
| 494 |
+
|
| 495 |
+
#define ADMUX _SFR_MEM8(0x7C)
|
| 496 |
+
#define MUX0 0
|
| 497 |
+
#define MUX1 1
|
| 498 |
+
#define MUX2 2
|
| 499 |
+
#define MUX3 3
|
| 500 |
+
#define ADLAR 5
|
| 501 |
+
#define REFS0 6
|
| 502 |
+
|
| 503 |
+
#define DIDR0 _SFR_MEM8(0x7E)
|
| 504 |
+
#define ADC0D 0
|
| 505 |
+
#define ADC1D 1
|
| 506 |
+
#define ADC2D 2
|
| 507 |
+
#define ADC3D 3
|
| 508 |
+
#define ADC4D 4
|
| 509 |
+
#define ADC5D 5
|
| 510 |
+
#define ADC6D 6
|
| 511 |
+
#define ADC7D 7
|
| 512 |
+
|
| 513 |
+
#define DIDR1 _SFR_MEM8(0x7F)
|
| 514 |
+
#define AIN0D 0
|
| 515 |
+
#define AIN1D 1
|
| 516 |
+
|
| 517 |
+
#define TCCR1A _SFR_MEM8(0x80)
|
| 518 |
+
#define WGM10 0
|
| 519 |
+
#define WGM11 1
|
| 520 |
+
#define COM1B0 4
|
| 521 |
+
#define COM1B1 5
|
| 522 |
+
#define COM1A0 6
|
| 523 |
+
#define COM1A1 7
|
| 524 |
+
|
| 525 |
+
#define TCCR1B _SFR_MEM8(0x81)
|
| 526 |
+
#define CS10 0
|
| 527 |
+
#define CS11 1
|
| 528 |
+
#define CS12 2
|
| 529 |
+
#define WGM12 3
|
| 530 |
+
#define WGM13 4
|
| 531 |
+
#define ICES1 6
|
| 532 |
+
#define ICNC1 7
|
| 533 |
+
|
| 534 |
+
#define TCCR1C _SFR_MEM8(0x82)
|
| 535 |
+
#define FOC1B 6
|
| 536 |
+
#define FOC1A 7
|
| 537 |
+
|
| 538 |
+
#define TCNT1 _SFR_MEM16(0x84)
|
| 539 |
+
|
| 540 |
+
#define TCNT1L _SFR_MEM8(0x84)
|
| 541 |
+
#define TCNT1L0 0
|
| 542 |
+
#define TCNT1L1 1
|
| 543 |
+
#define TCNT1L2 2
|
| 544 |
+
#define TCNT1L3 3
|
| 545 |
+
#define TCNT1L4 4
|
| 546 |
+
#define TCNT1L5 5
|
| 547 |
+
#define TCNT1L6 6
|
| 548 |
+
#define TCNT1L7 7
|
| 549 |
+
|
| 550 |
+
#define TCNT1H _SFR_MEM8(0x85)
|
| 551 |
+
#define TCNT1H0 0
|
| 552 |
+
#define TCNT1H1 1
|
| 553 |
+
#define TCNT1H2 2
|
| 554 |
+
#define TCNT1H3 3
|
| 555 |
+
#define TCNT1H4 4
|
| 556 |
+
#define TCNT1H5 5
|
| 557 |
+
#define TCNT1H6 6
|
| 558 |
+
#define TCNT1H7 7
|
| 559 |
+
|
| 560 |
+
#define ICR1 _SFR_MEM16(0x86)
|
| 561 |
+
|
| 562 |
+
#define ICR1L _SFR_MEM8(0x86)
|
| 563 |
+
#define ICR1L0 0
|
| 564 |
+
#define ICR1L1 1
|
| 565 |
+
#define ICR1L2 2
|
| 566 |
+
#define ICR1L3 3
|
| 567 |
+
#define ICR1L4 4
|
| 568 |
+
#define ICR1L5 5
|
| 569 |
+
#define ICR1L6 6
|
| 570 |
+
#define ICR1L7 7
|
| 571 |
+
|
| 572 |
+
#define ICR1H _SFR_MEM8(0x87)
|
| 573 |
+
#define ICR1H0 0
|
| 574 |
+
#define ICR1H1 1
|
| 575 |
+
#define ICR1H2 2
|
| 576 |
+
#define ICR1H3 3
|
| 577 |
+
#define ICR1H4 4
|
| 578 |
+
#define ICR1H5 5
|
| 579 |
+
#define ICR1H6 6
|
| 580 |
+
#define ICR1H7 7
|
| 581 |
+
|
| 582 |
+
#define OCR1A _SFR_MEM16(0x88)
|
| 583 |
+
|
| 584 |
+
#define OCR1AL _SFR_MEM8(0x88)
|
| 585 |
+
#define OCR1AL0 0
|
| 586 |
+
#define OCR1AL1 1
|
| 587 |
+
#define OCR1AL2 2
|
| 588 |
+
#define OCR1AL3 3
|
| 589 |
+
#define OCR1AL4 4
|
| 590 |
+
#define OCR1AL5 5
|
| 591 |
+
#define OCR1AL6 6
|
| 592 |
+
#define OCR1AL7 7
|
| 593 |
+
|
| 594 |
+
#define OCR1AH _SFR_MEM8(0x89)
|
| 595 |
+
#define OCR1AH0 0
|
| 596 |
+
#define OCR1AH1 1
|
| 597 |
+
#define OCR1AH2 2
|
| 598 |
+
#define OCR1AH3 3
|
| 599 |
+
#define OCR1AH4 4
|
| 600 |
+
#define OCR1AH5 5
|
| 601 |
+
#define OCR1AH6 6
|
| 602 |
+
#define OCR1AH7 7
|
| 603 |
+
|
| 604 |
+
#define OCR1B _SFR_MEM16(0x8A)
|
| 605 |
+
|
| 606 |
+
#define OCR1BL _SFR_MEM8(0x8A)
|
| 607 |
+
#define OCR1BL0 0
|
| 608 |
+
#define OCR1BL1 1
|
| 609 |
+
#define OCR1BL2 2
|
| 610 |
+
#define OCR1BL3 3
|
| 611 |
+
#define OCR1BL4 4
|
| 612 |
+
#define OCR1BL5 5
|
| 613 |
+
#define OCR1BL6 6
|
| 614 |
+
#define OCR1BL7 7
|
| 615 |
+
|
| 616 |
+
#define OCR1BH _SFR_MEM8(0x8B)
|
| 617 |
+
#define OCR1BH0 0
|
| 618 |
+
#define OCR1BH1 1
|
| 619 |
+
#define OCR1BH2 2
|
| 620 |
+
#define OCR1BH3 3
|
| 621 |
+
#define OCR1BH4 4
|
| 622 |
+
#define OCR1BH5 5
|
| 623 |
+
#define OCR1BH6 6
|
| 624 |
+
#define OCR1BH7 7
|
| 625 |
+
|
| 626 |
+
#define TWBR _SFR_MEM8(0xB8)
|
| 627 |
+
#define TWBR0 0
|
| 628 |
+
#define TWBR1 1
|
| 629 |
+
#define TWBR2 2
|
| 630 |
+
#define TWBR3 3
|
| 631 |
+
#define TWBR4 4
|
| 632 |
+
#define TWBR5 5
|
| 633 |
+
#define TWBR6 6
|
| 634 |
+
#define TWBR7 7
|
| 635 |
+
|
| 636 |
+
#define TWSR _SFR_MEM8(0xB9)
|
| 637 |
+
#define TWPS0 0
|
| 638 |
+
#define TWPS1 1
|
| 639 |
+
#define TWS3 3
|
| 640 |
+
#define TWS4 4
|
| 641 |
+
#define TWS5 5
|
| 642 |
+
#define TWS6 6
|
| 643 |
+
#define TWS7 7
|
| 644 |
+
|
| 645 |
+
#define TWAR _SFR_MEM8(0xBA)
|
| 646 |
+
#define TWGCE 0
|
| 647 |
+
#define TWA0 1
|
| 648 |
+
#define TWA1 2
|
| 649 |
+
#define TWA2 3
|
| 650 |
+
#define TWA3 4
|
| 651 |
+
#define TWA4 5
|
| 652 |
+
#define TWA5 6
|
| 653 |
+
#define TWA6 7
|
| 654 |
+
|
| 655 |
+
#define TWDR _SFR_MEM8(0xBB)
|
| 656 |
+
#define TWD0 0
|
| 657 |
+
#define TWD1 1
|
| 658 |
+
#define TWD2 2
|
| 659 |
+
#define TWD3 3
|
| 660 |
+
#define TWD4 4
|
| 661 |
+
#define TWD5 5
|
| 662 |
+
#define TWD6 6
|
| 663 |
+
#define TWD7 7
|
| 664 |
+
|
| 665 |
+
#define TWCR _SFR_MEM8(0xBC)
|
| 666 |
+
#define TWIE 0
|
| 667 |
+
#define TWEN 2
|
| 668 |
+
#define TWWC 3
|
| 669 |
+
#define TWSTO 4
|
| 670 |
+
#define TWSTA 5
|
| 671 |
+
#define TWEA 6
|
| 672 |
+
#define TWINT 7
|
| 673 |
+
|
| 674 |
+
#define TWAMR _SFR_MEM8(0xBD)
|
| 675 |
+
#define TWAM0 1
|
| 676 |
+
#define TWAM1 2
|
| 677 |
+
#define TWAM2 3
|
| 678 |
+
#define TWAM3 4
|
| 679 |
+
#define TWAM4 5
|
| 680 |
+
#define TWAM5 6
|
| 681 |
+
#define TWAM6 7
|
| 682 |
+
|
| 683 |
+
#define TWHSR _SFR_MEM8(0xBE)
|
| 684 |
+
#define TWIHS 0
|
| 685 |
+
|
| 686 |
+
|
| 687 |
+
|
| 688 |
+
/* Interrupt Vectors */
|
| 689 |
+
/* Interrupt vector 0 is the reset vector. */
|
| 690 |
+
|
| 691 |
+
#define INT0_vect_num 1
|
| 692 |
+
#define INT0_vect _VECTOR(1)
|
| 693 |
+
|
| 694 |
+
#define INT1_vect_num 2
|
| 695 |
+
#define INT1_vect _VECTOR(2)
|
| 696 |
+
|
| 697 |
+
#define PCINT0_vect_num 3
|
| 698 |
+
#define PCINT0_vect _VECTOR(3)
|
| 699 |
+
|
| 700 |
+
#define PCINT1_vect_num 4
|
| 701 |
+
#define PCINT1_vect _VECTOR(4)
|
| 702 |
+
|
| 703 |
+
#define PCINT2_vect_num 5
|
| 704 |
+
#define PCINT2_vect _VECTOR(5)
|
| 705 |
+
|
| 706 |
+
#define PCINT3_vect_num 6
|
| 707 |
+
#define PCINT3_vect _VECTOR(6)
|
| 708 |
+
|
| 709 |
+
#define WDT_vect_num 7
|
| 710 |
+
#define WDT_vect _VECTOR(7)
|
| 711 |
+
|
| 712 |
+
#define TIMER1_CAPT_vect_num 8
|
| 713 |
+
#define TIMER1_CAPT_vect _VECTOR(8)
|
| 714 |
+
|
| 715 |
+
#define TIMER1_COMPA_vect_num 9
|
| 716 |
+
#define TIMER1_COMPA_vect _VECTOR(9)
|
| 717 |
+
|
| 718 |
+
#define TIMER1_COMPB_vect_num 10
|
| 719 |
+
#define TIMER1_COMPB_vect _VECTOR(10)
|
| 720 |
+
|
| 721 |
+
#define TIMER1_OVF_vect_num 11
|
| 722 |
+
#define TIMER1_OVF_vect _VECTOR(11)
|
| 723 |
+
|
| 724 |
+
#define TIMER0_COMPA_vect_num 12
|
| 725 |
+
#define TIMER0_COMPA_vect _VECTOR(12)
|
| 726 |
+
|
| 727 |
+
#define TIMER0_COMPB_vect_num 13
|
| 728 |
+
#define TIMER0_COMPB_vect _VECTOR(13)
|
| 729 |
+
|
| 730 |
+
#define TIMER0_OVF_vect_num 14
|
| 731 |
+
#define TIMER0_OVF_vect _VECTOR(14)
|
| 732 |
+
|
| 733 |
+
#define SPI_STC_vect_num 15
|
| 734 |
+
#define SPI_STC_vect _VECTOR(15)
|
| 735 |
+
|
| 736 |
+
#define ADC_vect_num 16
|
| 737 |
+
#define ADC_vect _VECTOR(16)
|
| 738 |
+
|
| 739 |
+
#define EE_READY_vect_num 17
|
| 740 |
+
#define EE_READY_vect _VECTOR(17)
|
| 741 |
+
|
| 742 |
+
#define ANALOG_COMP_vect_num 18
|
| 743 |
+
#define ANALOG_COMP_vect _VECTOR(18)
|
| 744 |
+
|
| 745 |
+
#define TWI_vect_num 19
|
| 746 |
+
#define TWI_vect _VECTOR(19)
|
| 747 |
+
|
| 748 |
+
#define _VECTORS_SIZE 40
|
| 749 |
+
|
| 750 |
+
|
| 751 |
+
/* Constants */
|
| 752 |
+
#define RAMEND 0x2FF
|
| 753 |
+
#define RAMSTART (0x100)
|
| 754 |
+
#define XRAMSIZE 0
|
| 755 |
+
#define XRAMEND RAMEND
|
| 756 |
+
#define E2END 0x3F
|
| 757 |
+
#define E2PAGESIZE 4
|
| 758 |
+
#define FLASHEND 0x1FFF
|
| 759 |
+
#define SPM_PAGESIZE 64
|
| 760 |
+
|
| 761 |
+
|
| 762 |
+
/* Fuse Information */
|
| 763 |
+
#define FUSE_MEMORY_SIZE 3
|
| 764 |
+
|
| 765 |
+
/* Low Fuse Byte */
|
| 766 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
|
| 767 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
|
| 768 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
|
| 769 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
|
| 770 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
|
| 771 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
|
| 772 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Clock output */
|
| 773 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
|
| 774 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 775 |
+
|
| 776 |
+
/* High Fuse Byte */
|
| 777 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
|
| 778 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
|
| 779 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
|
| 780 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
|
| 781 |
+
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog Timer Always On */
|
| 782 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
|
| 783 |
+
#define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
|
| 784 |
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External reset disable */
|
| 785 |
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
| 786 |
+
|
| 787 |
+
/* Extended Fuse Byte */
|
| 788 |
+
#define FUSE_SELFPRGEN ~_BV(0) /* Self Programming Enable */
|
| 789 |
+
#define EFUSE_DEFAULT (0xFF)
|
| 790 |
+
|
| 791 |
+
|
| 792 |
+
/* Lock Bits */
|
| 793 |
+
#define __LOCK_BITS_EXIST
|
| 794 |
+
|
| 795 |
+
|
| 796 |
+
/* Signature */
|
| 797 |
+
#define SIGNATURE_0 0x1E
|
| 798 |
+
#define SIGNATURE_1 0x93
|
| 799 |
+
#define SIGNATURE_2 0x11
|
| 800 |
+
|
| 801 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 802 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 803 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 804 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 805 |
+
|
| 806 |
+
#endif /* _AVR_IOTN88_H_ */
|
hardware/tools/avr/avr/include/avr/iotn9.h
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2009 Atmel Corporation
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotn9.h 2063 2009-11-18 22:06:28Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotn9.h - definitions for ATtiny9 */
|
| 34 |
+
|
| 35 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 36 |
+
|
| 37 |
+
#ifndef _AVR_IO_H_
|
| 38 |
+
# error "Include <avr/io.h> instead of this file."
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IOXXX_H_
|
| 42 |
+
# define _AVR_IOXXX_H_ "iotn9.h"
|
| 43 |
+
#else
|
| 44 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
#ifndef _AVR_ATtiny9_H_
|
| 49 |
+
#define _AVR_ATtiny9_H_ 1
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
/* Registers and associated bit numbers. */
|
| 53 |
+
|
| 54 |
+
#define PINB _SFR_IO8(0x00)
|
| 55 |
+
#define PINB0 0
|
| 56 |
+
#define PINB1 1
|
| 57 |
+
#define PINB2 2
|
| 58 |
+
#define PINB3 3
|
| 59 |
+
|
| 60 |
+
#define DDRB _SFR_IO8(0x01)
|
| 61 |
+
#define DDB0 0
|
| 62 |
+
#define DDB1 1
|
| 63 |
+
#define DDB2 2
|
| 64 |
+
#define DDB3 3
|
| 65 |
+
|
| 66 |
+
#define PORTB _SFR_IO8(0x02)
|
| 67 |
+
#define PORTB0 0
|
| 68 |
+
#define PORTB1 1
|
| 69 |
+
#define PORTB2 2
|
| 70 |
+
#define PORTB3 3
|
| 71 |
+
|
| 72 |
+
#define PUEB _SFR_IO8(0x03)
|
| 73 |
+
#define PUEB0 0
|
| 74 |
+
#define PUEB1 1
|
| 75 |
+
#define PUEB2 2
|
| 76 |
+
#define PUEB3 3
|
| 77 |
+
|
| 78 |
+
#define PORTCR _SFR_IO8(0x0C)
|
| 79 |
+
#define BBMB 1
|
| 80 |
+
|
| 81 |
+
#define PCMSK _SFR_IO8(0x10)
|
| 82 |
+
#define PCINT0 0
|
| 83 |
+
#define PCINT1 1
|
| 84 |
+
#define PCINT2 2
|
| 85 |
+
#define PCINT3 3
|
| 86 |
+
|
| 87 |
+
#define PCIFR _SFR_IO8(0x11)
|
| 88 |
+
#define PCIF0 0
|
| 89 |
+
|
| 90 |
+
#define PCICR _SFR_IO8(0x12)
|
| 91 |
+
#define PCIE0 0
|
| 92 |
+
|
| 93 |
+
#define EIMSK _SFR_IO8(0x13)
|
| 94 |
+
#define INT0 0
|
| 95 |
+
|
| 96 |
+
#define EIFR _SFR_IO8(0x14)
|
| 97 |
+
#define INTF0 0
|
| 98 |
+
|
| 99 |
+
#define EICRA _SFR_IO8(0x15)
|
| 100 |
+
#define ISC00 0
|
| 101 |
+
#define ISC01 1
|
| 102 |
+
|
| 103 |
+
#define DIDR0 _SFR_IO8(0x17)
|
| 104 |
+
#define AIN0D 0
|
| 105 |
+
#define AIN1D 1
|
| 106 |
+
|
| 107 |
+
#define ACSR _SFR_IO8(0x1F)
|
| 108 |
+
#define ACIS0 0
|
| 109 |
+
#define ACIS1 1
|
| 110 |
+
#define ACIC 2
|
| 111 |
+
#define ACIE 3
|
| 112 |
+
#define ACI 4
|
| 113 |
+
#define ACO 5
|
| 114 |
+
#define ACD 7
|
| 115 |
+
|
| 116 |
+
#define ICR0 _SFR_IO16(0x22)
|
| 117 |
+
|
| 118 |
+
#define ICR0L _SFR_IO8(0x22)
|
| 119 |
+
#define ICR0_0 0
|
| 120 |
+
#define ICR0_1 1
|
| 121 |
+
#define ICR0_2 2
|
| 122 |
+
#define ICR0_3 3
|
| 123 |
+
#define ICR0_4 4
|
| 124 |
+
#define ICR0_5 5
|
| 125 |
+
#define ICR0_6 6
|
| 126 |
+
#define ICR0_7 7
|
| 127 |
+
|
| 128 |
+
#define ICR0H _SFR_IO8(0x23)
|
| 129 |
+
#define ICR0_8 0
|
| 130 |
+
#define ICR0_9 1
|
| 131 |
+
#define ICR0_10 2
|
| 132 |
+
#define ICR0_11 3
|
| 133 |
+
#define ICR0_12 4
|
| 134 |
+
#define ICR0_13 5
|
| 135 |
+
#define ICR0_14 6
|
| 136 |
+
#define ICR0_15 7
|
| 137 |
+
|
| 138 |
+
#define OCR0B _SFR_IO16(0x24)
|
| 139 |
+
|
| 140 |
+
#define OCR0BL _SFR_IO8(0x24)
|
| 141 |
+
#define OCR0B0 0
|
| 142 |
+
#define OCR0B1 1
|
| 143 |
+
#define OCR0B2 2
|
| 144 |
+
#define OCR0B3 3
|
| 145 |
+
#define OCR0B4 4
|
| 146 |
+
#define OCR0B5 5
|
| 147 |
+
#define OCR0B6 6
|
| 148 |
+
#define OCR0B7 7
|
| 149 |
+
|
| 150 |
+
#define OCR0BH _SFR_IO8(0x25)
|
| 151 |
+
#define OCR0B8 0
|
| 152 |
+
#define OCR0B9 1
|
| 153 |
+
#define OCR0B10 2
|
| 154 |
+
#define OCR0B11 3
|
| 155 |
+
#define OCR0B12 4
|
| 156 |
+
#define OCR0B13 5
|
| 157 |
+
#define OCR0B14 6
|
| 158 |
+
#define OCR0B15 7
|
| 159 |
+
|
| 160 |
+
#define OCR0A _SFR_IO16(0x26)
|
| 161 |
+
|
| 162 |
+
#define OCR0AL _SFR_IO8(0x26)
|
| 163 |
+
#define OCR0A0 0
|
| 164 |
+
#define OCR0A1 1
|
| 165 |
+
#define OCR0A2 2
|
| 166 |
+
#define OCR0A3 3
|
| 167 |
+
#define OCR0A4 4
|
| 168 |
+
#define OCR0A5 5
|
| 169 |
+
#define OCR0A6 6
|
| 170 |
+
#define OCR0A7 7
|
| 171 |
+
|
| 172 |
+
#define OCR0AH _SFR_IO8(0x27)
|
| 173 |
+
#define OCR0A8 0
|
| 174 |
+
#define OCR0A9 1
|
| 175 |
+
#define OCR0A10 2
|
| 176 |
+
#define OCR0A11 3
|
| 177 |
+
#define OCR0A12 4
|
| 178 |
+
#define OCR0A13 5
|
| 179 |
+
#define OCR0A14 6
|
| 180 |
+
#define OCR0A15 7
|
| 181 |
+
|
| 182 |
+
#define TCNT0 _SFR_IO16(0x28)
|
| 183 |
+
|
| 184 |
+
#define TCNT0L _SFR_IO8(0x28)
|
| 185 |
+
#define TCNT0_0 0
|
| 186 |
+
#define TCNT0_1 1
|
| 187 |
+
#define TCNT0_2 2
|
| 188 |
+
#define TCNT0_3 3
|
| 189 |
+
#define TCNT0_4 4
|
| 190 |
+
#define TCNT0_5 5
|
| 191 |
+
#define TCNT0_6 6
|
| 192 |
+
#define TCNT0_7 7
|
| 193 |
+
|
| 194 |
+
#define TCNT0H _SFR_IO8(0x29)
|
| 195 |
+
#define TCNT0_8 0
|
| 196 |
+
#define TCNT0_9 1
|
| 197 |
+
#define TCNT0_10 2
|
| 198 |
+
#define TCNT0_11 3
|
| 199 |
+
#define TCNT0_12 4
|
| 200 |
+
#define TCNT0_13 5
|
| 201 |
+
#define TCNT0_14 6
|
| 202 |
+
#define TCNT0_15 7
|
| 203 |
+
|
| 204 |
+
#define TIFR0 _SFR_IO8(0x2A)
|
| 205 |
+
#define TOV0 0
|
| 206 |
+
#define OCF0A 1
|
| 207 |
+
#define OCF0B 2
|
| 208 |
+
#define ICF0 5
|
| 209 |
+
|
| 210 |
+
#define TIMSK0 _SFR_IO8(0x2B)
|
| 211 |
+
#define TOIE0 0
|
| 212 |
+
#define OCIE0A 1
|
| 213 |
+
#define OCIE0B 2
|
| 214 |
+
#define ICIE0 5
|
| 215 |
+
|
| 216 |
+
#define TCCR0C _SFR_IO8(0x2C)
|
| 217 |
+
#define FOC0B 6
|
| 218 |
+
#define FOC0A 7
|
| 219 |
+
|
| 220 |
+
#define TCCR0B _SFR_IO8(0x2D)
|
| 221 |
+
#define CS00 0
|
| 222 |
+
#define CS01 1
|
| 223 |
+
#define CS02 2
|
| 224 |
+
#define WGM02 3
|
| 225 |
+
#define WGM03 4
|
| 226 |
+
#define ICES0 6
|
| 227 |
+
#define ICNC0 7
|
| 228 |
+
|
| 229 |
+
#define TCCR0A _SFR_IO8(0x2E)
|
| 230 |
+
#define WGM00 0
|
| 231 |
+
#define WGM01 1
|
| 232 |
+
#define COM0B0 4
|
| 233 |
+
#define COM0B1 5
|
| 234 |
+
#define COM0A0 6
|
| 235 |
+
#define COM0A1 7
|
| 236 |
+
|
| 237 |
+
#define GTCCR _SFR_IO8(0x2F)
|
| 238 |
+
#define PSR 0
|
| 239 |
+
#define TSM 7
|
| 240 |
+
|
| 241 |
+
#define WDTCSR _SFR_IO8(0x31)
|
| 242 |
+
#define WDP0 0
|
| 243 |
+
#define WDP1 1
|
| 244 |
+
#define WDP2 2
|
| 245 |
+
#define WDE 3
|
| 246 |
+
#define WDP3 5
|
| 247 |
+
#define WDIE 6
|
| 248 |
+
#define WDIF 7
|
| 249 |
+
|
| 250 |
+
#define NVMCSR _SFR_IO8(0x32)
|
| 251 |
+
#define NVMBSY 7
|
| 252 |
+
|
| 253 |
+
#define NVMCMD _SFR_IO8(0x33)
|
| 254 |
+
#define NVMCMD0 0
|
| 255 |
+
#define NVMCMD1 1
|
| 256 |
+
#define NVMCMD2 2
|
| 257 |
+
#define NVMCMD3 3
|
| 258 |
+
#define NVMCMD4 4
|
| 259 |
+
#define NVMCMD5 5
|
| 260 |
+
|
| 261 |
+
#define VLMCSR _SFR_IO8(0x34)
|
| 262 |
+
#define VLM0 0
|
| 263 |
+
#define VLM1 1
|
| 264 |
+
#define VLM2 2
|
| 265 |
+
#define VLMIE 6
|
| 266 |
+
#define VLMF 7
|
| 267 |
+
|
| 268 |
+
#define PRR _SFR_IO8(0x35)
|
| 269 |
+
#define PRTIM0 0
|
| 270 |
+
#define PRADC 1
|
| 271 |
+
|
| 272 |
+
#define __AVR_HAVE_PRR ((1<<PRTIM0)|(1<<PRADC))
|
| 273 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 274 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 275 |
+
|
| 276 |
+
#define CLKPSR _SFR_IO8(0x36)
|
| 277 |
+
#define CLKPS0 0
|
| 278 |
+
#define CLKPS1 1
|
| 279 |
+
#define CLKPS2 2
|
| 280 |
+
#define CLKPS3 3
|
| 281 |
+
|
| 282 |
+
#define CLKMSR _SFR_IO8(0x37)
|
| 283 |
+
#define CLKMS0 0
|
| 284 |
+
#define CLKMS1 1
|
| 285 |
+
|
| 286 |
+
#define OSCCAL _SFR_IO8(0x39)
|
| 287 |
+
#define CAL0 0
|
| 288 |
+
#define CAL1 1
|
| 289 |
+
#define CAL2 2
|
| 290 |
+
#define CAL3 3
|
| 291 |
+
#define CAL4 4
|
| 292 |
+
#define CAL5 5
|
| 293 |
+
#define CAL6 6
|
| 294 |
+
#define CAL7 7
|
| 295 |
+
|
| 296 |
+
#define SMCR _SFR_IO8(0x3A)
|
| 297 |
+
#define SE 0
|
| 298 |
+
#define SM0 1
|
| 299 |
+
#define SM1 2
|
| 300 |
+
#define SM2 3
|
| 301 |
+
|
| 302 |
+
#define RSTFLR _SFR_IO8(0x3B)
|
| 303 |
+
#define PORF 0
|
| 304 |
+
#define EXTRF 1
|
| 305 |
+
#define WDRF 3
|
| 306 |
+
|
| 307 |
+
#define CCP _SFR_IO8(0x3C)
|
| 308 |
+
#define CCP0 0
|
| 309 |
+
#define CCP1 1
|
| 310 |
+
#define CCP2 2
|
| 311 |
+
#define CCP3 3
|
| 312 |
+
#define CCP4 4
|
| 313 |
+
#define CCP5 5
|
| 314 |
+
#define CCP6 6
|
| 315 |
+
#define CCP7 7
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
/* Interrupt vectors */
|
| 319 |
+
/* Vector 0 is the reset vector */
|
| 320 |
+
#define INT0_vect_num 1
|
| 321 |
+
#define INT0_vect _VECTOR(1) /* External Interrupt Request 0 */
|
| 322 |
+
#define PCINT0_vect_num 2
|
| 323 |
+
#define PCINT0_vect _VECTOR(2) /* Pin Change Interrupt Request 0 */
|
| 324 |
+
#define TIM0_CAPT_vect_num 3
|
| 325 |
+
#define TIM0_CAPT_vect _VECTOR(3) /* Timer/Counter0 Input Capture */
|
| 326 |
+
#define TIM0_OVF_vect_num 4
|
| 327 |
+
#define TIM0_OVF_vect _VECTOR(4) /* Timer/Counter0 Overflow */
|
| 328 |
+
#define TIM0_COMPA_vect_num 5
|
| 329 |
+
#define TIM0_COMPA_vect _VECTOR(5) /* Timer/Counter Compare Match A */
|
| 330 |
+
#define TIM0_COMPB_vect_num 6
|
| 331 |
+
#define TIM0_COMPB_vect _VECTOR(6) /* Timer/Counter Compare Match B */
|
| 332 |
+
#define ANA_COMP_vect_num 7
|
| 333 |
+
#define ANA_COMP_vect _VECTOR(7) /* Analog Comparator */
|
| 334 |
+
#define WDT_vect_num 8
|
| 335 |
+
#define WDT_vect _VECTOR(8) /* Watchdog Time-out */
|
| 336 |
+
#define VLM_vect_num 9
|
| 337 |
+
#define VLM_vect _VECTOR(9) /* Vcc Voltage Level Monitor */
|
| 338 |
+
|
| 339 |
+
#define _VECTOR_SIZE 2 /* Size of individual vector. */
|
| 340 |
+
#define _VECTORS_SIZE (10 * _VECTOR_SIZE)
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
/* Constants */
|
| 344 |
+
#define SPM_PAGESIZE (32)
|
| 345 |
+
#define RAMSTART (0x40)
|
| 346 |
+
#define RAMSIZE (32)
|
| 347 |
+
#define RAMEND (RAMSTART + RAMSIZE - 1)
|
| 348 |
+
#define XRAMSTART (NA)
|
| 349 |
+
#define XRAMSIZE (0)
|
| 350 |
+
#define XRAMEND (RAMEND)
|
| 351 |
+
#define E2END (0x0)
|
| 352 |
+
#define E2PAGESIZE (0)
|
| 353 |
+
#define FLASHEND (0x3FF)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
/* Fuses */
|
| 357 |
+
#define FUSE_MEMORY_SIZE 0
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
/* Lock Bits */
|
| 361 |
+
#define __LOCK_BITS_EXIST
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
/* Signature */
|
| 365 |
+
#define SIGNATURE_0 0x1E
|
| 366 |
+
#define SIGNATURE_1 0x90
|
| 367 |
+
#define SIGNATURE_2 0x08
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
/* Device Pin Definitions */
|
| 371 |
+
#define SPDATA_DDR DDRCINT
|
| 372 |
+
#define SPDATA_PORT PORTCINT
|
| 373 |
+
#define SPDATA_PIN PINCINT
|
| 374 |
+
#define SPDATA_BIT INT0
|
| 375 |
+
|
| 376 |
+
#define OC0A_DDR DDRCINT
|
| 377 |
+
#define OC0A_PORT PORTCINT
|
| 378 |
+
#define OC0A_PIN PINCINT
|
| 379 |
+
#define OC0A_BIT INT0
|
| 380 |
+
|
| 381 |
+
#define ADC0_DDR DDRCINT
|
| 382 |
+
#define ADC0_PORT PORTCINT
|
| 383 |
+
#define ADC0_PIN PINCINT
|
| 384 |
+
#define ADC0_BIT INT0
|
| 385 |
+
|
| 386 |
+
#define AIN0_DDR DDRCINT
|
| 387 |
+
#define AIN0_PORT PORTCINT
|
| 388 |
+
#define AIN0_PIN PINCINT
|
| 389 |
+
#define AIN0_BIT INT0
|
| 390 |
+
|
| 391 |
+
#define PB0_DDR DDRCINT
|
| 392 |
+
#define PB0_PORT PORTCINT
|
| 393 |
+
#define PB0_PIN PINCINT
|
| 394 |
+
#define PB0_BIT INT0
|
| 395 |
+
|
| 396 |
+
#define SPCLK_DDR DDRCINT
|
| 397 |
+
#define SPCLK_PORT PORTCINT
|
| 398 |
+
#define SPCLK_PIN PINCINT
|
| 399 |
+
#define SPCLK_BIT INT1
|
| 400 |
+
|
| 401 |
+
#define CLKI_DDR DDRCINT
|
| 402 |
+
#define CLKI_PORT PORTCINT
|
| 403 |
+
#define CLKI_PIN PINCINT
|
| 404 |
+
#define CLKI_BIT INT1
|
| 405 |
+
|
| 406 |
+
#define ICP0_DDR DDRCINT
|
| 407 |
+
#define ICP0_PORT PORTCINT
|
| 408 |
+
#define ICP0_PIN PINCINT
|
| 409 |
+
#define ICP0_BIT INT1
|
| 410 |
+
|
| 411 |
+
#define OC0B_DDR DDRCINT
|
| 412 |
+
#define OC0B_PORT PORTCINT
|
| 413 |
+
#define OC0B_PIN PINCINT
|
| 414 |
+
#define OC0B_BIT INT1
|
| 415 |
+
|
| 416 |
+
#define ADC1_DDR DDRCINT
|
| 417 |
+
#define ADC1_PORT PORTCINT
|
| 418 |
+
#define ADC1_PIN PINCINT
|
| 419 |
+
#define ADC1_BIT INT1
|
| 420 |
+
|
| 421 |
+
#define AIN1_DDR DDRCINT
|
| 422 |
+
#define AIN1_PORT PORTCINT
|
| 423 |
+
#define AIN1_PIN PINCINT
|
| 424 |
+
#define AIN1_BIT INT1
|
| 425 |
+
|
| 426 |
+
#define PB1_DDR DDRCINT
|
| 427 |
+
#define PB1_PORT PORTCINT
|
| 428 |
+
#define PB1_PIN PINCINT
|
| 429 |
+
#define PB1_BIT INT1
|
| 430 |
+
|
| 431 |
+
#define CLKO_DDR DDRT
|
| 432 |
+
#define CLKO_PORT PORTT
|
| 433 |
+
#define CLKO_PIN PINT
|
| 434 |
+
#define CLKO_BIT T0
|
| 435 |
+
|
| 436 |
+
#define PCINT2_DDR DDRT
|
| 437 |
+
#define PCINT2_PORT PORTT
|
| 438 |
+
#define PCINT2_PIN PINT
|
| 439 |
+
#define PCINT2_BIT T0
|
| 440 |
+
|
| 441 |
+
#define INT0_DDR DDRT
|
| 442 |
+
#define INT0_PORT PORTT
|
| 443 |
+
#define INT0_PIN PINT
|
| 444 |
+
#define INT0_BIT T0
|
| 445 |
+
|
| 446 |
+
#define ADC2_DDR DDRT
|
| 447 |
+
#define ADC2_PORT PORTT
|
| 448 |
+
#define ADC2_PIN PINT
|
| 449 |
+
#define ADC2_BIT T0
|
| 450 |
+
|
| 451 |
+
#define PB2_DDR DDRT
|
| 452 |
+
#define PB2_PORT PORTT
|
| 453 |
+
#define PB2_PIN PINT
|
| 454 |
+
#define PB2_BIT T0
|
| 455 |
+
|
| 456 |
+
#define PCINT3_DDR DDRRESET
|
| 457 |
+
#define PCINT3_PORT PORTRESET
|
| 458 |
+
#define PCINT3_PIN PINRESET
|
| 459 |
+
#define PCINT3_BIT RESET
|
| 460 |
+
|
| 461 |
+
#define ADC3_DDR DDRRESET
|
| 462 |
+
#define ADC3_PORT PORTRESET
|
| 463 |
+
#define ADC3_PIN PINRESET
|
| 464 |
+
#define ADC3_BIT RESET
|
| 465 |
+
|
| 466 |
+
#define PB3_DDR DDRRESET
|
| 467 |
+
#define PB3_PORT PORTRESET
|
| 468 |
+
#define PB3_PIN PINRESET
|
| 469 |
+
#define PB3_BIT RESET
|
| 470 |
+
|
| 471 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 472 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 473 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 474 |
+
#define SLEEP_MODE_STANDBY (0x04<<1)
|
| 475 |
+
|
| 476 |
+
#endif /* _AVR_ATtiny9_H_ */
|
| 477 |
+
|
hardware/tools/avr/avr/include/avr/iotnx4.h
ADDED
|
@@ -0,0 +1,482 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2005,2007 Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotnx4.h 2225 2011-03-02 16:27:26Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotnx4.h - definitions for ATtiny24, ATtiny44 and ATtiny84 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_IOTNX4_H_
|
| 36 |
+
#define _AVR_IOTNX4_H_ 1
|
| 37 |
+
|
| 38 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 39 |
+
|
| 40 |
+
#ifndef _AVR_IO_H_
|
| 41 |
+
# error "Include <avr/io.h> instead of this file."
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
#ifndef _AVR_IOXXX_H_
|
| 45 |
+
# define _AVR_IOXXX_H_ "iotnx4.h"
|
| 46 |
+
#else
|
| 47 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
/* I/O registers */
|
| 51 |
+
|
| 52 |
+
#define PRR _SFR_IO8 (0x00)
|
| 53 |
+
#define PRTIM1 3
|
| 54 |
+
#define PRTIM0 2
|
| 55 |
+
#define PRUSI 1
|
| 56 |
+
#define PRADC 0
|
| 57 |
+
|
| 58 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1))
|
| 59 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 60 |
+
#define __AVR_HAVE_PRR_PRUSI
|
| 61 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 62 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 63 |
+
|
| 64 |
+
#define DIDR0 _SFR_IO8(0x01)
|
| 65 |
+
#define ADC7D 7
|
| 66 |
+
#define ADC6D 6
|
| 67 |
+
#define ADC5D 5
|
| 68 |
+
#define ADC4D 4
|
| 69 |
+
#define ADC3D 3
|
| 70 |
+
#define ADC2D 2
|
| 71 |
+
#define ADC1D 1
|
| 72 |
+
#define ADC0D 0
|
| 73 |
+
|
| 74 |
+
/* Reserved [0x02] */
|
| 75 |
+
|
| 76 |
+
#define ADCSRB _SFR_IO8 (0x03)
|
| 77 |
+
#define BIN 7
|
| 78 |
+
#define ACME 6
|
| 79 |
+
#define ADLAR 4
|
| 80 |
+
#define ADTS2 2
|
| 81 |
+
#define ADTS1 1
|
| 82 |
+
#define ADTS0 0
|
| 83 |
+
|
| 84 |
+
#ifndef __ASSEMBLER__
|
| 85 |
+
#define ADC _SFR_IO16(0x04)
|
| 86 |
+
#endif
|
| 87 |
+
#define ADCW _SFR_IO16(0x04)
|
| 88 |
+
#define ADCL _SFR_IO8(0x04)
|
| 89 |
+
#define ADCH _SFR_IO8(0x05)
|
| 90 |
+
|
| 91 |
+
#define ADCSRA _SFR_IO8 (0x06)
|
| 92 |
+
#define ADEN 7
|
| 93 |
+
#define ADSC 6
|
| 94 |
+
#define ADATE 5
|
| 95 |
+
#define ADIF 4
|
| 96 |
+
#define ADIE 3
|
| 97 |
+
#define ADPS2 2
|
| 98 |
+
#define ADPS1 1
|
| 99 |
+
#define ADPS0 0
|
| 100 |
+
|
| 101 |
+
#define ADMUX _SFR_IO8(0x07)
|
| 102 |
+
#define REFS1 7
|
| 103 |
+
#define REFS0 6
|
| 104 |
+
#define MUX5 5
|
| 105 |
+
#define MUX4 4
|
| 106 |
+
#define MUX3 3
|
| 107 |
+
#define MUX2 2
|
| 108 |
+
#define MUX1 1
|
| 109 |
+
#define MUX0 0
|
| 110 |
+
|
| 111 |
+
#define ACSR _SFR_IO8(0x08)
|
| 112 |
+
#define ACD 7
|
| 113 |
+
#define ACBG 6
|
| 114 |
+
#define ACO 5
|
| 115 |
+
#define ACI 4
|
| 116 |
+
#define ACIE 3
|
| 117 |
+
#define ACIC 2
|
| 118 |
+
#define ACIS1 1
|
| 119 |
+
#define ACIS0 0
|
| 120 |
+
|
| 121 |
+
/* Reserved [0x09..0x0A] */
|
| 122 |
+
|
| 123 |
+
#define TIFR1 _SFR_IO8(0x0B)
|
| 124 |
+
#define ICF1 5
|
| 125 |
+
#define OCF1B 2
|
| 126 |
+
#define OCF1A 1
|
| 127 |
+
#define TOV1 0
|
| 128 |
+
|
| 129 |
+
#define TIMSK1 _SFR_IO8(0x0C)
|
| 130 |
+
#define ICIE1 5
|
| 131 |
+
#define OCIE1B 2
|
| 132 |
+
#define OCIE1A 1
|
| 133 |
+
#define TOIE1 0
|
| 134 |
+
|
| 135 |
+
#define USICR _SFR_IO8(0x0D)
|
| 136 |
+
#define USISIE 7
|
| 137 |
+
#define USIOIE 6
|
| 138 |
+
#define USIWM1 5
|
| 139 |
+
#define USIWM0 4
|
| 140 |
+
#define USICS1 3
|
| 141 |
+
#define USICS0 2
|
| 142 |
+
#define USICLK 1
|
| 143 |
+
#define USITC 0
|
| 144 |
+
|
| 145 |
+
#define USISR _SFR_IO8(0x0E)
|
| 146 |
+
#define USISIF 7
|
| 147 |
+
#define USIOIF 6
|
| 148 |
+
#define USIPF 5
|
| 149 |
+
#define USIDC 4
|
| 150 |
+
#define USICNT3 3
|
| 151 |
+
#define USICNT2 2
|
| 152 |
+
#define USICNT1 1
|
| 153 |
+
#define USICNT0 0
|
| 154 |
+
|
| 155 |
+
#define USIDR _SFR_IO8(0x0F)
|
| 156 |
+
|
| 157 |
+
#define USIBR _SFR_IO8(0x10)
|
| 158 |
+
|
| 159 |
+
/* Reserved [0x11] */
|
| 160 |
+
|
| 161 |
+
#define PCMSK0 _SFR_IO8(0x12)
|
| 162 |
+
#define PCINT7 7
|
| 163 |
+
#define PCINT6 6
|
| 164 |
+
#define PCINT5 5
|
| 165 |
+
#define PCINT4 4
|
| 166 |
+
#define PCINT3 3
|
| 167 |
+
#define PCINT2 2
|
| 168 |
+
#define PCINT1 1
|
| 169 |
+
#define PCINT0 0
|
| 170 |
+
|
| 171 |
+
#define GPIOR0 _SFR_IO8(0x13)
|
| 172 |
+
|
| 173 |
+
#define GPIOR1 _SFR_IO8(0x14)
|
| 174 |
+
|
| 175 |
+
#define GPIOR2 _SFR_IO8(0x15)
|
| 176 |
+
|
| 177 |
+
#define PINB _SFR_IO8(0x16)
|
| 178 |
+
#define PINB3 3
|
| 179 |
+
#define PINB2 2
|
| 180 |
+
#define PINB1 1
|
| 181 |
+
#define PINB0 0
|
| 182 |
+
|
| 183 |
+
#define DDRB _SFR_IO8(0x17)
|
| 184 |
+
#define DDB3 3
|
| 185 |
+
#define DDB2 2
|
| 186 |
+
#define DDB1 1
|
| 187 |
+
#define DDB0 0
|
| 188 |
+
|
| 189 |
+
#define PORTB _SFR_IO8(0x18)
|
| 190 |
+
#define PB3 3
|
| 191 |
+
#define PB2 2
|
| 192 |
+
#define PB1 1
|
| 193 |
+
#define PB0 0
|
| 194 |
+
|
| 195 |
+
#define PINA _SFR_IO8(0x19)
|
| 196 |
+
#define PINA7 7
|
| 197 |
+
#define PINA6 6
|
| 198 |
+
#define PINA5 5
|
| 199 |
+
#define PINA4 4
|
| 200 |
+
#define PINA3 3
|
| 201 |
+
#define PINA2 2
|
| 202 |
+
#define PINA1 1
|
| 203 |
+
#define PINA0 0
|
| 204 |
+
|
| 205 |
+
#define DDRA _SFR_IO8(0x1A)
|
| 206 |
+
#define DDA7 7
|
| 207 |
+
#define DDA6 6
|
| 208 |
+
#define DDA5 5
|
| 209 |
+
#define DDA4 4
|
| 210 |
+
#define DDA3 3
|
| 211 |
+
#define DDA2 2
|
| 212 |
+
#define DDA1 1
|
| 213 |
+
#define DDA0 0
|
| 214 |
+
|
| 215 |
+
#define PORTA _SFR_IO8(0x1B)
|
| 216 |
+
#define PA7 7
|
| 217 |
+
#define PA6 6
|
| 218 |
+
#define PA5 5
|
| 219 |
+
#define PA4 4
|
| 220 |
+
#define PA3 3
|
| 221 |
+
#define PA2 2
|
| 222 |
+
#define PA1 1
|
| 223 |
+
#define PA0 0
|
| 224 |
+
|
| 225 |
+
/* EEPROM Control Register EECR */
|
| 226 |
+
#define EECR _SFR_IO8(0x1C)
|
| 227 |
+
#define EEPM1 5
|
| 228 |
+
#define EEPM0 4
|
| 229 |
+
#define EERIE 3
|
| 230 |
+
#define EEMPE 2
|
| 231 |
+
#define EEPE 1
|
| 232 |
+
#define EERE 0
|
| 233 |
+
|
| 234 |
+
/* EEPROM Data Register */
|
| 235 |
+
#define EEDR _SFR_IO8(0x1D)
|
| 236 |
+
|
| 237 |
+
/* EEPROM Address Register */
|
| 238 |
+
#define EEAR _SFR_IO16(0x1E)
|
| 239 |
+
#define EEARL _SFR_IO8(0x1E)
|
| 240 |
+
#define EEARH _SFR_IO8(0x1F)
|
| 241 |
+
|
| 242 |
+
#define PCMSK1 _SFR_IO8(0x20)
|
| 243 |
+
#define PCINT11 3
|
| 244 |
+
#define PCINT10 2
|
| 245 |
+
#define PCINT9 1
|
| 246 |
+
#define PCINT8 0
|
| 247 |
+
|
| 248 |
+
#define WDTCSR _SFR_IO8(0x21)
|
| 249 |
+
#define WDIF 7
|
| 250 |
+
#define WDIE 6
|
| 251 |
+
#define WDP3 5
|
| 252 |
+
#define WDCE 4
|
| 253 |
+
#define WDE 3
|
| 254 |
+
#define WDP2 2
|
| 255 |
+
#define WDP1 1
|
| 256 |
+
#define WDP0 0
|
| 257 |
+
|
| 258 |
+
#define TCCR1C _SFR_IO8(0x22)
|
| 259 |
+
#define FOC1A 7
|
| 260 |
+
#define FOC1B 6
|
| 261 |
+
|
| 262 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 263 |
+
#define TSM 7
|
| 264 |
+
#define PSR10 0
|
| 265 |
+
|
| 266 |
+
#define ICR1 _SFR_IO16(0x24)
|
| 267 |
+
#define ICR1L _SFR_IO8(0x24)
|
| 268 |
+
#define ICR1H _SFR_IO8(0x25)
|
| 269 |
+
|
| 270 |
+
#define CLKPR _SFR_IO8(0x26)
|
| 271 |
+
#define CLKPCE 7
|
| 272 |
+
#define CLKPS3 3
|
| 273 |
+
#define CLKPS2 2
|
| 274 |
+
#define CLKPS1 1
|
| 275 |
+
#define CLKPS0 0
|
| 276 |
+
|
| 277 |
+
#define DWDR _SFR_IO8(0x27)
|
| 278 |
+
|
| 279 |
+
#define OCR1B _SFR_IO16(0x28)
|
| 280 |
+
#define OCR1BL _SFR_IO8(0x28)
|
| 281 |
+
#define OCR1BH _SFR_IO8(0x29)
|
| 282 |
+
|
| 283 |
+
#define OCR1A _SFR_IO16(0x2A)
|
| 284 |
+
#define OCR1AL _SFR_IO8(0x2A)
|
| 285 |
+
#define OCR1AH _SFR_IO8(0x2B)
|
| 286 |
+
|
| 287 |
+
/* keep misspelled names from avr-libc 1.4.[0..1] for compatibility */
|
| 288 |
+
#define OCRB1 _SFR_IO16(0x28)
|
| 289 |
+
#define OCRB1L _SFR_IO8(0x28)
|
| 290 |
+
#define OCRB1H _SFR_IO8(0x29)
|
| 291 |
+
|
| 292 |
+
#define OCRA1 _SFR_IO16(0x2A)
|
| 293 |
+
#define OCRA1L _SFR_IO8(0x2A)
|
| 294 |
+
#define OCRA1H _SFR_IO8(0x2B)
|
| 295 |
+
|
| 296 |
+
#define TCNT1 _SFR_IO16(0x2C)
|
| 297 |
+
#define TCNT1L _SFR_IO8(0x2C)
|
| 298 |
+
#define TCNT1H _SFR_IO8(0x2D)
|
| 299 |
+
|
| 300 |
+
#define TCCR1B _SFR_IO8(0x2E)
|
| 301 |
+
#define ICNC1 7
|
| 302 |
+
#define ICES1 6
|
| 303 |
+
#define WGM13 4
|
| 304 |
+
#define WGM12 3
|
| 305 |
+
#define CS12 2
|
| 306 |
+
#define CS11 1
|
| 307 |
+
#define CS10 0
|
| 308 |
+
|
| 309 |
+
#define TCCR1A _SFR_IO8(0x2F)
|
| 310 |
+
#define COM1A1 7
|
| 311 |
+
#define COM1A0 6
|
| 312 |
+
#define COM1B1 5
|
| 313 |
+
#define COM1B0 4
|
| 314 |
+
#define WGM11 1
|
| 315 |
+
#define WGM10 0
|
| 316 |
+
|
| 317 |
+
#define TCCR0A _SFR_IO8(0x30)
|
| 318 |
+
#define COM0A1 7
|
| 319 |
+
#define COM0A0 6
|
| 320 |
+
#define COM0B1 5
|
| 321 |
+
#define COM0B0 4
|
| 322 |
+
#define WGM01 1
|
| 323 |
+
#define WGM00 0
|
| 324 |
+
|
| 325 |
+
#define OSCCAL _SFR_IO8(0x31)
|
| 326 |
+
|
| 327 |
+
#define TCNT0 _SFR_IO8(0x32)
|
| 328 |
+
|
| 329 |
+
#define TCCR0B _SFR_IO8(0x33)
|
| 330 |
+
#define FOC0A 7
|
| 331 |
+
#define FOC0B 6
|
| 332 |
+
#define WGM02 3
|
| 333 |
+
#define CS02 2
|
| 334 |
+
#define CS01 1
|
| 335 |
+
#define CS00 0
|
| 336 |
+
|
| 337 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 338 |
+
#define WDRF 3
|
| 339 |
+
#define BORF 2
|
| 340 |
+
#define EXTRF 1
|
| 341 |
+
#define PORF 0
|
| 342 |
+
|
| 343 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 344 |
+
#define BODS 7
|
| 345 |
+
#define PUD 6
|
| 346 |
+
#define SE 5
|
| 347 |
+
#define SM1 4
|
| 348 |
+
#define SM0 3
|
| 349 |
+
#define BODSE 2
|
| 350 |
+
#define ISC01 1
|
| 351 |
+
#define ISC00 0
|
| 352 |
+
|
| 353 |
+
#define OCR0A _SFR_IO8(0x36)
|
| 354 |
+
|
| 355 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 356 |
+
#define RSIG 5
|
| 357 |
+
#define CTPB 4
|
| 358 |
+
#define RFLB 3
|
| 359 |
+
#define PGWRT 2
|
| 360 |
+
#define PGERS 1
|
| 361 |
+
#define SPMEN 0
|
| 362 |
+
|
| 363 |
+
#define TIFR0 _SFR_IO8(0x38)
|
| 364 |
+
#define OCF0B 2
|
| 365 |
+
#define OCF0A 1
|
| 366 |
+
#define TOV0 0
|
| 367 |
+
|
| 368 |
+
#define TIMSK0 _SFR_IO8(0x39)
|
| 369 |
+
#define OCIE0B 2
|
| 370 |
+
#define OCIE0A 1
|
| 371 |
+
#define TOIE0 0
|
| 372 |
+
|
| 373 |
+
#define GIFR _SFR_IO8(0x3A)
|
| 374 |
+
#define INTF0 6
|
| 375 |
+
#define PCIF1 5
|
| 376 |
+
#define PCIF0 4
|
| 377 |
+
|
| 378 |
+
#define GIMSK _SFR_IO8(0x3B)
|
| 379 |
+
#define INT0 6
|
| 380 |
+
#define PCIE1 5
|
| 381 |
+
#define PCIE0 4
|
| 382 |
+
|
| 383 |
+
#define OCR0B _SFR_IO8(0x3C)
|
| 384 |
+
|
| 385 |
+
/* 0x3D..0x3E SP [defined in <avr/io.h>] */
|
| 386 |
+
/* 0x3F SREG [defined in <avr/io.h>] */
|
| 387 |
+
|
| 388 |
+
///---
|
| 389 |
+
|
| 390 |
+
/* Interrupt vectors */
|
| 391 |
+
/* Interrupt vector 0 is the reset vector. */
|
| 392 |
+
/* External Interrupt Request 0 */
|
| 393 |
+
#define INT0_vect_num 1
|
| 394 |
+
#define INT0_vect _VECTOR(1)
|
| 395 |
+
#define EXT_INT0_vect_num 1
|
| 396 |
+
#define EXT_INT0_vect _VECTOR(1)
|
| 397 |
+
#define SIG_INTERRUPT0 _VECTOR(1)
|
| 398 |
+
|
| 399 |
+
/* Pin Change Interrupt Request 0 */
|
| 400 |
+
#define PCINT0_vect_num 2
|
| 401 |
+
#define PCINT0_vect _VECTOR(2)
|
| 402 |
+
#define SIG_PIN_CHANGE0 _VECTOR(2)
|
| 403 |
+
|
| 404 |
+
/* Pin Change Interrupt Request 1 */
|
| 405 |
+
#define PCINT1_vect_num 3
|
| 406 |
+
#define PCINT1_vect _VECTOR(3)
|
| 407 |
+
#define SIG_PIN_CHANGE1 _VECTOR(3)
|
| 408 |
+
|
| 409 |
+
/* Watchdog Time-out */
|
| 410 |
+
#define WDT_vect_num 4
|
| 411 |
+
#define WDT_vect _VECTOR(4)
|
| 412 |
+
#define WATCHDOG_vect_num 4
|
| 413 |
+
#define WATCHDOG_vect _VECTOR(4)
|
| 414 |
+
#define SIG_WATCHDOG_TIMEOUT _VECTOR(4)
|
| 415 |
+
|
| 416 |
+
/* Timer/Counter1 Capture Event */
|
| 417 |
+
#define TIMER1_CAPT_vect_num 5
|
| 418 |
+
#define TIMER1_CAPT_vect _VECTOR(5)
|
| 419 |
+
#define TIM1_CAPT_vect_num 5
|
| 420 |
+
#define TIM1_CAPT_vect _VECTOR(5)
|
| 421 |
+
#define SIG_INPUT_CAPTURE1 _VECTOR(5)
|
| 422 |
+
|
| 423 |
+
/* Timer/Counter1 Compare Match A */
|
| 424 |
+
#define TIM1_COMPA_vect_num 6
|
| 425 |
+
#define TIM1_COMPA_vect _VECTOR(6)
|
| 426 |
+
#define SIG_OUTPUT_COMPARE1A _VECTOR(6)
|
| 427 |
+
|
| 428 |
+
/* Timer/Counter1 Compare Match B */
|
| 429 |
+
#define TIM1_COMPB_vect_num 7
|
| 430 |
+
#define TIM1_COMPB_vect _VECTOR(7)
|
| 431 |
+
#define SIG_OUTPUT_COMPARE1B _VECTOR(7)
|
| 432 |
+
|
| 433 |
+
/* Timer/Counter1 Overflow */
|
| 434 |
+
#define TIM1_OVF_vect_num 8
|
| 435 |
+
#define TIM1_OVF_vect _VECTOR(8)
|
| 436 |
+
#define SIG_OVERFLOW1 _VECTOR(8)
|
| 437 |
+
|
| 438 |
+
/* Timer/Counter0 Compare Match A */
|
| 439 |
+
#define TIM0_COMPA_vect_num 9
|
| 440 |
+
#define TIM0_COMPA_vect _VECTOR(9)
|
| 441 |
+
#define SIG_OUTPUT_COMPARE0A _VECTOR(9)
|
| 442 |
+
|
| 443 |
+
/* Timer/Counter0 Compare Match B */
|
| 444 |
+
#define TIM0_COMPB_vect_num 10
|
| 445 |
+
#define TIM0_COMPB_vect _VECTOR(10)
|
| 446 |
+
#define SIG_OUTPUT_COMPARE0B _VECTOR(10)
|
| 447 |
+
|
| 448 |
+
/* Timer/Counter0 Overflow */
|
| 449 |
+
#define TIM0_OVF_vect_num 11
|
| 450 |
+
#define TIM0_OVF_vect _VECTOR(11)
|
| 451 |
+
#define SIG_OVERFLOW0 _VECTOR(11)
|
| 452 |
+
|
| 453 |
+
/* Analog Comparator */
|
| 454 |
+
#define ANA_COMP_vect_num 12
|
| 455 |
+
#define ANA_COMP_vect _VECTOR(12)
|
| 456 |
+
#define SIG_COMPARATOR _VECTOR(12)
|
| 457 |
+
|
| 458 |
+
/* ADC Conversion Complete */
|
| 459 |
+
#define ADC_vect_num 13
|
| 460 |
+
#define ADC_vect _VECTOR(13)
|
| 461 |
+
#define SIG_ADC _VECTOR(13)
|
| 462 |
+
|
| 463 |
+
/* EEPROM Ready */
|
| 464 |
+
#define EE_RDY_vect_num 14
|
| 465 |
+
#define EE_RDY_vect _VECTOR(14)
|
| 466 |
+
#define SIG_EEPROM_READY _VECTOR(14)
|
| 467 |
+
|
| 468 |
+
/* USI START */
|
| 469 |
+
#define USI_START_vect_num 15
|
| 470 |
+
#define USI_START_vect _VECTOR(15)
|
| 471 |
+
#define USI_STR_vect_num 15
|
| 472 |
+
#define USI_STR_vect _VECTOR(15)
|
| 473 |
+
#define SIG_USI_START _VECTOR(15)
|
| 474 |
+
|
| 475 |
+
/* USI Overflow */
|
| 476 |
+
#define USI_OVF_vect_num 16
|
| 477 |
+
#define USI_OVF_vect _VECTOR(16)
|
| 478 |
+
#define SIG_USI_OVERFLOW _VECTOR(16)
|
| 479 |
+
|
| 480 |
+
#define _VECTORS_SIZE 34
|
| 481 |
+
|
| 482 |
+
#endif /* _AVR_IOTNX4_H_ */
|
hardware/tools/avr/avr/include/avr/iotnx5.h
ADDED
|
@@ -0,0 +1,442 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2005,2007 Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotnx5.h 2269 2011-12-29 08:07:25Z joerg_wunsch $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotnx5.h - definitions for ATtiny25, ATtiny45 and ATtiny85 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_IOTNX5_H_
|
| 36 |
+
#define _AVR_IOTNX5_H_ 1
|
| 37 |
+
|
| 38 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 39 |
+
|
| 40 |
+
#ifndef _AVR_IO_H_
|
| 41 |
+
# error "Include <avr/io.h> instead of this file."
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
#ifndef _AVR_IOXXX_H_
|
| 45 |
+
# define _AVR_IOXXX_H_ "iotnx5.h"
|
| 46 |
+
#else
|
| 47 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
/* I/O registers */
|
| 51 |
+
|
| 52 |
+
/* Reserved [0x00..0x02] */
|
| 53 |
+
|
| 54 |
+
#define ADCSRB _SFR_IO8 (0x03)
|
| 55 |
+
#define BIN 7
|
| 56 |
+
#define ACME 6
|
| 57 |
+
#define IPR 5
|
| 58 |
+
#define ADTS2 2
|
| 59 |
+
#define ADTS1 1
|
| 60 |
+
#define ADTS0 0
|
| 61 |
+
|
| 62 |
+
#ifndef __ASSEMBLER__
|
| 63 |
+
#define ADC _SFR_IO16(0x04)
|
| 64 |
+
#endif
|
| 65 |
+
#define ADCW _SFR_IO16(0x04)
|
| 66 |
+
#define ADCL _SFR_IO8(0x04)
|
| 67 |
+
#define ADCH _SFR_IO8(0x05)
|
| 68 |
+
|
| 69 |
+
#define ADCSRA _SFR_IO8 (0x06)
|
| 70 |
+
#define ADEN 7
|
| 71 |
+
#define ADSC 6
|
| 72 |
+
#define ADATE 5
|
| 73 |
+
#define ADIF 4
|
| 74 |
+
#define ADIE 3
|
| 75 |
+
#define ADPS2 2
|
| 76 |
+
#define ADPS1 1
|
| 77 |
+
#define ADPS0 0
|
| 78 |
+
|
| 79 |
+
#define ADMUX _SFR_IO8(0x07)
|
| 80 |
+
#define REFS1 7
|
| 81 |
+
#define REFS0 6
|
| 82 |
+
#define ADLAR 5
|
| 83 |
+
#define REFS2 4
|
| 84 |
+
#define MUX3 3
|
| 85 |
+
#define MUX2 2
|
| 86 |
+
#define MUX1 1
|
| 87 |
+
#define MUX0 0
|
| 88 |
+
|
| 89 |
+
#define ACSR _SFR_IO8(0x08)
|
| 90 |
+
#define ACD 7
|
| 91 |
+
#define ACBG 6
|
| 92 |
+
#define ACO 5
|
| 93 |
+
#define ACI 4
|
| 94 |
+
#define ACIE 3
|
| 95 |
+
#define ACIS1 1
|
| 96 |
+
#define ACIS0 0
|
| 97 |
+
|
| 98 |
+
/* Reserved [0x09..0x0C] */
|
| 99 |
+
|
| 100 |
+
#define USICR _SFR_IO8(0x0D)
|
| 101 |
+
#define USISIE 7
|
| 102 |
+
#define USIOIE 6
|
| 103 |
+
#define USIWM1 5
|
| 104 |
+
#define USIWM0 4
|
| 105 |
+
#define USICS1 3
|
| 106 |
+
#define USICS0 2
|
| 107 |
+
#define USICLK 1
|
| 108 |
+
#define USITC 0
|
| 109 |
+
|
| 110 |
+
#define USISR _SFR_IO8(0x0E)
|
| 111 |
+
#define USISIF 7
|
| 112 |
+
#define USIOIF 6
|
| 113 |
+
#define USIPF 5
|
| 114 |
+
#define USIDC 4
|
| 115 |
+
#define USICNT3 3
|
| 116 |
+
#define USICNT2 2
|
| 117 |
+
#define USICNT1 1
|
| 118 |
+
#define USICNT0 0
|
| 119 |
+
|
| 120 |
+
#define USIDR _SFR_IO8(0x0F)
|
| 121 |
+
#define USIBR _SFR_IO8(0x10)
|
| 122 |
+
|
| 123 |
+
#define GPIOR0 _SFR_IO8(0x11)
|
| 124 |
+
#define GPIOR1 _SFR_IO8(0x12)
|
| 125 |
+
#define GPIOR2 _SFR_IO8(0x13)
|
| 126 |
+
|
| 127 |
+
#define DIDR0 _SFR_IO8(0x14)
|
| 128 |
+
#define ADC0D 5
|
| 129 |
+
#define ADC2D 4
|
| 130 |
+
#define ADC3D 3
|
| 131 |
+
#define ADC1D 2
|
| 132 |
+
#define AIN1D 1
|
| 133 |
+
#define AIN0D 0
|
| 134 |
+
|
| 135 |
+
#define PCMSK _SFR_IO8(0x15)
|
| 136 |
+
#define PCINT5 5
|
| 137 |
+
#define PCINT4 4
|
| 138 |
+
#define PCINT3 3
|
| 139 |
+
#define PCINT2 2
|
| 140 |
+
#define PCINT1 1
|
| 141 |
+
#define PCINT0 0
|
| 142 |
+
|
| 143 |
+
#define PINB _SFR_IO8(0x16)
|
| 144 |
+
#define PINB5 5
|
| 145 |
+
#define PINB4 4
|
| 146 |
+
#define PINB3 3
|
| 147 |
+
#define PINB2 2
|
| 148 |
+
#define PINB1 1
|
| 149 |
+
#define PINB0 0
|
| 150 |
+
|
| 151 |
+
#define DDRB _SFR_IO8(0x17)
|
| 152 |
+
#define DDB5 5
|
| 153 |
+
#define DDB4 4
|
| 154 |
+
#define DDB3 3
|
| 155 |
+
#define DDB2 2
|
| 156 |
+
#define DDB1 1
|
| 157 |
+
#define DDB0 0
|
| 158 |
+
|
| 159 |
+
#define PORTB _SFR_IO8(0x18)
|
| 160 |
+
#define PB5 5
|
| 161 |
+
#define PB4 4
|
| 162 |
+
#define PB3 3
|
| 163 |
+
#define PB2 2
|
| 164 |
+
#define PB1 1
|
| 165 |
+
#define PB0 0
|
| 166 |
+
|
| 167 |
+
/* Reserved [0x19..0x1B] */
|
| 168 |
+
|
| 169 |
+
/* EEPROM Control Register EECR */
|
| 170 |
+
#define EECR _SFR_IO8(0x1C)
|
| 171 |
+
#define EEPM1 5
|
| 172 |
+
#define EEPM0 4
|
| 173 |
+
#define EERIE 3
|
| 174 |
+
#define EEMPE 2
|
| 175 |
+
#define EEPE 1
|
| 176 |
+
#define EERE 0
|
| 177 |
+
|
| 178 |
+
/* EEPROM Data Register */
|
| 179 |
+
#define EEDR _SFR_IO8(0x1D)
|
| 180 |
+
|
| 181 |
+
/* EEPROM Address Register */
|
| 182 |
+
#define EEAR _SFR_IO16(0x1E)
|
| 183 |
+
#define EEARL _SFR_IO8(0x1E)
|
| 184 |
+
#define EEARH _SFR_IO8(0x1F)
|
| 185 |
+
|
| 186 |
+
#define PRR _SFR_IO8(0x20)
|
| 187 |
+
#define PRTIM1 3
|
| 188 |
+
#define PRTIM0 2
|
| 189 |
+
#define PRUSI 1
|
| 190 |
+
#define PRADC 0
|
| 191 |
+
|
| 192 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1))
|
| 193 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 194 |
+
#define __AVR_HAVE_PRR_PRUSI
|
| 195 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 196 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 197 |
+
|
| 198 |
+
#define WDTCR _SFR_IO8(0x21)
|
| 199 |
+
#define WDIF 7
|
| 200 |
+
#define WDIE 6
|
| 201 |
+
#define WDP3 5
|
| 202 |
+
#define WDCE 4
|
| 203 |
+
#define WDE 3
|
| 204 |
+
#define WDP2 2
|
| 205 |
+
#define WDP1 1
|
| 206 |
+
#define WDP0 0
|
| 207 |
+
|
| 208 |
+
#define DWDR _SFR_IO8(0x22)
|
| 209 |
+
|
| 210 |
+
#define DTPS1 _SFR_IO8(0x23)
|
| 211 |
+
#define DTPS11 1
|
| 212 |
+
#define DTPS10 0
|
| 213 |
+
|
| 214 |
+
#define DT1B _SFR_IO8(0x24)
|
| 215 |
+
#define DT1BH3 7
|
| 216 |
+
#define DT1BH2 6
|
| 217 |
+
#define DT1BH1 5
|
| 218 |
+
#define DT1BH0 4
|
| 219 |
+
#define DT1BL3 3
|
| 220 |
+
#define DT1BL2 2
|
| 221 |
+
#define DT1BL1 1
|
| 222 |
+
#define DT1BL0 0
|
| 223 |
+
|
| 224 |
+
#define DT1A _SFR_IO8(0x25)
|
| 225 |
+
#define DT1AH3 7
|
| 226 |
+
#define DT1AH2 6
|
| 227 |
+
#define DT1AH1 5
|
| 228 |
+
#define DT1AH0 4
|
| 229 |
+
#define DT1AL3 3
|
| 230 |
+
#define DT1AL2 2
|
| 231 |
+
#define DT1AL1 1
|
| 232 |
+
#define DT1AL0 0
|
| 233 |
+
|
| 234 |
+
#define CLKPR _SFR_IO8(0x26)
|
| 235 |
+
#define CLKPCE 7
|
| 236 |
+
#define CLKPS3 3
|
| 237 |
+
#define CLKPS2 2
|
| 238 |
+
#define CLKPS1 1
|
| 239 |
+
#define CLKPS0 0
|
| 240 |
+
|
| 241 |
+
#define PLLCSR _SFR_IO8(0x27)
|
| 242 |
+
#define LSM 7
|
| 243 |
+
#define PCKE 2
|
| 244 |
+
#define PLLE 1
|
| 245 |
+
#define PLOCK 0
|
| 246 |
+
|
| 247 |
+
#define OCR0B _SFR_IO8(0x28)
|
| 248 |
+
|
| 249 |
+
#define OCR0A _SFR_IO8(0x29)
|
| 250 |
+
|
| 251 |
+
#define TCCR0A _SFR_IO8(0x2A)
|
| 252 |
+
#define COM0A1 7
|
| 253 |
+
#define COM0A0 6
|
| 254 |
+
#define COM0B1 5
|
| 255 |
+
#define COM0B0 4
|
| 256 |
+
#define WGM01 1
|
| 257 |
+
#define WGM00 0
|
| 258 |
+
|
| 259 |
+
#define OCR1B _SFR_IO8(0x2B)
|
| 260 |
+
|
| 261 |
+
#define GTCCR _SFR_IO8(0x2C)
|
| 262 |
+
#define TSM 7
|
| 263 |
+
#define PWM1B 6
|
| 264 |
+
#define COM1B1 5
|
| 265 |
+
#define COM1B0 4
|
| 266 |
+
#define FOC1B 3
|
| 267 |
+
#define FOC1A 2
|
| 268 |
+
#define PSR1 1
|
| 269 |
+
#define PSR0 0
|
| 270 |
+
|
| 271 |
+
#define OCR1C _SFR_IO8(0x2D)
|
| 272 |
+
|
| 273 |
+
#define OCR1A _SFR_IO8(0x2E)
|
| 274 |
+
|
| 275 |
+
#define TCNT1 _SFR_IO8(0x2F)
|
| 276 |
+
|
| 277 |
+
#define TCCR1 _SFR_IO8(0x30)
|
| 278 |
+
#define CTC1 7
|
| 279 |
+
#define PWM1A 6
|
| 280 |
+
#define COM1A1 5
|
| 281 |
+
#define COM1A0 4
|
| 282 |
+
#define CS13 3
|
| 283 |
+
#define CS12 2
|
| 284 |
+
#define CS11 1
|
| 285 |
+
#define CS10 0
|
| 286 |
+
|
| 287 |
+
#define OSCCAL _SFR_IO8(0x31)
|
| 288 |
+
|
| 289 |
+
#define TCNT0 _SFR_IO8(0x32)
|
| 290 |
+
|
| 291 |
+
#define TCCR0B _SFR_IO8(0x33)
|
| 292 |
+
#define FOC0A 7
|
| 293 |
+
#define FOC0B 6
|
| 294 |
+
#define WGM02 3
|
| 295 |
+
#define CS02 2
|
| 296 |
+
#define CS01 1
|
| 297 |
+
#define CS00 0
|
| 298 |
+
|
| 299 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 300 |
+
#define WDRF 3
|
| 301 |
+
#define BORF 2
|
| 302 |
+
#define EXTRF 1
|
| 303 |
+
#define PORF 0
|
| 304 |
+
|
| 305 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 306 |
+
#define BODS 7
|
| 307 |
+
#define PUD 6
|
| 308 |
+
#define SE 5
|
| 309 |
+
#define SM1 4
|
| 310 |
+
#define SM0 3
|
| 311 |
+
#define BODSE 2
|
| 312 |
+
#define ISC01 1
|
| 313 |
+
#define ISC00 0
|
| 314 |
+
|
| 315 |
+
/* Reserved [0x36] */
|
| 316 |
+
|
| 317 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 318 |
+
#define RSIG 5
|
| 319 |
+
#define CTPB 4
|
| 320 |
+
#define RFLB 3
|
| 321 |
+
#define PGWRT 2
|
| 322 |
+
#define PGERS 1
|
| 323 |
+
#define SPMEN 0
|
| 324 |
+
|
| 325 |
+
#define TIFR _SFR_IO8(0x38)
|
| 326 |
+
#define OCF1A 6
|
| 327 |
+
#define OCF1B 5
|
| 328 |
+
#define OCF0A 4
|
| 329 |
+
#define OCF0B 3
|
| 330 |
+
#define TOV1 2
|
| 331 |
+
#define TOV0 1
|
| 332 |
+
|
| 333 |
+
#define TIMSK _SFR_IO8(0x39)
|
| 334 |
+
#define OCIE1A 6
|
| 335 |
+
#define OCIE1B 5
|
| 336 |
+
#define OCIE0A 4
|
| 337 |
+
#define OCIE0B 3
|
| 338 |
+
#define TOIE1 2
|
| 339 |
+
#define TOIE0 1
|
| 340 |
+
|
| 341 |
+
#define GIFR _SFR_IO8(0x3A)
|
| 342 |
+
#define INTF0 6
|
| 343 |
+
#define PCIF 5
|
| 344 |
+
|
| 345 |
+
#define GIMSK _SFR_IO8(0x3B)
|
| 346 |
+
#define INT0 6
|
| 347 |
+
#define PCIE 5
|
| 348 |
+
|
| 349 |
+
/* Reserved [0x3C] */
|
| 350 |
+
|
| 351 |
+
/* 0x3D..0x3E SP [defined in <avr/io.h>] */
|
| 352 |
+
/* 0x3F SREG [defined in <avr/io.h>] */
|
| 353 |
+
|
| 354 |
+
///---
|
| 355 |
+
|
| 356 |
+
/* Interrupt vectors */
|
| 357 |
+
/* Interrupt vector 0 is the reset vector. */
|
| 358 |
+
/* External Interrupt 0 */
|
| 359 |
+
#define INT0_vect_num 1
|
| 360 |
+
#define INT0_vect _VECTOR(1)
|
| 361 |
+
#define SIG_INTERRUPT0 _VECTOR(1)
|
| 362 |
+
|
| 363 |
+
/* Pin change Interrupt Request 0 */
|
| 364 |
+
#define PCINT0_vect_num 2
|
| 365 |
+
#define PCINT0_vect _VECTOR(2)
|
| 366 |
+
#define SIG_PIN_CHANGE _VECTOR(2)
|
| 367 |
+
|
| 368 |
+
/* Timer/Counter1 Compare Match 1A */
|
| 369 |
+
#define TIM1_COMPA_vect_num 3
|
| 370 |
+
#define TIM1_COMPA_vect _VECTOR(3)
|
| 371 |
+
#define TIMER1_COMPA_vect_num 3
|
| 372 |
+
#define TIMER1_COMPA_vect _VECTOR(3)
|
| 373 |
+
#define SIG_OUTPUT_COMPARE1A _VECTOR(3)
|
| 374 |
+
|
| 375 |
+
/* Timer/Counter1 Overflow */
|
| 376 |
+
#define TIM1_OVF_vect_num 4
|
| 377 |
+
#define TIM1_OVF_vect _VECTOR(4)
|
| 378 |
+
#define TIMER1_OVF_vect_num 4
|
| 379 |
+
#define TIMER1_OVF_vect _VECTOR(4)
|
| 380 |
+
#define SIG_OVERFLOW1 _VECTOR(4)
|
| 381 |
+
|
| 382 |
+
/* Timer/Counter0 Overflow */
|
| 383 |
+
#define TIM0_OVF_vect_num 5
|
| 384 |
+
#define TIM0_OVF_vect _VECTOR(5)
|
| 385 |
+
#define TIMER0_OVF_vect_num 5
|
| 386 |
+
#define TIMER0_OVF_vect _VECTOR(5)
|
| 387 |
+
#define SIG_OVERFLOW0 _VECTOR(5)
|
| 388 |
+
|
| 389 |
+
/* EEPROM Ready */
|
| 390 |
+
#define EE_RDY_vect_num 6
|
| 391 |
+
#define EE_RDY_vect _VECTOR(6)
|
| 392 |
+
#define SIG_EEPROM_READY _VECTOR(6)
|
| 393 |
+
|
| 394 |
+
/* Analog comparator */
|
| 395 |
+
#define ANA_COMP_vect_num 7
|
| 396 |
+
#define ANA_COMP_vect _VECTOR(7)
|
| 397 |
+
#define SIG_COMPARATOR _VECTOR(7)
|
| 398 |
+
|
| 399 |
+
/* ADC Conversion ready */
|
| 400 |
+
#define ADC_vect_num 8
|
| 401 |
+
#define ADC_vect _VECTOR(8)
|
| 402 |
+
#define SIG_ADC _VECTOR(8)
|
| 403 |
+
|
| 404 |
+
/* Timer/Counter1 Compare Match B */
|
| 405 |
+
#define TIM1_COMPB_vect_num 9
|
| 406 |
+
#define TIM1_COMPB_vect _VECTOR(9)
|
| 407 |
+
#define TIMER1_COMPB_vect_num 9
|
| 408 |
+
#define TIMER1_COMPB_vect _VECTOR(9)
|
| 409 |
+
#define SIG_OUTPUT_COMPARE1B _VECTOR(9)
|
| 410 |
+
|
| 411 |
+
/* Timer/Counter0 Compare Match A */
|
| 412 |
+
#define TIM0_COMPA_vect_num 10
|
| 413 |
+
#define TIM0_COMPA_vect _VECTOR(10)
|
| 414 |
+
#define TIMER0_COMPA_vect_num 10
|
| 415 |
+
#define TIMER0_COMPA_vect _VECTOR(10)
|
| 416 |
+
#define SIG_OUTPUT_COMPARE0A _VECTOR(10)
|
| 417 |
+
|
| 418 |
+
/* Timer/Counter0 Compare Match B */
|
| 419 |
+
#define TIM0_COMPB_vect_num 11
|
| 420 |
+
#define TIM0_COMPB_vect _VECTOR(11)
|
| 421 |
+
#define TIMER0_COMPB_vect_num 11
|
| 422 |
+
#define TIMER0_COMPB_vect _VECTOR(11)
|
| 423 |
+
#define SIG_OUTPUT_COMPARE0B _VECTOR(11)
|
| 424 |
+
|
| 425 |
+
/* Watchdog Time-out */
|
| 426 |
+
#define WDT_vect_num 12
|
| 427 |
+
#define WDT_vect _VECTOR(12)
|
| 428 |
+
#define SIG_WATCHDOG_TIMEOUT _VECTOR(12)
|
| 429 |
+
|
| 430 |
+
/* USI START */
|
| 431 |
+
#define USI_START_vect_num 13
|
| 432 |
+
#define USI_START_vect _VECTOR(13)
|
| 433 |
+
#define SIG_USI_START _VECTOR(13)
|
| 434 |
+
|
| 435 |
+
/* USI Overflow */
|
| 436 |
+
#define USI_OVF_vect_num 14
|
| 437 |
+
#define USI_OVF_vect _VECTOR(14)
|
| 438 |
+
#define SIG_USI_OVERFLOW _VECTOR(14)
|
| 439 |
+
|
| 440 |
+
#define _VECTORS_SIZE 30
|
| 441 |
+
|
| 442 |
+
#endif /* _AVR_IOTNX5_H_ */
|
hardware/tools/avr/avr/include/avr/iotnx61.h
ADDED
|
@@ -0,0 +1,541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006, 2007 Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iotnx61.h 2247 2011-05-23 19:39:56Z joerg_wunsch $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iotnx61.h - definitions for ATtiny261, ATtiny461 and ATtiny861 */
|
| 34 |
+
|
| 35 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 36 |
+
|
| 37 |
+
#ifndef _AVR_IO_H_
|
| 38 |
+
# error "Include <avr/io.h> instead of this file."
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IOXXX_H_
|
| 42 |
+
# define _AVR_IOXXX_H_ "iotnx61.h"
|
| 43 |
+
#else
|
| 44 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#ifndef _AVR_IOTNx61_H_
|
| 48 |
+
#define _AVR_IOTNx61_H_ 1
|
| 49 |
+
|
| 50 |
+
/* Registers and associated bit numbers */
|
| 51 |
+
|
| 52 |
+
#define TCCR1E _SFR_IO8(0x00)
|
| 53 |
+
#define OC1OE0 0
|
| 54 |
+
#define OC1OE1 1
|
| 55 |
+
#define OC1OE2 2
|
| 56 |
+
#define OC1OE3 3
|
| 57 |
+
#define OC1OE4 4
|
| 58 |
+
#define OC1OE5 5
|
| 59 |
+
|
| 60 |
+
#define DIDR0 _SFR_IO8(0x01)
|
| 61 |
+
#define ADC0D 0
|
| 62 |
+
#define ADC1D 1
|
| 63 |
+
#define ADC2D 2
|
| 64 |
+
#define AREFD 3
|
| 65 |
+
#define ADC3D 4
|
| 66 |
+
#define ADC4D 5
|
| 67 |
+
#define ADC5D 6
|
| 68 |
+
#define ADC6D 7
|
| 69 |
+
|
| 70 |
+
#define DIDR1 _SFR_IO8(0x02)
|
| 71 |
+
#define ADC7D 4
|
| 72 |
+
#define ADC8D 5
|
| 73 |
+
#define ADC9D 6
|
| 74 |
+
#define ADC10D 7
|
| 75 |
+
|
| 76 |
+
#define ADCSRB _SFR_IO8(0x03)
|
| 77 |
+
#define ADTS0 0
|
| 78 |
+
#define ADTS1 1
|
| 79 |
+
#define ADTS2 2
|
| 80 |
+
#define MUX5 3
|
| 81 |
+
#define REFS2 4
|
| 82 |
+
#define IRP 5
|
| 83 |
+
#define GSEL 6
|
| 84 |
+
#define BIN 7
|
| 85 |
+
|
| 86 |
+
#define ADCW _SFR_IO16(0x04)
|
| 87 |
+
#ifndef __ASSEMBLER__
|
| 88 |
+
#define ADC _SFR_IO16(0x04)
|
| 89 |
+
#endif
|
| 90 |
+
|
| 91 |
+
#define ADCL _SFR_IO8(0x04)
|
| 92 |
+
#define ADCH _SFR_IO8(0x05)
|
| 93 |
+
|
| 94 |
+
#define ADCSRA _SFR_IO8(0x06)
|
| 95 |
+
#define ADPS0 0
|
| 96 |
+
#define ADPS1 1
|
| 97 |
+
#define ADPS2 2
|
| 98 |
+
#define ADIE 3
|
| 99 |
+
#define ADIF 4
|
| 100 |
+
#define ADATE 5
|
| 101 |
+
#define ADSC 6
|
| 102 |
+
#define ADEN 7
|
| 103 |
+
|
| 104 |
+
#define ADMUX _SFR_IO8(0x07)
|
| 105 |
+
#define MUX0 0
|
| 106 |
+
#define MUX1 1
|
| 107 |
+
#define MUX2 2
|
| 108 |
+
#define MUX3 3
|
| 109 |
+
#define MUX4 4
|
| 110 |
+
#define ADLAR 5
|
| 111 |
+
#define REFS0 6
|
| 112 |
+
#define REFS1 7
|
| 113 |
+
|
| 114 |
+
#define ACSRA _SFR_IO8(0x08)
|
| 115 |
+
#define ACIS0 0
|
| 116 |
+
#define ACIS1 1
|
| 117 |
+
#define ACME 2
|
| 118 |
+
#define ACIE 3
|
| 119 |
+
#define ACI 4
|
| 120 |
+
#define ACO 5
|
| 121 |
+
#define ACBG 6
|
| 122 |
+
#define ACD 7
|
| 123 |
+
|
| 124 |
+
#define ACSRB _SFR_IO8(0x09)
|
| 125 |
+
#define ACM0 0
|
| 126 |
+
#define ACM1 1
|
| 127 |
+
#define ACM2 2
|
| 128 |
+
#define HLEV 6
|
| 129 |
+
#define HSEL 7
|
| 130 |
+
|
| 131 |
+
#define GPIOR0 _SFR_IO8(0x0A)
|
| 132 |
+
|
| 133 |
+
#define GPIOR1 _SFR_IO8(0x0B)
|
| 134 |
+
|
| 135 |
+
#define GPIOR2 _SFR_IO8(0x0C)
|
| 136 |
+
|
| 137 |
+
#define USICR _SFR_IO8(0x0D)
|
| 138 |
+
#define USITC 0
|
| 139 |
+
#define USICLK 1
|
| 140 |
+
#define USICS0 2
|
| 141 |
+
#define USICS1 3
|
| 142 |
+
#define USIWM0 4
|
| 143 |
+
#define USIWM1 5
|
| 144 |
+
#define USIOIE 6
|
| 145 |
+
#define USISIE 7
|
| 146 |
+
|
| 147 |
+
#define USISR _SFR_IO8(0x0E)
|
| 148 |
+
#define USICNT0 0
|
| 149 |
+
#define USICNT1 1
|
| 150 |
+
#define USICNT2 2
|
| 151 |
+
#define USICNT3 3
|
| 152 |
+
#define USIDC 4
|
| 153 |
+
#define USIPF 5
|
| 154 |
+
#define USIOIF 6
|
| 155 |
+
#define USISIF 7
|
| 156 |
+
|
| 157 |
+
#define USIDR _SFR_IO8(0x0F)
|
| 158 |
+
|
| 159 |
+
#define USIBR _SFR_IO8(0x10)
|
| 160 |
+
|
| 161 |
+
#define USIPP _SFR_IO8(0x11)
|
| 162 |
+
#define USIPOS 0
|
| 163 |
+
|
| 164 |
+
#define OCR0B _SFR_IO8(0x12)
|
| 165 |
+
|
| 166 |
+
#define OCR0A _SFR_IO8(0x13)
|
| 167 |
+
|
| 168 |
+
#define TCNT0H _SFR_IO8(0x14)
|
| 169 |
+
|
| 170 |
+
#define TCCR0A _SFR_IO8(0x15)
|
| 171 |
+
#define WGM00 0 /* up to at least datasheet rev. B */
|
| 172 |
+
#define CTC0 0 /* newer revisions; change not mentioned
|
| 173 |
+
* in revision history */
|
| 174 |
+
#define ACIC0 3
|
| 175 |
+
#define ICES0 4
|
| 176 |
+
#define ICNC0 5
|
| 177 |
+
#define ICEN0 6
|
| 178 |
+
#define TCW0 7
|
| 179 |
+
|
| 180 |
+
#define PINB _SFR_IO8(0x16)
|
| 181 |
+
#define PINB0 0
|
| 182 |
+
#define PINB1 1
|
| 183 |
+
#define PINB2 2
|
| 184 |
+
#define PINB3 3
|
| 185 |
+
#define PINB4 4
|
| 186 |
+
#define PINB5 5
|
| 187 |
+
#define PINB6 6
|
| 188 |
+
#define PINB7 7
|
| 189 |
+
|
| 190 |
+
#define DDRB _SFR_IO8(0x17)
|
| 191 |
+
#define DDB0 0
|
| 192 |
+
#define DDB1 1
|
| 193 |
+
#define DDB2 2
|
| 194 |
+
#define DDB3 3
|
| 195 |
+
#define DDB4 4
|
| 196 |
+
#define DDB5 5
|
| 197 |
+
#define DDB6 6
|
| 198 |
+
#define DDB7 7
|
| 199 |
+
|
| 200 |
+
#define PORTB _SFR_IO8(0x18)
|
| 201 |
+
#define PB0 0
|
| 202 |
+
#define PB1 1
|
| 203 |
+
#define PB2 2
|
| 204 |
+
#define PB3 3
|
| 205 |
+
#define PB4 4
|
| 206 |
+
#define PB5 5
|
| 207 |
+
#define PB6 6
|
| 208 |
+
#define PB7 7
|
| 209 |
+
|
| 210 |
+
#define PINA _SFR_IO8(0x19)
|
| 211 |
+
#define PINA0 0
|
| 212 |
+
#define PINA1 1
|
| 213 |
+
#define PINA2 2
|
| 214 |
+
#define PINA3 3
|
| 215 |
+
#define PINA4 4
|
| 216 |
+
#define PINA5 5
|
| 217 |
+
#define PINA6 6
|
| 218 |
+
#define PINA7 7
|
| 219 |
+
|
| 220 |
+
#define DDRA _SFR_IO8(0x1A)
|
| 221 |
+
#define DDA0 0
|
| 222 |
+
#define DDA1 1
|
| 223 |
+
#define DDA2 2
|
| 224 |
+
#define DDA3 3
|
| 225 |
+
#define DDA4 4
|
| 226 |
+
#define DDA5 5
|
| 227 |
+
#define DDA6 6
|
| 228 |
+
#define DDA7 7
|
| 229 |
+
|
| 230 |
+
#define PORTA _SFR_IO8(0x1B)
|
| 231 |
+
#define PA0 0
|
| 232 |
+
#define PA1 1
|
| 233 |
+
#define PA2 2
|
| 234 |
+
#define PA3 3
|
| 235 |
+
#define PA4 4
|
| 236 |
+
#define PA5 5
|
| 237 |
+
#define PA6 6
|
| 238 |
+
#define PA7 7
|
| 239 |
+
|
| 240 |
+
/* EEPROM Control Register */
|
| 241 |
+
#define EECR _SFR_IO8(0x1C)
|
| 242 |
+
#define EERE 0
|
| 243 |
+
#define EEPE 1
|
| 244 |
+
#define EEMPE 2
|
| 245 |
+
#define EERIE 3
|
| 246 |
+
#define EEPM0 4
|
| 247 |
+
#define EEPM1 5
|
| 248 |
+
|
| 249 |
+
/* EEPROM Data Register */
|
| 250 |
+
#define EEDR _SFR_IO8(0x1D)
|
| 251 |
+
|
| 252 |
+
/* EEPROM Address Register */
|
| 253 |
+
#define EEAR _SFR_IO16(0x1E)
|
| 254 |
+
#define EEARL _SFR_IO8(0x1E)
|
| 255 |
+
#define EEARH _SFR_IO8(0x1F)
|
| 256 |
+
|
| 257 |
+
#define DWDR _SFR_IO8(0x20)
|
| 258 |
+
|
| 259 |
+
#define WDTCR _SFR_IO8(0x21)
|
| 260 |
+
#define WDP0 0
|
| 261 |
+
#define WDP1 1
|
| 262 |
+
#define WDP2 2
|
| 263 |
+
#define WDE 3
|
| 264 |
+
#define WDCE 4
|
| 265 |
+
#define WDP3 5
|
| 266 |
+
#define WDIE 6
|
| 267 |
+
#define WDIF 7
|
| 268 |
+
|
| 269 |
+
#define PCMSK1 _SFR_IO8(0x22)
|
| 270 |
+
#define PCINT8 0
|
| 271 |
+
#define PCINT9 1
|
| 272 |
+
#define PCINT10 2
|
| 273 |
+
#define PCINT11 3
|
| 274 |
+
#define PCINT12 4
|
| 275 |
+
#define PCINT13 5
|
| 276 |
+
#define PCINT14 6
|
| 277 |
+
#define PCINT15 7
|
| 278 |
+
|
| 279 |
+
#define PCMSK0 _SFR_IO8(0x23)
|
| 280 |
+
#define PCINT0 0
|
| 281 |
+
#define PCINT1 1
|
| 282 |
+
#define PCINT2 2
|
| 283 |
+
#define PCINT3 3
|
| 284 |
+
#define PCINT4 4
|
| 285 |
+
#define PCINT5 5
|
| 286 |
+
#define PCINT6 6
|
| 287 |
+
#define PCINT7 7
|
| 288 |
+
|
| 289 |
+
#define DT1 _SFR_IO8(0x24)
|
| 290 |
+
#define DT1L0 0
|
| 291 |
+
#define DT1L1 1
|
| 292 |
+
#define DT1L2 2
|
| 293 |
+
#define DT1L3 3
|
| 294 |
+
#define DT1H0 4
|
| 295 |
+
#define DT1H1 5
|
| 296 |
+
#define DT1H2 6
|
| 297 |
+
#define DT1H3 7
|
| 298 |
+
|
| 299 |
+
#define TC1H _SFR_IO8(0x25)
|
| 300 |
+
#define TC18 0
|
| 301 |
+
#define TC19 1
|
| 302 |
+
|
| 303 |
+
#define TCCR1D _SFR_IO8(0x26)
|
| 304 |
+
#define WGM10 0
|
| 305 |
+
#define WGM11 1
|
| 306 |
+
#define FPF1 2
|
| 307 |
+
#define FPAC1 3
|
| 308 |
+
#define FPES1 4
|
| 309 |
+
#define FPNC1 5
|
| 310 |
+
#define FPEN1 6
|
| 311 |
+
#define FPIE1 7
|
| 312 |
+
|
| 313 |
+
#define TCCR1C _SFR_IO8(0x27)
|
| 314 |
+
#define PWM1D 0
|
| 315 |
+
#define FOC1D 1
|
| 316 |
+
#define COM1D0 2
|
| 317 |
+
#define COM1D1 3
|
| 318 |
+
#define COM1B0S 4
|
| 319 |
+
#define COM1B1S 5
|
| 320 |
+
#define COM1A0S 6
|
| 321 |
+
#define COM1A1S 7
|
| 322 |
+
|
| 323 |
+
#define CLKPR _SFR_IO8(0x28)
|
| 324 |
+
#define CLKPS0 0
|
| 325 |
+
#define CLKPS1 1
|
| 326 |
+
#define CLKPS2 2
|
| 327 |
+
#define CLKPS3 3
|
| 328 |
+
#define CLKPCE 7
|
| 329 |
+
|
| 330 |
+
#define PLLCSR _SFR_IO8(0x29)
|
| 331 |
+
#define PLOCK 0
|
| 332 |
+
#define PLLE 1
|
| 333 |
+
#define PCKE 2
|
| 334 |
+
#define LSM 7
|
| 335 |
+
|
| 336 |
+
#define OCR1D _SFR_IO8(0x2A)
|
| 337 |
+
|
| 338 |
+
#define OCR1C _SFR_IO8(0x2B)
|
| 339 |
+
|
| 340 |
+
#define OCR1B _SFR_IO8(0x2C)
|
| 341 |
+
|
| 342 |
+
#define OCR1A _SFR_IO8(0x2D)
|
| 343 |
+
|
| 344 |
+
#define TCNT1 _SFR_IO8(0x2E)
|
| 345 |
+
|
| 346 |
+
#define TCCR1B _SFR_IO8(0x2F)
|
| 347 |
+
#define CS10 0
|
| 348 |
+
#define CS11 1
|
| 349 |
+
#define CS12 2
|
| 350 |
+
#define CS13 3
|
| 351 |
+
#define DTPS10 4
|
| 352 |
+
#define DTPS11 5
|
| 353 |
+
#define PSR1 6
|
| 354 |
+
#define PWM1X 7
|
| 355 |
+
|
| 356 |
+
#define TCCR1A _SFR_IO8(0x30)
|
| 357 |
+
#define PWM1B 0
|
| 358 |
+
#define PWM1A 1
|
| 359 |
+
#define FOC1B 2
|
| 360 |
+
#define FOC1A 3
|
| 361 |
+
#define COM1B0 4
|
| 362 |
+
#define COM1B1 5
|
| 363 |
+
#define COM1A0 6
|
| 364 |
+
#define COM1A1 7
|
| 365 |
+
|
| 366 |
+
#define OSCCAL _SFR_IO8(0x31)
|
| 367 |
+
|
| 368 |
+
#define TCNT0L _SFR_IO8(0x32)
|
| 369 |
+
|
| 370 |
+
#define TCCR0B _SFR_IO8(0x33)
|
| 371 |
+
#define CS00 0
|
| 372 |
+
#define CS01 1
|
| 373 |
+
#define CS02 2
|
| 374 |
+
#define PSR0 3
|
| 375 |
+
#define TSM 4
|
| 376 |
+
|
| 377 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 378 |
+
#define PORF 0
|
| 379 |
+
#define EXTRF 1
|
| 380 |
+
#define BORF 2
|
| 381 |
+
#define WDRF 3
|
| 382 |
+
|
| 383 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 384 |
+
#define ISC00 0
|
| 385 |
+
#define ISC01 1
|
| 386 |
+
#define SM0 3
|
| 387 |
+
#define SM1 4
|
| 388 |
+
#define SE 5
|
| 389 |
+
#define PUD 6
|
| 390 |
+
|
| 391 |
+
#define PRR _SFR_IO8(0x36)
|
| 392 |
+
#define PRADC 0
|
| 393 |
+
#define PRUSI 1
|
| 394 |
+
#define PRTIM0 2
|
| 395 |
+
#define PRTIM1 3
|
| 396 |
+
|
| 397 |
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1))
|
| 398 |
+
#define __AVR_HAVE_PRR_PRADC
|
| 399 |
+
#define __AVR_HAVE_PRR_PRUSI
|
| 400 |
+
#define __AVR_HAVE_PRR_PRTIM0
|
| 401 |
+
#define __AVR_HAVE_PRR_PRTIM1
|
| 402 |
+
|
| 403 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 404 |
+
#define SPMEN 0
|
| 405 |
+
#define PGERS 1
|
| 406 |
+
#define PGWRT 2
|
| 407 |
+
#define RFLB 3
|
| 408 |
+
#define CTPB 4
|
| 409 |
+
|
| 410 |
+
#define TIFR _SFR_IO8(0x38)
|
| 411 |
+
#define ICF0 0
|
| 412 |
+
#define TOV0 1
|
| 413 |
+
#define TOV1 2
|
| 414 |
+
#define OCF0B 3
|
| 415 |
+
#define OCF0A 4
|
| 416 |
+
#define OCF1B 5
|
| 417 |
+
#define OCF1A 6
|
| 418 |
+
#define OCF1D 7
|
| 419 |
+
|
| 420 |
+
#define TIMSK _SFR_IO8(0x39)
|
| 421 |
+
#define TICIE0 0
|
| 422 |
+
#define TOIE0 1
|
| 423 |
+
#define TOIE1 2
|
| 424 |
+
#define OCIE0B 3
|
| 425 |
+
#define OCIE0A 4
|
| 426 |
+
#define OCIE1B 5
|
| 427 |
+
#define OCIE1A 6
|
| 428 |
+
#define OCIE1D 7
|
| 429 |
+
|
| 430 |
+
#define GIFR _SFR_IO8(0x3A)
|
| 431 |
+
#define PCIF 5
|
| 432 |
+
#define INTF0 6
|
| 433 |
+
#define INTF1 7
|
| 434 |
+
|
| 435 |
+
#define GIMSK _SFR_IO8(0x3B)
|
| 436 |
+
#define PCIE0 4
|
| 437 |
+
#define PCIE1 5
|
| 438 |
+
#define INT0 6
|
| 439 |
+
#define INT1 7
|
| 440 |
+
|
| 441 |
+
/* Reserved [0x3C] */
|
| 442 |
+
|
| 443 |
+
/* 0x3D..0x3E SP [defined in <avr/io.h>] */
|
| 444 |
+
/* 0x3F SREG [defined in <avr/io.h>] */
|
| 445 |
+
|
| 446 |
+
|
| 447 |
+
/* Interrupt vectors */
|
| 448 |
+
/* Interrupt vector 0 is the reset vector. */
|
| 449 |
+
/* External Interrupt 0 */
|
| 450 |
+
#define INT0_vect_num 1
|
| 451 |
+
#define INT0_vect _VECTOR(1)
|
| 452 |
+
#define SIG_INTERRUPT0 _VECTOR(1)
|
| 453 |
+
|
| 454 |
+
/* Pin Change Interrupt */
|
| 455 |
+
#define PCINT_vect_num 2
|
| 456 |
+
#define PCINT_vect _VECTOR(2)
|
| 457 |
+
#define SIG_PIN_CHANGE _VECTOR(2)
|
| 458 |
+
|
| 459 |
+
/* Timer/Counter1 Compare Match 1A */
|
| 460 |
+
#define TIMER1_COMPA_vect_num 3
|
| 461 |
+
#define TIMER1_COMPA_vect _VECTOR(3)
|
| 462 |
+
#define SIG_OUTPUT_COMPARE1A _VECTOR(3)
|
| 463 |
+
|
| 464 |
+
/* Timer/Counter1 Compare Match 1B */
|
| 465 |
+
#define TIMER1_COMPB_vect_num 4
|
| 466 |
+
#define TIMER1_COMPB_vect _VECTOR(4)
|
| 467 |
+
#define SIG_OUTPUT_COMPARE1B _VECTOR(4)
|
| 468 |
+
|
| 469 |
+
/* Timer/Counter1 Overflow */
|
| 470 |
+
#define TIMER1_OVF_vect_num 5
|
| 471 |
+
#define TIMER1_OVF_vect _VECTOR(5)
|
| 472 |
+
#define SIG_OVERFLOW1 _VECTOR(5)
|
| 473 |
+
|
| 474 |
+
/* Timer/Counter0 Overflow */
|
| 475 |
+
#define TIMER0_OVF_vect_num 6
|
| 476 |
+
#define TIMER0_OVF_vect _VECTOR(6)
|
| 477 |
+
#define SIG_OVERFLOW0 _VECTOR(6)
|
| 478 |
+
|
| 479 |
+
/* USI Start */
|
| 480 |
+
#define USI_START_vect_num 7
|
| 481 |
+
#define USI_START_vect _VECTOR(7)
|
| 482 |
+
#define SIG_USI_START _VECTOR(7)
|
| 483 |
+
|
| 484 |
+
/* USI Overflow */
|
| 485 |
+
#define USI_OVF_vect_num 8
|
| 486 |
+
#define USI_OVF_vect _VECTOR(8)
|
| 487 |
+
#define SIG_USI_OVERFLOW _VECTOR(8)
|
| 488 |
+
|
| 489 |
+
/* EEPROM Ready */
|
| 490 |
+
#define EE_RDY_vect_num 9
|
| 491 |
+
#define EE_RDY_vect _VECTOR(9)
|
| 492 |
+
#define SIG_EEPROM_READY _VECTOR(9)
|
| 493 |
+
|
| 494 |
+
/* Analog Comparator */
|
| 495 |
+
#define ANA_COMP_vect_num 10
|
| 496 |
+
#define ANA_COMP_vect _VECTOR(10)
|
| 497 |
+
#define SIG_ANA_COMP _VECTOR(10)
|
| 498 |
+
#define SIG_COMPARATOR _VECTOR(10)
|
| 499 |
+
|
| 500 |
+
/* ADC Conversion Complete */
|
| 501 |
+
#define ADC_vect_num 11
|
| 502 |
+
#define ADC_vect _VECTOR(11)
|
| 503 |
+
#define SIG_ADC _VECTOR(11)
|
| 504 |
+
|
| 505 |
+
/* Watchdog Time-Out */
|
| 506 |
+
#define WDT_vect_num 12
|
| 507 |
+
#define WDT_vect _VECTOR(12)
|
| 508 |
+
#define SIG_WDT _VECTOR(12)
|
| 509 |
+
|
| 510 |
+
/* External Interrupt 1 */
|
| 511 |
+
#define INT1_vect_num 13
|
| 512 |
+
#define INT1_vect _VECTOR(13)
|
| 513 |
+
#define SIG_INTERRUPT1 _VECTOR(13)
|
| 514 |
+
|
| 515 |
+
/* Timer/Counter0 Compare Match A */
|
| 516 |
+
#define TIMER0_COMPA_vect_num 14
|
| 517 |
+
#define TIMER0_COMPA_vect _VECTOR(14)
|
| 518 |
+
#define SIG_OUTPUT_COMPARE0A _VECTOR(14)
|
| 519 |
+
|
| 520 |
+
/* Timer/Counter0 Compare Match B */
|
| 521 |
+
#define TIMER0_COMPB_vect_num 15
|
| 522 |
+
#define TIMER0_COMPB_vect _VECTOR(15)
|
| 523 |
+
#define SIG_OUTPUT_COMPARE0B _VECTOR(15)
|
| 524 |
+
|
| 525 |
+
/* ADC Conversion Complete */
|
| 526 |
+
#define TIMER0_CAPT_vect_num 16
|
| 527 |
+
#define TIMER0_CAPT_vect _VECTOR(16)
|
| 528 |
+
#define SIG_INPUT_CAPTURE0 _VECTOR(16)
|
| 529 |
+
|
| 530 |
+
/* Timer/Counter1 Compare Match D */
|
| 531 |
+
#define TIMER1_COMPD_vect_num 17
|
| 532 |
+
#define TIMER1_COMPD_vect _VECTOR(17)
|
| 533 |
+
#define SIG_OUTPUT_COMPARE0D _VECTOR(17)
|
| 534 |
+
|
| 535 |
+
/* Timer/Counter1 Fault Protection */
|
| 536 |
+
#define FAULT_PROTECTION_vect_num 18
|
| 537 |
+
#define FAULT_PROTECTION_vect _VECTOR(18)
|
| 538 |
+
|
| 539 |
+
#define _VECTORS_SIZE 38
|
| 540 |
+
|
| 541 |
+
#endif /* _AVR_IOTNx61_H_ */
|
hardware/tools/avr/avr/include/avr/iousb1286.h
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006 Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iousb1286.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iousb1286.h - definitions for AT90USB1286 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_AT90USB1286_H_
|
| 36 |
+
#define _AVR_AT90USB1286_H_ 1
|
| 37 |
+
|
| 38 |
+
#include <avr/iousbxx6_7.h>
|
| 39 |
+
|
| 40 |
+
/* Constants */
|
| 41 |
+
#define SPM_PAGESIZE 256
|
| 42 |
+
#define RAMSTART 0x100
|
| 43 |
+
#define RAMEND 0x20FF
|
| 44 |
+
#define XRAMEND 0xFFFF
|
| 45 |
+
#define E2END 0xFFF
|
| 46 |
+
#define E2PAGESIZE 8
|
| 47 |
+
#define FLASHEND 0x1FFFF
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
/* Fuses */
|
| 51 |
+
#define FUSE_MEMORY_SIZE 3
|
| 52 |
+
|
| 53 |
+
/* Low Fuse Byte */
|
| 54 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 55 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 56 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 57 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 58 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 59 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 60 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 61 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 62 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 63 |
+
|
| 64 |
+
/* High Fuse Byte */
|
| 65 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 66 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 67 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 68 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 69 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 70 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 71 |
+
#define FUSE_JTAGEN (unsigned char)~_BV(6)
|
| 72 |
+
#define FUSE_OCDEN (unsigned char)~_BV(7)
|
| 73 |
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
|
| 74 |
+
|
| 75 |
+
/* Extended Fuse Byte */
|
| 76 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 77 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 78 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 79 |
+
#define FUSE_HWBE (unsigned char)~_BV(3)
|
| 80 |
+
#define EFUSE_DEFAULT (FUSE_BODLEVEL2 & FUSE_HWBE)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
/* Lock Bits */
|
| 84 |
+
#define __LOCK_BITS_EXIST
|
| 85 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 86 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
/* Signature */
|
| 90 |
+
#define SIGNATURE_0 0x1E
|
| 91 |
+
#define SIGNATURE_1 0x97
|
| 92 |
+
#define SIGNATURE_2 0x82
|
| 93 |
+
|
| 94 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 95 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 96 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 97 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 98 |
+
#define SLEEP_MODE_STANDBY (0x06<<1)
|
| 99 |
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
|
| 100 |
+
|
| 101 |
+
#endif /* _AVR_AT90USB1286_H_ */
|
hardware/tools/avr/avr/include/avr/iousb1287.h
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006 Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iousb1287.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
|
| 32 |
+
|
| 33 |
+
/* avr/iousb1287.h - definitions for AT90USB1287 */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_AT90USB1287_H_
|
| 36 |
+
#define _AVR_AT90USB1287_H_ 1
|
| 37 |
+
|
| 38 |
+
#include <avr/iousbxx6_7.h>
|
| 39 |
+
|
| 40 |
+
/* Constants */
|
| 41 |
+
#define SPM_PAGESIZE 256
|
| 42 |
+
#define RAMSTART 0x100
|
| 43 |
+
#define RAMEND 0x20FF
|
| 44 |
+
#define XRAMEND 0xFFFF
|
| 45 |
+
#define E2END 0xFFF
|
| 46 |
+
#define E2PAGESIZE 8
|
| 47 |
+
#define FLASHEND 0x1FFFF
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
/* Fuses */
|
| 51 |
+
#define FUSE_MEMORY_SIZE 3
|
| 52 |
+
|
| 53 |
+
/* Low Fuse Byte */
|
| 54 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 55 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 56 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 57 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 58 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 59 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 60 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 61 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 62 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 63 |
+
|
| 64 |
+
/* High Fuse Byte */
|
| 65 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 66 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 67 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 68 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 69 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 70 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 71 |
+
#define FUSE_JTAGEN (unsigned char)~_BV(6)
|
| 72 |
+
#define FUSE_OCDEN (unsigned char)~_BV(7)
|
| 73 |
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
|
| 74 |
+
|
| 75 |
+
/* Extended Fuse Byte */
|
| 76 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 77 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 78 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 79 |
+
#define FUSE_HWBE (unsigned char)~_BV(3)
|
| 80 |
+
#define EFUSE_DEFAULT (FUSE_BODLEVEL2 & FUSE_HWBE)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
/* Lock Bits */
|
| 84 |
+
#define __LOCK_BITS_EXIST
|
| 85 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 86 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
/* Signature */
|
| 90 |
+
#define SIGNATURE_0 0x1E
|
| 91 |
+
#define SIGNATURE_1 0x97
|
| 92 |
+
#define SIGNATURE_2 0x82
|
| 93 |
+
|
| 94 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 95 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 96 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 97 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 98 |
+
#define SLEEP_MODE_STANDBY (0x06<<1)
|
| 99 |
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
|
| 100 |
+
|
| 101 |
+
#endif /* _AVR_AT90USB1287_H_ */
|
hardware/tools/avr/avr/include/avr/iousb162.h
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2007 Anatoly Sokolov
|
| 2 |
+
Copyright (c) 2010 Atmel Corporation
|
| 3 |
+
All rights reserved.
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without
|
| 6 |
+
modification, are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright
|
| 9 |
+
notice, this list of conditions and the following disclaimer.
|
| 10 |
+
|
| 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
|
| 14 |
+
distribution.
|
| 15 |
+
|
| 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.
|
| 19 |
+
|
| 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. */
|
| 31 |
+
|
| 32 |
+
/* $Id: iousb162.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
|
| 33 |
+
|
| 34 |
+
/* avr/iousb162.h - definitions for AT90USB162 */
|
| 35 |
+
|
| 36 |
+
#ifndef _AVR_AT90USB162_H_
|
| 37 |
+
#define _AVR_AT90USB162_H_ 1
|
| 38 |
+
|
| 39 |
+
#include <avr/iousbxx2.h>
|
| 40 |
+
|
| 41 |
+
/* Constants */
|
| 42 |
+
#define SPM_PAGESIZE 128
|
| 43 |
+
#define RAMSTART 0x100
|
| 44 |
+
#define RAMEND 0x2FF
|
| 45 |
+
#define XRAMEND RAMEND
|
| 46 |
+
#define E2END 0x1FF
|
| 47 |
+
#define E2PAGESIZE 4
|
| 48 |
+
#define FLASHEND 0x3FFF
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
/* Fuses */
|
| 52 |
+
#define FUSE_MEMORY_SIZE 3
|
| 53 |
+
|
| 54 |
+
/* Low Fuse Byte */
|
| 55 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 56 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 57 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 58 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 59 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 60 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 61 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 62 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 63 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_SUT1 & FUSE_CKDIV8)
|
| 64 |
+
|
| 65 |
+
/* High Fuse Byte */
|
| 66 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 67 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 68 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 69 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 70 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 71 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 72 |
+
#define FUSE_RSTDSBL (unsigned char)~_BV(6)
|
| 73 |
+
#define FUSE_DWEN (unsigned char)~_BV(7)
|
| 74 |
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN)
|
| 75 |
+
|
| 76 |
+
/* Extended Fuse Byte */
|
| 77 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 78 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 79 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 80 |
+
#define FUSE_HWBE (unsigned char)~_BV(3)
|
| 81 |
+
#define EFUSE_DEFAULT (FUSE_BODLEVEL0 & FUSE_BODLEVEL1 & FUSE_HWBE)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Lock Bits */
|
| 85 |
+
#define __LOCK_BITS_EXIST
|
| 86 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 87 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
/* Signature */
|
| 91 |
+
#define SIGNATURE_0 0x1E
|
| 92 |
+
#define SIGNATURE_1 0x94
|
| 93 |
+
#define SIGNATURE_2 0x82
|
| 94 |
+
|
| 95 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 96 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 97 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 98 |
+
#define SLEEP_MODE_STANDBY (0x06<<1)
|
| 99 |
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
|
| 100 |
+
|
| 101 |
+
#endif /* _AVR_AT90USB162_H_ */
|
hardware/tools/avr/avr/include/avr/iousb646.h
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006 Anatoly Sokolov
|
| 2 |
+
Copyright (c) 2010 Atmel Corporation
|
| 3 |
+
All rights reserved.
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without
|
| 6 |
+
modification, are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright
|
| 9 |
+
notice, this list of conditions and the following disclaimer.
|
| 10 |
+
|
| 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
|
| 14 |
+
distribution.
|
| 15 |
+
|
| 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.
|
| 19 |
+
|
| 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. */
|
| 31 |
+
|
| 32 |
+
/* $Id: iousb646.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
|
| 33 |
+
|
| 34 |
+
/* avr/iousb646.h - definitions for AT90USB646 */
|
| 35 |
+
|
| 36 |
+
#ifndef _AVR_AT90USB646_H_
|
| 37 |
+
#define _AVR_AT90USB646_H_ 1
|
| 38 |
+
|
| 39 |
+
#include <avr/iousbxx6_7.h>
|
| 40 |
+
|
| 41 |
+
/* Constants */
|
| 42 |
+
#define SPM_PAGESIZE 256
|
| 43 |
+
#define RAMSTART 0x100
|
| 44 |
+
#define RAMEND 0x10FF
|
| 45 |
+
#define XRAMEND 0xFFFF
|
| 46 |
+
#define E2END 0x7FF
|
| 47 |
+
#define E2PAGESIZE 8
|
| 48 |
+
#define FLASHEND 0xFFFF
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
/* Fuses */
|
| 52 |
+
#define FUSE_MEMORY_SIZE 3
|
| 53 |
+
|
| 54 |
+
/* Low Fuse Byte */
|
| 55 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 56 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 57 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 58 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 59 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 60 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 61 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 62 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 63 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 64 |
+
|
| 65 |
+
/* High Fuse Byte */
|
| 66 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 67 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 68 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 69 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 70 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 71 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 72 |
+
#define FUSE_JTAGEN (unsigned char)~_BV(6)
|
| 73 |
+
#define FUSE_OCDEN (unsigned char)~_BV(7)
|
| 74 |
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
|
| 75 |
+
|
| 76 |
+
/* Extended Fuse Byte */
|
| 77 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 78 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 79 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 80 |
+
#define FUSE_HWBE (unsigned char)~_BV(3)
|
| 81 |
+
#define EFUSE_DEFAULT (FUSE_BODLEVEL2 & FUSE_HWBE)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Lock Bits */
|
| 85 |
+
#define __LOCK_BITS_EXIST
|
| 86 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 87 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
/* Signature */
|
| 91 |
+
#define SIGNATURE_0 0x1E
|
| 92 |
+
#define SIGNATURE_1 0x96
|
| 93 |
+
#define SIGNATURE_2 0x82
|
| 94 |
+
|
| 95 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 96 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 97 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 98 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 99 |
+
#define SLEEP_MODE_STANDBY (0x06<<1)
|
| 100 |
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
|
| 101 |
+
|
| 102 |
+
#endif /* _AVR_AT90USB646_H_ */
|
hardware/tools/avr/avr/include/avr/iousb647.h
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006 Anatoly Sokolov
|
| 2 |
+
Copyright (c) 2010 Atmel Corporation
|
| 3 |
+
All rights reserved.
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without
|
| 6 |
+
modification, are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright
|
| 9 |
+
notice, this list of conditions and the following disclaimer.
|
| 10 |
+
|
| 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
|
| 14 |
+
distribution.
|
| 15 |
+
|
| 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.
|
| 19 |
+
|
| 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. */
|
| 31 |
+
|
| 32 |
+
/* $Id: iousb647.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
|
| 33 |
+
|
| 34 |
+
/* avr/iousb647.h - definitions for AT90USB647 */
|
| 35 |
+
|
| 36 |
+
#ifndef _AVR_AT90USB647_H_
|
| 37 |
+
#define _AVR_AT90USB647_H_ 1
|
| 38 |
+
|
| 39 |
+
#include <avr/iousbxx6_7.h>
|
| 40 |
+
|
| 41 |
+
/* Constants */
|
| 42 |
+
#define SPM_PAGESIZE 256
|
| 43 |
+
#define RAMSTART 0x100
|
| 44 |
+
#define RAMEND 0x10FF
|
| 45 |
+
#define XRAMEND 0xFFFF
|
| 46 |
+
#define E2END 0x7FF
|
| 47 |
+
#define E2PAGESIZE 8
|
| 48 |
+
#define FLASHEND 0xFFFF
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
/* Fuses */
|
| 52 |
+
#define FUSE_MEMORY_SIZE 3
|
| 53 |
+
|
| 54 |
+
/* Low Fuse Byte */
|
| 55 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 56 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 57 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 58 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 59 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 60 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 61 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 62 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 63 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
| 64 |
+
|
| 65 |
+
/* High Fuse Byte */
|
| 66 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 67 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 68 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 69 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 70 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 71 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 72 |
+
#define FUSE_JTAGEN (unsigned char)~_BV(6)
|
| 73 |
+
#define FUSE_OCDEN (unsigned char)~_BV(7)
|
| 74 |
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
|
| 75 |
+
|
| 76 |
+
/* Extended Fuse Byte */
|
| 77 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 78 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 79 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 80 |
+
#define FUSE_HWBE (unsigned char)~_BV(3)
|
| 81 |
+
#define EFUSE_DEFAULT (FUSE_BODLEVEL2 & FUSE_HWBE)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Lock Bits */
|
| 85 |
+
#define __LOCK_BITS_EXIST
|
| 86 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 87 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
/* Signature */
|
| 91 |
+
#define SIGNATURE_0 0x1E
|
| 92 |
+
#define SIGNATURE_1 0x96
|
| 93 |
+
#define SIGNATURE_2 0x82
|
| 94 |
+
|
| 95 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 96 |
+
#define SLEEP_MODE_ADC (0x01<<1)
|
| 97 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 98 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 99 |
+
#define SLEEP_MODE_STANDBY (0x06<<1)
|
| 100 |
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
|
| 101 |
+
|
| 102 |
+
#endif /* _AVR_AT90USB647_H_ */
|
hardware/tools/avr/avr/include/avr/iousb82.h
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2007 Anatoly Sokolov
|
| 2 |
+
Copyright (c) 2010 Atmel Corporation
|
| 3 |
+
All rights reserved.
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without
|
| 6 |
+
modification, are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright
|
| 9 |
+
notice, this list of conditions and the following disclaimer.
|
| 10 |
+
|
| 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
|
| 14 |
+
distribution.
|
| 15 |
+
|
| 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.
|
| 19 |
+
|
| 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. */
|
| 31 |
+
|
| 32 |
+
/* $Id: iousb82.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
|
| 33 |
+
|
| 34 |
+
/* avr/iousb82.h - definitions for AT90USB82 */
|
| 35 |
+
|
| 36 |
+
#ifndef _AVR_AT90USB82_H_
|
| 37 |
+
#define _AVR_AT90USB82_H_ 1
|
| 38 |
+
|
| 39 |
+
#include <avr/iousbxx2.h>
|
| 40 |
+
|
| 41 |
+
/* Constants */
|
| 42 |
+
#define SPM_PAGESIZE 128
|
| 43 |
+
#define RAMSTART 0x100
|
| 44 |
+
#define RAMEND 0x2FF
|
| 45 |
+
#define XRAMEND RAMEND
|
| 46 |
+
#define E2END 0x1FF
|
| 47 |
+
#define E2PAGESIZE 4
|
| 48 |
+
#define FLASHEND 0x1FFF
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
/* Fuses */
|
| 52 |
+
#define FUSE_MEMORY_SIZE 3
|
| 53 |
+
|
| 54 |
+
/* Low Fuse Byte */
|
| 55 |
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
| 56 |
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
| 57 |
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
| 58 |
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
| 59 |
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
| 60 |
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
| 61 |
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
| 62 |
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
| 63 |
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_SUT1 & FUSE_CKDIV8)
|
| 64 |
+
|
| 65 |
+
/* High Fuse Byte */
|
| 66 |
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
| 67 |
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
| 68 |
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
| 69 |
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
| 70 |
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
| 71 |
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
| 72 |
+
#define FUSE_RSTDSBL (unsigned char)~_BV(6)
|
| 73 |
+
#define FUSE_DWEN (unsigned char)~_BV(7)
|
| 74 |
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN)
|
| 75 |
+
|
| 76 |
+
/* Extended Fuse Byte */
|
| 77 |
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
| 78 |
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
| 79 |
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
| 80 |
+
#define FUSE_HWBE (unsigned char)~_BV(3)
|
| 81 |
+
#define EFUSE_DEFAULT (FUSE_BODLEVEL0 & FUSE_BODLEVEL1 & FUSE_HWBE)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
/* Lock Bits */
|
| 85 |
+
#define __LOCK_BITS_EXIST
|
| 86 |
+
#define __BOOT_LOCK_BITS_0_EXIST
|
| 87 |
+
#define __BOOT_LOCK_BITS_1_EXIST
|
| 88 |
+
|
| 89 |
+
#define SLEEP_MODE_IDLE (0x00<<1)
|
| 90 |
+
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
|
| 91 |
+
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
|
| 92 |
+
#define SLEEP_MODE_STANDBY (0x06<<1)
|
| 93 |
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
|
| 94 |
+
|
| 95 |
+
#endif /* _AVR_AT90USB82_H_ */
|
hardware/tools/avr/avr/include/avr/iousbxx2.h
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2007 Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iousbxx2.h 2246 2011-05-14 20:02:02Z joerg_wunsch $ */
|
| 32 |
+
|
| 33 |
+
/* iousbxx2.h - definitions for AT90USB82 and AT90USB162. */
|
| 34 |
+
|
| 35 |
+
#ifndef _AVR_IOUSBXX2_H_
|
| 36 |
+
#define _AVR_IOUSBXX2_H_ 1
|
| 37 |
+
|
| 38 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 39 |
+
|
| 40 |
+
#ifndef _AVR_IO_H_
|
| 41 |
+
# error "Include <avr/io.h> instead of this file."
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
#ifndef _AVR_IOXXX_H_
|
| 45 |
+
# define _AVR_IOXXX_H_ "iousbxx2.h"
|
| 46 |
+
#else
|
| 47 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
/* Registers and associated bit numbers */
|
| 51 |
+
|
| 52 |
+
/* Reserved [0x00..0x02] */
|
| 53 |
+
|
| 54 |
+
#define PINB _SFR_IO8(0X03)
|
| 55 |
+
#define PINB7 7
|
| 56 |
+
#define PINB6 6
|
| 57 |
+
#define PINB5 5
|
| 58 |
+
#define PINB4 4
|
| 59 |
+
#define PINB3 3
|
| 60 |
+
#define PINB2 2
|
| 61 |
+
#define PINB1 1
|
| 62 |
+
#define PINB0 0
|
| 63 |
+
|
| 64 |
+
#define DDRB _SFR_IO8(0x04)
|
| 65 |
+
#define DDB7 7
|
| 66 |
+
#define DDB6 6
|
| 67 |
+
#define DDB5 5
|
| 68 |
+
#define DDB4 4
|
| 69 |
+
#define DDB3 3
|
| 70 |
+
#define DDB2 2
|
| 71 |
+
#define DDB1 1
|
| 72 |
+
#define DDB0 0
|
| 73 |
+
|
| 74 |
+
#define PORTB _SFR_IO8(0x05)
|
| 75 |
+
#define PB7 7
|
| 76 |
+
#define PB6 6
|
| 77 |
+
#define PB5 5
|
| 78 |
+
#define PB4 4
|
| 79 |
+
#define PB3 3
|
| 80 |
+
#define PB2 2
|
| 81 |
+
#define PB1 1
|
| 82 |
+
#define PB0 0
|
| 83 |
+
|
| 84 |
+
#define PINC _SFR_IO8(0x06)
|
| 85 |
+
#define PINC7 7
|
| 86 |
+
#define PINC6 6
|
| 87 |
+
#define PINC5 5
|
| 88 |
+
#define PINC4 4
|
| 89 |
+
#define PINC2 2
|
| 90 |
+
#define PINC1 1
|
| 91 |
+
#define PINC0 0
|
| 92 |
+
|
| 93 |
+
#define DDRC _SFR_IO8(0x07)
|
| 94 |
+
#define DDC7 7
|
| 95 |
+
#define DDC6 6
|
| 96 |
+
#define DDC5 5
|
| 97 |
+
#define DDC4 4
|
| 98 |
+
#define DDC2 2
|
| 99 |
+
#define DDC1 1
|
| 100 |
+
#define DDC0 0
|
| 101 |
+
|
| 102 |
+
#define PORTC _SFR_IO8(0x08)
|
| 103 |
+
#define PC7 7
|
| 104 |
+
#define PC6 6
|
| 105 |
+
#define PC5 5
|
| 106 |
+
#define PC4 4
|
| 107 |
+
#define PC2 2
|
| 108 |
+
#define PC1 1
|
| 109 |
+
#define PC0 0
|
| 110 |
+
|
| 111 |
+
#define PIND _SFR_IO8(0x09)
|
| 112 |
+
#define PIND7 7
|
| 113 |
+
#define PIND6 6
|
| 114 |
+
#define PIND5 5
|
| 115 |
+
#define PIND4 4
|
| 116 |
+
#define PIND3 3
|
| 117 |
+
#define PIND2 2
|
| 118 |
+
#define PIND1 1
|
| 119 |
+
#define PIND0 0
|
| 120 |
+
|
| 121 |
+
#define DDRD _SFR_IO8(0x0A)
|
| 122 |
+
#define DDD7 7
|
| 123 |
+
#define DDD6 6
|
| 124 |
+
#define DDD5 5
|
| 125 |
+
#define DDD4 4
|
| 126 |
+
#define DDD3 3
|
| 127 |
+
#define DDD2 2
|
| 128 |
+
#define DDD1 1
|
| 129 |
+
#define DDD0 0
|
| 130 |
+
|
| 131 |
+
#define PORTD _SFR_IO8(0x0B)
|
| 132 |
+
#define PD7 7
|
| 133 |
+
#define PD6 6
|
| 134 |
+
#define PD5 5
|
| 135 |
+
#define PD4 4
|
| 136 |
+
#define PD3 3
|
| 137 |
+
#define PD2 2
|
| 138 |
+
#define PD1 1
|
| 139 |
+
#define PD0 0
|
| 140 |
+
|
| 141 |
+
/* Reserved [0xC..0x14] */
|
| 142 |
+
|
| 143 |
+
#define TIFR0 _SFR_IO8(0x15)
|
| 144 |
+
#define OCF0B 2
|
| 145 |
+
#define OCF0A 1
|
| 146 |
+
#define TOV0 0
|
| 147 |
+
|
| 148 |
+
#define TIFR1 _SFR_IO8(0x16)
|
| 149 |
+
#define ICF1 5
|
| 150 |
+
#define OCF1C 3
|
| 151 |
+
#define OCF1B 2
|
| 152 |
+
#define OCF1A 1
|
| 153 |
+
#define TOV1 0
|
| 154 |
+
|
| 155 |
+
/* Reserved [0x17..0x1A] */
|
| 156 |
+
|
| 157 |
+
#define PCIFR _SFR_IO8(0x1B)
|
| 158 |
+
#define PCIF1 1
|
| 159 |
+
#define PCIF0 0
|
| 160 |
+
|
| 161 |
+
#define EIFR _SFR_IO8(0x1C)
|
| 162 |
+
#define INTF7 7
|
| 163 |
+
#define INTF6 6
|
| 164 |
+
#define INTF5 5
|
| 165 |
+
#define INTF4 4
|
| 166 |
+
#define INTF3 3
|
| 167 |
+
#define INTF2 2
|
| 168 |
+
#define INTF1 1
|
| 169 |
+
#define INTF0 0
|
| 170 |
+
|
| 171 |
+
#define EIMSK _SFR_IO8(0x1D)
|
| 172 |
+
#define INT7 7
|
| 173 |
+
#define INT6 6
|
| 174 |
+
#define INT5 5
|
| 175 |
+
#define INT4 4
|
| 176 |
+
#define INT3 3
|
| 177 |
+
#define INT2 2
|
| 178 |
+
#define INT1 1
|
| 179 |
+
#define INT0 0
|
| 180 |
+
|
| 181 |
+
#define GPIOR0 _SFR_IO8(0x1E)
|
| 182 |
+
|
| 183 |
+
#define EECR _SFR_IO8(0x1F)
|
| 184 |
+
#define EEPM1 5
|
| 185 |
+
#define EEPM0 4
|
| 186 |
+
#define EERIE 3
|
| 187 |
+
#define EEMPE 2
|
| 188 |
+
#define EEPE 1
|
| 189 |
+
#define EERE 0
|
| 190 |
+
|
| 191 |
+
#define EEDR _SFR_IO8(0x20)
|
| 192 |
+
|
| 193 |
+
#define EEAR _SFR_IO16(0x21)
|
| 194 |
+
#define EEARL _SFR_IO8(0x21)
|
| 195 |
+
#define EEARH _SFR_IO8(0x22)
|
| 196 |
+
|
| 197 |
+
/* 6-char sequence denoting where to find the EEPROM registers in memory space.
|
| 198 |
+
Adresses denoted in hex syntax with uppercase letters. Used by the EEPROM
|
| 199 |
+
subroutines.
|
| 200 |
+
First two letters: EECR address.
|
| 201 |
+
Second two letters: EEDR address.
|
| 202 |
+
Last two letters: EEAR address. */
|
| 203 |
+
#define __EEPROM_REG_LOCATIONS__ 1F2021
|
| 204 |
+
|
| 205 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 206 |
+
#define TSM 7
|
| 207 |
+
#define PSRASY 1
|
| 208 |
+
#define PSRSYNC 0
|
| 209 |
+
|
| 210 |
+
#define TCCR0A _SFR_IO8(0x24)
|
| 211 |
+
#define COM0A1 7
|
| 212 |
+
#define COM0A0 6
|
| 213 |
+
#define COM0B1 5
|
| 214 |
+
#define COM0B0 4
|
| 215 |
+
#define WGM01 1
|
| 216 |
+
#define WGM00 0
|
| 217 |
+
|
| 218 |
+
#define TCCR0B _SFR_IO8(0x25)
|
| 219 |
+
#define FOC0A 7
|
| 220 |
+
#define FOC0B 6
|
| 221 |
+
#define WGM02 3
|
| 222 |
+
#define CS02 2
|
| 223 |
+
#define CS01 1
|
| 224 |
+
#define CS00 0
|
| 225 |
+
|
| 226 |
+
#define TCNT0 _SFR_IO8(0X26)
|
| 227 |
+
|
| 228 |
+
#define OCR0A _SFR_IO8(0x27)
|
| 229 |
+
|
| 230 |
+
#define OCR0B _SFR_IO8(0X28)
|
| 231 |
+
|
| 232 |
+
#define PLLCSR _SFR_IO8(0x29)
|
| 233 |
+
#define PLLP2 4
|
| 234 |
+
#define PLLP1 3
|
| 235 |
+
#define PLLP0 2
|
| 236 |
+
#define PLLE 1
|
| 237 |
+
#define PLOCK 0
|
| 238 |
+
|
| 239 |
+
#define GPIOR1 _SFR_IO8(0x2A)
|
| 240 |
+
|
| 241 |
+
#define GPIOR2 _SFR_IO8(0x2B)
|
| 242 |
+
|
| 243 |
+
#define SPCR _SFR_IO8(0x2C)
|
| 244 |
+
#define SPIE 7
|
| 245 |
+
#define SPE 6
|
| 246 |
+
#define DORD 5
|
| 247 |
+
#define MSTR 4
|
| 248 |
+
#define CPOL 3
|
| 249 |
+
#define CPHA 2
|
| 250 |
+
#define SPR1 1
|
| 251 |
+
#define SPR0 0
|
| 252 |
+
|
| 253 |
+
#define SPSR _SFR_IO8(0x2D)
|
| 254 |
+
#define SPIF 7
|
| 255 |
+
#define WCOL 6
|
| 256 |
+
#define SPI2X 0
|
| 257 |
+
|
| 258 |
+
#define SPDR _SFR_IO8(0x2E)
|
| 259 |
+
|
| 260 |
+
/* Reserved [0x2F] */
|
| 261 |
+
|
| 262 |
+
#define ACSR _SFR_IO8(0x30)
|
| 263 |
+
#define ACD 7
|
| 264 |
+
#define ACBG 6
|
| 265 |
+
#define ACO 5
|
| 266 |
+
#define ACI 4
|
| 267 |
+
#define ACIE 3
|
| 268 |
+
#define ACIC 2
|
| 269 |
+
#define ACIS1 1
|
| 270 |
+
#define ACIS0 0
|
| 271 |
+
|
| 272 |
+
#define DWDR _SFR_IO8(0x31)
|
| 273 |
+
#define IDRD 7
|
| 274 |
+
|
| 275 |
+
/* Reserved [0x32] */
|
| 276 |
+
|
| 277 |
+
#define SMCR _SFR_IO8(0x33)
|
| 278 |
+
#define SM2 3
|
| 279 |
+
#define SM1 2
|
| 280 |
+
#define SM0 1
|
| 281 |
+
#define SE 0
|
| 282 |
+
|
| 283 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 284 |
+
#define USBRF 5
|
| 285 |
+
#define WDRF 3
|
| 286 |
+
#define BORF 2
|
| 287 |
+
#define EXTRF 1
|
| 288 |
+
#define PORF 0
|
| 289 |
+
|
| 290 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 291 |
+
#define PUD 4
|
| 292 |
+
#define IVSEL 1
|
| 293 |
+
#define IVCE 0
|
| 294 |
+
|
| 295 |
+
/* Reserved [0x36] */
|
| 296 |
+
|
| 297 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 298 |
+
#define SPMIE 7
|
| 299 |
+
#define RWWSB 6
|
| 300 |
+
#define SIGRD 5
|
| 301 |
+
#define RWWSRE 4
|
| 302 |
+
#define BLBSET 3
|
| 303 |
+
#define PGWRT 2
|
| 304 |
+
#define PGERS 1
|
| 305 |
+
#define SPMEN 0
|
| 306 |
+
|
| 307 |
+
/* Reserved [0x38..0x3C] */
|
| 308 |
+
|
| 309 |
+
/* SP [0x3D..0x3E] */
|
| 310 |
+
/* SREG [0x3F] */
|
| 311 |
+
|
| 312 |
+
#define WDTCSR _SFR_MEM8(0x60)
|
| 313 |
+
#define WDIF 7
|
| 314 |
+
#define WDIE 6
|
| 315 |
+
#define WDP3 5
|
| 316 |
+
#define WDCE 4
|
| 317 |
+
#define WDE 3
|
| 318 |
+
#define WDP2 2
|
| 319 |
+
#define WDP1 1
|
| 320 |
+
#define WDP0 0
|
| 321 |
+
|
| 322 |
+
#define CLKPR _SFR_MEM8(0x61)
|
| 323 |
+
#define CLKPCE 7
|
| 324 |
+
#define CLKPS3 3
|
| 325 |
+
#define CLKPS2 2
|
| 326 |
+
#define CLKPS1 1
|
| 327 |
+
#define CLKPS0 0
|
| 328 |
+
|
| 329 |
+
#define WDTCKD _SFR_MEM8(0x62)
|
| 330 |
+
#define WDEWIF 3
|
| 331 |
+
#define WDEWIE 2
|
| 332 |
+
#define WCLKD1 1
|
| 333 |
+
#define WCLKD0 0
|
| 334 |
+
|
| 335 |
+
#define REGCR _SFR_MEM8(0x63)
|
| 336 |
+
#define REGDIS 0
|
| 337 |
+
|
| 338 |
+
#define PRR0 _SFR_MEM8(0x64)
|
| 339 |
+
#define PRTIM0 5
|
| 340 |
+
#define PRTIM1 3
|
| 341 |
+
#define PRSPI 2
|
| 342 |
+
|
| 343 |
+
#define __AVR_HAVE_PRR0 ((1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0))
|
| 344 |
+
#define __AVR_HAVE_PRR0_PRSPI
|
| 345 |
+
#define __AVR_HAVE_PRR0_PRTIM1
|
| 346 |
+
#define __AVR_HAVE_PRR0_PRTIM0
|
| 347 |
+
|
| 348 |
+
#define PRR1 _SFR_MEM8(0x65)
|
| 349 |
+
#define PRUSB 7
|
| 350 |
+
#define PRUSART1 0
|
| 351 |
+
|
| 352 |
+
#define __AVR_HAVE_PRR1 ((1<<PRUSART1)|(1<<PRUSB))
|
| 353 |
+
#define __AVR_HAVE_PRR1_PRUSART1
|
| 354 |
+
#define __AVR_HAVE_PRR1_PRUSB
|
| 355 |
+
|
| 356 |
+
#define OSCCAL _SFR_MEM8(0x66)
|
| 357 |
+
|
| 358 |
+
/* Reserved [0x67] */
|
| 359 |
+
|
| 360 |
+
#define PCICR _SFR_MEM8(0x68)
|
| 361 |
+
#define PCIE1 1
|
| 362 |
+
#define PCIE0 0
|
| 363 |
+
|
| 364 |
+
#define EICRA _SFR_MEM8(0x69)
|
| 365 |
+
#define ISC31 7
|
| 366 |
+
#define ISC30 6
|
| 367 |
+
#define ISC21 5
|
| 368 |
+
#define ISC20 4
|
| 369 |
+
#define ISC11 3
|
| 370 |
+
#define ISC10 2
|
| 371 |
+
#define ISC01 1
|
| 372 |
+
#define ISC00 0
|
| 373 |
+
|
| 374 |
+
#define EICRB _SFR_MEM8(0x6A)
|
| 375 |
+
#define ISC71 7
|
| 376 |
+
#define ISC70 6
|
| 377 |
+
#define ISC61 5
|
| 378 |
+
#define ISC60 4
|
| 379 |
+
#define ISC51 3
|
| 380 |
+
#define ISC50 2
|
| 381 |
+
#define ISC41 1
|
| 382 |
+
#define ISC40 0
|
| 383 |
+
|
| 384 |
+
#define PCMSK0 _SFR_MEM8(0x6B)
|
| 385 |
+
#define PCINT7 7
|
| 386 |
+
#define PCINT6 6
|
| 387 |
+
#define PCINT5 5
|
| 388 |
+
#define PCINT4 4
|
| 389 |
+
#define PCINT3 3
|
| 390 |
+
#define PCINT2 2
|
| 391 |
+
#define PCINT1 1
|
| 392 |
+
#define PCINT0 0
|
| 393 |
+
|
| 394 |
+
#define PCMSK1 _SFR_MEM8(0x6C)
|
| 395 |
+
#define PCINT12 4
|
| 396 |
+
#define PCINT11 3
|
| 397 |
+
#define PCINT10 2
|
| 398 |
+
#define PCINT9 1
|
| 399 |
+
#define PCINT8 0
|
| 400 |
+
|
| 401 |
+
/* Reserved [0x6D] */
|
| 402 |
+
|
| 403 |
+
#define TIMSK0 _SFR_MEM8(0x6E)
|
| 404 |
+
#define OCIE0B 2
|
| 405 |
+
#define OCIE0A 1
|
| 406 |
+
#define TOIE0 0
|
| 407 |
+
|
| 408 |
+
#define TIMSK1 _SFR_MEM8(0x6F)
|
| 409 |
+
#define ICIE1 5
|
| 410 |
+
#define OCIE1C 3
|
| 411 |
+
#define OCIE1B 2
|
| 412 |
+
#define OCIE1A 1
|
| 413 |
+
#define TOIE1 0
|
| 414 |
+
|
| 415 |
+
/* Reserved [0x70..0x7F] */
|
| 416 |
+
|
| 417 |
+
#define TCCR1A _SFR_MEM8(0x80)
|
| 418 |
+
#define COM1A1 7
|
| 419 |
+
#define COM1A0 6
|
| 420 |
+
#define COM1B1 5
|
| 421 |
+
#define COM1B0 4
|
| 422 |
+
#define COM1C1 3
|
| 423 |
+
#define COM1C0 2
|
| 424 |
+
#define WGM11 1
|
| 425 |
+
#define WGM10 0
|
| 426 |
+
|
| 427 |
+
#define TCCR1B _SFR_MEM8(0x81)
|
| 428 |
+
#define ICNC1 7
|
| 429 |
+
#define ICES1 6
|
| 430 |
+
#define WGM13 4
|
| 431 |
+
#define WGM12 3
|
| 432 |
+
#define CS12 2
|
| 433 |
+
#define CS11 1
|
| 434 |
+
#define CS10 0
|
| 435 |
+
|
| 436 |
+
#define TCCR1C _SFR_MEM8(0x82)
|
| 437 |
+
#define FOC1A 7
|
| 438 |
+
#define FOC1B 6
|
| 439 |
+
#define FOC1C 5
|
| 440 |
+
|
| 441 |
+
/* Reserved [0x83] */
|
| 442 |
+
|
| 443 |
+
/* Combine TCNT1L and TCNT1H */
|
| 444 |
+
#define TCNT1 _SFR_MEM16(0x84)
|
| 445 |
+
|
| 446 |
+
#define TCNT1L _SFR_MEM8(0x84)
|
| 447 |
+
#define TCNT1H _SFR_MEM8(0x85)
|
| 448 |
+
|
| 449 |
+
/* Combine ICR1L and ICR1H */
|
| 450 |
+
#define ICR1 _SFR_MEM16(0x86)
|
| 451 |
+
|
| 452 |
+
#define ICR1L _SFR_MEM8(0x86)
|
| 453 |
+
#define ICR1H _SFR_MEM8(0x87)
|
| 454 |
+
|
| 455 |
+
/* Combine OCR1AL and OCR1AH */
|
| 456 |
+
#define OCR1A _SFR_MEM16(0x88)
|
| 457 |
+
|
| 458 |
+
#define OCR1AL _SFR_MEM8(0x88)
|
| 459 |
+
#define OCR1AH _SFR_MEM8(0x89)
|
| 460 |
+
|
| 461 |
+
/* Combine OCR1BL and OCR1BH */
|
| 462 |
+
#define OCR1B _SFR_MEM16(0x8A)
|
| 463 |
+
|
| 464 |
+
#define OCR1BL _SFR_MEM8(0x8A)
|
| 465 |
+
#define OCR1BH _SFR_MEM8(0x8B)
|
| 466 |
+
|
| 467 |
+
/* Combine OCR1CL and OCR1CH */
|
| 468 |
+
#define OCR1C _SFR_MEM16(0x8C)
|
| 469 |
+
|
| 470 |
+
#define OCR1CL _SFR_MEM8(0x8C)
|
| 471 |
+
#define OCR1CH _SFR_MEM8(0x8D)
|
| 472 |
+
|
| 473 |
+
/* Reserved [0x8E..0xC7] */
|
| 474 |
+
|
| 475 |
+
#define UCSR1A _SFR_MEM8(0xC8)
|
| 476 |
+
#define RXC1 7
|
| 477 |
+
#define TXC1 6
|
| 478 |
+
#define UDRE1 5
|
| 479 |
+
#define FE1 4
|
| 480 |
+
#define DOR1 3
|
| 481 |
+
#define UPE1 2
|
| 482 |
+
#define U2X1 1
|
| 483 |
+
#define MPCM1 0
|
| 484 |
+
|
| 485 |
+
#define UCSR1B _SFR_MEM8(0XC9)
|
| 486 |
+
#define RXCIE1 7
|
| 487 |
+
#define TXCIE1 6
|
| 488 |
+
#define UDRIE1 5
|
| 489 |
+
#define RXEN1 4
|
| 490 |
+
#define TXEN1 3
|
| 491 |
+
#define UCSZ12 2
|
| 492 |
+
#define RXB81 1
|
| 493 |
+
#define TXB81 0
|
| 494 |
+
|
| 495 |
+
#define UCSR1C _SFR_MEM8(0xCA)
|
| 496 |
+
#define UMSEL11 7
|
| 497 |
+
#define UMSEL10 6
|
| 498 |
+
#define UPM11 5
|
| 499 |
+
#define UPM10 4
|
| 500 |
+
#define USBS1 3
|
| 501 |
+
#define UCSZ11 2
|
| 502 |
+
#define UCSZ10 1
|
| 503 |
+
#define UCPOL1 0
|
| 504 |
+
|
| 505 |
+
#define UCSR1D _SFR_MEM8(0xCB)
|
| 506 |
+
#define CTSEN 1
|
| 507 |
+
#define RTSEN 0
|
| 508 |
+
|
| 509 |
+
/* Combine UBRR1L and UBRR1H */
|
| 510 |
+
#define UBRR1 _SFR_MEM16(0xCC)
|
| 511 |
+
|
| 512 |
+
#define UBRR1L _SFR_MEM8(0xCC)
|
| 513 |
+
#define UBRR1H _SFR_MEM8(0xCD)
|
| 514 |
+
|
| 515 |
+
#define UDR1 _SFR_MEM8(0XCE)
|
| 516 |
+
|
| 517 |
+
/* Reserved [0xCF] */
|
| 518 |
+
|
| 519 |
+
#define CKSEL0 _SFR_MEM8(0XD0) /* old name; up to AVR Studio v 4.13 */
|
| 520 |
+
#define CLKSEL0 _SFR_MEM8(0XD0) /* since AVR Studio v 4.14 */
|
| 521 |
+
#define RCSUT1 7
|
| 522 |
+
#define RCSUT0 6
|
| 523 |
+
#define EXSUT1 5
|
| 524 |
+
#define EXSUT0 4
|
| 525 |
+
#define RCE 3
|
| 526 |
+
#define EXTE 2
|
| 527 |
+
#define CLKS 0
|
| 528 |
+
|
| 529 |
+
#define CKSEL1 _SFR_MEM8(0XD1) /* old name */
|
| 530 |
+
#define CLKSEL1 _SFR_MEM8(0XD1)
|
| 531 |
+
#define RCCKSEL3 7
|
| 532 |
+
#define RCCKSEL2 6
|
| 533 |
+
#define RCCKSEL1 5
|
| 534 |
+
#define RCCKSEL0 4
|
| 535 |
+
#define EXCKSEL3 3
|
| 536 |
+
#define EXCKSEL2 2
|
| 537 |
+
#define EXCKSEL1 1
|
| 538 |
+
#define EXCKSEL0 0
|
| 539 |
+
|
| 540 |
+
#define CKSTA _SFR_MEM8(0XD2) /* old name */
|
| 541 |
+
#define CLKSTA _SFR_MEM8(0XD2)
|
| 542 |
+
#define RCON 1
|
| 543 |
+
#define EXTON 0
|
| 544 |
+
|
| 545 |
+
/* Reserved [0xD3..0xD7] */
|
| 546 |
+
|
| 547 |
+
#define USBCON _SFR_MEM8(0XD8)
|
| 548 |
+
#define USBE 7
|
| 549 |
+
#define FRZCLK 5
|
| 550 |
+
|
| 551 |
+
/* Reserved [0xD9..0xDA] */
|
| 552 |
+
|
| 553 |
+
/* Combine UDPADDL and UDPADDH */
|
| 554 |
+
#define UDPADD _SFR_MEM16(0xDB)
|
| 555 |
+
|
| 556 |
+
#define UDPADDL _SFR_MEM8(0xDB)
|
| 557 |
+
#define UDPADDH _SFR_MEM8(0xDC)
|
| 558 |
+
#define DPACC 7
|
| 559 |
+
|
| 560 |
+
/* Reserved [0xDD..0xDF] */
|
| 561 |
+
|
| 562 |
+
#define UDCON _SFR_MEM8(0XE0)
|
| 563 |
+
#define RSTCPU 2
|
| 564 |
+
#define RMWKUP 1
|
| 565 |
+
#define DETACH 0
|
| 566 |
+
|
| 567 |
+
#define UDINT _SFR_MEM8(0XE1)
|
| 568 |
+
#define UPRSMI 6
|
| 569 |
+
#define EORSMI 5
|
| 570 |
+
#define WAKEUPI 4
|
| 571 |
+
#define EORSTI 3
|
| 572 |
+
#define SOFI 2
|
| 573 |
+
#define SUSPI 0
|
| 574 |
+
|
| 575 |
+
#define UDIEN _SFR_MEM8(0XE2)
|
| 576 |
+
#define UPRSME 6
|
| 577 |
+
#define EORSME 5
|
| 578 |
+
#define WAKEUPE 4
|
| 579 |
+
#define EORSTE 3
|
| 580 |
+
#define SOFE 2
|
| 581 |
+
#define SUSPE 0
|
| 582 |
+
|
| 583 |
+
#define UDADDR _SFR_MEM8(0XE3)
|
| 584 |
+
#define ADDEN 7
|
| 585 |
+
|
| 586 |
+
/* Combine UDFNUML and UDFNUMH */
|
| 587 |
+
#define UDFNUM _SFR_MEM16(0xE4)
|
| 588 |
+
|
| 589 |
+
#define UDFNUML _SFR_MEM8(0xE4)
|
| 590 |
+
#define UDFNUMH _SFR_MEM8(0xE5)
|
| 591 |
+
|
| 592 |
+
#define UDMFN _SFR_MEM8(0XE6)
|
| 593 |
+
#define FNCERR 4
|
| 594 |
+
|
| 595 |
+
/* Reserved [0xE7] */
|
| 596 |
+
|
| 597 |
+
#define UEINTX _SFR_MEM8(0XE8)
|
| 598 |
+
#define FIFOCON 7
|
| 599 |
+
#define NAKINI 6
|
| 600 |
+
#define RWAL 5
|
| 601 |
+
#define NAKOUTI 4
|
| 602 |
+
#define RXSTPI 3
|
| 603 |
+
#define RXOUTI 2
|
| 604 |
+
#define STALLEDI 1
|
| 605 |
+
#define TXINI 0
|
| 606 |
+
|
| 607 |
+
#define UENUM _SFR_MEM8(0XE9)
|
| 608 |
+
#define EPNUM2 2
|
| 609 |
+
#define EPNUM1 1
|
| 610 |
+
#define EPNUM0 0
|
| 611 |
+
|
| 612 |
+
#define UERST _SFR_MEM8(0XEA)
|
| 613 |
+
#define EPRST4 4
|
| 614 |
+
#define EPRST3 3
|
| 615 |
+
#define EPRST2 2
|
| 616 |
+
#define EPRST1 1
|
| 617 |
+
#define EPRST0 0
|
| 618 |
+
|
| 619 |
+
#define UECONX _SFR_MEM8(0XEB)
|
| 620 |
+
#define STALLRQ 5
|
| 621 |
+
#define STALLRQC 4
|
| 622 |
+
#define RSTDT 3
|
| 623 |
+
#define EPEN 0
|
| 624 |
+
|
| 625 |
+
#define UECFG0X _SFR_MEM8(0XEC)
|
| 626 |
+
#define EPTYPE1 7
|
| 627 |
+
#define EPTYPE0 6
|
| 628 |
+
#define EPDIR 0
|
| 629 |
+
|
| 630 |
+
#define UECFG1X _SFR_MEM8(0XED)
|
| 631 |
+
#define EPSIZE2 6
|
| 632 |
+
#define EPSIZE1 5
|
| 633 |
+
#define EPSIZE0 4
|
| 634 |
+
#define EPBK1 3
|
| 635 |
+
#define EPBK0 2
|
| 636 |
+
#define ALLOC 1
|
| 637 |
+
|
| 638 |
+
#define UESTA0X _SFR_MEM8(0XEE)
|
| 639 |
+
#define CFGOK 7
|
| 640 |
+
#define OVERFI 6
|
| 641 |
+
#define UNDERFI 5
|
| 642 |
+
#define DTSEQ1 3
|
| 643 |
+
#define DTSEQ0 2
|
| 644 |
+
#define NBUSYBK1 1
|
| 645 |
+
#define NBUSYBK0 0
|
| 646 |
+
|
| 647 |
+
#define UESTA1X _SFR_MEM8(0XEF)
|
| 648 |
+
#define CTRLDIR 2
|
| 649 |
+
#define CURRBK1 1
|
| 650 |
+
#define CURRBK0 0
|
| 651 |
+
|
| 652 |
+
#define UEIENX _SFR_MEM8(0XF0)
|
| 653 |
+
#define FLERRE 7
|
| 654 |
+
#define NAKINE 6
|
| 655 |
+
#define NAKOUTE 4
|
| 656 |
+
#define RXSTPE 3
|
| 657 |
+
#define RXOUTE 2
|
| 658 |
+
#define STALLEDE 1
|
| 659 |
+
#define TXINE 0
|
| 660 |
+
|
| 661 |
+
#define UEDATX _SFR_MEM8(0XF1)
|
| 662 |
+
|
| 663 |
+
#define UEBCLX _SFR_MEM8(0xF2)
|
| 664 |
+
|
| 665 |
+
/* Reserved [0xF3] */
|
| 666 |
+
|
| 667 |
+
#define UEINT _SFR_MEM8(0XF4)
|
| 668 |
+
#define EPINT4 4
|
| 669 |
+
#define EPINT3 3
|
| 670 |
+
#define EPINT2 2
|
| 671 |
+
#define EPINT1 1
|
| 672 |
+
#define EPINT0 0
|
| 673 |
+
|
| 674 |
+
/* Reserved [0xF5..0xF9] */
|
| 675 |
+
|
| 676 |
+
#define PS2CON _SFR_MEM8(0XFA)
|
| 677 |
+
#define PS2EN 0
|
| 678 |
+
|
| 679 |
+
#define UPOE _SFR_MEM8(0XFB)
|
| 680 |
+
#define UPWE1 7
|
| 681 |
+
#define UPWE0 6
|
| 682 |
+
#define UPDRV1 5
|
| 683 |
+
#define UPDRV0 4
|
| 684 |
+
#define SCKI 3
|
| 685 |
+
#define DATAI 2
|
| 686 |
+
#define DPI 1
|
| 687 |
+
#define DMI 0
|
| 688 |
+
|
| 689 |
+
/* Reserved [0xFC..0xFF] */
|
| 690 |
+
|
| 691 |
+
/* Interrupt vectors */
|
| 692 |
+
|
| 693 |
+
/* External Interrupt Request 0 */
|
| 694 |
+
#define INT0_vect_num 1
|
| 695 |
+
#define INT0_vect _VECTOR(1)
|
| 696 |
+
|
| 697 |
+
/* External Interrupt Request 1 */
|
| 698 |
+
#define INT1_vect_num 2
|
| 699 |
+
#define INT1_vect _VECTOR(2)
|
| 700 |
+
|
| 701 |
+
/* External Interrupt Request 2 */
|
| 702 |
+
#define INT2_vect_num 3
|
| 703 |
+
#define INT2_vect _VECTOR(3)
|
| 704 |
+
|
| 705 |
+
/* External Interrupt Request 3 */
|
| 706 |
+
#define INT3_vect_num 4
|
| 707 |
+
#define INT3_vect _VECTOR(4)
|
| 708 |
+
|
| 709 |
+
/* External Interrupt Request 4 */
|
| 710 |
+
#define INT4_vect_num 5
|
| 711 |
+
#define INT4_vect _VECTOR(5)
|
| 712 |
+
|
| 713 |
+
/* External Interrupt Request 5 */
|
| 714 |
+
#define INT5_vect_num 6
|
| 715 |
+
#define INT5_vect _VECTOR(6)
|
| 716 |
+
|
| 717 |
+
/* External Interrupt Request 6 */
|
| 718 |
+
#define INT6_vect_num 7
|
| 719 |
+
#define INT6_vect _VECTOR(7)
|
| 720 |
+
|
| 721 |
+
/* External Interrupt Request 7 */
|
| 722 |
+
#define INT7_vect_num 8
|
| 723 |
+
#define INT7_vect _VECTOR(8)
|
| 724 |
+
|
| 725 |
+
/* Pin Change Interrupt Request 0 */
|
| 726 |
+
#define PCINT0_vect_num 9
|
| 727 |
+
#define PCINT0_vect _VECTOR(9)
|
| 728 |
+
|
| 729 |
+
/* Pin Change Interrupt Request 1 */
|
| 730 |
+
#define PCINT1_vect_num 10
|
| 731 |
+
#define PCINT1_vect _VECTOR(10)
|
| 732 |
+
|
| 733 |
+
/* USB General Interrupt Request */
|
| 734 |
+
#define USB_GEN_vect_num 11
|
| 735 |
+
#define USB_GEN_vect _VECTOR(11)
|
| 736 |
+
|
| 737 |
+
/* USB Endpoint/Pipe Interrupt Communication Request */
|
| 738 |
+
#define USB_COM_vect_num 12
|
| 739 |
+
#define USB_COM_vect _VECTOR(12)
|
| 740 |
+
|
| 741 |
+
/* Watchdog Time-out Interrupt */
|
| 742 |
+
#define WDT_vect_num 13
|
| 743 |
+
#define WDT_vect _VECTOR(13)
|
| 744 |
+
|
| 745 |
+
/* Timer/Counter2 Capture Event */
|
| 746 |
+
#define TIMER1_CAPT_vect_num 14
|
| 747 |
+
#define TIMER1_CAPT_vect _VECTOR(14)
|
| 748 |
+
|
| 749 |
+
/* Timer/Counter2 Compare Match B */
|
| 750 |
+
#define TIMER1_COMPA_vect_num 15
|
| 751 |
+
#define TIMER1_COMPA_vect _VECTOR(15)
|
| 752 |
+
|
| 753 |
+
/* Timer/Counter2 Compare Match B */
|
| 754 |
+
#define TIMER1_COMPB_vect_num 16
|
| 755 |
+
#define TIMER1_COMPB_vect _VECTOR(16)
|
| 756 |
+
|
| 757 |
+
/* Timer/Counter2 Compare Match C */
|
| 758 |
+
#define TIMER1_COMPC_vect_num 17
|
| 759 |
+
#define TIMER1_COMPC_vect _VECTOR(17)
|
| 760 |
+
|
| 761 |
+
/* Timer/Counter1 Overflow */
|
| 762 |
+
#define TIMER1_OVF_vect_num 18
|
| 763 |
+
#define TIMER1_OVF_vect _VECTOR(18)
|
| 764 |
+
|
| 765 |
+
/* Timer/Counter0 Compare Match A */
|
| 766 |
+
#define TIMER0_COMPA_vect_num 19
|
| 767 |
+
#define TIMER0_COMPA_vect _VECTOR(19)
|
| 768 |
+
|
| 769 |
+
/* Timer/Counter0 Compare Match B */
|
| 770 |
+
#define TIMER0_COMPB_vect_num 20
|
| 771 |
+
#define TIMER0_COMPB_vect _VECTOR(20)
|
| 772 |
+
|
| 773 |
+
/* Timer/Counter0 Overflow */
|
| 774 |
+
#define TIMER0_OVF_vect_num 21
|
| 775 |
+
#define TIMER0_OVF_vect _VECTOR(21)
|
| 776 |
+
|
| 777 |
+
/* SPI Serial Transfer Complete */
|
| 778 |
+
#define SPI_STC_vect_num 22
|
| 779 |
+
#define SPI_STC_vect _VECTOR(22)
|
| 780 |
+
|
| 781 |
+
/* USART1, Rx Complete */
|
| 782 |
+
#define USART1_RX_vect_num 23
|
| 783 |
+
#define USART1_RX_vect _VECTOR(23)
|
| 784 |
+
|
| 785 |
+
/* USART1 Data register Empty */
|
| 786 |
+
#define USART1_UDRE_vect_num 24
|
| 787 |
+
#define USART1_UDRE_vect _VECTOR(24)
|
| 788 |
+
|
| 789 |
+
/* USART1, Tx Complete */
|
| 790 |
+
#define USART1_TX_vect_num 25
|
| 791 |
+
#define USART1_TX_vect _VECTOR(25)
|
| 792 |
+
|
| 793 |
+
/* Analog Comparator */
|
| 794 |
+
#define ANALOG_COMP_vect_num 26
|
| 795 |
+
#define ANALOG_COMP_vect _VECTOR(26)
|
| 796 |
+
|
| 797 |
+
/* EEPROM Ready */
|
| 798 |
+
#define EE_READY_vect_num 27
|
| 799 |
+
#define EE_READY_vect _VECTOR(27)
|
| 800 |
+
|
| 801 |
+
/* Store Program Memory Read */
|
| 802 |
+
#define SPM_READY_vect_num 28
|
| 803 |
+
#define SPM_READY_vect _VECTOR(28)
|
| 804 |
+
|
| 805 |
+
#define _VECTORS_SIZE 116
|
| 806 |
+
|
| 807 |
+
#endif /* _AVR_IOUSBXX2_H_ */
|
hardware/tools/avr/avr/include/avr/iousbxx6_7.h
ADDED
|
@@ -0,0 +1,1336 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Copyright (c) 2006, Anatoly Sokolov
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
|
| 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
|
| 13 |
+
distribution.
|
| 14 |
+
|
| 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.
|
| 18 |
+
|
| 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. */
|
| 30 |
+
|
| 31 |
+
/* $Id: iousbxx6_7.h 2225 2011-03-02 16:27:26Z arcanum $ */
|
| 32 |
+
|
| 33 |
+
/* iousbxx6_7.h - definitions for AT90USB646, AT90USB647, AT90USB1286
|
| 34 |
+
and AT90USB1287 */
|
| 35 |
+
|
| 36 |
+
#ifndef _AVR_IOUSBXX6_7_H_
|
| 37 |
+
#define _AVR_IOUSBXX6_7_H_ 1
|
| 38 |
+
|
| 39 |
+
/* This file should only be included from <avr/io.h>, never directly. */
|
| 40 |
+
|
| 41 |
+
#ifndef _AVR_IO_H_
|
| 42 |
+
# error "Include <avr/io.h> instead of this file."
|
| 43 |
+
#endif
|
| 44 |
+
|
| 45 |
+
#ifndef _AVR_IOXXX_H_
|
| 46 |
+
# define _AVR_IOXXX_H_ "iousbxx6_7.h"
|
| 47 |
+
#else
|
| 48 |
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
| 52 |
+
# define __AT90USBxx6__ 1
|
| 53 |
+
#elif defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__)
|
| 54 |
+
# define __AT90USBxx7__ 1
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
/* Registers and associated bit numbers */
|
| 58 |
+
|
| 59 |
+
#define PINA _SFR_IO8(0X00)
|
| 60 |
+
#define PINA7 7
|
| 61 |
+
#define PINA6 6
|
| 62 |
+
#define PINA5 5
|
| 63 |
+
#define PINA4 4
|
| 64 |
+
#define PINA3 3
|
| 65 |
+
#define PINA2 2
|
| 66 |
+
#define PINA1 1
|
| 67 |
+
#define PINA0 0
|
| 68 |
+
|
| 69 |
+
#define DDRA _SFR_IO8(0X01)
|
| 70 |
+
#define DDA7 7
|
| 71 |
+
#define DDA6 6
|
| 72 |
+
#define DDA5 5
|
| 73 |
+
#define DDA4 4
|
| 74 |
+
#define DDA3 3
|
| 75 |
+
#define DDA2 2
|
| 76 |
+
#define DDA1 1
|
| 77 |
+
#define DDA0 0
|
| 78 |
+
|
| 79 |
+
#define PORTA _SFR_IO8(0X02)
|
| 80 |
+
#define PA7 7
|
| 81 |
+
#define PA6 6
|
| 82 |
+
#define PA5 5
|
| 83 |
+
#define PA4 4
|
| 84 |
+
#define PA3 3
|
| 85 |
+
#define PA2 2
|
| 86 |
+
#define PA1 1
|
| 87 |
+
#define PA0 0
|
| 88 |
+
|
| 89 |
+
#define PINB _SFR_IO8(0X03)
|
| 90 |
+
#define PINB7 7
|
| 91 |
+
#define PINB6 6
|
| 92 |
+
#define PINB5 5
|
| 93 |
+
#define PINB4 4
|
| 94 |
+
#define PINB3 3
|
| 95 |
+
#define PINB2 2
|
| 96 |
+
#define PINB1 1
|
| 97 |
+
#define PINB0 0
|
| 98 |
+
|
| 99 |
+
#define DDRB _SFR_IO8(0x04)
|
| 100 |
+
#define DDB7 7
|
| 101 |
+
#define DDB6 6
|
| 102 |
+
#define DDB5 5
|
| 103 |
+
#define DDB4 4
|
| 104 |
+
#define DDB3 3
|
| 105 |
+
#define DDB2 2
|
| 106 |
+
#define DDB1 1
|
| 107 |
+
#define DDB0 0
|
| 108 |
+
|
| 109 |
+
#define PORTB _SFR_IO8(0x05)
|
| 110 |
+
#define PB7 7
|
| 111 |
+
#define PB6 6
|
| 112 |
+
#define PB5 5
|
| 113 |
+
#define PB4 4
|
| 114 |
+
#define PB3 3
|
| 115 |
+
#define PB2 2
|
| 116 |
+
#define PB1 1
|
| 117 |
+
#define PB0 0
|
| 118 |
+
|
| 119 |
+
#define PINC _SFR_IO8(0x06)
|
| 120 |
+
#define PINC7 7
|
| 121 |
+
#define PINC6 6
|
| 122 |
+
#define PINC5 5
|
| 123 |
+
#define PINC4 4
|
| 124 |
+
#define PINC3 3
|
| 125 |
+
#define PINC2 2
|
| 126 |
+
#define PINC1 1
|
| 127 |
+
#define PINC0 0
|
| 128 |
+
|
| 129 |
+
#define DDRC _SFR_IO8(0x07)
|
| 130 |
+
#define DDC7 7
|
| 131 |
+
#define DDC6 6
|
| 132 |
+
#define DDC5 5
|
| 133 |
+
#define DDC4 4
|
| 134 |
+
#define DDC3 3
|
| 135 |
+
#define DDC2 2
|
| 136 |
+
#define DDC1 1
|
| 137 |
+
#define DDC0 0
|
| 138 |
+
|
| 139 |
+
#define PORTC _SFR_IO8(0x08)
|
| 140 |
+
#define PC7 7
|
| 141 |
+
#define PC6 6
|
| 142 |
+
#define PC5 5
|
| 143 |
+
#define PC4 4
|
| 144 |
+
#define PC3 3
|
| 145 |
+
#define PC2 2
|
| 146 |
+
#define PC1 1
|
| 147 |
+
#define PC0 0
|
| 148 |
+
|
| 149 |
+
#define PIND _SFR_IO8(0x09)
|
| 150 |
+
#define PIND7 7
|
| 151 |
+
#define PIND6 6
|
| 152 |
+
#define PIND5 5
|
| 153 |
+
#define PIND4 4
|
| 154 |
+
#define PIND3 3
|
| 155 |
+
#define PIND2 2
|
| 156 |
+
#define PIND1 1
|
| 157 |
+
#define PIND0 0
|
| 158 |
+
|
| 159 |
+
#define DDRD _SFR_IO8(0x0A)
|
| 160 |
+
#define DDD7 7
|
| 161 |
+
#define DDD6 6
|
| 162 |
+
#define DDD5 5
|
| 163 |
+
#define DDD4 4
|
| 164 |
+
#define DDD3 3
|
| 165 |
+
#define DDD2 2
|
| 166 |
+
#define DDD1 1
|
| 167 |
+
#define DDD0 0
|
| 168 |
+
|
| 169 |
+
#define PORTD _SFR_IO8(0x0B)
|
| 170 |
+
#define PD7 7
|
| 171 |
+
#define PD6 6
|
| 172 |
+
#define PD5 5
|
| 173 |
+
#define PD4 4
|
| 174 |
+
#define PD3 3
|
| 175 |
+
#define PD2 2
|
| 176 |
+
#define PD1 1
|
| 177 |
+
#define PD0 0
|
| 178 |
+
|
| 179 |
+
#define PINE _SFR_IO8(0x0C)
|
| 180 |
+
#define PINE7 7
|
| 181 |
+
#define PINE6 6
|
| 182 |
+
#define PINE5 5
|
| 183 |
+
#define PINE4 4
|
| 184 |
+
#define PINE3 3
|
| 185 |
+
#define PINE2 2
|
| 186 |
+
#define PINE1 1
|
| 187 |
+
#define PINE0 0
|
| 188 |
+
|
| 189 |
+
#define DDRE _SFR_IO8(0x0D)
|
| 190 |
+
#define DDE7 7
|
| 191 |
+
#define DDE6 6
|
| 192 |
+
#define DDE5 5
|
| 193 |
+
#define DDE4 4
|
| 194 |
+
#define DDE3 3
|
| 195 |
+
#define DDE2 2
|
| 196 |
+
#define DDE1 1
|
| 197 |
+
#define DDE0 0
|
| 198 |
+
|
| 199 |
+
#define PORTE _SFR_IO8(0x0E)
|
| 200 |
+
#define PE7 7
|
| 201 |
+
#define PE6 6
|
| 202 |
+
#define PE5 5
|
| 203 |
+
#define PE4 4
|
| 204 |
+
#define PE3 3
|
| 205 |
+
#define PE2 2
|
| 206 |
+
#define PE1 1
|
| 207 |
+
#define PE0 0
|
| 208 |
+
|
| 209 |
+
#define PINF _SFR_IO8(0x0F)
|
| 210 |
+
#define PINF7 7
|
| 211 |
+
#define PINF6 6
|
| 212 |
+
#define PINF5 5
|
| 213 |
+
#define PINF4 4
|
| 214 |
+
#define PINF3 3
|
| 215 |
+
#define PINF2 2
|
| 216 |
+
#define PINF1 1
|
| 217 |
+
#define PINF0 0
|
| 218 |
+
|
| 219 |
+
#define DDRF _SFR_IO8(0x10)
|
| 220 |
+
#define DDF7 7
|
| 221 |
+
#define DDF6 6
|
| 222 |
+
#define DDF5 5
|
| 223 |
+
#define DDF4 4
|
| 224 |
+
#define DDF3 3
|
| 225 |
+
#define DDF2 2
|
| 226 |
+
#define DDF1 1
|
| 227 |
+
#define DDF0 0
|
| 228 |
+
|
| 229 |
+
#define PORTF _SFR_IO8(0x11)
|
| 230 |
+
#define PF7 7
|
| 231 |
+
#define PF6 6
|
| 232 |
+
#define PF5 5
|
| 233 |
+
#define PF4 4
|
| 234 |
+
#define PF3 3
|
| 235 |
+
#define PF2 2
|
| 236 |
+
#define PF1 1
|
| 237 |
+
#define PF0 0
|
| 238 |
+
|
| 239 |
+
/* Reserved [0x12..0x14] */
|
| 240 |
+
|
| 241 |
+
#define TIFR0 _SFR_IO8(0x15)
|
| 242 |
+
#define OCF0B 2
|
| 243 |
+
#define OCF0A 1
|
| 244 |
+
#define TOV0 0
|
| 245 |
+
|
| 246 |
+
#define TIFR1 _SFR_IO8(0x16)
|
| 247 |
+
#define ICF1 5
|
| 248 |
+
#define OCF1C 3
|
| 249 |
+
#define OCF1B 2
|
| 250 |
+
#define OCF1A 1
|
| 251 |
+
#define TOV1 0
|
| 252 |
+
|
| 253 |
+
#define TIFR2 _SFR_IO8(0x17)
|
| 254 |
+
#define OCF2B 2
|
| 255 |
+
#define OCF2A 1
|
| 256 |
+
#define TOV2 0
|
| 257 |
+
|
| 258 |
+
#define TIFR3 _SFR_IO8(0x18)
|
| 259 |
+
#define ICF3 5
|
| 260 |
+
#define OCF3C 3
|
| 261 |
+
#define OCF3B 2
|
| 262 |
+
#define OCF3A 1
|
| 263 |
+
#define TOV3 0
|
| 264 |
+
|
| 265 |
+
/* Reserved [0x19..0x1A] */
|
| 266 |
+
|
| 267 |
+
#define PCIFR _SFR_IO8(0x1B)
|
| 268 |
+
#define PCIF0 0
|
| 269 |
+
|
| 270 |
+
#define EIFR _SFR_IO8(0x1C)
|
| 271 |
+
#define INTF7 7
|
| 272 |
+
#define INTF6 6
|
| 273 |
+
#define INTF5 5
|
| 274 |
+
#define INTF4 4
|
| 275 |
+
#define INTF3 3
|
| 276 |
+
#define INTF2 2
|
| 277 |
+
#define INTF1 1
|
| 278 |
+
#define INTF0 0
|
| 279 |
+
|
| 280 |
+
#define EIMSK _SFR_IO8(0x1D)
|
| 281 |
+
#define INT7 7
|
| 282 |
+
#define INT6 6
|
| 283 |
+
#define INT5 5
|
| 284 |
+
#define INT4 4
|
| 285 |
+
#define INT3 3
|
| 286 |
+
#define INT2 2
|
| 287 |
+
#define INT1 1
|
| 288 |
+
#define INT0 0
|
| 289 |
+
|
| 290 |
+
#define GPIOR0 _SFR_IO8(0x1E)
|
| 291 |
+
|
| 292 |
+
#define EECR _SFR_IO8(0x1F)
|
| 293 |
+
#define EEPM1 5
|
| 294 |
+
#define EEPM0 4
|
| 295 |
+
#define EERIE 3
|
| 296 |
+
#define EEMPE 2
|
| 297 |
+
#define EEPE 1
|
| 298 |
+
#define EERE 0
|
| 299 |
+
|
| 300 |
+
#define EEDR _SFR_IO8(0x20)
|
| 301 |
+
|
| 302 |
+
#define EEAR _SFR_IO16(0x21)
|
| 303 |
+
#define EEARL _SFR_IO8(0x21)
|
| 304 |
+
#define EEARH _SFR_IO8(0x22)
|
| 305 |
+
|
| 306 |
+
/* 6-char sequence denoting where to find the EEPROM registers in memory space.
|
| 307 |
+
Adresses denoted in hex syntax with uppercase letters. Used by the EEPROM
|
| 308 |
+
subroutines.
|
| 309 |
+
First two letters: EECR address.
|
| 310 |
+
Second two letters: EEDR address.
|
| 311 |
+
Last two letters: EEAR address. */
|
| 312 |
+
#define __EEPROM_REG_LOCATIONS__ 1F2021
|
| 313 |
+
|
| 314 |
+
#define GTCCR _SFR_IO8(0x23)
|
| 315 |
+
#define TSM 7
|
| 316 |
+
#define PSRASY 1
|
| 317 |
+
#define PSRSYNC 0
|
| 318 |
+
|
| 319 |
+
#define TCCR0A _SFR_IO8(0x24)
|
| 320 |
+
#define COM0A1 7
|
| 321 |
+
#define COM0A0 6
|
| 322 |
+
#define COM0B1 5
|
| 323 |
+
#define COM0B0 4
|
| 324 |
+
#define WGM01 1
|
| 325 |
+
#define WGM00 0
|
| 326 |
+
|
| 327 |
+
#define TCCR0B _SFR_IO8(0x25)
|
| 328 |
+
#define FOC0A 7
|
| 329 |
+
#define FOC0B 6
|
| 330 |
+
#define WGM02 3
|
| 331 |
+
#define CS02 2
|
| 332 |
+
#define CS01 1
|
| 333 |
+
#define CS00 0
|
| 334 |
+
|
| 335 |
+
#define TCNT0 _SFR_IO8(0X26)
|
| 336 |
+
|
| 337 |
+
#define OCR0A _SFR_IO8(0x27)
|
| 338 |
+
|
| 339 |
+
#define OCR0B _SFR_IO8(0X28)
|
| 340 |
+
|
| 341 |
+
#define PLLCSR _SFR_IO8(0x29)
|
| 342 |
+
#define PLLP2 4
|
| 343 |
+
#define PLLP1 3
|
| 344 |
+
#define PLLP0 2
|
| 345 |
+
#define PLLE 1
|
| 346 |
+
#define PLOCK 0
|
| 347 |
+
|
| 348 |
+
#define GPIOR1 _SFR_IO8(0x2A)
|
| 349 |
+
|
| 350 |
+
#define GPIOR2 _SFR_IO8(0x2B)
|
| 351 |
+
|
| 352 |
+
#define SPCR _SFR_IO8(0x2C)
|
| 353 |
+
#define SPIE 7
|
| 354 |
+
#define SPE 6
|
| 355 |
+
#define DORD 5
|
| 356 |
+
#define MSTR 4
|
| 357 |
+
#define CPOL 3
|
| 358 |
+
#define CPHA 2
|
| 359 |
+
#define SPR1 1
|
| 360 |
+
#define SPR0 0
|
| 361 |
+
|
| 362 |
+
#define SPSR _SFR_IO8(0x2D)
|
| 363 |
+
#define SPIF 7
|
| 364 |
+
#define WCOL 6
|
| 365 |
+
#define SPI2X 0
|
| 366 |
+
|
| 367 |
+
#define SPDR _SFR_IO8(0x2E)
|
| 368 |
+
|
| 369 |
+
/* Reserved [0x2F] */
|
| 370 |
+
|
| 371 |
+
#define ACSR _SFR_IO8(0x30)
|
| 372 |
+
#define ACD 7
|
| 373 |
+
#define ACBG 6
|
| 374 |
+
#define ACO 5
|
| 375 |
+
#define ACI 4
|
| 376 |
+
#define ACIE 3
|
| 377 |
+
#define ACIC 2
|
| 378 |
+
#define ACIS1 1
|
| 379 |
+
#define ACIS0 0
|
| 380 |
+
|
| 381 |
+
#define MONDR _SFR_IO8(0x31)
|
| 382 |
+
#define OCDR _SFR_IO8(0x31)
|
| 383 |
+
#define IDRD 7
|
| 384 |
+
#define OCDR7 7
|
| 385 |
+
#define OCDR6 6
|
| 386 |
+
#define OCDR5 5
|
| 387 |
+
#define OCDR4 4
|
| 388 |
+
#define OCDR3 3
|
| 389 |
+
#define OCDR2 2
|
| 390 |
+
#define OCDR1 1
|
| 391 |
+
#define OCDR0 0
|
| 392 |
+
|
| 393 |
+
/* Reserved [0x32] */
|
| 394 |
+
|
| 395 |
+
#define SMCR _SFR_IO8(0x33)
|
| 396 |
+
#define SM2 3
|
| 397 |
+
#define SM1 2
|
| 398 |
+
#define SM0 1
|
| 399 |
+
#define SE 0
|
| 400 |
+
|
| 401 |
+
#define MCUSR _SFR_IO8(0x34)
|
| 402 |
+
#define JTRF 4
|
| 403 |
+
#define WDRF 3
|
| 404 |
+
#define BORF 2
|
| 405 |
+
#define EXTRF 1
|
| 406 |
+
#define PORF 0
|
| 407 |
+
|
| 408 |
+
#define MCUCR _SFR_IO8(0x35)
|
| 409 |
+
#define JTD 7
|
| 410 |
+
#define PUD 4
|
| 411 |
+
#define IVSEL 1
|
| 412 |
+
#define IVCE 0
|
| 413 |
+
|
| 414 |
+
/* Reserved [0x36] */
|
| 415 |
+
|
| 416 |
+
#define SPMCSR _SFR_IO8(0x37)
|
| 417 |
+
#define SPMIE 7
|
| 418 |
+
#define RWWSB 6
|
| 419 |
+
#define SIGRD 5
|
| 420 |
+
#define RWWSRE 4
|
| 421 |
+
#define BLBSET 3
|
| 422 |
+
#define PGWRT 2
|
| 423 |
+
#define PGERS 1
|
| 424 |
+
#define SPMEN 0
|
| 425 |
+
|
| 426 |
+
/* Reserved [0x38..0x3A] */
|
| 427 |
+
|
| 428 |
+
#if defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
| 429 |
+
#define RAMPZ _SFR_IO8(0x3B)
|
| 430 |
+
#endif
|
| 431 |
+
|
| 432 |
+
/* Reserved [0x3C] */
|
| 433 |
+
|
| 434 |
+
/* SP [0x3D..0x3E] */
|
| 435 |
+
/* SREG [0x3F] */
|
| 436 |
+
|
| 437 |
+
#define WDTCSR _SFR_MEM8(0x60)
|
| 438 |
+
#define WDIF 7
|
| 439 |
+
#define WDIE 6
|
| 440 |
+
#define WDP3 5
|
| 441 |
+
#define WDCE 4
|
| 442 |
+
#define WDE 3
|
| 443 |
+
#define WDP2 2
|
| 444 |
+
#define WDP1 1
|
| 445 |
+
#define WDP0 0
|
| 446 |
+
|
| 447 |
+
#define CLKPR _SFR_MEM8(0x61)
|
| 448 |
+
#define CLKPCE 7
|
| 449 |
+
#define CLKPS3 3
|
| 450 |
+
#define CLKPS2 2
|
| 451 |
+
#define CLKPS1 1
|
| 452 |
+
#define CLKPS0 0
|
| 453 |
+
|
| 454 |
+
/* Reserved [0x62..0x63] */
|
| 455 |
+
|
| 456 |
+
#define PRR0 _SFR_MEM8(0x64)
|
| 457 |
+
#define PRTWI 7
|
| 458 |
+
#define PRTIM2 6
|
| 459 |
+
#define PRTIM0 5
|
| 460 |
+
#define PRTIM1 3
|
| 461 |
+
#define PRSPI 2
|
| 462 |
+
#define PRADC 0
|
| 463 |
+
|
| 464 |
+
#define __AVR_HAVE_PRR0 ((1<<PRADC)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI))
|
| 465 |
+
#define __AVR_HAVE_PRR0_PRADC
|
| 466 |
+
#define __AVR_HAVE_PRR0_PRSPI
|
| 467 |
+
#define __AVR_HAVE_PRR0_PRTIM1
|
| 468 |
+
#define __AVR_HAVE_PRR0_PRTIM0
|
| 469 |
+
#define __AVR_HAVE_PRR0_PRTIM2
|
| 470 |
+
#define __AVR_HAVE_PRR0_PRTWI
|
| 471 |
+
|
| 472 |
+
#define PRR1 _SFR_MEM8(0x65)
|
| 473 |
+
#define PRUSB 7
|
| 474 |
+
#define PRTIM3 3
|
| 475 |
+
#define PRUSART1 0
|
| 476 |
+
|
| 477 |
+
#define __AVR_HAVE_PRR1 ((1<<PRUSART1)|(1<<PRTIM3)|(1<<PRUSB))
|
| 478 |
+
#define __AVR_HAVE_PRR1_PRUSART1
|
| 479 |
+
#define __AVR_HAVE_PRR1_PRTIM3
|
| 480 |
+
#define __AVR_HAVE_PRR1_PRUSB
|
| 481 |
+
|
| 482 |
+
#define OSCCAL _SFR_MEM8(0x66)
|
| 483 |
+
|
| 484 |
+
/* Reserved [0x67] */
|
| 485 |
+
|
| 486 |
+
#define PCICR _SFR_MEM8(0x68)
|
| 487 |
+
#define PCIE0 0
|
| 488 |
+
|
| 489 |
+
#define EICRA _SFR_MEM8(0x69)
|
| 490 |
+
#define ISC31 7
|
| 491 |
+
#define ISC30 6
|
| 492 |
+
#define ISC21 5
|
| 493 |
+
#define ISC20 4
|
| 494 |
+
#define ISC11 3
|
| 495 |
+
#define ISC10 2
|
| 496 |
+
#define ISC01 1
|
| 497 |
+
#define ISC00 0
|
| 498 |
+
|
| 499 |
+
#define EICRB _SFR_MEM8(0x6A)
|
| 500 |
+
#define ISC71 7
|
| 501 |
+
#define ISC70 6
|
| 502 |
+
#define ISC61 5
|
| 503 |
+
#define ISC60 4
|
| 504 |
+
#define ISC51 3
|
| 505 |
+
#define ISC50 2
|
| 506 |
+
#define ISC41 1
|
| 507 |
+
#define ISC40 0
|
| 508 |
+
|
| 509 |
+
#define PCMSK0 _SFR_MEM8(0x6B)
|
| 510 |
+
#define PCINT7 7
|
| 511 |
+
#define PCINT6 6
|
| 512 |
+
#define PCINT5 5
|
| 513 |
+
#define PCINT4 4
|
| 514 |
+
#define PCINT3 3
|
| 515 |
+
#define PCINT2 2
|
| 516 |
+
#define PCINT1 1
|
| 517 |
+
#define PCINT0 0
|
| 518 |
+
|
| 519 |
+
/* Reserved [0x6C..0x6D] */
|
| 520 |
+
|
| 521 |
+
#define TIMSK0 _SFR_MEM8(0x6E)
|
| 522 |
+
#define OCIE0B 2
|
| 523 |
+
#define OCIE0A 1
|
| 524 |
+
#define TOIE0 0
|
| 525 |
+
|
| 526 |
+
#define TIMSK1 _SFR_MEM8(0x6F)
|
| 527 |
+
#define ICIE1 5
|
| 528 |
+
#define OCIE1C 3
|
| 529 |
+
#define OCIE1B 2
|
| 530 |
+
#define OCIE1A 1
|
| 531 |
+
#define TOIE1 0
|
| 532 |
+
|
| 533 |
+
#define TIMSK2 _SFR_MEM8(0x70)
|
| 534 |
+
#define OCIE2B 2
|
| 535 |
+
#define OCIE2A 1
|
| 536 |
+
#define TOIE2 0
|
| 537 |
+
|
| 538 |
+
#define TIMSK3 _SFR_MEM8(0x71)
|
| 539 |
+
#define ICIE3 5
|
| 540 |
+
#define OCIE3C 3
|
| 541 |
+
#define OCIE3B 2
|
| 542 |
+
#define OCIE3A 1
|
| 543 |
+
#define TOIE3 0
|
| 544 |
+
|
| 545 |
+
/* Reserved [0x72..0x73] */
|
| 546 |
+
|
| 547 |
+
#define XMCRA _SFR_MEM8(0x74)
|
| 548 |
+
#define SRE 7
|
| 549 |
+
#define SRL2 6
|
| 550 |
+
#define SRL1 5
|
| 551 |
+
#define SRL0 4
|
| 552 |
+
#define SRW11 3
|
| 553 |
+
#define SRW10 2
|
| 554 |
+
#define SRW01 1
|
| 555 |
+
#define SRW00 0
|
| 556 |
+
|
| 557 |
+
#define XMCRB _SFR_MEM8(0x75)
|
| 558 |
+
#define XMBK 7
|
| 559 |
+
#define XMM2 2
|
| 560 |
+
#define XMM1 1
|
| 561 |
+
#define XMM0 0
|
| 562 |
+
|
| 563 |
+
/* Reserved [0x76..0x77] */
|
| 564 |
+
|
| 565 |
+
/* RegDef: ADC Data Register */
|
| 566 |
+
#ifndef __ASSEMBLER__
|
| 567 |
+
#define ADC _SFR_MEM16(0x78)
|
| 568 |
+
#endif
|
| 569 |
+
#define ADCW _SFR_MEM16(0x78)
|
| 570 |
+
#define ADCL _SFR_MEM8(0x78)
|
| 571 |
+
#define ADCH _SFR_MEM8(0x79)
|
| 572 |
+
|
| 573 |
+
#define ADCSRA _SFR_MEM8(0x7A)
|
| 574 |
+
#define ADEN 7
|
| 575 |
+
#define ADSC 6
|
| 576 |
+
#define ADATE 5
|
| 577 |
+
#define ADIF 4
|
| 578 |
+
#define ADIE 3
|
| 579 |
+
#define ADPS2 2
|
| 580 |
+
#define ADPS1 1
|
| 581 |
+
#define ADPS0 0
|
| 582 |
+
|
| 583 |
+
#define ADCSRB _SFR_MEM8(0x7B)
|
| 584 |
+
#define ADHSM 7
|
| 585 |
+
#define ACME 6
|
| 586 |
+
#define ADTS2 2
|
| 587 |
+
#define ADTS1 1
|
| 588 |
+
#define ADTS0 0
|
| 589 |
+
|
| 590 |
+
#define ADMUX _SFR_MEM8(0x7C)
|
| 591 |
+
#define REFS1 7
|
| 592 |
+
#define REFS0 6
|
| 593 |
+
#define ADLAR 5
|
| 594 |
+
#define MUX4 4
|
| 595 |
+
#define MUX3 3
|
| 596 |
+
#define MUX2 2
|
| 597 |
+
#define MUX1 1
|
| 598 |
+
#define MUX0 0
|
| 599 |
+
|
| 600 |
+
/* Reserved [0x7D] */
|
| 601 |
+
|
| 602 |
+
#define DIDR0 _SFR_MEM8(0x7E)
|
| 603 |
+
#define ADC7D 7
|
| 604 |
+
#define ADC6D 6
|
| 605 |
+
#define ADC5D 5
|
| 606 |
+
#define ADC4D 4
|
| 607 |
+
#define ADC3D 3
|
| 608 |
+
#define ADC2D 2
|
| 609 |
+
#define ADC1D 1
|
| 610 |
+
#define ADC0D 0
|
| 611 |
+
|
| 612 |
+
#define DIDR1 _SFR_MEM8(0x7F)
|
| 613 |
+
#define AIN1D 1
|
| 614 |
+
#define AIN0D 0
|
| 615 |
+
|
| 616 |
+
#define TCCR1A _SFR_MEM8(0x80)
|
| 617 |
+
#define COM1A1 7
|
| 618 |
+
#define COM1A0 6
|
| 619 |
+
#define COM1B1 5
|
| 620 |
+
#define COM1B0 4
|
| 621 |
+
#define COM1C1 3
|
| 622 |
+
#define COM1C0 2
|
| 623 |
+
#define WGM11 1
|
| 624 |
+
#define WGM10 0
|
| 625 |
+
|
| 626 |
+
#define TCCR1B _SFR_MEM8(0x81)
|
| 627 |
+
#define ICNC1 7
|
| 628 |
+
#define ICES1 6
|
| 629 |
+
#define WGM13 4
|
| 630 |
+
#define WGM12 3
|
| 631 |
+
#define CS12 2
|
| 632 |
+
#define CS11 1
|
| 633 |
+
#define CS10 0
|
| 634 |
+
|
| 635 |
+
#define TCCR1C _SFR_MEM8(0x82)
|
| 636 |
+
#define FOC1A 7
|
| 637 |
+
#define FOC1B 6
|
| 638 |
+
#define FOC1C 5
|
| 639 |
+
|
| 640 |
+
/* Reserved [0x83] */
|
| 641 |
+
|
| 642 |
+
/* Combine TCNT1L and TCNT1H */
|
| 643 |
+
#define TCNT1 _SFR_MEM16(0x84)
|
| 644 |
+
|
| 645 |
+
#define TCNT1L _SFR_MEM8(0x84)
|
| 646 |
+
#define TCNT1H _SFR_MEM8(0x85)
|
| 647 |
+
|
| 648 |
+
/* Combine ICR1L and ICR1H */
|
| 649 |
+
#define ICR1 _SFR_MEM16(0x86)
|
| 650 |
+
|
| 651 |
+
#define ICR1L _SFR_MEM8(0x86)
|
| 652 |
+
#define ICR1H _SFR_MEM8(0x87)
|
| 653 |
+
|
| 654 |
+
/* Combine OCR1AL and OCR1AH */
|
| 655 |
+
#define OCR1A _SFR_MEM16(0x88)
|
| 656 |
+
|
| 657 |
+
#define OCR1AL _SFR_MEM8(0x88)
|
| 658 |
+
#define OCR1AH _SFR_MEM8(0x89)
|
| 659 |
+
|
| 660 |
+
/* Combine OCR1BL and OCR1BH */
|
| 661 |
+
#define OCR1B _SFR_MEM16(0x8A)
|
| 662 |
+
|
| 663 |
+
#define OCR1BL _SFR_MEM8(0x8A)
|
| 664 |
+
#define OCR1BH _SFR_MEM8(0x8B)
|
| 665 |
+
|
| 666 |
+
/* Combine OCR1CL and OCR1CH */
|
| 667 |
+
#define OCR1C _SFR_MEM16(0x8C)
|
| 668 |
+
|
| 669 |
+
#define OCR1CL _SFR_MEM8(0x8C)
|
| 670 |
+
#define OCR1CH _SFR_MEM8(0x8D)
|
| 671 |
+
|
| 672 |
+
/* Reserved [0x8E..0x8F] */
|
| 673 |
+
|
| 674 |
+
#define TCCR3A _SFR_MEM8(0x90)
|
| 675 |
+
#define COM3A1 7
|
| 676 |
+
#define COM3A0 6
|
| 677 |
+
#define COM3B1 5
|
| 678 |
+
#define COM3B0 4
|
| 679 |
+
#define COM3C1 3
|
| 680 |
+
#define COM3C0 2
|
| 681 |
+
#define WGM31 1
|
| 682 |
+
#define WGM30 0
|
| 683 |
+
|
| 684 |
+
#define TCCR3B _SFR_MEM8(0x91)
|
| 685 |
+
#define ICNC3 7
|
| 686 |
+
#define ICES3 6
|
| 687 |
+
#define WGM33 4
|
| 688 |
+
#define WGM32 3
|
| 689 |
+
#define CS32 2
|
| 690 |
+
#define CS31 1
|
| 691 |
+
#define CS30 0
|
| 692 |
+
|
| 693 |
+
#define TCCR3C _SFR_MEM8(0x92)
|
| 694 |
+
#define FOC3A 7
|
| 695 |
+
#define FOC3B 6
|
| 696 |
+
#define FOC3C 5
|
| 697 |
+
|
| 698 |
+
/* Reserved [0x93] */
|
| 699 |
+
|
| 700 |
+
/* Combine TCNT3L and TCNT3H */
|
| 701 |
+
#define TCNT3 _SFR_MEM16(0x94)
|
| 702 |
+
|
| 703 |
+
#define TCNT3L _SFR_MEM8(0x94)
|
| 704 |
+
#define TCNT3H _SFR_MEM8(0x95)
|
| 705 |
+
|
| 706 |
+
/* Combine ICR3L and ICR3H */
|
| 707 |
+
#define ICR3 _SFR_MEM16(0x96)
|
| 708 |
+
|
| 709 |
+
#define ICR3L _SFR_MEM8(0x96)
|
| 710 |
+
#define ICR3H _SFR_MEM8(0x97)
|
| 711 |
+
|
| 712 |
+
/* Combine OCR3AL and OCR3AH */
|
| 713 |
+
#define OCR3A _SFR_MEM16(0x98)
|
| 714 |
+
|
| 715 |
+
#define OCR3AL _SFR_MEM8(0x98)
|
| 716 |
+
#define OCR3AH _SFR_MEM8(0x99)
|
| 717 |
+
|
| 718 |
+
/* Combine OCR3BL and OCR3BH */
|
| 719 |
+
#define OCR3B _SFR_MEM16(0x9A)
|
| 720 |
+
|
| 721 |
+
#define OCR3BL _SFR_MEM8(0x9A)
|
| 722 |
+
#define OCR3BH _SFR_MEM8(0x9B)
|
| 723 |
+
|
| 724 |
+
/* Combine OCR3CL and OCR3CH */
|
| 725 |
+
#define OCR3C _SFR_MEM16(0x9C)
|
| 726 |
+
|
| 727 |
+
#define OCR3CL _SFR_MEM8(0x9C)
|
| 728 |
+
#define OCR3CH _SFR_MEM8(0x9D)
|
| 729 |
+
|
| 730 |
+
#if defined(__AT90USBxx7__)
|
| 731 |
+
|
| 732 |
+
#define UHCON _SFR_MEM8(0x9E)
|
| 733 |
+
#define RESUME 2
|
| 734 |
+
#define RESET 1
|
| 735 |
+
#define SOFEN 0
|
| 736 |
+
|
| 737 |
+
#define UHINT _SFR_MEM8(0x9F)
|
| 738 |
+
#define HWUPI 6
|
| 739 |
+
#define HSOFI 5
|
| 740 |
+
#define RXRSMI 4
|
| 741 |
+
#define RSMEDI 3
|
| 742 |
+
#define RSTI 2
|
| 743 |
+
#define DDISCI 1
|
| 744 |
+
#define DCONNI 0
|
| 745 |
+
|
| 746 |
+
#define UHIEN _SFR_MEM8(0xA0)
|
| 747 |
+
#define HWUPE 6
|
| 748 |
+
#define HSOFE 5
|
| 749 |
+
#define RXRSME 4
|
| 750 |
+
#define RSMEDE 3
|
| 751 |
+
#define RSTE 2
|
| 752 |
+
#define DDISCE 1
|
| 753 |
+
#define DCONNE 0
|
| 754 |
+
|
| 755 |
+
#define UHADDR _SFR_MEM8(0xA1)
|
| 756 |
+
|
| 757 |
+
/* Combine UHFNUML and UHFNUMH */
|
| 758 |
+
#define UHFNUM _SFR_MEM16(0xA2)
|
| 759 |
+
|
| 760 |
+
#define UHFNUML _SFR_MEM8(0xA2)
|
| 761 |
+
#define UHFNUMH _SFR_MEM8(0xA3)
|
| 762 |
+
|
| 763 |
+
#define UHFLEN _SFR_MEM8(0xA4)
|
| 764 |
+
|
| 765 |
+
#define UPINRQX _SFR_MEM8(0xA5)
|
| 766 |
+
|
| 767 |
+
#define UPINTX _SFR_MEM8(0xA6)
|
| 768 |
+
#define FIFOCON 7
|
| 769 |
+
#define NAKEDI 6
|
| 770 |
+
#define RWAL 5
|
| 771 |
+
#define PERRI 4
|
| 772 |
+
#define TXSTPI 3
|
| 773 |
+
#define TXOUTI 2
|
| 774 |
+
#define RXSTALLI 1
|
| 775 |
+
#define RXINI 0
|
| 776 |
+
|
| 777 |
+
#define UPNUM _SFR_MEM8(0xA7)
|
| 778 |
+
|
| 779 |
+
#define UPRST _SFR_MEM8(0xA8)
|
| 780 |
+
#define PRST6 6
|
| 781 |
+
#define PRST5 5
|
| 782 |
+
#define PRST4 4
|
| 783 |
+
#define PRST3 3
|
| 784 |
+
#define PRST2 2
|
| 785 |
+
#define PRST1 1
|
| 786 |
+
#define PRST0 0
|
| 787 |
+
|
| 788 |
+
#define UPCONX _SFR_MEM8(0xA9)
|
| 789 |
+
#define PFREEZE 6
|
| 790 |
+
#define INMODE 5
|
| 791 |
+
/* #define AUTOSW 4 */ /* Reserved */
|
| 792 |
+
#define RSTDT 3
|
| 793 |
+
#define PEN 0
|
| 794 |
+
|
| 795 |
+
#define UPCFG0X _SFR_MEM8(0XAA)
|
| 796 |
+
#define PTYPE1 7
|
| 797 |
+
#define PTYPE0 6
|
| 798 |
+
#define PTOKEN1 5
|
| 799 |
+
#define PTOKEN0 4
|
| 800 |
+
#define PEPNUM3 3
|
| 801 |
+
#define PEPNUM2 2
|
| 802 |
+
#define PEPNUM1 1
|
| 803 |
+
#define PEPNUM0 0
|
| 804 |
+
|
| 805 |
+
#define UPCFG1X _SFR_MEM8(0XAB)
|
| 806 |
+
#define PSIZE2 6
|
| 807 |
+
#define PSIZE1 5
|
| 808 |
+
#define PSIZE0 4
|
| 809 |
+
#define PBK1 3
|
| 810 |
+
#define PBK0 2
|
| 811 |
+
#define ALLOC 1
|
| 812 |
+
|
| 813 |
+
#define UPSTAX _SFR_MEM8(0XAC)
|
| 814 |
+
#define CFGOK 7
|
| 815 |
+
#define OVERFI 6
|
| 816 |
+
#define UNDERFI 5
|
| 817 |
+
#define DTSEQ1 3
|
| 818 |
+
#define DTSEQ0 2
|
| 819 |
+
#define NBUSYBK1 1
|
| 820 |
+
#define NBUSYBK0 0
|
| 821 |
+
|
| 822 |
+
#define UPCFG2X _SFR_MEM8(0XAD)
|
| 823 |
+
|
| 824 |
+
#define UPIENX _SFR_MEM8(0XAE)
|
| 825 |
+
#define FLERRE 7
|
| 826 |
+
#define NAKEDE 6
|
| 827 |
+
#define PERRE 4
|
| 828 |
+
#define TXSTPE 3
|
| 829 |
+
#define TXOUTE 2
|
| 830 |
+
#define RXSTALLE 1
|
| 831 |
+
#define RXINE 0
|
| 832 |
+
|
| 833 |
+
#define UPDATX _SFR_MEM8(0XAF)
|
| 834 |
+
|
| 835 |
+
#endif /* __AT90USBxx7__ */
|
| 836 |
+
|
| 837 |
+
#define TCCR2A _SFR_MEM8(0xB0)
|
| 838 |
+
#define COM2A1 7
|
| 839 |
+
#define COM2A0 6
|
| 840 |
+
#define COM2B1 5
|
| 841 |
+
#define COM2B0 4
|
| 842 |
+
#define WGM21 1
|
| 843 |
+
#define WGM20 0
|
| 844 |
+
|
| 845 |
+
#define TCCR2B _SFR_MEM8(0xB1)
|
| 846 |
+
#define FOC2A 7
|
| 847 |
+
#define FOC2B 6
|
| 848 |
+
#define WGM22 3
|
| 849 |
+
#define CS22 2
|
| 850 |
+
#define CS21 1
|
| 851 |
+
#define CS20 0
|
| 852 |
+
|
| 853 |
+
#define TCNT2 _SFR_MEM8(0xB2)
|
| 854 |
+
|
| 855 |
+
#define OCR2A _SFR_MEM8(0xB3)
|
| 856 |
+
|
| 857 |
+
#define OCR2B _SFR_MEM8(0xB4)
|
| 858 |
+
|
| 859 |
+
/* Reserved [0xB5] */
|
| 860 |
+
|
| 861 |
+
#define ASSR _SFR_MEM8(0xB6)
|
| 862 |
+
#define EXCLK 6
|
| 863 |
+
#define AS2 5
|
| 864 |
+
#define TCN2UB 4
|
| 865 |
+
#define OCR2AUB 3
|
| 866 |
+
#define OCR2BUB 2
|
| 867 |
+
#define TCR2AUB 1
|
| 868 |
+
#define TCR2BUB 0
|
| 869 |
+
|
| 870 |
+
/* Reserved [0xB7] */
|
| 871 |
+
|
| 872 |
+
#define TWBR _SFR_MEM8(0xB8)
|
| 873 |
+
|
| 874 |
+
#define TWSR _SFR_MEM8(0xB9)
|
| 875 |
+
#define TWS7 7
|
| 876 |
+
#define TWS6 6
|
| 877 |
+
#define TWS5 5
|
| 878 |
+
#define TWS4 4
|
| 879 |
+
#define TWS3 3
|
| 880 |
+
#define TWPS1 1
|
| 881 |
+
#define TWPS0 0
|
| 882 |
+
|
| 883 |
+
#define TWAR _SFR_MEM8(0xBA)
|
| 884 |
+
#define TWA6 7
|
| 885 |
+
#define TWA5 6
|
| 886 |
+
#define TWA4 5
|
| 887 |
+
#define TWA3 4
|
| 888 |
+
#define TWA2 3
|
| 889 |
+
#define TWA1 2
|
| 890 |
+
#define TWA0 1
|
| 891 |
+
#define TWGCE 0
|
| 892 |
+
|
| 893 |
+
#define TWDR _SFR_MEM8(0xBB)
|
| 894 |
+
|
| 895 |
+
#define TWCR _SFR_MEM8(0xBC)
|
| 896 |
+
#define TWINT 7
|
| 897 |
+
#define TWEA 6
|
| 898 |
+
#define TWSTA 5
|
| 899 |
+
#define TWSTO 4
|
| 900 |
+
#define TWWC 3
|
| 901 |
+
#define TWEN 2
|
| 902 |
+
#define TWIE 0
|
| 903 |
+
|
| 904 |
+
#define TWAMR _SFR_MEM8(0xBD)
|
| 905 |
+
#define TWAM6 7
|
| 906 |
+
#define TWAM5 6
|
| 907 |
+
#define TWAM4 5
|
| 908 |
+
#define TWAM3 4
|
| 909 |
+
#define TWAM2 3
|
| 910 |
+
#define TWAM1 2
|
| 911 |
+
#define TWAM0 1
|
| 912 |
+
|
| 913 |
+
/* Reserved [0xBE..0xC7] */
|
| 914 |
+
|
| 915 |
+
#define UCSR1A _SFR_MEM8(0xC8)
|
| 916 |
+
#define RXC1 7
|
| 917 |
+
#define TXC1 6
|
| 918 |
+
#define UDRE1 5
|
| 919 |
+
#define FE1 4
|
| 920 |
+
#define DOR1 3
|
| 921 |
+
#define UPE1 2
|
| 922 |
+
#define U2X1 1
|
| 923 |
+
#define MPCM1 0
|
| 924 |
+
|
| 925 |
+
#define UCSR1B _SFR_MEM8(0XC9)
|
| 926 |
+
#define RXCIE1 7
|
| 927 |
+
#define TXCIE1 6
|
| 928 |
+
#define UDRIE1 5
|
| 929 |
+
#define RXEN1 4
|
| 930 |
+
#define TXEN1 3
|
| 931 |
+
#define UCSZ12 2
|
| 932 |
+
#define RXB81 1
|
| 933 |
+
#define TXB81 0
|
| 934 |
+
|
| 935 |
+
#define UCSR1C _SFR_MEM8(0xCA)
|
| 936 |
+
#define UMSEL11 7
|
| 937 |
+
#define UMSEL10 6
|
| 938 |
+
#define UPM11 5
|
| 939 |
+
#define UPM10 4
|
| 940 |
+
#define USBS1 3
|
| 941 |
+
#define UCSZ11 2
|
| 942 |
+
#define UCSZ10 1
|
| 943 |
+
#define UCPOL1 0
|
| 944 |
+
|
| 945 |
+
/* Reserved [0xCB] */
|
| 946 |
+
|
| 947 |
+
/* Combine UBRR1L and UBRR1H */
|
| 948 |
+
#define UBRR1 _SFR_MEM16(0xCC)
|
| 949 |
+
|
| 950 |
+
#define UBRR1L _SFR_MEM8(0xCC)
|
| 951 |
+
#define UBRR1H _SFR_MEM8(0xCD)
|
| 952 |
+
|
| 953 |
+
#define UDR1 _SFR_MEM8(0XCE)
|
| 954 |
+
|
| 955 |
+
/* Reserved [0xCF..0xD6] */
|
| 956 |
+
|
| 957 |
+
#define UHWCON _SFR_MEM8(0XD7)
|
| 958 |
+
#define UIMOD 7
|
| 959 |
+
#define UIDE 6
|
| 960 |
+
#define UVCONE 4
|
| 961 |
+
#define UVREGE 0
|
| 962 |
+
|
| 963 |
+
#define USBCON _SFR_MEM8(0XD8)
|
| 964 |
+
#define USBE 7
|
| 965 |
+
#define HOST 6
|
| 966 |
+
#define FRZCLK 5
|
| 967 |
+
#define OTGPADE 4
|
| 968 |
+
#define IDTE 1
|
| 969 |
+
#define VBUSTE 0
|
| 970 |
+
|
| 971 |
+
#define USBSTA _SFR_MEM8(0XD9)
|
| 972 |
+
#define SPEED 3
|
| 973 |
+
#define ID 1
|
| 974 |
+
#define VBUS 0
|
| 975 |
+
|
| 976 |
+
#define USBINT _SFR_MEM8(0XDA)
|
| 977 |
+
#define IDTI 1
|
| 978 |
+
#define VBUSTI 0
|
| 979 |
+
|
| 980 |
+
/* Combine UDPADDL and UDPADDH */
|
| 981 |
+
#define UDPADD _SFR_MEM16(0xDB)
|
| 982 |
+
|
| 983 |
+
#define UDPADDL _SFR_MEM8(0xDB)
|
| 984 |
+
#define UDPADDH _SFR_MEM8(0xDC)
|
| 985 |
+
#define DPACC 7
|
| 986 |
+
|
| 987 |
+
#if defined(__AT90USBxx7__)
|
| 988 |
+
|
| 989 |
+
#define OTGCON _SFR_MEM8(0XDD)
|
| 990 |
+
#define HNPREQ 5
|
| 991 |
+
#define SRPREQ 4
|
| 992 |
+
#define SRPSEL 3
|
| 993 |
+
#define VBUSHWC 2
|
| 994 |
+
#define VBUSREQ 1
|
| 995 |
+
#define VBUSRQC 0
|
| 996 |
+
|
| 997 |
+
#define OTGIEN _SFR_MEM8(0XDE)
|
| 998 |
+
#define STOE 5
|
| 999 |
+
#define HNPERRE 4
|
| 1000 |
+
#define ROLEEXE 3
|
| 1001 |
+
#define BCERRE 2
|
| 1002 |
+
#define VBERRE 1
|
| 1003 |
+
#define SRPE 0
|
| 1004 |
+
|
| 1005 |
+
#define OTGINT _SFR_MEM8(0XDF)
|
| 1006 |
+
#define STOI 5
|
| 1007 |
+
#define HNPERRI 4
|
| 1008 |
+
#define ROLEEXI 3
|
| 1009 |
+
#define BCERRI 2
|
| 1010 |
+
#define VBERRI 1
|
| 1011 |
+
#define SRPI 0
|
| 1012 |
+
|
| 1013 |
+
#endif /* __AT90USBxx7__ */
|
| 1014 |
+
|
| 1015 |
+
#define UDCON _SFR_MEM8(0XE0)
|
| 1016 |
+
#define LSM 2
|
| 1017 |
+
#define RMWKUP 1
|
| 1018 |
+
#define DETACH 0
|
| 1019 |
+
|
| 1020 |
+
#define UDINT _SFR_MEM8(0XE1)
|
| 1021 |
+
#define UPRSMI 6
|
| 1022 |
+
#define EORSMI 5
|
| 1023 |
+
#define WAKEUPI 4
|
| 1024 |
+
#define EORSTI 3
|
| 1025 |
+
#define SOFI 2
|
| 1026 |
+
/* #define MSOFI 1 */ /* Reserved */
|
| 1027 |
+
#define SUSPI 0
|
| 1028 |
+
|
| 1029 |
+
#define UDIEN _SFR_MEM8(0XE2)
|
| 1030 |
+
#define UPRSME 6
|
| 1031 |
+
#define EORSME 5
|
| 1032 |
+
#define WAKEUPE 4
|
| 1033 |
+
#define EORSTE 3
|
| 1034 |
+
#define SOFE 2
|
| 1035 |
+
/* #define MSOFE 1 */ /* Reserved */
|
| 1036 |
+
#define SUSPE 0
|
| 1037 |
+
|
| 1038 |
+
#define UDADDR _SFR_MEM8(0XE3)
|
| 1039 |
+
#define ADDEN 7
|
| 1040 |
+
|
| 1041 |
+
/* Combine UDFNUML and UDFNUMH */
|
| 1042 |
+
#define UDFNUM _SFR_MEM16(0xE4)
|
| 1043 |
+
|
| 1044 |
+
#define UDFNUML _SFR_MEM8(0xE4)
|
| 1045 |
+
#define UDFNUMH _SFR_MEM8(0xE5)
|
| 1046 |
+
|
| 1047 |
+
#define UDMFN _SFR_MEM8(0XE6)
|
| 1048 |
+
#define FNCERR 4
|
| 1049 |
+
|
| 1050 |
+
#define UDTST _SFR_MEM8(0XE7)
|
| 1051 |
+
#define OPMODE2 5
|
| 1052 |
+
#define TSTPCKT 4
|
| 1053 |
+
#define TSTK 3
|
| 1054 |
+
#define TSTJ 2
|
| 1055 |
+
|
| 1056 |
+
#define UEINTX _SFR_MEM8(0XE8)
|
| 1057 |
+
#define FIFOCON 7
|
| 1058 |
+
#define NAKINI 6
|
| 1059 |
+
#define RWAL 5
|
| 1060 |
+
#define NAKOUTI 4
|
| 1061 |
+
#define RXSTPI 3
|
| 1062 |
+
#define RXOUTI 2
|
| 1063 |
+
#define STALLEDI 1
|
| 1064 |
+
#define TXINI 0
|
| 1065 |
+
|
| 1066 |
+
#define UENUM _SFR_MEM8(0XE9)
|
| 1067 |
+
|
| 1068 |
+
#define UERST _SFR_MEM8(0XEA)
|
| 1069 |
+
#define EPRST6 6
|
| 1070 |
+
#define EPRST5 5
|
| 1071 |
+
#define EPRST4 4
|
| 1072 |
+
#define EPRST3 3
|
| 1073 |
+
#define EPRST2 2
|
| 1074 |
+
#define EPRST1 1
|
| 1075 |
+
#define EPRST0 0
|
| 1076 |
+
|
| 1077 |
+
#define UECONX _SFR_MEM8(0XEB)
|
| 1078 |
+
#define STALLRQ 5
|
| 1079 |
+
#define STALLRQC 4
|
| 1080 |
+
#define RSTDT 3
|
| 1081 |
+
#define EPEN 0
|
| 1082 |
+
|
| 1083 |
+
#define UECFG0X _SFR_MEM8(0XEC)
|
| 1084 |
+
#define EPTYPE1 7
|
| 1085 |
+
#define EPTYPE0 6
|
| 1086 |
+
/* #define ISOSW 3 */ /* Reserved */
|
| 1087 |
+
/* #define AUTOSW 2 */ /* Reserved */
|
| 1088 |
+
/* #define NYETSDIS 1 */ /* Reserved */
|
| 1089 |
+
#define EPDIR 0
|
| 1090 |
+
|
| 1091 |
+
#define UECFG1X _SFR_MEM8(0XED)
|
| 1092 |
+
#define EPSIZE2 6
|
| 1093 |
+
#define EPSIZE1 5
|
| 1094 |
+
#define EPSIZE0 4
|
| 1095 |
+
#define EPBK1 3
|
| 1096 |
+
#define EPBK0 2
|
| 1097 |
+
#define ALLOC 1
|
| 1098 |
+
|
| 1099 |
+
#define UESTA0X _SFR_MEM8(0XEE)
|
| 1100 |
+
#define CFGOK 7
|
| 1101 |
+
#define OVERFI 6
|
| 1102 |
+
#define UNDERFI 5
|
| 1103 |
+
#define ZLPSEEN 4
|
| 1104 |
+
#define DTSEQ1 3
|
| 1105 |
+
#define DTSEQ0 2
|
| 1106 |
+
#define NBUSYBK1 1
|
| 1107 |
+
#define NBUSYBK0 0
|
| 1108 |
+
|
| 1109 |
+
#define UESTA1X _SFR_MEM8(0XEF)
|
| 1110 |
+
#define CTRLDIR 2
|
| 1111 |
+
#define CURRBK1 1
|
| 1112 |
+
#define CURRBK0 0
|
| 1113 |
+
|
| 1114 |
+
#define UEIENX _SFR_MEM8(0XF0)
|
| 1115 |
+
#define FLERRE 7
|
| 1116 |
+
#define NAKINE 6
|
| 1117 |
+
#define NAKOUTE 4
|
| 1118 |
+
#define RXSTPE 3
|
| 1119 |
+
#define RXOUTE 2
|
| 1120 |
+
#define STALLEDE 1
|
| 1121 |
+
#define TXINE 0
|
| 1122 |
+
|
| 1123 |
+
#define UEDATX _SFR_MEM8(0XF1)
|
| 1124 |
+
|
| 1125 |
+
/* Combine UEBCLX and UEBCHX */
|
| 1126 |
+
#define UEBCX _SFR_MEM16(0xF2)
|
| 1127 |
+
|
| 1128 |
+
#define UEBCLX _SFR_MEM8(0xF2)
|
| 1129 |
+
#define UEBCHX _SFR_MEM8(0xF3)
|
| 1130 |
+
|
| 1131 |
+
#define UEINT _SFR_MEM8(0XF4)
|
| 1132 |
+
#define EPINT6 6
|
| 1133 |
+
#define EPINT5 5
|
| 1134 |
+
#define EPINT4 4
|
| 1135 |
+
#define EPINT3 3
|
| 1136 |
+
#define EPINT2 2
|
| 1137 |
+
#define EPINT1 1
|
| 1138 |
+
#define EPINT0 0
|
| 1139 |
+
|
| 1140 |
+
#if defined(__AT90USBxx7__)
|
| 1141 |
+
|
| 1142 |
+
#define UPERRX _SFR_MEM8(0XF5)
|
| 1143 |
+
#define COUNTER1 6
|
| 1144 |
+
#define COUNTER0 5
|
| 1145 |
+
#define CRC16 4
|
| 1146 |
+
#define TIMEOUT 3
|
| 1147 |
+
#define PID 2
|
| 1148 |
+
#define DATAPID 1
|
| 1149 |
+
#define DATATGL 0
|
| 1150 |
+
|
| 1151 |
+
/* Combine UPBCLX and UPBCHX */
|
| 1152 |
+
#define UPBCX _SFR_MEM16(0xF6)
|
| 1153 |
+
|
| 1154 |
+
#define UPBCLX _SFR_MEM8(0xF6)
|
| 1155 |
+
#define UPBCHX _SFR_MEM8(0xF7)
|
| 1156 |
+
|
| 1157 |
+
#define UPINT _SFR_MEM8(0XF8)
|
| 1158 |
+
#define PINT6 6
|
| 1159 |
+
#define PINT5 5
|
| 1160 |
+
#define PINT4 4
|
| 1161 |
+
#define PINT3 3
|
| 1162 |
+
#define PINT2 2
|
| 1163 |
+
#define PINT1 1
|
| 1164 |
+
#define PINT0 0
|
| 1165 |
+
|
| 1166 |
+
#define OTGTCON _SFR_MEM8(0XF9)
|
| 1167 |
+
#define PAGE1 6
|
| 1168 |
+
#define PAGE0 5
|
| 1169 |
+
#define VALUE1 1
|
| 1170 |
+
#define VALUE0 0
|
| 1171 |
+
|
| 1172 |
+
#endif /* __AT90USBxx7__ */
|
| 1173 |
+
|
| 1174 |
+
/* Reserved [0xFA..0xFF] */
|
| 1175 |
+
|
| 1176 |
+
/* Interrupt vectors */
|
| 1177 |
+
|
| 1178 |
+
/* External Interrupt Request 0 */
|
| 1179 |
+
#define INT0_vect_num 1
|
| 1180 |
+
#define INT0_vect _VECTOR(1)
|
| 1181 |
+
|
| 1182 |
+
/* External Interrupt Request 1 */
|
| 1183 |
+
#define INT1_vect_num 2
|
| 1184 |
+
#define INT1_vect _VECTOR(2)
|
| 1185 |
+
|
| 1186 |
+
/* External Interrupt Request 2 */
|
| 1187 |
+
#define INT2_vect_num 3
|
| 1188 |
+
#define INT2_vect _VECTOR(3)
|
| 1189 |
+
|
| 1190 |
+
/* External Interrupt Request 3 */
|
| 1191 |
+
#define INT3_vect_num 4
|
| 1192 |
+
#define INT3_vect _VECTOR(4)
|
| 1193 |
+
|
| 1194 |
+
/* External Interrupt Request 4 */
|
| 1195 |
+
#define INT4_vect_num 5
|
| 1196 |
+
#define INT4_vect _VECTOR(5)
|
| 1197 |
+
|
| 1198 |
+
/* External Interrupt Request 5 */
|
| 1199 |
+
#define INT5_vect_num 6
|
| 1200 |
+
#define INT5_vect _VECTOR(6)
|
| 1201 |
+
|
| 1202 |
+
/* External Interrupt Request 6 */
|
| 1203 |
+
#define INT6_vect_num 7
|
| 1204 |
+
#define INT6_vect _VECTOR(7)
|
| 1205 |
+
|
| 1206 |
+
/* External Interrupt Request 7 */
|
| 1207 |
+
#define INT7_vect_num 8
|
| 1208 |
+
#define INT7_vect _VECTOR(8)
|
| 1209 |
+
|
| 1210 |
+
/* Pin Change Interrupt Request 0 */
|
| 1211 |
+
#define PCINT0_vect_num 9
|
| 1212 |
+
#define PCINT0_vect _VECTOR(9)
|
| 1213 |
+
|
| 1214 |
+
/* USB General Interrupt Request */
|
| 1215 |
+
#define USB_GEN_vect_num 10
|
| 1216 |
+
#define USB_GEN_vect _VECTOR(10)
|
| 1217 |
+
|
| 1218 |
+
/* USB Endpoint/Pipe Interrupt Communication Request */
|
| 1219 |
+
#define USB_COM_vect_num 11
|
| 1220 |
+
#define USB_COM_vect _VECTOR(11)
|
| 1221 |
+
|
| 1222 |
+
/* Watchdog Time-out Interrupt */
|
| 1223 |
+
#define WDT_vect_num 12
|
| 1224 |
+
#define WDT_vect _VECTOR(12)
|
| 1225 |
+
|
| 1226 |
+
/* Timer/Counter2 Compare Match A */
|
| 1227 |
+
#define TIMER2_COMPA_vect_num 13
|
| 1228 |
+
#define TIMER2_COMPA_vect _VECTOR(13)
|
| 1229 |
+
|
| 1230 |
+
/* Timer/Counter2 Compare Match B */
|
| 1231 |
+
#define TIMER2_COMPB_vect_num 14
|
| 1232 |
+
#define TIMER2_COMPB_vect _VECTOR(14)
|
| 1233 |
+
|
| 1234 |
+
/* Timer/Counter2 Overflow */
|
| 1235 |
+
#define TIMER2_OVF_vect_num 15
|
| 1236 |
+
#define TIMER2_OVF_vect _VECTOR(15)
|
| 1237 |
+
|
| 1238 |
+
/* Timer/Counter1 Capture Event */
|
| 1239 |
+
#define TIMER1_CAPT_vect_num 16
|
| 1240 |
+
#define TIMER1_CAPT_vect _VECTOR(16)
|
| 1241 |
+
|
| 1242 |
+
/* Timer/Counter1 Compare Match A */
|
| 1243 |
+
#define TIMER1_COMPA_vect_num 17
|
| 1244 |
+
#define TIMER1_COMPA_vect _VECTOR(17)
|
| 1245 |
+
|
| 1246 |
+
/* Timer/Counter1 Compare Match B */
|
| 1247 |
+
#define TIMER1_COMPB_vect_num 18
|
| 1248 |
+
#define TIMER1_COMPB_vect _VECTOR(18)
|
| 1249 |
+
|
| 1250 |
+
/* Timer/Counter1 Compare Match C */
|
| 1251 |
+
#define TIMER1_COMPC_vect_num 19
|
| 1252 |
+
#define TIMER1_COMPC_vect _VECTOR(19)
|
| 1253 |
+
|
| 1254 |
+
/* Timer/Counter1 Overflow */
|
| 1255 |
+
#define TIMER1_OVF_vect_num 20
|
| 1256 |
+
#define TIMER1_OVF_vect _VECTOR(20)
|
| 1257 |
+
|
| 1258 |
+
/* Timer/Counter0 Compare Match A */
|
| 1259 |
+
#define TIMER0_COMPA_vect_num 21
|
| 1260 |
+
#define TIMER0_COMPA_vect _VECTOR(21)
|
| 1261 |
+
|
| 1262 |
+
/* Timer/Counter0 Compare Match B */
|
| 1263 |
+
#define TIMER0_COMPB_vect_num 22
|
| 1264 |
+
#define TIMER0_COMPB_vect _VECTOR(22)
|
| 1265 |
+
|
| 1266 |
+
/* Timer/Counter0 Overflow */
|
| 1267 |
+
#define TIMER0_OVF_vect_num 23
|
| 1268 |
+
#define TIMER0_OVF_vect _VECTOR(23)
|
| 1269 |
+
|
| 1270 |
+
/* SPI Serial Transfer Complete */
|
| 1271 |
+
#define SPI_STC_vect_num 24
|
| 1272 |
+
#define SPI_STC_vect _VECTOR(24)
|
| 1273 |
+
|
| 1274 |
+
/* USART1, Rx Complete */
|
| 1275 |
+
#define USART1_RX_vect_num 25
|
| 1276 |
+
#define USART1_RX_vect _VECTOR(25)
|
| 1277 |
+
|
| 1278 |
+
/* USART1 Data register Empty */
|
| 1279 |
+
#define USART1_UDRE_vect_num 26
|
| 1280 |
+
#define USART1_UDRE_vect _VECTOR(26)
|
| 1281 |
+
|
| 1282 |
+
/* USART1, Tx Complete */
|
| 1283 |
+
#define USART1_TX_vect_num 27
|
| 1284 |
+
#define USART1_TX_vect _VECTOR(27)
|
| 1285 |
+
|
| 1286 |
+
/* Analog Comparator */
|
| 1287 |
+
#define ANALOG_COMP_vect_num 28
|
| 1288 |
+
#define ANALOG_COMP_vect _VECTOR(28)
|
| 1289 |
+
|
| 1290 |
+
/* ADC Conversion Complete */
|
| 1291 |
+
#define ADC_vect_num 29
|
| 1292 |
+
#define ADC_vect _VECTOR(29)
|
| 1293 |
+
|
| 1294 |
+
/* EEPROM Ready */
|
| 1295 |
+
#define EE_READY_vect_num 30
|
| 1296 |
+
#define EE_READY_vect _VECTOR(30)
|
| 1297 |
+
|
| 1298 |
+
/* Timer/Counter3 Capture Event */
|
| 1299 |
+
#define TIMER3_CAPT_vect_num 31
|
| 1300 |
+
#define TIMER3_CAPT_vect _VECTOR(31)
|
| 1301 |
+
|
| 1302 |
+
/* Timer/Counter3 Compare Match A */
|
| 1303 |
+
#define TIMER3_COMPA_vect_num 32
|
| 1304 |
+
#define TIMER3_COMPA_vect _VECTOR(32)
|
| 1305 |
+
|
| 1306 |
+
/* Timer/Counter3 Compare Match B */
|
| 1307 |
+
#define TIMER3_COMPB_vect_num 33
|
| 1308 |
+
#define TIMER3_COMPB_vect _VECTOR(33)
|
| 1309 |
+
|
| 1310 |
+
/* Timer/Counter3 Compare Match C */
|
| 1311 |
+
#define TIMER3_COMPC_vect_num 34
|
| 1312 |
+
#define TIMER3_COMPC_vect _VECTOR(34)
|
| 1313 |
+
|
| 1314 |
+
/* Timer/Counter3 Overflow */
|
| 1315 |
+
#define TIMER3_OVF_vect_num 35
|
| 1316 |
+
#define TIMER3_OVF_vect _VECTOR(35)
|
| 1317 |
+
|
| 1318 |
+
/* 2-wire Serial Interface */
|
| 1319 |
+
#define TWI_vect_num 36
|
| 1320 |
+
#define TWI_vect _VECTOR(36)
|
| 1321 |
+
|
| 1322 |
+
/* Store Program Memory Read */
|
| 1323 |
+
#define SPM_READY_vect_num 37
|
| 1324 |
+
#define SPM_READY_vect _VECTOR(37)
|
| 1325 |
+
|
| 1326 |
+
#define _VECTORS_SIZE 152
|
| 1327 |
+
|
| 1328 |
+
#if defined(__AT90USBxx6__)
|
| 1329 |
+
# undef __AT90USBxx6__
|
| 1330 |
+
#endif /* __AT90USBxx6__ */
|
| 1331 |
+
|
| 1332 |
+
#if defined(__AT90USBxx7__)
|
| 1333 |
+
# undef __AT90USBxx7__
|
| 1334 |
+
#endif /* __AT90USBxx7__ */
|
| 1335 |
+
|
| 1336 |
+
#endif /* _AVR_IOUSBXX6_7_H_ */
|
hardware/tools/avr/avr/include/avr/iox128a1.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128a1u.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128a3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128a3u.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128a4u.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128b1.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128b3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128c3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128d3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox128d4.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox16a4.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox16a4u.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox16c4.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox16d4.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox16e5.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox192a3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox192a3u.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox192c3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox192d3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox256a3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hardware/tools/avr/avr/include/avr/iox256a3b.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|