arduino_ci 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +77 -1
- data/cpp/arduino/Arduino.cpp +17 -7
- data/cpp/arduino/Arduino.h +151 -5
- data/cpp/arduino/ArduinoDefines.h +90 -0
- data/cpp/arduino/AvrMath.h +18 -28
- data/cpp/arduino/Godmode.cpp +62 -0
- data/cpp/arduino/Godmode.h +74 -0
- data/cpp/arduino/HardwareSerial.h +81 -0
- data/cpp/arduino/Print.h +67 -0
- data/cpp/arduino/Stream.h +210 -0
- data/cpp/arduino/WCharacter.h +96 -0
- data/cpp/arduino/WString.h +164 -0
- data/cpp/arduino/binary.h +518 -0
- data/cpp/arduino/include/README.md +3 -0
- data/cpp/arduino/include/common.h +333 -0
- data/cpp/arduino/include/fuse.h +274 -0
- data/cpp/arduino/include/io.h +643 -0
- data/cpp/arduino/include/io1200.h +274 -0
- data/cpp/arduino/include/io2313.h +385 -0
- data/cpp/arduino/include/io2323.h +210 -0
- data/cpp/arduino/include/io2333.h +461 -0
- data/cpp/arduino/include/io2343.h +214 -0
- data/cpp/arduino/include/io43u32x.h +440 -0
- data/cpp/arduino/include/io43u35x.h +432 -0
- data/cpp/arduino/include/io4414.h +500 -0
- data/cpp/arduino/include/io4433.h +489 -0
- data/cpp/arduino/include/io4434.h +588 -0
- data/cpp/arduino/include/io76c711.h +499 -0
- data/cpp/arduino/include/io8515.h +501 -0
- data/cpp/arduino/include/io8534.h +217 -0
- data/cpp/arduino/include/io8535.h +589 -0
- data/cpp/arduino/include/io86r401.h +309 -0
- data/cpp/arduino/include/io90pwm1.h +1157 -0
- data/cpp/arduino/include/io90pwm161.h +918 -0
- data/cpp/arduino/include/io90pwm216.h +1225 -0
- data/cpp/arduino/include/io90pwm2b.h +1466 -0
- data/cpp/arduino/include/io90pwm316.h +1272 -0
- data/cpp/arduino/include/io90pwm3b.h +1466 -0
- data/cpp/arduino/include/io90pwm81.h +1036 -0
- data/cpp/arduino/include/io90pwmx.h +1415 -0
- data/cpp/arduino/include/io90scr100.h +1719 -0
- data/cpp/arduino/include/ioa5272.h +803 -0
- data/cpp/arduino/include/ioa5505.h +803 -0
- data/cpp/arduino/include/ioa5702m322.h +2591 -0
- data/cpp/arduino/include/ioa5782.h +1843 -0
- data/cpp/arduino/include/ioa5790.h +907 -0
- data/cpp/arduino/include/ioa5790n.h +922 -0
- data/cpp/arduino/include/ioa5791.h +923 -0
- data/cpp/arduino/include/ioa5795.h +756 -0
- data/cpp/arduino/include/ioa5831.h +1949 -0
- data/cpp/arduino/include/ioa6285.h +740 -0
- data/cpp/arduino/include/ioa6286.h +740 -0
- data/cpp/arduino/include/ioa6289.h +847 -0
- data/cpp/arduino/include/ioa6612c.h +795 -0
- data/cpp/arduino/include/ioa6613c.h +795 -0
- data/cpp/arduino/include/ioa6614q.h +798 -0
- data/cpp/arduino/include/ioa6616c.h +865 -0
- data/cpp/arduino/include/ioa6617c.h +865 -0
- data/cpp/arduino/include/ioa664251.h +857 -0
- data/cpp/arduino/include/ioa8210.h +1843 -0
- data/cpp/arduino/include/ioa8510.h +1949 -0
- data/cpp/arduino/include/ioat94k.h +565 -0
- data/cpp/arduino/include/iocan128.h +100 -0
- data/cpp/arduino/include/iocan32.h +100 -0
- data/cpp/arduino/include/iocan64.h +100 -0
- data/cpp/arduino/include/iocanxx.h +2020 -0
- data/cpp/arduino/include/iom103.h +735 -0
- data/cpp/arduino/include/iom128.h +1299 -0
- data/cpp/arduino/include/iom1280.h +101 -0
- data/cpp/arduino/include/iom1281.h +101 -0
- data/cpp/arduino/include/iom1284.h +1099 -0
- data/cpp/arduino/include/iom1284p.h +1219 -0
- data/cpp/arduino/include/iom1284rfr2.h +2690 -0
- data/cpp/arduino/include/iom128a.h +1070 -0
- data/cpp/arduino/include/iom128rfa1.h +5385 -0
- data/cpp/arduino/include/iom128rfr2.h +2706 -0
- data/cpp/arduino/include/iom16.h +676 -0
- data/cpp/arduino/include/iom161.h +726 -0
- data/cpp/arduino/include/iom162.h +1022 -0
- data/cpp/arduino/include/iom163.h +686 -0
- data/cpp/arduino/include/iom164.h +101 -0
- data/cpp/arduino/include/iom164a.h +34 -0
- data/cpp/arduino/include/iom164p.h +34 -0
- data/cpp/arduino/include/iom164pa.h +1016 -0
- data/cpp/arduino/include/iom165.h +887 -0
- data/cpp/arduino/include/iom165a.h +832 -0
- data/cpp/arduino/include/iom165p.h +889 -0
- data/cpp/arduino/include/iom165pa.h +948 -0
- data/cpp/arduino/include/iom168.h +97 -0
- data/cpp/arduino/include/iom168a.h +35 -0
- data/cpp/arduino/include/iom168p.h +942 -0
- data/cpp/arduino/include/iom168pa.h +843 -0
- data/cpp/arduino/include/iom168pb.h +899 -0
- data/cpp/arduino/include/iom169.h +1174 -0
- data/cpp/arduino/include/iom169a.h +44 -0
- data/cpp/arduino/include/iom169p.h +1097 -0
- data/cpp/arduino/include/iom169pa.h +1485 -0
- data/cpp/arduino/include/iom16a.h +923 -0
- data/cpp/arduino/include/iom16hva.h +80 -0
- data/cpp/arduino/include/iom16hva2.h +883 -0
- data/cpp/arduino/include/iom16hvb.h +1052 -0
- data/cpp/arduino/include/iom16hvbrevb.h +1052 -0
- data/cpp/arduino/include/iom16m1.h +1571 -0
- data/cpp/arduino/include/iom16u2.h +1000 -0
- data/cpp/arduino/include/iom16u4.h +1423 -0
- data/cpp/arduino/include/iom2560.h +101 -0
- data/cpp/arduino/include/iom2561.h +101 -0
- data/cpp/arduino/include/iom2564rfr2.h +2691 -0
- data/cpp/arduino/include/iom256rfr2.h +2707 -0
- data/cpp/arduino/include/iom3000.h +237 -0
- data/cpp/arduino/include/iom32.h +755 -0
- data/cpp/arduino/include/iom323.h +744 -0
- data/cpp/arduino/include/iom324a.h +1014 -0
- data/cpp/arduino/include/iom324p.h +1016 -0
- data/cpp/arduino/include/iom324pa.h +1372 -0
- data/cpp/arduino/include/iom325.h +886 -0
- data/cpp/arduino/include/iom3250.h +982 -0
- data/cpp/arduino/include/iom3250a.h +34 -0
- data/cpp/arduino/include/iom3250p.h +34 -0
- data/cpp/arduino/include/iom3250pa.h +1042 -0
- data/cpp/arduino/include/iom325a.h +34 -0
- data/cpp/arduino/include/iom325p.h +34 -0
- data/cpp/arduino/include/iom325pa.h +937 -0
- data/cpp/arduino/include/iom328.h +34 -0
- data/cpp/arduino/include/iom328p.h +948 -0
- data/cpp/arduino/include/iom329.h +1069 -0
- data/cpp/arduino/include/iom3290.h +1227 -0
- data/cpp/arduino/include/iom3290a.h +34 -0
- data/cpp/arduino/include/iom3290pa.h +1123 -0
- data/cpp/arduino/include/iom329a.h +34 -0
- data/cpp/arduino/include/iom329p.h +1164 -0
- data/cpp/arduino/include/iom329pa.h +34 -0
- data/cpp/arduino/include/iom32a.h +686 -0
- data/cpp/arduino/include/iom32c1.h +1320 -0
- data/cpp/arduino/include/iom32hvb.h +1052 -0
- data/cpp/arduino/include/iom32hvbrevb.h +953 -0
- data/cpp/arduino/include/iom32m1.h +1625 -0
- data/cpp/arduino/include/iom32u2.h +1000 -0
- data/cpp/arduino/include/iom32u4.h +1512 -0
- data/cpp/arduino/include/iom32u6.h +1431 -0
- data/cpp/arduino/include/iom406.h +783 -0
- data/cpp/arduino/include/iom48.h +93 -0
- data/cpp/arduino/include/iom48a.h +35 -0
- data/cpp/arduino/include/iom48p.h +936 -0
- data/cpp/arduino/include/iom48pa.h +839 -0
- data/cpp/arduino/include/iom48pb.h +890 -0
- data/cpp/arduino/include/iom64.h +1311 -0
- data/cpp/arduino/include/iom640.h +101 -0
- data/cpp/arduino/include/iom644.h +101 -0
- data/cpp/arduino/include/iom644a.h +34 -0
- data/cpp/arduino/include/iom644p.h +101 -0
- data/cpp/arduino/include/iom644pa.h +1387 -0
- data/cpp/arduino/include/iom644rfr2.h +2685 -0
- data/cpp/arduino/include/iom645.h +881 -0
- data/cpp/arduino/include/iom6450.h +978 -0
- data/cpp/arduino/include/iom6450a.h +34 -0
- data/cpp/arduino/include/iom6450p.h +34 -0
- data/cpp/arduino/include/iom645a.h +34 -0
- data/cpp/arduino/include/iom645p.h +34 -0
- data/cpp/arduino/include/iom649.h +1061 -0
- data/cpp/arduino/include/iom6490.h +1182 -0
- data/cpp/arduino/include/iom6490a.h +34 -0
- data/cpp/arduino/include/iom6490p.h +34 -0
- data/cpp/arduino/include/iom649a.h +34 -0
- data/cpp/arduino/include/iom649p.h +1490 -0
- data/cpp/arduino/include/iom64a.h +1084 -0
- data/cpp/arduino/include/iom64c1.h +1321 -0
- data/cpp/arduino/include/iom64hve.h +1034 -0
- data/cpp/arduino/include/iom64hve2.h +767 -0
- data/cpp/arduino/include/iom64m1.h +1572 -0
- data/cpp/arduino/include/iom64rfr2.h +2701 -0
- data/cpp/arduino/include/iom8.h +665 -0
- data/cpp/arduino/include/iom8515.h +687 -0
- data/cpp/arduino/include/iom8535.h +772 -0
- data/cpp/arduino/include/iom88.h +97 -0
- data/cpp/arduino/include/iom88a.h +35 -0
- data/cpp/arduino/include/iom88p.h +941 -0
- data/cpp/arduino/include/iom88pa.h +1185 -0
- data/cpp/arduino/include/iom88pb.h +899 -0
- data/cpp/arduino/include/iom8a.h +621 -0
- data/cpp/arduino/include/iom8hva.h +76 -0
- data/cpp/arduino/include/iom8u2.h +997 -0
- data/cpp/arduino/include/iomx8.h +808 -0
- data/cpp/arduino/include/iomxx0_1.h +1692 -0
- data/cpp/arduino/include/iomxx4.h +954 -0
- data/cpp/arduino/include/iomxxhva.h +550 -0
- data/cpp/arduino/include/iotn10.h +512 -0
- data/cpp/arduino/include/iotn11.h +255 -0
- data/cpp/arduino/include/iotn12.h +288 -0
- data/cpp/arduino/include/iotn13.h +395 -0
- data/cpp/arduino/include/iotn13a.h +394 -0
- data/cpp/arduino/include/iotn15.h +363 -0
- data/cpp/arduino/include/iotn1634.h +914 -0
- data/cpp/arduino/include/iotn167.h +883 -0
- data/cpp/arduino/include/iotn20.h +776 -0
- data/cpp/arduino/include/iotn22.h +221 -0
- data/cpp/arduino/include/iotn2313.h +702 -0
- data/cpp/arduino/include/iotn2313a.h +812 -0
- data/cpp/arduino/include/iotn24.h +94 -0
- data/cpp/arduino/include/iotn24a.h +846 -0
- data/cpp/arduino/include/iotn25.h +93 -0
- data/cpp/arduino/include/iotn26.h +422 -0
- data/cpp/arduino/include/iotn261.h +93 -0
- data/cpp/arduino/include/iotn261a.h +987 -0
- data/cpp/arduino/include/iotn28.h +297 -0
- data/cpp/arduino/include/iotn4.h +477 -0
- data/cpp/arduino/include/iotn40.h +767 -0
- data/cpp/arduino/include/iotn4313.h +813 -0
- data/cpp/arduino/include/iotn43u.h +604 -0
- data/cpp/arduino/include/iotn44.h +94 -0
- data/cpp/arduino/include/iotn441.h +903 -0
- data/cpp/arduino/include/iotn44a.h +844 -0
- data/cpp/arduino/include/iotn45.h +93 -0
- data/cpp/arduino/include/iotn461.h +94 -0
- data/cpp/arduino/include/iotn461a.h +987 -0
- data/cpp/arduino/include/iotn48.h +806 -0
- data/cpp/arduino/include/iotn5.h +512 -0
- data/cpp/arduino/include/iotn828.h +911 -0
- data/cpp/arduino/include/iotn84.h +94 -0
- data/cpp/arduino/include/iotn841.h +903 -0
- data/cpp/arduino/include/iotn84a.h +844 -0
- data/cpp/arduino/include/iotn85.h +93 -0
- data/cpp/arduino/include/iotn861.h +94 -0
- data/cpp/arduino/include/iotn861a.h +988 -0
- data/cpp/arduino/include/iotn87.h +859 -0
- data/cpp/arduino/include/iotn88.h +806 -0
- data/cpp/arduino/include/iotn9.h +477 -0
- data/cpp/arduino/include/iotnx4.h +482 -0
- data/cpp/arduino/include/iotnx5.h +442 -0
- data/cpp/arduino/include/iotnx61.h +541 -0
- data/cpp/arduino/include/iousb1286.h +101 -0
- data/cpp/arduino/include/iousb1287.h +101 -0
- data/cpp/arduino/include/iousb162.h +101 -0
- data/cpp/arduino/include/iousb646.h +102 -0
- data/cpp/arduino/include/iousb647.h +102 -0
- data/cpp/arduino/include/iousb82.h +95 -0
- data/cpp/arduino/include/iousbxx2.h +807 -0
- data/cpp/arduino/include/iousbxx6_7.h +1336 -0
- data/cpp/arduino/include/iox128a1.h +7236 -0
- data/cpp/arduino/include/iox128a1u.h +8305 -0
- data/cpp/arduino/include/iox128a3.h +6987 -0
- data/cpp/arduino/include/iox128a3u.h +7697 -0
- data/cpp/arduino/include/iox128a4u.h +7309 -0
- data/cpp/arduino/include/iox128b1.h +6872 -0
- data/cpp/arduino/include/iox128b3.h +6288 -0
- data/cpp/arduino/include/iox128c3.h +6264 -0
- data/cpp/arduino/include/iox128d3.h +5749 -0
- data/cpp/arduino/include/iox128d4.h +5562 -0
- data/cpp/arduino/include/iox16a4.h +6748 -0
- data/cpp/arduino/include/iox16a4u.h +7309 -0
- data/cpp/arduino/include/iox16c4.h +6078 -0
- data/cpp/arduino/include/iox16d4.h +5717 -0
- data/cpp/arduino/include/iox16e5.h +7699 -0
- data/cpp/arduino/include/iox192a3.h +6987 -0
- data/cpp/arduino/include/iox192a3u.h +7697 -0
- data/cpp/arduino/include/iox192c3.h +6264 -0
- data/cpp/arduino/include/iox192d3.h +5749 -0
- data/cpp/arduino/include/iox256a3.h +6987 -0
- data/cpp/arduino/include/iox256a3b.h +6983 -0
- data/cpp/arduino/include/iox256a3bu.h +7706 -0
- data/cpp/arduino/include/iox256a3u.h +7697 -0
- data/cpp/arduino/include/iox256c3.h +6264 -0
- data/cpp/arduino/include/iox256d3.h +5709 -0
- data/cpp/arduino/include/iox32a4.h +6747 -0
- data/cpp/arduino/include/iox32a4u.h +7309 -0
- data/cpp/arduino/include/iox32c3.h +6264 -0
- data/cpp/arduino/include/iox32c4.h +6078 -0
- data/cpp/arduino/include/iox32d3.h +5105 -0
- data/cpp/arduino/include/iox32d4.h +5685 -0
- data/cpp/arduino/include/iox32e5.h +7699 -0
- data/cpp/arduino/include/iox384c3.h +6849 -0
- data/cpp/arduino/include/iox384d3.h +5833 -0
- data/cpp/arduino/include/iox64a1.h +7236 -0
- data/cpp/arduino/include/iox64a1u.h +8305 -0
- data/cpp/arduino/include/iox64a3.h +6987 -0
- data/cpp/arduino/include/iox64a3u.h +7697 -0
- data/cpp/arduino/include/iox64a4u.h +7309 -0
- data/cpp/arduino/include/iox64b1.h +6454 -0
- data/cpp/arduino/include/iox64b3.h +6288 -0
- data/cpp/arduino/include/iox64c3.h +6264 -0
- data/cpp/arduino/include/iox64d3.h +5764 -0
- data/cpp/arduino/include/iox64d4.h +5555 -0
- data/cpp/arduino/include/iox8e5.h +7699 -0
- data/cpp/arduino/include/lock.h +239 -0
- data/cpp/arduino/include/portpins.h +549 -0
- data/cpp/arduino/include/version.h +90 -0
- data/cpp/arduino/include/xmega.h +71 -0
- data/cpp/unittest/Assertion.h +9 -4
- data/cpp/unittest/Compare.h +93 -0
- data/lib/arduino_ci/arduino_installation.rb +1 -1
- data/lib/arduino_ci/cpp_library.rb +4 -1
- data/lib/arduino_ci/version.rb +1 -1
- data/misc/default.yaml +7 -0
- metadata +285 -2
@@ -0,0 +1,1299 @@
|
|
1
|
+
/* Copyright (c) 2002, Peter Jansen
|
2
|
+
Copyright (c) 2007, 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: iom128.h 2226 2011-03-04 17:47:16Z arcanum $ */
|
33
|
+
|
34
|
+
/* avr/iom128.h - defines for ATmega128
|
35
|
+
|
36
|
+
As of 2002-08-27:
|
37
|
+
- This should be up to date with data sheet 2467E-AVR-05/02 */
|
38
|
+
|
39
|
+
#ifndef _AVR_IOM128_H_
|
40
|
+
#define _AVR_IOM128_H_ 1
|
41
|
+
|
42
|
+
/* This file should only be included from <avr/io.h>, never directly. */
|
43
|
+
|
44
|
+
#ifndef _AVR_IO_H_
|
45
|
+
# error "Include <avr/io.h> instead of this file."
|
46
|
+
#endif
|
47
|
+
|
48
|
+
#ifndef _AVR_IOXXX_H_
|
49
|
+
# define _AVR_IOXXX_H_ "iom128.h"
|
50
|
+
#else
|
51
|
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
52
|
+
#endif
|
53
|
+
|
54
|
+
/* I/O registers */
|
55
|
+
|
56
|
+
/* Input Pins, Port F */
|
57
|
+
#define PINF _SFR_IO8(0x00)
|
58
|
+
|
59
|
+
/* Input Pins, Port E */
|
60
|
+
#define PINE _SFR_IO8(0x01)
|
61
|
+
|
62
|
+
/* Data Direction Register, Port E */
|
63
|
+
#define DDRE _SFR_IO8(0x02)
|
64
|
+
|
65
|
+
/* Data Register, Port E */
|
66
|
+
#define PORTE _SFR_IO8(0x03)
|
67
|
+
|
68
|
+
/* ADC Data Register */
|
69
|
+
#define ADCW _SFR_IO16(0x04)
|
70
|
+
#ifndef __ASSEMBLER__
|
71
|
+
#define ADC _SFR_IO16(0x04)
|
72
|
+
#endif
|
73
|
+
#define ADCL _SFR_IO8(0x04)
|
74
|
+
#define ADCH _SFR_IO8(0x05)
|
75
|
+
|
76
|
+
/* ADC Control and status register */
|
77
|
+
#define ADCSR _SFR_IO8(0x06)
|
78
|
+
#define ADCSRA _SFR_IO8(0x06) /* new name in datasheet (2467E-AVR-05/02) */
|
79
|
+
|
80
|
+
/* ADC Multiplexer select */
|
81
|
+
#define ADMUX _SFR_IO8(0x07)
|
82
|
+
|
83
|
+
/* Analog Comparator Control and Status Register */
|
84
|
+
#define ACSR _SFR_IO8(0x08)
|
85
|
+
|
86
|
+
/* USART0 Baud Rate Register Low */
|
87
|
+
#define UBRR0L _SFR_IO8(0x09)
|
88
|
+
|
89
|
+
/* USART0 Control and Status Register B */
|
90
|
+
#define UCSR0B _SFR_IO8(0x0A)
|
91
|
+
|
92
|
+
/* USART0 Control and Status Register A */
|
93
|
+
#define UCSR0A _SFR_IO8(0x0B)
|
94
|
+
|
95
|
+
/* USART0 I/O Data Register */
|
96
|
+
#define UDR0 _SFR_IO8(0x0C)
|
97
|
+
|
98
|
+
/* SPI Control Register */
|
99
|
+
#define SPCR _SFR_IO8(0x0D)
|
100
|
+
|
101
|
+
/* SPI Status Register */
|
102
|
+
#define SPSR _SFR_IO8(0x0E)
|
103
|
+
|
104
|
+
/* SPI I/O Data Register */
|
105
|
+
#define SPDR _SFR_IO8(0x0F)
|
106
|
+
|
107
|
+
/* Input Pins, Port D */
|
108
|
+
#define PIND _SFR_IO8(0x10)
|
109
|
+
|
110
|
+
/* Data Direction Register, Port D */
|
111
|
+
#define DDRD _SFR_IO8(0x11)
|
112
|
+
|
113
|
+
/* Data Register, Port D */
|
114
|
+
#define PORTD _SFR_IO8(0x12)
|
115
|
+
|
116
|
+
/* Input Pins, Port C */
|
117
|
+
#define PINC _SFR_IO8(0x13)
|
118
|
+
|
119
|
+
/* Data Direction Register, Port C */
|
120
|
+
#define DDRC _SFR_IO8(0x14)
|
121
|
+
|
122
|
+
/* Data Register, Port C */
|
123
|
+
#define PORTC _SFR_IO8(0x15)
|
124
|
+
|
125
|
+
/* Input Pins, Port B */
|
126
|
+
#define PINB _SFR_IO8(0x16)
|
127
|
+
|
128
|
+
/* Data Direction Register, Port B */
|
129
|
+
#define DDRB _SFR_IO8(0x17)
|
130
|
+
|
131
|
+
/* Data Register, Port B */
|
132
|
+
#define PORTB _SFR_IO8(0x18)
|
133
|
+
|
134
|
+
/* Input Pins, Port A */
|
135
|
+
#define PINA _SFR_IO8(0x19)
|
136
|
+
|
137
|
+
/* Data Direction Register, Port A */
|
138
|
+
#define DDRA _SFR_IO8(0x1A)
|
139
|
+
|
140
|
+
/* Data Register, Port A */
|
141
|
+
#define PORTA _SFR_IO8(0x1B)
|
142
|
+
|
143
|
+
/* EEPROM Control Register */
|
144
|
+
#define EECR _SFR_IO8(0x1C)
|
145
|
+
|
146
|
+
/* EEPROM Data Register */
|
147
|
+
#define EEDR _SFR_IO8(0x1D)
|
148
|
+
|
149
|
+
/* EEPROM Address Register */
|
150
|
+
#define EEAR _SFR_IO16(0x1E)
|
151
|
+
#define EEARL _SFR_IO8(0x1E)
|
152
|
+
#define EEARH _SFR_IO8(0x1F)
|
153
|
+
|
154
|
+
/* Special Function I/O Register */
|
155
|
+
#define SFIOR _SFR_IO8(0x20)
|
156
|
+
|
157
|
+
/* Watchdog Timer Control Register */
|
158
|
+
#define WDTCR _SFR_IO8(0x21)
|
159
|
+
|
160
|
+
/* On-chip Debug Register */
|
161
|
+
#define OCDR _SFR_IO8(0x22)
|
162
|
+
|
163
|
+
/* Timer2 Output Compare Register */
|
164
|
+
#define OCR2 _SFR_IO8(0x23)
|
165
|
+
|
166
|
+
/* Timer/Counter 2 */
|
167
|
+
#define TCNT2 _SFR_IO8(0x24)
|
168
|
+
|
169
|
+
/* Timer/Counter 2 Control register */
|
170
|
+
#define TCCR2 _SFR_IO8(0x25)
|
171
|
+
|
172
|
+
/* T/C 1 Input Capture Register */
|
173
|
+
#define ICR1 _SFR_IO16(0x26)
|
174
|
+
#define ICR1L _SFR_IO8(0x26)
|
175
|
+
#define ICR1H _SFR_IO8(0x27)
|
176
|
+
|
177
|
+
/* Timer/Counter1 Output Compare Register B */
|
178
|
+
#define OCR1B _SFR_IO16(0x28)
|
179
|
+
#define OCR1BL _SFR_IO8(0x28)
|
180
|
+
#define OCR1BH _SFR_IO8(0x29)
|
181
|
+
|
182
|
+
/* Timer/Counter1 Output Compare Register A */
|
183
|
+
#define OCR1A _SFR_IO16(0x2A)
|
184
|
+
#define OCR1AL _SFR_IO8(0x2A)
|
185
|
+
#define OCR1AH _SFR_IO8(0x2B)
|
186
|
+
|
187
|
+
/* Timer/Counter 1 */
|
188
|
+
#define TCNT1 _SFR_IO16(0x2C)
|
189
|
+
#define TCNT1L _SFR_IO8(0x2C)
|
190
|
+
#define TCNT1H _SFR_IO8(0x2D)
|
191
|
+
|
192
|
+
/* Timer/Counter 1 Control and Status Register */
|
193
|
+
#define TCCR1B _SFR_IO8(0x2E)
|
194
|
+
|
195
|
+
/* Timer/Counter 1 Control Register */
|
196
|
+
#define TCCR1A _SFR_IO8(0x2F)
|
197
|
+
|
198
|
+
/* Timer/Counter 0 Asynchronous Control & Status Register */
|
199
|
+
#define ASSR _SFR_IO8(0x30)
|
200
|
+
|
201
|
+
/* Output Compare Register 0 */
|
202
|
+
#define OCR0 _SFR_IO8(0x31)
|
203
|
+
|
204
|
+
/* Timer/Counter 0 */
|
205
|
+
#define TCNT0 _SFR_IO8(0x32)
|
206
|
+
|
207
|
+
/* Timer/Counter 0 Control Register */
|
208
|
+
#define TCCR0 _SFR_IO8(0x33)
|
209
|
+
|
210
|
+
/* MCU Status Register */
|
211
|
+
#define MCUSR _SFR_IO8(0x34)
|
212
|
+
#define MCUCSR _SFR_IO8(0x34) /* new name in datasheet (2467E-AVR-05/02) */
|
213
|
+
|
214
|
+
/* MCU general Control Register */
|
215
|
+
#define MCUCR _SFR_IO8(0x35)
|
216
|
+
|
217
|
+
/* Timer/Counter Interrupt Flag Register */
|
218
|
+
#define TIFR _SFR_IO8(0x36)
|
219
|
+
|
220
|
+
/* Timer/Counter Interrupt MaSK register */
|
221
|
+
#define TIMSK _SFR_IO8(0x37)
|
222
|
+
|
223
|
+
/* External Interrupt Flag Register */
|
224
|
+
#define EIFR _SFR_IO8(0x38)
|
225
|
+
|
226
|
+
/* External Interrupt MaSK register */
|
227
|
+
#define EIMSK _SFR_IO8(0x39)
|
228
|
+
|
229
|
+
/* External Interrupt Control Register B */
|
230
|
+
#define EICRB _SFR_IO8(0x3A)
|
231
|
+
|
232
|
+
/* RAM Page Z select register */
|
233
|
+
#define RAMPZ _SFR_IO8(0x3B)
|
234
|
+
|
235
|
+
/* XDIV Divide control register */
|
236
|
+
#define XDIV _SFR_IO8(0x3C)
|
237
|
+
|
238
|
+
/* 0x3D..0x3E SP */
|
239
|
+
|
240
|
+
/* 0x3F SREG */
|
241
|
+
|
242
|
+
/* Extended I/O registers */
|
243
|
+
|
244
|
+
/* Data Direction Register, Port F */
|
245
|
+
#define DDRF _SFR_MEM8(0x61)
|
246
|
+
|
247
|
+
/* Data Register, Port F */
|
248
|
+
#define PORTF _SFR_MEM8(0x62)
|
249
|
+
|
250
|
+
/* Input Pins, Port G */
|
251
|
+
#define PING _SFR_MEM8(0x63)
|
252
|
+
|
253
|
+
/* Data Direction Register, Port G */
|
254
|
+
#define DDRG _SFR_MEM8(0x64)
|
255
|
+
|
256
|
+
/* Data Register, Port G */
|
257
|
+
#define PORTG _SFR_MEM8(0x65)
|
258
|
+
|
259
|
+
/* Store Program Memory Control and Status Register */
|
260
|
+
#define SPMCR _SFR_MEM8(0x68)
|
261
|
+
#define SPMCSR _SFR_MEM8(0x68) /* new name in datasheet (2467E-AVR-05/02) */
|
262
|
+
|
263
|
+
/* External Interrupt Control Register A */
|
264
|
+
#define EICRA _SFR_MEM8(0x6A)
|
265
|
+
|
266
|
+
/* External Memory Control Register B */
|
267
|
+
#define XMCRB _SFR_MEM8(0x6C)
|
268
|
+
|
269
|
+
/* External Memory Control Register A */
|
270
|
+
#define XMCRA _SFR_MEM8(0x6D)
|
271
|
+
|
272
|
+
/* Oscillator Calibration Register */
|
273
|
+
#define OSCCAL _SFR_MEM8(0x6F)
|
274
|
+
|
275
|
+
/* 2-wire Serial Interface Bit Rate Register */
|
276
|
+
#define TWBR _SFR_MEM8(0x70)
|
277
|
+
|
278
|
+
/* 2-wire Serial Interface Status Register */
|
279
|
+
#define TWSR _SFR_MEM8(0x71)
|
280
|
+
|
281
|
+
/* 2-wire Serial Interface Address Register */
|
282
|
+
#define TWAR _SFR_MEM8(0x72)
|
283
|
+
|
284
|
+
/* 2-wire Serial Interface Data Register */
|
285
|
+
#define TWDR _SFR_MEM8(0x73)
|
286
|
+
|
287
|
+
/* 2-wire Serial Interface Control Register */
|
288
|
+
#define TWCR _SFR_MEM8(0x74)
|
289
|
+
|
290
|
+
/* Time Counter 1 Output Compare Register C */
|
291
|
+
#define OCR1C _SFR_MEM16(0x78)
|
292
|
+
#define OCR1CL _SFR_MEM8(0x78)
|
293
|
+
#define OCR1CH _SFR_MEM8(0x79)
|
294
|
+
|
295
|
+
/* Timer/Counter 1 Control Register C */
|
296
|
+
#define TCCR1C _SFR_MEM8(0x7A)
|
297
|
+
|
298
|
+
/* Extended Timer Interrupt Flag Register */
|
299
|
+
#define ETIFR _SFR_MEM8(0x7C)
|
300
|
+
|
301
|
+
/* Extended Timer Interrupt Mask Register */
|
302
|
+
#define ETIMSK _SFR_MEM8(0x7D)
|
303
|
+
|
304
|
+
/* Timer/Counter 3 Input Capture Register */
|
305
|
+
#define ICR3 _SFR_MEM16(0x80)
|
306
|
+
#define ICR3L _SFR_MEM8(0x80)
|
307
|
+
#define ICR3H _SFR_MEM8(0x81)
|
308
|
+
|
309
|
+
/* Timer/Counter 3 Output Compare Register C */
|
310
|
+
#define OCR3C _SFR_MEM16(0x82)
|
311
|
+
#define OCR3CL _SFR_MEM8(0x82)
|
312
|
+
#define OCR3CH _SFR_MEM8(0x83)
|
313
|
+
|
314
|
+
/* Timer/Counter 3 Output Compare Register B */
|
315
|
+
#define OCR3B _SFR_MEM16(0x84)
|
316
|
+
#define OCR3BL _SFR_MEM8(0x84)
|
317
|
+
#define OCR3BH _SFR_MEM8(0x85)
|
318
|
+
|
319
|
+
/* Timer/Counter 3 Output Compare Register A */
|
320
|
+
#define OCR3A _SFR_MEM16(0x86)
|
321
|
+
#define OCR3AL _SFR_MEM8(0x86)
|
322
|
+
#define OCR3AH _SFR_MEM8(0x87)
|
323
|
+
|
324
|
+
/* Timer/Counter 3 Counter Register */
|
325
|
+
#define TCNT3 _SFR_MEM16(0x88)
|
326
|
+
#define TCNT3L _SFR_MEM8(0x88)
|
327
|
+
#define TCNT3H _SFR_MEM8(0x89)
|
328
|
+
|
329
|
+
/* Timer/Counter 3 Control Register B */
|
330
|
+
#define TCCR3B _SFR_MEM8(0x8A)
|
331
|
+
|
332
|
+
/* Timer/Counter 3 Control Register A */
|
333
|
+
#define TCCR3A _SFR_MEM8(0x8B)
|
334
|
+
|
335
|
+
/* Timer/Counter 3 Control Register C */
|
336
|
+
#define TCCR3C _SFR_MEM8(0x8C)
|
337
|
+
|
338
|
+
/* USART0 Baud Rate Register High */
|
339
|
+
#define UBRR0H _SFR_MEM8(0x90)
|
340
|
+
|
341
|
+
/* USART0 Control and Status Register C */
|
342
|
+
#define UCSR0C _SFR_MEM8(0x95)
|
343
|
+
|
344
|
+
/* USART1 Baud Rate Register High */
|
345
|
+
#define UBRR1H _SFR_MEM8(0x98)
|
346
|
+
|
347
|
+
/* USART1 Baud Rate Register Low*/
|
348
|
+
#define UBRR1L _SFR_MEM8(0x99)
|
349
|
+
|
350
|
+
/* USART1 Control and Status Register B */
|
351
|
+
#define UCSR1B _SFR_MEM8(0x9A)
|
352
|
+
|
353
|
+
/* USART1 Control and Status Register A */
|
354
|
+
#define UCSR1A _SFR_MEM8(0x9B)
|
355
|
+
|
356
|
+
/* USART1 I/O Data Register */
|
357
|
+
#define UDR1 _SFR_MEM8(0x9C)
|
358
|
+
|
359
|
+
/* USART1 Control and Status Register C */
|
360
|
+
#define UCSR1C _SFR_MEM8(0x9D)
|
361
|
+
|
362
|
+
/* Interrupt vectors */
|
363
|
+
|
364
|
+
/* External Interrupt Request 0 */
|
365
|
+
#define INT0_vect_num 1
|
366
|
+
#define INT0_vect _VECTOR(1)
|
367
|
+
#define SIG_INTERRUPT0 _VECTOR(1)
|
368
|
+
|
369
|
+
/* External Interrupt Request 1 */
|
370
|
+
#define INT1_vect_num 2
|
371
|
+
#define INT1_vect _VECTOR(2)
|
372
|
+
#define SIG_INTERRUPT1 _VECTOR(2)
|
373
|
+
|
374
|
+
/* External Interrupt Request 2 */
|
375
|
+
#define INT2_vect_num 3
|
376
|
+
#define INT2_vect _VECTOR(3)
|
377
|
+
#define SIG_INTERRUPT2 _VECTOR(3)
|
378
|
+
|
379
|
+
/* External Interrupt Request 3 */
|
380
|
+
#define INT3_vect_num 4
|
381
|
+
#define INT3_vect _VECTOR(4)
|
382
|
+
#define SIG_INTERRUPT3 _VECTOR(4)
|
383
|
+
|
384
|
+
/* External Interrupt Request 4 */
|
385
|
+
#define INT4_vect_num 5
|
386
|
+
#define INT4_vect _VECTOR(5)
|
387
|
+
#define SIG_INTERRUPT4 _VECTOR(5)
|
388
|
+
|
389
|
+
/* External Interrupt Request 5 */
|
390
|
+
#define INT5_vect_num 6
|
391
|
+
#define INT5_vect _VECTOR(6)
|
392
|
+
#define SIG_INTERRUPT5 _VECTOR(6)
|
393
|
+
|
394
|
+
/* External Interrupt Request 6 */
|
395
|
+
#define INT6_vect_num 7
|
396
|
+
#define INT6_vect _VECTOR(7)
|
397
|
+
#define SIG_INTERRUPT6 _VECTOR(7)
|
398
|
+
|
399
|
+
/* External Interrupt Request 7 */
|
400
|
+
#define INT7_vect_num 8
|
401
|
+
#define INT7_vect _VECTOR(8)
|
402
|
+
#define SIG_INTERRUPT7 _VECTOR(8)
|
403
|
+
|
404
|
+
/* Timer/Counter2 Compare Match */
|
405
|
+
#define TIMER2_COMP_vect_num 9
|
406
|
+
#define TIMER2_COMP_vect _VECTOR(9)
|
407
|
+
#define SIG_OUTPUT_COMPARE2 _VECTOR(9)
|
408
|
+
|
409
|
+
/* Timer/Counter2 Overflow */
|
410
|
+
#define TIMER2_OVF_vect_num 10
|
411
|
+
#define TIMER2_OVF_vect _VECTOR(10)
|
412
|
+
#define SIG_OVERFLOW2 _VECTOR(10)
|
413
|
+
|
414
|
+
/* Timer/Counter1 Capture Event */
|
415
|
+
#define TIMER1_CAPT_vect_num 11
|
416
|
+
#define TIMER1_CAPT_vect _VECTOR(11)
|
417
|
+
#define SIG_INPUT_CAPTURE1 _VECTOR(11)
|
418
|
+
|
419
|
+
/* Timer/Counter1 Compare Match A */
|
420
|
+
#define TIMER1_COMPA_vect_num 12
|
421
|
+
#define TIMER1_COMPA_vect _VECTOR(12)
|
422
|
+
#define SIG_OUTPUT_COMPARE1A _VECTOR(12)
|
423
|
+
|
424
|
+
/* Timer/Counter Compare Match B */
|
425
|
+
#define TIMER1_COMPB_vect_num 13
|
426
|
+
#define TIMER1_COMPB_vect _VECTOR(13)
|
427
|
+
#define SIG_OUTPUT_COMPARE1B _VECTOR(13)
|
428
|
+
|
429
|
+
/* Timer/Counter1 Overflow */
|
430
|
+
#define TIMER1_OVF_vect_num 14
|
431
|
+
#define TIMER1_OVF_vect _VECTOR(14)
|
432
|
+
#define SIG_OVERFLOW1 _VECTOR(14)
|
433
|
+
|
434
|
+
/* Timer/Counter0 Compare Match */
|
435
|
+
#define TIMER0_COMP_vect_num 15
|
436
|
+
#define TIMER0_COMP_vect _VECTOR(15)
|
437
|
+
#define SIG_OUTPUT_COMPARE0 _VECTOR(15)
|
438
|
+
|
439
|
+
/* Timer/Counter0 Overflow */
|
440
|
+
#define TIMER0_OVF_vect_num 16
|
441
|
+
#define TIMER0_OVF_vect _VECTOR(16)
|
442
|
+
#define SIG_OVERFLOW0 _VECTOR(16)
|
443
|
+
|
444
|
+
/* SPI Serial Transfer Complete */
|
445
|
+
#define SPI_STC_vect_num 17
|
446
|
+
#define SPI_STC_vect _VECTOR(17)
|
447
|
+
#define SIG_SPI _VECTOR(17)
|
448
|
+
|
449
|
+
/* USART0, Rx Complete */
|
450
|
+
#define USART0_RX_vect_num 18
|
451
|
+
#define USART0_RX_vect _VECTOR(18)
|
452
|
+
#define SIG_USART0_RECV _VECTOR(18)
|
453
|
+
#define SIG_UART0_RECV _VECTOR(18)
|
454
|
+
|
455
|
+
/* USART0 Data Register Empty */
|
456
|
+
#define USART0_UDRE_vect_num 19
|
457
|
+
#define USART0_UDRE_vect _VECTOR(19)
|
458
|
+
#define SIG_USART0_DATA _VECTOR(19)
|
459
|
+
#define SIG_UART0_DATA _VECTOR(19)
|
460
|
+
|
461
|
+
/* USART0, Tx Complete */
|
462
|
+
#define USART0_TX_vect_num 20
|
463
|
+
#define USART0_TX_vect _VECTOR(20)
|
464
|
+
#define SIG_USART0_TRANS _VECTOR(20)
|
465
|
+
#define SIG_UART0_TRANS _VECTOR(20)
|
466
|
+
|
467
|
+
/* ADC Conversion Complete */
|
468
|
+
#define ADC_vect_num 21
|
469
|
+
#define ADC_vect _VECTOR(21)
|
470
|
+
#define SIG_ADC _VECTOR(21)
|
471
|
+
|
472
|
+
/* EEPROM Ready */
|
473
|
+
#define EE_READY_vect _VECTOR(22)
|
474
|
+
#define EE_READY_vect _VECTOR(22)
|
475
|
+
#define SIG_EEPROM_READY _VECTOR(22)
|
476
|
+
|
477
|
+
/* Analog Comparator */
|
478
|
+
#define ANALOG_COMP_vect_num 23
|
479
|
+
#define ANALOG_COMP_vect _VECTOR(23)
|
480
|
+
#define SIG_COMPARATOR _VECTOR(23)
|
481
|
+
|
482
|
+
/* Timer/Counter1 Compare Match C */
|
483
|
+
#define TIMER1_COMPC_vect_num 24
|
484
|
+
#define TIMER1_COMPC_vect _VECTOR(24)
|
485
|
+
#define SIG_OUTPUT_COMPARE1C _VECTOR(24)
|
486
|
+
|
487
|
+
/* Timer/Counter3 Capture Event */
|
488
|
+
#define TIMER3_CAPT_vect_num 25
|
489
|
+
#define TIMER3_CAPT_vect _VECTOR(25)
|
490
|
+
#define SIG_INPUT_CAPTURE3 _VECTOR(25)
|
491
|
+
|
492
|
+
/* Timer/Counter3 Compare Match A */
|
493
|
+
#define TIMER3_COMPA_vect_num 26
|
494
|
+
#define TIMER3_COMPA_vect _VECTOR(26)
|
495
|
+
#define SIG_OUTPUT_COMPARE3A _VECTOR(26)
|
496
|
+
|
497
|
+
/* Timer/Counter3 Compare Match B */
|
498
|
+
#define TIMER3_COMPB_vect_num 27
|
499
|
+
#define TIMER3_COMPB_vect _VECTOR(27)
|
500
|
+
#define SIG_OUTPUT_COMPARE3B _VECTOR(27)
|
501
|
+
|
502
|
+
/* Timer/Counter3 Compare Match C */
|
503
|
+
#define TIMER3_COMPC_vect_num 28
|
504
|
+
#define TIMER3_COMPC_vect _VECTOR(28)
|
505
|
+
#define SIG_OUTPUT_COMPARE3C _VECTOR(28)
|
506
|
+
|
507
|
+
/* Timer/Counter3 Overflow */
|
508
|
+
#define TIMER3_OVF_vect_num 29
|
509
|
+
#define TIMER3_OVF_vect _VECTOR(29)
|
510
|
+
#define SIG_OVERFLOW3 _VECTOR(29)
|
511
|
+
|
512
|
+
/* USART1, Rx Complete */
|
513
|
+
#define USART1_RX_vect_num 30
|
514
|
+
#define USART1_RX_vect _VECTOR(30)
|
515
|
+
#define SIG_USART1_RECV _VECTOR(30)
|
516
|
+
#define SIG_UART1_RECV _VECTOR(30)
|
517
|
+
|
518
|
+
/* USART1, Data Register Empty */
|
519
|
+
#define USART1_UDRE_vect_num 31
|
520
|
+
#define USART1_UDRE_vect _VECTOR(31)
|
521
|
+
#define SIG_USART1_DATA _VECTOR(31)
|
522
|
+
#define SIG_UART1_DATA _VECTOR(31)
|
523
|
+
|
524
|
+
/* USART1, Tx Complete */
|
525
|
+
#define USART1_TX_vect_num 32
|
526
|
+
#define USART1_TX_vect _VECTOR(32)
|
527
|
+
#define SIG_USART1_TRANS _VECTOR(32)
|
528
|
+
#define SIG_UART1_TRANS _VECTOR(32)
|
529
|
+
|
530
|
+
/* 2-wire Serial Interface */
|
531
|
+
#define TWI_vect_num 33
|
532
|
+
#define TWI_vect _VECTOR(33)
|
533
|
+
#define SIG_2WIRE_SERIAL _VECTOR(33)
|
534
|
+
|
535
|
+
/* Store Program Memory Read */
|
536
|
+
#define SPM_READY_vect_num 34
|
537
|
+
#define SPM_READY_vect _VECTOR(34)
|
538
|
+
#define SPM_READY_vect _VECTOR(34)
|
539
|
+
#define SIG_SPM_READY _VECTOR(34)
|
540
|
+
|
541
|
+
#define _VECTORS_SIZE 140
|
542
|
+
|
543
|
+
/*
|
544
|
+
The Register Bit names are represented by their bit number (0-7).
|
545
|
+
*/
|
546
|
+
|
547
|
+
/* 2-wire Control Register - TWCR */
|
548
|
+
#define TWINT 7
|
549
|
+
#define TWEA 6
|
550
|
+
#define TWSTA 5
|
551
|
+
#define TWSTO 4
|
552
|
+
#define TWWC 3
|
553
|
+
#define TWEN 2
|
554
|
+
#define TWIE 0
|
555
|
+
|
556
|
+
/* 2-wire Address Register - TWAR */
|
557
|
+
#define TWA6 7
|
558
|
+
#define TWA5 6
|
559
|
+
#define TWA4 5
|
560
|
+
#define TWA3 4
|
561
|
+
#define TWA2 3
|
562
|
+
#define TWA1 2
|
563
|
+
#define TWA0 1
|
564
|
+
#define TWGCE 0
|
565
|
+
|
566
|
+
/* 2-wire Status Register - TWSR */
|
567
|
+
#define TWS7 7
|
568
|
+
#define TWS6 6
|
569
|
+
#define TWS5 5
|
570
|
+
#define TWS4 4
|
571
|
+
#define TWS3 3
|
572
|
+
#define TWPS1 1
|
573
|
+
#define TWPS0 0
|
574
|
+
|
575
|
+
/* External Memory Control Register A - XMCRA */
|
576
|
+
#define SRL2 6
|
577
|
+
#define SRL1 5
|
578
|
+
#define SRL0 4
|
579
|
+
#define SRW01 3
|
580
|
+
#define SRW00 2
|
581
|
+
#define SRW11 1
|
582
|
+
|
583
|
+
/* External Memory Control Register B - XMCRA */
|
584
|
+
#define XMBK 7
|
585
|
+
#define XMM2 2
|
586
|
+
#define XMM1 1
|
587
|
+
#define XMM0 0
|
588
|
+
|
589
|
+
/* XDIV Divide control register - XDIV */
|
590
|
+
#define XDIVEN 7
|
591
|
+
#define XDIV6 6
|
592
|
+
#define XDIV5 5
|
593
|
+
#define XDIV4 4
|
594
|
+
#define XDIV3 3
|
595
|
+
#define XDIV2 2
|
596
|
+
#define XDIV1 1
|
597
|
+
#define XDIV0 0
|
598
|
+
|
599
|
+
/* RAM Page Z select register - RAMPZ */
|
600
|
+
#define RAMPZ0 0
|
601
|
+
|
602
|
+
/* External Interrupt Control Register A - EICRA */
|
603
|
+
#define ISC31 7
|
604
|
+
#define ISC30 6
|
605
|
+
#define ISC21 5
|
606
|
+
#define ISC20 4
|
607
|
+
#define ISC11 3
|
608
|
+
#define ISC10 2
|
609
|
+
#define ISC01 1
|
610
|
+
#define ISC00 0
|
611
|
+
|
612
|
+
/* External Interrupt Control Register B - EICRB */
|
613
|
+
#define ISC71 7
|
614
|
+
#define ISC70 6
|
615
|
+
#define ISC61 5
|
616
|
+
#define ISC60 4
|
617
|
+
#define ISC51 3
|
618
|
+
#define ISC50 2
|
619
|
+
#define ISC41 1
|
620
|
+
#define ISC40 0
|
621
|
+
|
622
|
+
/* Store Program Memory Control Register - SPMCSR, SPMCR */
|
623
|
+
#define SPMIE 7
|
624
|
+
#define RWWSB 6
|
625
|
+
#define RWWSRE 4
|
626
|
+
#define BLBSET 3
|
627
|
+
#define PGWRT 2
|
628
|
+
#define PGERS 1
|
629
|
+
#define SPMEN 0
|
630
|
+
|
631
|
+
/* External Interrupt MaSK register - EIMSK */
|
632
|
+
#define INT7 7
|
633
|
+
#define INT6 6
|
634
|
+
#define INT5 5
|
635
|
+
#define INT4 4
|
636
|
+
#define INT3 3
|
637
|
+
#define INT2 2
|
638
|
+
#define INT1 1
|
639
|
+
#define INT0 0
|
640
|
+
|
641
|
+
/* External Interrupt Flag Register - EIFR */
|
642
|
+
#define INTF7 7
|
643
|
+
#define INTF6 6
|
644
|
+
#define INTF5 5
|
645
|
+
#define INTF4 4
|
646
|
+
#define INTF3 3
|
647
|
+
#define INTF2 2
|
648
|
+
#define INTF1 1
|
649
|
+
#define INTF0 0
|
650
|
+
|
651
|
+
/* Timer/Counter Interrupt MaSK register - TIMSK */
|
652
|
+
#define OCIE2 7
|
653
|
+
#define TOIE2 6
|
654
|
+
#define TICIE1 5
|
655
|
+
#define OCIE1A 4
|
656
|
+
#define OCIE1B 3
|
657
|
+
#define TOIE1 2
|
658
|
+
#define OCIE0 1
|
659
|
+
#define TOIE0 0
|
660
|
+
|
661
|
+
/* Timer/Counter Interrupt Flag Register - TIFR */
|
662
|
+
#define OCF2 7
|
663
|
+
#define TOV2 6
|
664
|
+
#define ICF1 5
|
665
|
+
#define OCF1A 4
|
666
|
+
#define OCF1B 3
|
667
|
+
#define TOV1 2
|
668
|
+
#define OCF0 1
|
669
|
+
#define TOV0 0
|
670
|
+
|
671
|
+
/* Extended Timer Interrupt MaSK register - ETIMSK */
|
672
|
+
#define TICIE3 5
|
673
|
+
#define OCIE3A 4
|
674
|
+
#define OCIE3B 3
|
675
|
+
#define TOIE3 2
|
676
|
+
#define OCIE3C 1
|
677
|
+
#define OCIE1C 0
|
678
|
+
|
679
|
+
/* Extended Timer Interrupt Flag Register - ETIFR */
|
680
|
+
#define ICF3 5
|
681
|
+
#define OCF3A 4
|
682
|
+
#define OCF3B 3
|
683
|
+
#define TOV3 2
|
684
|
+
#define OCF3C 1
|
685
|
+
#define OCF1C 0
|
686
|
+
|
687
|
+
/* MCU general Control Register - MCUCR */
|
688
|
+
#define SRE 7
|
689
|
+
#define SRW 6
|
690
|
+
#define SRW10 6 /* new name in datasheet (2467E-AVR-05/02) */
|
691
|
+
#define SE 5
|
692
|
+
#define SM1 4
|
693
|
+
#define SM0 3
|
694
|
+
#define SM2 2
|
695
|
+
#define IVSEL 1
|
696
|
+
#define IVCE 0
|
697
|
+
|
698
|
+
/* MCU Status Register - MCUSR, MCUCSR */
|
699
|
+
#define JTD 7
|
700
|
+
#define JTRF 4
|
701
|
+
#define WDRF 3
|
702
|
+
#define BORF 2
|
703
|
+
#define EXTRF 1
|
704
|
+
#define PORF 0
|
705
|
+
|
706
|
+
/* Timer/Counter Control Register (generic) */
|
707
|
+
#define FOC 7
|
708
|
+
#define WGM0 6
|
709
|
+
#define COM1 5
|
710
|
+
#define COM0 4
|
711
|
+
#define WGM1 3
|
712
|
+
#define CS2 2
|
713
|
+
#define CS1 1
|
714
|
+
#define CS0 0
|
715
|
+
|
716
|
+
/* Timer/Counter 0 Control Register - TCCR0 */
|
717
|
+
#define FOC0 7
|
718
|
+
#define WGM00 6
|
719
|
+
#define COM01 5
|
720
|
+
#define COM00 4
|
721
|
+
#define WGM01 3
|
722
|
+
#define CS02 2
|
723
|
+
#define CS01 1
|
724
|
+
#define CS00 0
|
725
|
+
|
726
|
+
/* Timer/Counter 2 Control Register - TCCR2 */
|
727
|
+
#define FOC2 7
|
728
|
+
#define WGM20 6
|
729
|
+
#define COM21 5
|
730
|
+
#define COM20 4
|
731
|
+
#define WGM21 3
|
732
|
+
#define CS22 2
|
733
|
+
#define CS21 1
|
734
|
+
#define CS20 0
|
735
|
+
|
736
|
+
/* Timer/Counter 0 Asynchronous Control & Status Register - ASSR */
|
737
|
+
#define AS0 3
|
738
|
+
#define TCN0UB 2
|
739
|
+
#define OCR0UB 1
|
740
|
+
#define TCR0UB 0
|
741
|
+
|
742
|
+
/* Timer/Counter Control Register A (generic) */
|
743
|
+
#define COMA1 7
|
744
|
+
#define COMA0 6
|
745
|
+
#define COMB1 5
|
746
|
+
#define COMB0 4
|
747
|
+
#define COMC1 3
|
748
|
+
#define COMC0 2
|
749
|
+
#define WGMA1 1
|
750
|
+
#define WGMA0 0
|
751
|
+
|
752
|
+
/* Timer/Counter 1 Control and Status Register A - TCCR1A */
|
753
|
+
#define COM1A1 7
|
754
|
+
#define COM1A0 6
|
755
|
+
#define COM1B1 5
|
756
|
+
#define COM1B0 4
|
757
|
+
#define COM1C1 3
|
758
|
+
#define COM1C0 2
|
759
|
+
#define WGM11 1
|
760
|
+
#define WGM10 0
|
761
|
+
|
762
|
+
/* Timer/Counter 3 Control and Status Register A - TCCR3A */
|
763
|
+
#define COM3A1 7
|
764
|
+
#define COM3A0 6
|
765
|
+
#define COM3B1 5
|
766
|
+
#define COM3B0 4
|
767
|
+
#define COM3C1 3
|
768
|
+
#define COM3C0 2
|
769
|
+
#define WGM31 1
|
770
|
+
#define WGM30 0
|
771
|
+
|
772
|
+
/* Timer/Counter Control and Status Register B (generic) */
|
773
|
+
#define ICNC 7
|
774
|
+
#define ICES 6
|
775
|
+
#define WGMB3 4
|
776
|
+
#define WGMB2 3
|
777
|
+
#define CSB2 2
|
778
|
+
#define CSB1 1
|
779
|
+
#define CSB0 0
|
780
|
+
|
781
|
+
/* Timer/Counter 1 Control and Status Register B - TCCR1B */
|
782
|
+
#define ICNC1 7
|
783
|
+
#define ICES1 6
|
784
|
+
#define WGM13 4
|
785
|
+
#define WGM12 3
|
786
|
+
#define CS12 2
|
787
|
+
#define CS11 1
|
788
|
+
#define CS10 0
|
789
|
+
|
790
|
+
/* Timer/Counter 3 Control and Status Register B - TCCR3B */
|
791
|
+
#define ICNC3 7
|
792
|
+
#define ICES3 6
|
793
|
+
#define WGM33 4
|
794
|
+
#define WGM32 3
|
795
|
+
#define CS32 2
|
796
|
+
#define CS31 1
|
797
|
+
#define CS30 0
|
798
|
+
|
799
|
+
/* Timer/Counter Control Register C (generic) */
|
800
|
+
#define FOCA 7
|
801
|
+
#define FOCB 6
|
802
|
+
#define FOCC 5
|
803
|
+
|
804
|
+
/* Timer/Counter 3 Control Register C - TCCR3C */
|
805
|
+
#define FOC3A 7
|
806
|
+
#define FOC3B 6
|
807
|
+
#define FOC3C 5
|
808
|
+
|
809
|
+
/* Timer/Counter 1 Control Register C - TCCR1C */
|
810
|
+
#define FOC1A 7
|
811
|
+
#define FOC1B 6
|
812
|
+
#define FOC1C 5
|
813
|
+
|
814
|
+
/* On-chip Debug Register - OCDR */
|
815
|
+
#define IDRD 7
|
816
|
+
#define OCDR7 7
|
817
|
+
#define OCDR6 6
|
818
|
+
#define OCDR5 5
|
819
|
+
#define OCDR4 4
|
820
|
+
#define OCDR3 3
|
821
|
+
#define OCDR2 2
|
822
|
+
#define OCDR1 1
|
823
|
+
#define OCDR0 0
|
824
|
+
|
825
|
+
/* Watchdog Timer Control Register - WDTCR */
|
826
|
+
#define WDCE 4
|
827
|
+
#define WDE 3
|
828
|
+
#define WDP2 2
|
829
|
+
#define WDP1 1
|
830
|
+
#define WDP0 0
|
831
|
+
|
832
|
+
/*
|
833
|
+
The ADHSM bit has been removed from all documentation,
|
834
|
+
as being not needed at all since the comparator has proven
|
835
|
+
to be fast enough even without feeding it more power.
|
836
|
+
*/
|
837
|
+
|
838
|
+
/* Special Function I/O Register - SFIOR */
|
839
|
+
#define TSM 7
|
840
|
+
#define ACME 3
|
841
|
+
#define PUD 2
|
842
|
+
#define PSR0 1
|
843
|
+
#define PSR321 0
|
844
|
+
|
845
|
+
/* SPI Status Register - SPSR */
|
846
|
+
#define SPIF 7
|
847
|
+
#define WCOL 6
|
848
|
+
#define SPI2X 0
|
849
|
+
|
850
|
+
/* SPI Control Register - SPCR */
|
851
|
+
#define SPIE 7
|
852
|
+
#define SPE 6
|
853
|
+
#define DORD 5
|
854
|
+
#define MSTR 4
|
855
|
+
#define CPOL 3
|
856
|
+
#define CPHA 2
|
857
|
+
#define SPR1 1
|
858
|
+
#define SPR0 0
|
859
|
+
|
860
|
+
/* USART Register C (generic) */
|
861
|
+
#define UMSEL 6
|
862
|
+
#define UPM1 5
|
863
|
+
#define UPM0 4
|
864
|
+
#define USBS 3
|
865
|
+
#define UCSZ1 2
|
866
|
+
#define UCSZ0 1
|
867
|
+
#define UCPOL 0
|
868
|
+
|
869
|
+
/* USART1 Register C - UCSR1C */
|
870
|
+
#define UMSEL1 6
|
871
|
+
#define UPM11 5
|
872
|
+
#define UPM10 4
|
873
|
+
#define USBS1 3
|
874
|
+
#define UCSZ11 2
|
875
|
+
#define UCSZ10 1
|
876
|
+
#define UCPOL1 0
|
877
|
+
|
878
|
+
/* USART0 Register C - UCSR0C */
|
879
|
+
#define UMSEL0 6
|
880
|
+
#define UPM01 5
|
881
|
+
#define UPM00 4
|
882
|
+
#define USBS0 3
|
883
|
+
#define UCSZ01 2
|
884
|
+
#define UCSZ00 1
|
885
|
+
#define UCPOL0 0
|
886
|
+
|
887
|
+
/* USART Status Register A (generic) */
|
888
|
+
#define RXC 7
|
889
|
+
#define TXC 6
|
890
|
+
#define UDRE 5
|
891
|
+
#define FE 4
|
892
|
+
#define DOR 3
|
893
|
+
#define UPE 2
|
894
|
+
#define U2X 1
|
895
|
+
#define MPCM 0
|
896
|
+
|
897
|
+
/* USART1 Status Register A - UCSR1A */
|
898
|
+
#define RXC1 7
|
899
|
+
#define TXC1 6
|
900
|
+
#define UDRE1 5
|
901
|
+
#define FE1 4
|
902
|
+
#define DOR1 3
|
903
|
+
#define UPE1 2
|
904
|
+
#define U2X1 1
|
905
|
+
#define MPCM1 0
|
906
|
+
|
907
|
+
/* USART0 Status Register A - UCSR0A */
|
908
|
+
#define RXC0 7
|
909
|
+
#define TXC0 6
|
910
|
+
#define UDRE0 5
|
911
|
+
#define FE0 4
|
912
|
+
#define DOR0 3
|
913
|
+
#define UPE0 2
|
914
|
+
#define U2X0 1
|
915
|
+
#define MPCM0 0
|
916
|
+
|
917
|
+
/* USART Control Register B (generic) */
|
918
|
+
#define RXCIE 7
|
919
|
+
#define TXCIE 6
|
920
|
+
#define UDRIE 5
|
921
|
+
#define RXEN 4
|
922
|
+
#define TXEN 3
|
923
|
+
#define UCSZ 2
|
924
|
+
#define UCSZ2 2 /* new name in datasheet (2467E-AVR-05/02) */
|
925
|
+
#define RXB8 1
|
926
|
+
#define TXB8 0
|
927
|
+
|
928
|
+
/* USART1 Control Register B - UCSR1B */
|
929
|
+
#define RXCIE1 7
|
930
|
+
#define TXCIE1 6
|
931
|
+
#define UDRIE1 5
|
932
|
+
#define RXEN1 4
|
933
|
+
#define TXEN1 3
|
934
|
+
#define UCSZ12 2
|
935
|
+
#define RXB81 1
|
936
|
+
#define TXB81 0
|
937
|
+
|
938
|
+
/* USART0 Control Register B - UCSR0B */
|
939
|
+
#define RXCIE0 7
|
940
|
+
#define TXCIE0 6
|
941
|
+
#define UDRIE0 5
|
942
|
+
#define RXEN0 4
|
943
|
+
#define TXEN0 3
|
944
|
+
#define UCSZ02 2
|
945
|
+
#define RXB80 1
|
946
|
+
#define TXB80 0
|
947
|
+
|
948
|
+
/* Analog Comparator Control and Status Register - ACSR */
|
949
|
+
#define ACD 7
|
950
|
+
#define ACBG 6
|
951
|
+
#define ACO 5
|
952
|
+
#define ACI 4
|
953
|
+
#define ACIE 3
|
954
|
+
#define ACIC 2
|
955
|
+
#define ACIS1 1
|
956
|
+
#define ACIS0 0
|
957
|
+
|
958
|
+
/* ADC Control and status register - ADCSRA */
|
959
|
+
#define ADEN 7
|
960
|
+
#define ADSC 6
|
961
|
+
#define ADFR 5
|
962
|
+
#define ADIF 4
|
963
|
+
#define ADIE 3
|
964
|
+
#define ADPS2 2
|
965
|
+
#define ADPS1 1
|
966
|
+
#define ADPS0 0
|
967
|
+
|
968
|
+
/* ADC Multiplexer select - ADMUX */
|
969
|
+
#define REFS1 7
|
970
|
+
#define REFS0 6
|
971
|
+
#define ADLAR 5
|
972
|
+
#define MUX4 4
|
973
|
+
#define MUX3 3
|
974
|
+
#define MUX2 2
|
975
|
+
#define MUX1 1
|
976
|
+
#define MUX0 0
|
977
|
+
|
978
|
+
/* Port A Data Register - PORTA */
|
979
|
+
#define PA7 7
|
980
|
+
#define PA6 6
|
981
|
+
#define PA5 5
|
982
|
+
#define PA4 4
|
983
|
+
#define PA3 3
|
984
|
+
#define PA2 2
|
985
|
+
#define PA1 1
|
986
|
+
#define PA0 0
|
987
|
+
|
988
|
+
/* Port A Data Direction Register - DDRA */
|
989
|
+
#define DDA7 7
|
990
|
+
#define DDA6 6
|
991
|
+
#define DDA5 5
|
992
|
+
#define DDA4 4
|
993
|
+
#define DDA3 3
|
994
|
+
#define DDA2 2
|
995
|
+
#define DDA1 1
|
996
|
+
#define DDA0 0
|
997
|
+
|
998
|
+
/* Port A Input Pins - PINA */
|
999
|
+
#define PINA7 7
|
1000
|
+
#define PINA6 6
|
1001
|
+
#define PINA5 5
|
1002
|
+
#define PINA4 4
|
1003
|
+
#define PINA3 3
|
1004
|
+
#define PINA2 2
|
1005
|
+
#define PINA1 1
|
1006
|
+
#define PINA0 0
|
1007
|
+
|
1008
|
+
/* Port B Data Register - PORTB */
|
1009
|
+
#define PB7 7
|
1010
|
+
#define PB6 6
|
1011
|
+
#define PB5 5
|
1012
|
+
#define PB4 4
|
1013
|
+
#define PB3 3
|
1014
|
+
#define PB2 2
|
1015
|
+
#define PB1 1
|
1016
|
+
#define PB0 0
|
1017
|
+
|
1018
|
+
/* Port B Data Direction Register - DDRB */
|
1019
|
+
#define DDB7 7
|
1020
|
+
#define DDB6 6
|
1021
|
+
#define DDB5 5
|
1022
|
+
#define DDB4 4
|
1023
|
+
#define DDB3 3
|
1024
|
+
#define DDB2 2
|
1025
|
+
#define DDB1 1
|
1026
|
+
#define DDB0 0
|
1027
|
+
|
1028
|
+
/* Port B Input Pins - PINB */
|
1029
|
+
#define PINB7 7
|
1030
|
+
#define PINB6 6
|
1031
|
+
#define PINB5 5
|
1032
|
+
#define PINB4 4
|
1033
|
+
#define PINB3 3
|
1034
|
+
#define PINB2 2
|
1035
|
+
#define PINB1 1
|
1036
|
+
#define PINB0 0
|
1037
|
+
|
1038
|
+
/* Port C Data Register - PORTC */
|
1039
|
+
#define PC7 7
|
1040
|
+
#define PC6 6
|
1041
|
+
#define PC5 5
|
1042
|
+
#define PC4 4
|
1043
|
+
#define PC3 3
|
1044
|
+
#define PC2 2
|
1045
|
+
#define PC1 1
|
1046
|
+
#define PC0 0
|
1047
|
+
|
1048
|
+
/* Port C Data Direction Register - DDRC */
|
1049
|
+
#define DDC7 7
|
1050
|
+
#define DDC6 6
|
1051
|
+
#define DDC5 5
|
1052
|
+
#define DDC4 4
|
1053
|
+
#define DDC3 3
|
1054
|
+
#define DDC2 2
|
1055
|
+
#define DDC1 1
|
1056
|
+
#define DDC0 0
|
1057
|
+
|
1058
|
+
/* Port C Input Pins - PINC */
|
1059
|
+
#define PINC7 7
|
1060
|
+
#define PINC6 6
|
1061
|
+
#define PINC5 5
|
1062
|
+
#define PINC4 4
|
1063
|
+
#define PINC3 3
|
1064
|
+
#define PINC2 2
|
1065
|
+
#define PINC1 1
|
1066
|
+
#define PINC0 0
|
1067
|
+
|
1068
|
+
/* Port D Data Register - PORTD */
|
1069
|
+
#define PD7 7
|
1070
|
+
#define PD6 6
|
1071
|
+
#define PD5 5
|
1072
|
+
#define PD4 4
|
1073
|
+
#define PD3 3
|
1074
|
+
#define PD2 2
|
1075
|
+
#define PD1 1
|
1076
|
+
#define PD0 0
|
1077
|
+
|
1078
|
+
/* Port D Data Direction Register - DDRD */
|
1079
|
+
#define DDD7 7
|
1080
|
+
#define DDD6 6
|
1081
|
+
#define DDD5 5
|
1082
|
+
#define DDD4 4
|
1083
|
+
#define DDD3 3
|
1084
|
+
#define DDD2 2
|
1085
|
+
#define DDD1 1
|
1086
|
+
#define DDD0 0
|
1087
|
+
|
1088
|
+
/* Port D Input Pins - PIND */
|
1089
|
+
#define PIND7 7
|
1090
|
+
#define PIND6 6
|
1091
|
+
#define PIND5 5
|
1092
|
+
#define PIND4 4
|
1093
|
+
#define PIND3 3
|
1094
|
+
#define PIND2 2
|
1095
|
+
#define PIND1 1
|
1096
|
+
#define PIND0 0
|
1097
|
+
|
1098
|
+
/* Port E Data Register - PORTE */
|
1099
|
+
#define PE7 7
|
1100
|
+
#define PE6 6
|
1101
|
+
#define PE5 5
|
1102
|
+
#define PE4 4
|
1103
|
+
#define PE3 3
|
1104
|
+
#define PE2 2
|
1105
|
+
#define PE1 1
|
1106
|
+
#define PE0 0
|
1107
|
+
|
1108
|
+
/* Port E Data Direction Register - DDRE */
|
1109
|
+
#define DDE7 7
|
1110
|
+
#define DDE6 6
|
1111
|
+
#define DDE5 5
|
1112
|
+
#define DDE4 4
|
1113
|
+
#define DDE3 3
|
1114
|
+
#define DDE2 2
|
1115
|
+
#define DDE1 1
|
1116
|
+
#define DDE0 0
|
1117
|
+
|
1118
|
+
/* Port E Input Pins - PINE */
|
1119
|
+
#define PINE7 7
|
1120
|
+
#define PINE6 6
|
1121
|
+
#define PINE5 5
|
1122
|
+
#define PINE4 4
|
1123
|
+
#define PINE3 3
|
1124
|
+
#define PINE2 2
|
1125
|
+
#define PINE1 1
|
1126
|
+
#define PINE0 0
|
1127
|
+
|
1128
|
+
/* Port F Data Register - PORTF */
|
1129
|
+
#define PF7 7
|
1130
|
+
#define PF6 6
|
1131
|
+
#define PF5 5
|
1132
|
+
#define PF4 4
|
1133
|
+
#define PF3 3
|
1134
|
+
#define PF2 2
|
1135
|
+
#define PF1 1
|
1136
|
+
#define PF0 0
|
1137
|
+
|
1138
|
+
/* Port F Data Direction Register - DDRF */
|
1139
|
+
#define DDF7 7
|
1140
|
+
#define DDF6 6
|
1141
|
+
#define DDF5 5
|
1142
|
+
#define DDF4 4
|
1143
|
+
#define DDF3 3
|
1144
|
+
#define DDF2 2
|
1145
|
+
#define DDF1 1
|
1146
|
+
#define DDF0 0
|
1147
|
+
|
1148
|
+
/* Port F Input Pins - PINF */
|
1149
|
+
#define PINF7 7
|
1150
|
+
#define PINF6 6
|
1151
|
+
#define PINF5 5
|
1152
|
+
#define PINF4 4
|
1153
|
+
#define PINF3 3
|
1154
|
+
#define PINF2 2
|
1155
|
+
#define PINF1 1
|
1156
|
+
#define PINF0 0
|
1157
|
+
|
1158
|
+
/* Port G Data Register - PORTG */
|
1159
|
+
#define PG4 4
|
1160
|
+
#define PG3 3
|
1161
|
+
#define PG2 2
|
1162
|
+
#define PG1 1
|
1163
|
+
#define PG0 0
|
1164
|
+
|
1165
|
+
/* Port G Data Direction Register - DDRG */
|
1166
|
+
#define DDG4 4
|
1167
|
+
#define DDG3 3
|
1168
|
+
#define DDG2 2
|
1169
|
+
#define DDG1 1
|
1170
|
+
#define DDG0 0
|
1171
|
+
|
1172
|
+
/* Port G Input Pins - PING */
|
1173
|
+
#define PING4 4
|
1174
|
+
#define PING3 3
|
1175
|
+
#define PING2 2
|
1176
|
+
#define PING1 1
|
1177
|
+
#define PING0 0
|
1178
|
+
|
1179
|
+
/* EEPROM Control Register */
|
1180
|
+
#define EERIE 3
|
1181
|
+
#define EEMWE 2
|
1182
|
+
#define EEWE 1
|
1183
|
+
#define EERE 0
|
1184
|
+
|
1185
|
+
/* Constants */
|
1186
|
+
#define SPM_PAGESIZE 256
|
1187
|
+
#define RAMSTART 0x100
|
1188
|
+
#define RAMEND 0x10FF /* Last On-Chip SRAM Location */
|
1189
|
+
#define XRAMEND 0xFFFF
|
1190
|
+
#define E2END 0x0FFF
|
1191
|
+
#define E2PAGESIZE 8
|
1192
|
+
#define FLASHEND 0x1FFFF
|
1193
|
+
|
1194
|
+
|
1195
|
+
/* Fuses */
|
1196
|
+
|
1197
|
+
#define FUSE_MEMORY_SIZE 3
|
1198
|
+
|
1199
|
+
/* Low Fuse Byte */
|
1200
|
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
1201
|
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
1202
|
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
1203
|
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
1204
|
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
1205
|
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
1206
|
+
#define FUSE_BODEN (unsigned char)~_BV(6)
|
1207
|
+
#define FUSE_BODLEVEL (unsigned char)~_BV(7)
|
1208
|
+
#define LFUSE_DEFAULT (FUSE_CKSEL1 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0)
|
1209
|
+
|
1210
|
+
/* High Fuse Byte */
|
1211
|
+
#define FUSE_BOOTRST (unsigned char)~_BV(0)
|
1212
|
+
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
|
1213
|
+
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
|
1214
|
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
1215
|
+
#define FUSE_CKOPT (unsigned char)~_BV(4)
|
1216
|
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
1217
|
+
#define FUSE_JTAGEN (unsigned char)~_BV(6)
|
1218
|
+
#define FUSE_OCDEN (unsigned char)~_BV(7)
|
1219
|
+
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
|
1220
|
+
|
1221
|
+
/* Extended Fuse Byte */
|
1222
|
+
#define FUSE_WDTON (unsigned char)~_BV(0)
|
1223
|
+
#define FUSE_M103C (unsigned char)~_BV(1)
|
1224
|
+
#define EFUSE_DEFAULT (FUSE_M103C)
|
1225
|
+
|
1226
|
+
|
1227
|
+
/* Lock Bits */
|
1228
|
+
#define __LOCK_BITS_EXIST
|
1229
|
+
#define __BOOT_LOCK_BITS_0_EXIST
|
1230
|
+
#define __BOOT_LOCK_BITS_1_EXIST
|
1231
|
+
|
1232
|
+
|
1233
|
+
/* Signature */
|
1234
|
+
#define SIGNATURE_0 0x1E
|
1235
|
+
#define SIGNATURE_1 0x97
|
1236
|
+
#define SIGNATURE_2 0x02
|
1237
|
+
|
1238
|
+
|
1239
|
+
|
1240
|
+
/* Deprecated items */
|
1241
|
+
#if !defined(__AVR_LIBC_DEPRECATED_ENABLE__)
|
1242
|
+
|
1243
|
+
#pragma GCC system_header
|
1244
|
+
|
1245
|
+
#pragma GCC poison MCUSR
|
1246
|
+
#pragma GCC poison SPMCR
|
1247
|
+
|
1248
|
+
#pragma GCC poison SIG_INTERRUPT0
|
1249
|
+
#pragma GCC poison SIG_INTERRUPT1
|
1250
|
+
#pragma GCC poison SIG_INTERRUPT2
|
1251
|
+
#pragma GCC poison SIG_INTERRUPT3
|
1252
|
+
#pragma GCC poison SIG_INTERRUPT4
|
1253
|
+
#pragma GCC poison SIG_INTERRUPT5
|
1254
|
+
#pragma GCC poison SIG_INTERRUPT6
|
1255
|
+
#pragma GCC poison SIG_INTERRUPT7
|
1256
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE2
|
1257
|
+
#pragma GCC poison SIG_OVERFLOW2
|
1258
|
+
#pragma GCC poison SIG_INPUT_CAPTURE1
|
1259
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE1A
|
1260
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE1B
|
1261
|
+
#pragma GCC poison SIG_OVERFLOW1
|
1262
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE0
|
1263
|
+
#pragma GCC poison SIG_OVERFLOW0
|
1264
|
+
#pragma GCC poison SIG_SPI
|
1265
|
+
#pragma GCC poison SIG_USART0_RECV
|
1266
|
+
#pragma GCC poison SIG_UART0_RECV
|
1267
|
+
#pragma GCC poison SIG_USART0_DATA
|
1268
|
+
#pragma GCC poison SIG_UART0_DATA
|
1269
|
+
#pragma GCC poison SIG_USART0_TRANS
|
1270
|
+
#pragma GCC poison SIG_UART0_TRANS
|
1271
|
+
#pragma GCC poison SIG_ADC
|
1272
|
+
#pragma GCC poison SIG_EEPROM_READY
|
1273
|
+
#pragma GCC poison SIG_COMPARATOR
|
1274
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE1C
|
1275
|
+
#pragma GCC poison SIG_INPUT_CAPTURE3
|
1276
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE3A
|
1277
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE3B
|
1278
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE3C
|
1279
|
+
#pragma GCC poison SIG_OVERFLOW3
|
1280
|
+
#pragma GCC poison SIG_USART1_RECV
|
1281
|
+
#pragma GCC poison SIG_UART1_RECV
|
1282
|
+
#pragma GCC poison SIG_USART1_DATA
|
1283
|
+
#pragma GCC poison SIG_UART1_DATA
|
1284
|
+
#pragma GCC poison SIG_USART1_TRANS
|
1285
|
+
#pragma GCC poison SIG_UART1_TRANS
|
1286
|
+
#pragma GCC poison SIG_2WIRE_SERIAL
|
1287
|
+
#pragma GCC poison SIG_SPM_READY
|
1288
|
+
|
1289
|
+
|
1290
|
+
#endif /* !defined(__AVR_LIBC_DEPRECATED_ENABLE__) */
|
1291
|
+
|
1292
|
+
#define SLEEP_MODE_IDLE (0x00<<2)
|
1293
|
+
#define SLEEP_MODE_ADC (0x02<<2)
|
1294
|
+
#define SLEEP_MODE_PWR_DOWN (0x04<<2)
|
1295
|
+
#define SLEEP_MODE_PWR_SAVE (0x06<<2)
|
1296
|
+
#define SLEEP_MODE_STANDBY (0x05<<2)
|
1297
|
+
#define SLEEP_MODE_EXT_STANDBY (0x07<<2)
|
1298
|
+
|
1299
|
+
#endif /* _AVR_IOM128_H_ */
|