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,363 @@
|
|
1
|
+
/* Copyright (c) 2002,2005 Marek Michalkiewicz
|
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: iotn15.h 2236 2011-03-17 21:53:39Z arcanum $ */
|
32
|
+
|
33
|
+
/* avr/iotn15.h - definitions for ATtiny15 */
|
34
|
+
|
35
|
+
#ifndef _AVR_IOTN15_H_
|
36
|
+
#define _AVR_IOTN15_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_ "iotn15.h"
|
46
|
+
#else
|
47
|
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
48
|
+
#endif
|
49
|
+
|
50
|
+
#ifndef __ASSEMBLER__
|
51
|
+
# warning "MCU not supported by the C compiler"
|
52
|
+
#endif
|
53
|
+
|
54
|
+
/* I/O registers */
|
55
|
+
|
56
|
+
/* 0x00..0x03 reserved */
|
57
|
+
|
58
|
+
#ifndef __ASSEMBLER__
|
59
|
+
#define ADC _SFR_IO16 (0x04)
|
60
|
+
#endif
|
61
|
+
#define ADCW _SFR_IO16(0x04)
|
62
|
+
#define ADCL _SFR_IO8(0x04)
|
63
|
+
#define ADCH _SFR_IO8(0x05)
|
64
|
+
#define ADCSR _SFR_IO8(0x06)
|
65
|
+
#define ADMUX _SFR_IO8(0x07)
|
66
|
+
|
67
|
+
/* Analog Comparator Control and Status Register */
|
68
|
+
#define ACSR _SFR_IO8(0x08)
|
69
|
+
|
70
|
+
/* 0x09..0x15 reserved */
|
71
|
+
|
72
|
+
/* Input Pins, Port B */
|
73
|
+
#define PINB _SFR_IO8(0x16)
|
74
|
+
|
75
|
+
/* Data Direction Register, Port B */
|
76
|
+
#define DDRB _SFR_IO8(0x17)
|
77
|
+
|
78
|
+
/* Data Register, Port B */
|
79
|
+
#define PORTB _SFR_IO8(0x18)
|
80
|
+
|
81
|
+
/* 0x19..0x1B reserved */
|
82
|
+
|
83
|
+
/* EEPROM Control Register */
|
84
|
+
#define EECR _SFR_IO8(0x1C)
|
85
|
+
|
86
|
+
/* EEPROM Data Register */
|
87
|
+
#define EEDR _SFR_IO8(0x1D)
|
88
|
+
|
89
|
+
/* EEPROM Address Register */
|
90
|
+
#define EEAR _SFR_IO8(0x1E)
|
91
|
+
#define EEARL _SFR_IO8(0x1E)
|
92
|
+
|
93
|
+
/* 0x1F..0x20 reserved */
|
94
|
+
|
95
|
+
/* Watchdog Timer Control Register */
|
96
|
+
#define WDTCR _SFR_IO8(0x21)
|
97
|
+
|
98
|
+
/* 0x22..0x2B reserved */
|
99
|
+
#define SFIOR _SFR_IO8(0x2C)
|
100
|
+
|
101
|
+
#define OCR1B _SFR_IO8(0x2D)
|
102
|
+
#define OCR1A _SFR_IO8(0x2E)
|
103
|
+
#define TCNT1 _SFR_IO8(0x2F)
|
104
|
+
#define TCCR1 _SFR_IO8(0x30)
|
105
|
+
|
106
|
+
/* Oscillator Calibration Register */
|
107
|
+
#define OSCCAL _SFR_IO8(0x31)
|
108
|
+
|
109
|
+
/* Timer/Counter0 (8-bit) */
|
110
|
+
#define TCNT0 _SFR_IO8(0x32)
|
111
|
+
|
112
|
+
/* Timer/Counter0 Control Register */
|
113
|
+
#define TCCR0 _SFR_IO8(0x33)
|
114
|
+
|
115
|
+
/* MCU general Status Register */
|
116
|
+
#define MCUSR _SFR_IO8(0x34)
|
117
|
+
|
118
|
+
/* MCU general Control Register */
|
119
|
+
#define MCUCR _SFR_IO8(0x35)
|
120
|
+
|
121
|
+
/* 0x36..0x37 reserved */
|
122
|
+
|
123
|
+
/* Timer/Counter Interrupt Flag Register */
|
124
|
+
#define TIFR _SFR_IO8(0x38)
|
125
|
+
|
126
|
+
/* Timer/Counter Interrupt MaSK Register */
|
127
|
+
#define TIMSK _SFR_IO8(0x39)
|
128
|
+
|
129
|
+
/* General Interrupt Flag Register */
|
130
|
+
#define GIFR _SFR_IO8(0x3A)
|
131
|
+
|
132
|
+
/* General Interrupt MaSK register */
|
133
|
+
#define GIMSK _SFR_IO8(0x3B)
|
134
|
+
|
135
|
+
/* 0x3C..0x3E reserved */
|
136
|
+
|
137
|
+
/* 0x3F SREG */
|
138
|
+
|
139
|
+
/* Interrupt vectors */
|
140
|
+
|
141
|
+
/* External Interrupt 0 */
|
142
|
+
#define INT0_vect_num 1
|
143
|
+
#define INT0_vect _VECTOR(1)
|
144
|
+
#define SIG_INTERRUPT0 _VECTOR(1)
|
145
|
+
|
146
|
+
/* External Interrupt Request 0 */
|
147
|
+
#define IO_PINS_vect_num 2
|
148
|
+
#define IO_PINS_vect _VECTOR(2)
|
149
|
+
#define SIG_PIN _VECTOR(2)
|
150
|
+
#define SIG_PIN_CHANGE _VECTOR(2)
|
151
|
+
|
152
|
+
/* Timer/Counter1 Compare Match */
|
153
|
+
#define TIMER1_COMP_vect_num 3
|
154
|
+
#define TIMER1_COMP_vect _VECTOR(3)
|
155
|
+
#define SIG_OUTPUT_COMPARE1A _VECTOR(3)
|
156
|
+
|
157
|
+
/* Timer/Counter1 Overflow */
|
158
|
+
#define TIMER1_OVF_vect_num 4
|
159
|
+
#define TIMER1_OVF_vect _VECTOR(4)
|
160
|
+
#define SIG_OVERFLOW1 _VECTOR(4)
|
161
|
+
|
162
|
+
/* Timer/Counter0 Overflow */
|
163
|
+
#define TIMER0_OVF_vect_num 5
|
164
|
+
#define TIMER0_OVF_vect _VECTOR(5)
|
165
|
+
#define SIG_OVERFLOW0 _VECTOR(5)
|
166
|
+
|
167
|
+
/* EEPROM Ready */
|
168
|
+
#define EE_RDY_vect_num 6
|
169
|
+
#define EE_RDY_vect _VECTOR(6)
|
170
|
+
#define SIG_EEPROM_READY _VECTOR(6)
|
171
|
+
|
172
|
+
/* Analog Comparator */
|
173
|
+
#define ANA_COMP_vect_num 7
|
174
|
+
#define ANA_COMP_vect _VECTOR(7)
|
175
|
+
#define SIG_COMPARATOR _VECTOR(7)
|
176
|
+
|
177
|
+
/* ADC Conversion Ready */
|
178
|
+
#define ADC_vect_num 8
|
179
|
+
#define ADC_vect _VECTOR(8)
|
180
|
+
#define SIG_ADC _VECTOR(8)
|
181
|
+
|
182
|
+
#define _VECTORS_SIZE 18
|
183
|
+
|
184
|
+
/* Bit numbers */
|
185
|
+
|
186
|
+
/* GIMSK */
|
187
|
+
#define INT0 6
|
188
|
+
#define PCIE 5
|
189
|
+
|
190
|
+
/* GIFR */
|
191
|
+
#define INTF0 6
|
192
|
+
#define PCIF 5
|
193
|
+
|
194
|
+
/* TIMSK */
|
195
|
+
#define OCIE1 6
|
196
|
+
#define TOIE1 2
|
197
|
+
#define TOIE0 1
|
198
|
+
|
199
|
+
/* TIFR */
|
200
|
+
#define OCF1 6
|
201
|
+
#define TOV1 2
|
202
|
+
#define TOV0 1
|
203
|
+
|
204
|
+
/* MCUCR */
|
205
|
+
#define PUD 6
|
206
|
+
#define SE 5
|
207
|
+
#define SM1 4
|
208
|
+
#define SM0 3
|
209
|
+
#define ISC01 1
|
210
|
+
#define ISC00 0
|
211
|
+
|
212
|
+
/* MCUSR */
|
213
|
+
#define WDRF 3
|
214
|
+
#define BORF 2
|
215
|
+
#define EXTRF 1
|
216
|
+
#define PORF 0
|
217
|
+
|
218
|
+
/* TCCR0 */
|
219
|
+
#define CS02 2
|
220
|
+
#define CS01 1
|
221
|
+
#define CS00 0
|
222
|
+
|
223
|
+
/* TCCR1 */
|
224
|
+
#define CTC1 7
|
225
|
+
#define PWM1 6
|
226
|
+
#define COM1A1 5
|
227
|
+
#define COM1A0 4
|
228
|
+
#define CS13 3
|
229
|
+
#define CS12 2
|
230
|
+
#define CS11 1
|
231
|
+
#define CS10 0
|
232
|
+
|
233
|
+
/* SFIOR */
|
234
|
+
#define FOC1A 2
|
235
|
+
#define PSR1 1
|
236
|
+
#define PSR0 0
|
237
|
+
|
238
|
+
/* WDTCR */
|
239
|
+
#define WDTOE 4
|
240
|
+
#define WDE 3
|
241
|
+
#define WDP2 2
|
242
|
+
#define WDP1 1
|
243
|
+
#define WDP0 0
|
244
|
+
|
245
|
+
/*
|
246
|
+
PB5 = RESET# / ADC0
|
247
|
+
PB4 = ADC3
|
248
|
+
PB3 = ADC2
|
249
|
+
PB2 = SCK / ADC1 / T0 / INT0
|
250
|
+
PB1 = MISO / AIN1 / OCP
|
251
|
+
PB0 = MOSI / AIN0 / AREF
|
252
|
+
*/
|
253
|
+
|
254
|
+
/* PORTB */
|
255
|
+
#define PB4 4
|
256
|
+
#define PB3 3
|
257
|
+
#define PB2 2
|
258
|
+
#define PB1 1
|
259
|
+
#define PB0 0
|
260
|
+
|
261
|
+
/* DDRB */
|
262
|
+
#define DDB4 4
|
263
|
+
#define DDB3 3
|
264
|
+
#define DDB2 2
|
265
|
+
#define DDB1 1
|
266
|
+
#define DDB0 0
|
267
|
+
|
268
|
+
/* PINB */
|
269
|
+
#define PINB5 5
|
270
|
+
#define PINB4 4
|
271
|
+
#define PINB3 3
|
272
|
+
#define PINB2 2
|
273
|
+
#define PINB1 1
|
274
|
+
#define PINB0 0
|
275
|
+
|
276
|
+
/* ACSR */
|
277
|
+
#define ACD 7
|
278
|
+
#define GREF 6
|
279
|
+
#define ACO 5
|
280
|
+
#define ACI 4
|
281
|
+
#define ACIE 3
|
282
|
+
#define ACIS1 1
|
283
|
+
#define ACIS0 0
|
284
|
+
|
285
|
+
/* ADMUX */
|
286
|
+
#define REFS1 7
|
287
|
+
#define REFS0 6
|
288
|
+
#define ADLAR 5
|
289
|
+
#define MUX2 2
|
290
|
+
#define MUX1 1
|
291
|
+
#define MUX0 0
|
292
|
+
|
293
|
+
/* ADCSR */
|
294
|
+
#define ADEN 7
|
295
|
+
#define ADSC 6
|
296
|
+
#define ADFR 5
|
297
|
+
#define ADIF 4
|
298
|
+
#define ADIE 3
|
299
|
+
#define ADPS2 2
|
300
|
+
#define ADPS1 1
|
301
|
+
#define ADPS0 0
|
302
|
+
|
303
|
+
/* EEPROM Control Register */
|
304
|
+
#define EERIE 3
|
305
|
+
#define EEMWE 2
|
306
|
+
#define EEWE 1
|
307
|
+
#define EERE 0
|
308
|
+
|
309
|
+
#define RAMSTART 0x60
|
310
|
+
/* Last memory addresses */
|
311
|
+
#define RAMEND 0x1F
|
312
|
+
#define XRAMEND 0x0
|
313
|
+
#define E2END 0x3F
|
314
|
+
#define E2PAGESIZE 2
|
315
|
+
#define FLASHEND 0x3FF
|
316
|
+
|
317
|
+
|
318
|
+
/* Fuses */
|
319
|
+
|
320
|
+
#define FUSE_MEMORY_SIZE 1
|
321
|
+
|
322
|
+
/* Fuse Byte */
|
323
|
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
324
|
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
325
|
+
#define FUSE_RSTDISBL (unsigned char)~_BV(4)
|
326
|
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
327
|
+
#define FUSE_BODEN (unsigned char)~_BV(6)
|
328
|
+
#define FUSE_BODLEVEL (unsigned char)~_BV(7)
|
329
|
+
#define FUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL1 & FUSE_SPIEN)
|
330
|
+
|
331
|
+
|
332
|
+
/* Lock Bits */
|
333
|
+
#define __LOCK_BITS_EXIST
|
334
|
+
|
335
|
+
|
336
|
+
/* Signature */
|
337
|
+
#define SIGNATURE_0 0x1E
|
338
|
+
#define SIGNATURE_1 0x90
|
339
|
+
#define SIGNATURE_2 0x06
|
340
|
+
|
341
|
+
|
342
|
+
/* Deprecated items */
|
343
|
+
#if !defined(__AVR_LIBC_DEPRECATED_ENABLE__)
|
344
|
+
|
345
|
+
#pragma GCC system_header
|
346
|
+
|
347
|
+
#pragma GCC poison SIG_INTERRUPT0
|
348
|
+
#pragma GCC poison SIG_PIN
|
349
|
+
#pragma GCC poison SIG_PIN_CHANGE
|
350
|
+
#pragma GCC poison SIG_OUTPUT_COMPARE1A
|
351
|
+
#pragma GCC poison SIG_OVERFLOW1
|
352
|
+
#pragma GCC poison SIG_OVERFLOW0
|
353
|
+
#pragma GCC poison SIG_EEPROM_READY
|
354
|
+
#pragma GCC poison SIG_COMPARATOR
|
355
|
+
#pragma GCC poison SIG_ADC
|
356
|
+
|
357
|
+
#endif /* !defined(__AVR_LIBC_DEPRECATED_ENABLE__) */
|
358
|
+
|
359
|
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
360
|
+
#define SLEEP_MODE_ADC (0x01<<3)
|
361
|
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
362
|
+
|
363
|
+
#endif /* _AVR_IOTN15_H_ */
|
@@ -0,0 +1,914 @@
|
|
1
|
+
/*****************************************************************************
|
2
|
+
*
|
3
|
+
* Copyright (C) 2016 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_ATTINY1634_H_INCLUDED
|
36
|
+
#define _AVR_ATTINY1634_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_ "iotn1634.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
|
+
/* Combine ADCL and ADCH */
|
52
|
+
#ifndef __ASSEMBLER__
|
53
|
+
#define ADC _SFR_IO16(0x00)
|
54
|
+
#endif
|
55
|
+
#define ADCW _SFR_IO16(0x00)
|
56
|
+
|
57
|
+
#define ADCL _SFR_IO8(0x00)
|
58
|
+
#define ADCH _SFR_IO8(0x01)
|
59
|
+
|
60
|
+
#define ADCSRB _SFR_IO8(0x02)
|
61
|
+
#define ADTS0 0
|
62
|
+
#define ADTS1 1
|
63
|
+
#define ADTS2 2
|
64
|
+
#define ADLAR 3
|
65
|
+
#define VDPD 6
|
66
|
+
#define VDEN 7
|
67
|
+
|
68
|
+
#define ADCSRA _SFR_IO8(0x03)
|
69
|
+
#define ADPS0 0
|
70
|
+
#define ADPS1 1
|
71
|
+
#define ADPS2 2
|
72
|
+
#define ADIE 3
|
73
|
+
#define ADIF 4
|
74
|
+
#define ADATE 5
|
75
|
+
#define ADSC 6
|
76
|
+
#define ADEN 7
|
77
|
+
|
78
|
+
#define ADMUX _SFR_IO8(0x04)
|
79
|
+
#define MUX0 0
|
80
|
+
#define MUX1 1
|
81
|
+
#define MUX2 2
|
82
|
+
#define MUX3 3
|
83
|
+
#define ADC0EN 4
|
84
|
+
#define REFEN 5
|
85
|
+
#define REFS0 6
|
86
|
+
#define REFS1 7
|
87
|
+
|
88
|
+
#define ACSRB _SFR_IO8(0x05)
|
89
|
+
#define ACIRS0 0
|
90
|
+
#define ACIRS1 1
|
91
|
+
#define ACME 2
|
92
|
+
#define ACCE 3
|
93
|
+
#define ACLP 5
|
94
|
+
#define HLEV 6
|
95
|
+
#define HSEL 7
|
96
|
+
|
97
|
+
#define ACSRA _SFR_IO8(0x06)
|
98
|
+
#define ACIS0 0
|
99
|
+
#define ACIS1 1
|
100
|
+
#define ACIC 2
|
101
|
+
#define ACIE 3
|
102
|
+
#define ACI 4
|
103
|
+
#define ACO 5
|
104
|
+
#define ACBG 6
|
105
|
+
#define ACD 7
|
106
|
+
|
107
|
+
#define PINC _SFR_IO8(0x07)
|
108
|
+
#define PINC5 5
|
109
|
+
#define PINC4 4
|
110
|
+
#define PINC3 3
|
111
|
+
#define PINC2 2
|
112
|
+
#define PINC1 1
|
113
|
+
#define PINC0 0
|
114
|
+
|
115
|
+
#define DDRC _SFR_IO8(0x08)
|
116
|
+
#define DDRC5 5
|
117
|
+
// Inserted "DDC5" from "DDRC5" due to compatibility
|
118
|
+
#define DDC5 5
|
119
|
+
#define DDRC4 4
|
120
|
+
// Inserted "DDC4" from "DDRC4" due to compatibility
|
121
|
+
#define DDC4 4
|
122
|
+
#define DDRC3 3
|
123
|
+
// Inserted "DDC3" from "DDRC3" due to compatibility
|
124
|
+
#define DDC3 3
|
125
|
+
#define DDRC2 2
|
126
|
+
// Inserted "DDC2" from "DDRC2" due to compatibility
|
127
|
+
#define DDC2 2
|
128
|
+
#define DDRC1 1
|
129
|
+
// Inserted "DDC1" from "DDRC1" due to compatibility
|
130
|
+
#define DDC1 1
|
131
|
+
#define DDRC0 0
|
132
|
+
// Inserted "DDC0" from "DDRC0" due to compatibility
|
133
|
+
#define DDC0 0
|
134
|
+
|
135
|
+
#define PORTC _SFR_IO8(0x09)
|
136
|
+
#define PORTC5 5
|
137
|
+
#define PORTC4 4
|
138
|
+
#define PORTC3 3
|
139
|
+
#define PORTC2 2
|
140
|
+
#define PORTC1 1
|
141
|
+
#define PORTC0 0
|
142
|
+
|
143
|
+
#define PUEC _SFR_IO8(0x0A)
|
144
|
+
#define PUEC0 0
|
145
|
+
#define PUEC1 1
|
146
|
+
#define PUEC2 2
|
147
|
+
#define PUEC3 3
|
148
|
+
#define PUEC4 4
|
149
|
+
#define PUEC5 5
|
150
|
+
|
151
|
+
#define PINB _SFR_IO8(0x0B)
|
152
|
+
#define PINB3 3
|
153
|
+
#define PINB2 2
|
154
|
+
#define PINB1 1
|
155
|
+
#define PINB0 0
|
156
|
+
|
157
|
+
#define DDRB _SFR_IO8(0x0C)
|
158
|
+
#define DDRB3 3
|
159
|
+
// Inserted "DDB3" from "DDRB3" due to compatibility
|
160
|
+
#define DDB3 3
|
161
|
+
#define DDRB2 2
|
162
|
+
// Inserted "DDB2" from "DDRB2" due to compatibility
|
163
|
+
#define DDB2 2
|
164
|
+
#define DDRB1 1
|
165
|
+
// Inserted "DDB1" from "DDRB1" due to compatibility
|
166
|
+
#define DDB1 1
|
167
|
+
#define DDRB0 0
|
168
|
+
// Inserted "DDB0" from "DDRB0" due to compatibility
|
169
|
+
#define DDB0 0
|
170
|
+
|
171
|
+
#define PORTB _SFR_IO8(0x0D)
|
172
|
+
#define PORTB3 3
|
173
|
+
#define PORTB2 2
|
174
|
+
#define PORTB1 1
|
175
|
+
#define PORTB0 0
|
176
|
+
|
177
|
+
#define PUEB _SFR_IO8(0x0E)
|
178
|
+
#define PUEB0 0
|
179
|
+
#define PUEB1 1
|
180
|
+
#define PUEB2 2
|
181
|
+
#define PUEB3 3
|
182
|
+
|
183
|
+
#define PINA _SFR_IO8(0x0F)
|
184
|
+
#define PINA7 7
|
185
|
+
#define PINA6 6
|
186
|
+
#define PINA5 5
|
187
|
+
#define PINA4 4
|
188
|
+
#define PINA3 3
|
189
|
+
#define PINA2 2
|
190
|
+
#define PINA1 1
|
191
|
+
#define PINA0 0
|
192
|
+
|
193
|
+
#define DDRA _SFR_IO8(0x10)
|
194
|
+
#define DDRA7 7
|
195
|
+
// Inserted "DDA7" from "DDRA7" due to compatibility
|
196
|
+
#define DDA7 7
|
197
|
+
#define DDRA6 6
|
198
|
+
// Inserted "DDA6" from "DDRA6" due to compatibility
|
199
|
+
#define DDA6 6
|
200
|
+
#define DDRA5 5
|
201
|
+
// Inserted "DDA5" from "DDRA5" due to compatibility
|
202
|
+
#define DDA5 5
|
203
|
+
#define DDRA4 4
|
204
|
+
// Inserted "DDA4" from "DDRA4" due to compatibility
|
205
|
+
#define DDA4 4
|
206
|
+
#define DDRA3 3
|
207
|
+
// Inserted "DDA3" from "DDRA3" due to compatibility
|
208
|
+
#define DDA3 3
|
209
|
+
#define DDRA2 2
|
210
|
+
// Inserted "DDA2" from "DDRA2" due to compatibility
|
211
|
+
#define DDA2 2
|
212
|
+
#define DDRA1 1
|
213
|
+
// Inserted "DDA1" from "DDRA1" due to compatibility
|
214
|
+
#define DDA1 1
|
215
|
+
#define DDRA0 0
|
216
|
+
// Inserted "DDA0" from "DDRA0" due to compatibility
|
217
|
+
#define DDA0 0
|
218
|
+
|
219
|
+
#define PORTA _SFR_IO8(0x11)
|
220
|
+
#define PORTA7 7
|
221
|
+
#define PORTA6 6
|
222
|
+
#define PORTA5 5
|
223
|
+
#define PORTA4 4
|
224
|
+
#define PORTA3 3
|
225
|
+
#define PORTA2 2
|
226
|
+
#define PORTA1 1
|
227
|
+
#define PORTA0 0
|
228
|
+
|
229
|
+
#define PUEA _SFR_IO8(0x12)
|
230
|
+
#define PUEA0 0
|
231
|
+
#define PUEA1 1
|
232
|
+
#define PUEA2 2
|
233
|
+
#define PUEA3 3
|
234
|
+
#define PUEA4 4
|
235
|
+
#define PUEA5 5
|
236
|
+
#define PUEA6 6
|
237
|
+
#define PUEA7 7
|
238
|
+
|
239
|
+
#define PORTCR _SFR_IO8(0x13)
|
240
|
+
#define BBMB 1
|
241
|
+
#define BBMC 2
|
242
|
+
#define BBMA 0
|
243
|
+
|
244
|
+
#define GPIOR0 _SFR_IO8(0x14)
|
245
|
+
|
246
|
+
#define GPIOR1 _SFR_IO8(0x15)
|
247
|
+
|
248
|
+
#define GPIOR2 _SFR_IO8(0x16)
|
249
|
+
|
250
|
+
#define OCR0B _SFR_IO8(0x17)
|
251
|
+
|
252
|
+
#define OCR0A _SFR_IO8(0x18)
|
253
|
+
|
254
|
+
#define TCNT0 _SFR_IO8(0x19)
|
255
|
+
|
256
|
+
#define TCCR0B _SFR_IO8(0x1A)
|
257
|
+
#define CS00 0
|
258
|
+
#define CS01 1
|
259
|
+
#define CS02 2
|
260
|
+
#define WGM02 3
|
261
|
+
#define FOC0B 6
|
262
|
+
#define FOC0A 7
|
263
|
+
|
264
|
+
#define TCCR0A _SFR_IO8(0x1B)
|
265
|
+
#define WGM00 0
|
266
|
+
#define WGM01 1
|
267
|
+
#define COM0B0 4
|
268
|
+
#define COM0B1 5
|
269
|
+
#define COM0A0 6
|
270
|
+
#define COM0A1 7
|
271
|
+
|
272
|
+
#define EECR _SFR_IO8(0x1C)
|
273
|
+
#define EERE 0
|
274
|
+
#define EEPE 1
|
275
|
+
#define EEMPE 2
|
276
|
+
#define EERIE 3
|
277
|
+
#define EEPM0 4
|
278
|
+
#define EEPM1 5
|
279
|
+
|
280
|
+
#define EEDR _SFR_IO8(0x1D)
|
281
|
+
|
282
|
+
/* Combine EEARL and EEARH */
|
283
|
+
#define EEAR _SFR_IO16(0x1E)
|
284
|
+
|
285
|
+
#define EEARL _SFR_IO8(0x1E)
|
286
|
+
#define EEARH _SFR_IO8(0x1F)
|
287
|
+
|
288
|
+
#define UDR0 _SFR_IO8(0x20)
|
289
|
+
|
290
|
+
/* Combine UBRR0L and UBRR0H */
|
291
|
+
#define UBRR0 _SFR_IO16(0x21)
|
292
|
+
|
293
|
+
#define UBRR0L _SFR_IO8(0x21)
|
294
|
+
#define UBRR0H _SFR_IO8(0x22)
|
295
|
+
|
296
|
+
#define UCSR0D _SFR_IO8(0x23)
|
297
|
+
#define SFDE0 5
|
298
|
+
#define RXS0 6
|
299
|
+
#define RXSIE0 7
|
300
|
+
|
301
|
+
#define UCSR0C _SFR_IO8(0x24)
|
302
|
+
#define UCPOL0 0
|
303
|
+
#define UCSZ00 1
|
304
|
+
#define UCSZ01 2
|
305
|
+
#define USBS0 3
|
306
|
+
#define UPM00 4
|
307
|
+
#define UPM01 5
|
308
|
+
#define UMSEL00 6
|
309
|
+
#define UMSEL01 7
|
310
|
+
|
311
|
+
#define UCSR0B _SFR_IO8(0x25)
|
312
|
+
#define TXB80 0
|
313
|
+
#define RXB80 1
|
314
|
+
#define UCSZ02 2
|
315
|
+
#define TXEN0 3
|
316
|
+
#define RXEN0 4
|
317
|
+
#define UDRIE0 5
|
318
|
+
#define TXCIE0 6
|
319
|
+
#define RXCIE0 7
|
320
|
+
|
321
|
+
#define UCSR0A _SFR_IO8(0x26)
|
322
|
+
#define MPCM0 0
|
323
|
+
#define U2X0 1
|
324
|
+
#define UPE0 2
|
325
|
+
#define DOR0 3
|
326
|
+
#define FE0 4
|
327
|
+
#define UDRE0 5
|
328
|
+
#define TXC0 6
|
329
|
+
#define RXC0 7
|
330
|
+
|
331
|
+
#define PCMSK0 _SFR_IO8(0x27)
|
332
|
+
#define PCINT0 0
|
333
|
+
#define PCINT1 1
|
334
|
+
#define PCINT2 2
|
335
|
+
#define PCINT3 3
|
336
|
+
#define PCINT4 4
|
337
|
+
#define PCINT5 5
|
338
|
+
#define PCINT6 6
|
339
|
+
#define PCINT7 7
|
340
|
+
|
341
|
+
#define PCMSK1 _SFR_IO8(0x28)
|
342
|
+
#define PCINT8 0
|
343
|
+
#define PCINT9 1
|
344
|
+
#define PCINT10 2
|
345
|
+
#define PCINT11 3
|
346
|
+
|
347
|
+
#define PCMSK2 _SFR_IO8(0x29)
|
348
|
+
#define PCINT12 0
|
349
|
+
#define PCINT13 1
|
350
|
+
#define PCINT14 2
|
351
|
+
#define PCINT15 3
|
352
|
+
#define PCINT16 4
|
353
|
+
#define PCINT17 5
|
354
|
+
|
355
|
+
#define USICR _SFR_IO8(0x2A)
|
356
|
+
#define USITC 0
|
357
|
+
#define USICLK 1
|
358
|
+
#define USICS0 2
|
359
|
+
#define USICS1 3
|
360
|
+
#define USIWM0 4
|
361
|
+
#define USIWM1 5
|
362
|
+
#define USIOIE 6
|
363
|
+
#define USISIE 7
|
364
|
+
|
365
|
+
#define USISR _SFR_IO8(0x2B)
|
366
|
+
#define USICNT0 0
|
367
|
+
#define USICNT1 1
|
368
|
+
#define USICNT2 2
|
369
|
+
#define USICNT3 3
|
370
|
+
#define USIDC 4
|
371
|
+
#define USIPF 5
|
372
|
+
#define USIOIF 6
|
373
|
+
#define USISIF 7
|
374
|
+
|
375
|
+
#define USIDR _SFR_IO8(0x2C)
|
376
|
+
|
377
|
+
#define USIBR _SFR_IO8(0x2D)
|
378
|
+
|
379
|
+
/* Reserved [0x2E] */
|
380
|
+
|
381
|
+
#define CCP _SFR_IO8(0x2F)
|
382
|
+
|
383
|
+
#define WDTCSR _SFR_IO8(0x30)
|
384
|
+
#define WDE 3
|
385
|
+
#define WDP0 0
|
386
|
+
#define WDP1 1
|
387
|
+
#define WDP2 2
|
388
|
+
#define WDP3 5
|
389
|
+
#define WDIE 6
|
390
|
+
#define WDIF 7
|
391
|
+
|
392
|
+
/* Reserved [0x31] */
|
393
|
+
|
394
|
+
#define CLKSR _SFR_IO8(0x32)
|
395
|
+
#define CKSEL0 0
|
396
|
+
#define CKSEL1 1
|
397
|
+
#define CKSEL2 2
|
398
|
+
#define CKSEL3 3
|
399
|
+
#define SUT 4
|
400
|
+
#define CKOUT_IO 5
|
401
|
+
#define CSTR 6
|
402
|
+
#define OSCRDY 7
|
403
|
+
|
404
|
+
#define CLKPR _SFR_IO8(0x33)
|
405
|
+
#define CLKPS0 0
|
406
|
+
#define CLKPS1 1
|
407
|
+
#define CLKPS2 2
|
408
|
+
#define CLKPS3 3
|
409
|
+
|
410
|
+
#define PRR _SFR_IO8(0x34)
|
411
|
+
#define PRADC 0
|
412
|
+
#define PRUSART0 1
|
413
|
+
#define PRUSART1 2
|
414
|
+
#define PRUSI 3
|
415
|
+
#define PRTIM0 4
|
416
|
+
#define PRTIM1 5
|
417
|
+
#define PRTWI 6
|
418
|
+
|
419
|
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSART0)|(1<<PRUSART1)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRTWI))
|
420
|
+
#define __AVR_HAVE_PRR_PRADC
|
421
|
+
#define __AVR_HAVE_PRR_PRUSART0
|
422
|
+
#define __AVR_HAVE_PRR_PRUSART1
|
423
|
+
#define __AVR_HAVE_PRR_PRUSI
|
424
|
+
#define __AVR_HAVE_PRR_PRTIM0
|
425
|
+
#define __AVR_HAVE_PRR_PRTIM1
|
426
|
+
#define __AVR_HAVE_PRR_PRTWI
|
427
|
+
|
428
|
+
#define MCUSR _SFR_IO8(0x35)
|
429
|
+
#define PORF 0
|
430
|
+
#define EXTRF 1
|
431
|
+
#define BORF 2
|
432
|
+
#define WDRF 3
|
433
|
+
|
434
|
+
#define MCUCR _SFR_IO8(0x36)
|
435
|
+
#define ISC00 0
|
436
|
+
#define ISC01 1
|
437
|
+
#define SE 4
|
438
|
+
#define SM0 5
|
439
|
+
#define SM1 6
|
440
|
+
|
441
|
+
#define SPMCSR _SFR_IO8(0x37)
|
442
|
+
#define SPMEN 0
|
443
|
+
#define PGERS 1
|
444
|
+
#define PGWRT 2
|
445
|
+
#define RFLB 3
|
446
|
+
#define CTPB 4
|
447
|
+
#define RSIG 5
|
448
|
+
|
449
|
+
/* Reserved [0x38] */
|
450
|
+
|
451
|
+
#define TIFR _SFR_IO8(0x39)
|
452
|
+
#define ICF1 3
|
453
|
+
#define OCF1B 5
|
454
|
+
#define OCF1A 6
|
455
|
+
#define TOV1 7
|
456
|
+
#define OCF0A 0
|
457
|
+
#define TOV0 1
|
458
|
+
#define OCF0B 2
|
459
|
+
|
460
|
+
#define TIMSK _SFR_IO8(0x3A)
|
461
|
+
#define ICIE1 3
|
462
|
+
#define OCIE1B 5
|
463
|
+
#define OCIE1A 6
|
464
|
+
#define TOIE1 7
|
465
|
+
#define OCIE0A 0
|
466
|
+
#define TOIE0 1
|
467
|
+
#define OCIE0B 2
|
468
|
+
|
469
|
+
#define GIFR _SFR_IO8(0x3B)
|
470
|
+
#define PCIF0 3
|
471
|
+
#define PCIF1 4
|
472
|
+
#define PCIF2 5
|
473
|
+
#define INTF0 6
|
474
|
+
|
475
|
+
#define GIMSK _SFR_IO8(0x3C)
|
476
|
+
#define PCIE0 3
|
477
|
+
#define PCIE1 4
|
478
|
+
#define PCIE2 5
|
479
|
+
#define INT0 6
|
480
|
+
|
481
|
+
/* SP [0x3D..0x3E] */
|
482
|
+
|
483
|
+
/* SREG [0x3F] */
|
484
|
+
|
485
|
+
#define DIDR0 _SFR_MEM8(0x60)
|
486
|
+
#define AREFD 0
|
487
|
+
#define AIN0D 1
|
488
|
+
#define AIN1D 2
|
489
|
+
#define ADC0D 3
|
490
|
+
#define ADC1D 4
|
491
|
+
#define ADC2D 5
|
492
|
+
#define ADC3D 6
|
493
|
+
#define ADC4D 7
|
494
|
+
|
495
|
+
#define DIDR1 _SFR_MEM8(0x61)
|
496
|
+
#define ADC5D 0
|
497
|
+
#define ADC6D 1
|
498
|
+
#define ADC7D 2
|
499
|
+
#define ADC8D 3
|
500
|
+
|
501
|
+
#define DIDR2 _SFR_MEM8(0x62)
|
502
|
+
#define ADC9D 0
|
503
|
+
#define ADC10D 1
|
504
|
+
#define ADC11D 2
|
505
|
+
|
506
|
+
#define OSCCAL0 _SFR_MEM8(0x63)
|
507
|
+
|
508
|
+
#define OSCTCAL0A _SFR_MEM8(0x64)
|
509
|
+
|
510
|
+
#define OSCTCAL0B _SFR_MEM8(0x65)
|
511
|
+
|
512
|
+
#define OSCCAL1 _SFR_MEM8(0x66)
|
513
|
+
|
514
|
+
#define GTCCR _SFR_MEM8(0x67)
|
515
|
+
#define PSR10 0
|
516
|
+
#define TSM 7
|
517
|
+
|
518
|
+
/* Combine ICR1L and ICR1H */
|
519
|
+
#define ICR1 _SFR_MEM16(0x68)
|
520
|
+
|
521
|
+
#define ICR1L _SFR_MEM8(0x68)
|
522
|
+
#define ICR1H _SFR_MEM8(0x69)
|
523
|
+
|
524
|
+
/* Combine OCR1BL and OCR1BH */
|
525
|
+
#define OCR1B _SFR_MEM16(0x6A)
|
526
|
+
|
527
|
+
#define OCR1BL _SFR_MEM8(0x6A)
|
528
|
+
#define OCR1BH _SFR_MEM8(0x6B)
|
529
|
+
|
530
|
+
/* Combine OCR1AL and OCR1AH */
|
531
|
+
#define OCR1A _SFR_MEM16(0x6C)
|
532
|
+
|
533
|
+
#define OCR1AL _SFR_MEM8(0x6C)
|
534
|
+
#define OCR1AH _SFR_MEM8(0x6D)
|
535
|
+
|
536
|
+
/* Combine TCNT1L and TCNT1H */
|
537
|
+
#define TCNT1 _SFR_MEM16(0x6E)
|
538
|
+
|
539
|
+
#define TCNT1L _SFR_MEM8(0x6E)
|
540
|
+
#define TCNT1H _SFR_MEM8(0x6F)
|
541
|
+
|
542
|
+
#define TCCR1C _SFR_MEM8(0x70)
|
543
|
+
#define FOC1B 6
|
544
|
+
#define FOC1A 7
|
545
|
+
|
546
|
+
#define TCCR1B _SFR_MEM8(0x71)
|
547
|
+
#define CS10 0
|
548
|
+
#define CS11 1
|
549
|
+
#define CS12 2
|
550
|
+
#define WGM12 3
|
551
|
+
#define WGM13 4
|
552
|
+
#define ICES1 6
|
553
|
+
#define ICNC1 7
|
554
|
+
|
555
|
+
#define TCCR1A _SFR_MEM8(0x72)
|
556
|
+
#define WGM10 0
|
557
|
+
#define WGM11 1
|
558
|
+
#define COM1B0 4
|
559
|
+
#define COM1B1 5
|
560
|
+
#define COM1A0 6
|
561
|
+
#define COM1A1 7
|
562
|
+
|
563
|
+
#define UDR1 _SFR_MEM8(0x73)
|
564
|
+
|
565
|
+
/* Combine UBRR1L and UBRR1H */
|
566
|
+
#define UBRR1 _SFR_MEM16(0x74)
|
567
|
+
|
568
|
+
#define UBRR1L _SFR_MEM8(0x74)
|
569
|
+
#define UBRR1H _SFR_MEM8(0x75)
|
570
|
+
|
571
|
+
#define UCSR1D _SFR_MEM8(0x76)
|
572
|
+
#define SFDE1 5
|
573
|
+
#define RXS1 6
|
574
|
+
#define RXSIE1 7
|
575
|
+
|
576
|
+
#define UCSR1C _SFR_MEM8(0x77)
|
577
|
+
#define UCPOL1 0
|
578
|
+
#define UCSZ10 1
|
579
|
+
#define UCSZ11 2
|
580
|
+
#define USBS1 3
|
581
|
+
#define UPM10 4
|
582
|
+
#define UPM11 5
|
583
|
+
#define UMSEL10 6
|
584
|
+
#define UMSEL11 7
|
585
|
+
|
586
|
+
#define UCSR1B _SFR_MEM8(0x78)
|
587
|
+
#define TXB81 0
|
588
|
+
#define RXB81 1
|
589
|
+
#define UCSZ12 2
|
590
|
+
#define TXEN1 3
|
591
|
+
#define RXEN1 4
|
592
|
+
#define UDRIE1 5
|
593
|
+
#define TXCIE1 6
|
594
|
+
#define RXCIE1 7
|
595
|
+
|
596
|
+
#define UCSR1A _SFR_MEM8(0x79)
|
597
|
+
#define MPCM1 0
|
598
|
+
#define U2X1 1
|
599
|
+
#define UPE1 2
|
600
|
+
#define DOR1 3
|
601
|
+
#define FE1 4
|
602
|
+
#define UDRE1 5
|
603
|
+
#define TXC1 6
|
604
|
+
#define RXC1 7
|
605
|
+
|
606
|
+
#define TWSD _SFR_MEM8(0x7A)
|
607
|
+
#define TWSD0 0
|
608
|
+
#define TWSD1 1
|
609
|
+
#define TWSD2 2
|
610
|
+
#define TWSD3 3
|
611
|
+
#define TWSD4 4
|
612
|
+
#define TWSD5 5
|
613
|
+
#define TWSD6 6
|
614
|
+
#define TWSD7 7
|
615
|
+
|
616
|
+
#define TWSAM _SFR_MEM8(0x7B)
|
617
|
+
|
618
|
+
#define TWSA _SFR_MEM8(0x7C)
|
619
|
+
#define TWSA0 0
|
620
|
+
#define TWSA1 1
|
621
|
+
#define TWSA2 2
|
622
|
+
#define TWSA3 3
|
623
|
+
#define TWSA4 4
|
624
|
+
#define TWSA5 5
|
625
|
+
#define TWSA6 6
|
626
|
+
#define TWSA7 7
|
627
|
+
|
628
|
+
#define TWSSRA _SFR_MEM8(0x7D)
|
629
|
+
#define TWAS 0
|
630
|
+
#define TWDIR 1
|
631
|
+
#define TWBE 2
|
632
|
+
#define TWC 3
|
633
|
+
#define TWRA 4
|
634
|
+
#define TWCH 5
|
635
|
+
#define TWASIF 6
|
636
|
+
#define TWDIF 7
|
637
|
+
|
638
|
+
#define TWSCRB _SFR_MEM8(0x7E)
|
639
|
+
#define TWCMD0 0
|
640
|
+
#define TWCMD1 1
|
641
|
+
#define TWAA 2
|
642
|
+
|
643
|
+
#define TWSCRA _SFR_MEM8(0x7F)
|
644
|
+
#define TWSME 0
|
645
|
+
#define TWPME 1
|
646
|
+
#define TWSIE 2
|
647
|
+
#define TWEN 3
|
648
|
+
#define TWASIE 4
|
649
|
+
#define TWDIE 5
|
650
|
+
#define TWSHE 7
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
/* Values and associated defines */
|
655
|
+
|
656
|
+
|
657
|
+
#define SLEEP_MODE_IDLE (0x00<<5)
|
658
|
+
#define SLEEP_MODE_ADC (0x01<<5)
|
659
|
+
#define SLEEP_MODE_PWR_DOWN (0x02<<5)
|
660
|
+
#define SLEEP_MODE_STANDBY (0x03<<5)
|
661
|
+
|
662
|
+
/* Interrupt vectors */
|
663
|
+
/* Vector 0 is the reset vector */
|
664
|
+
/* External Interrupt Request 0 */
|
665
|
+
#define INT0_vect _VECTOR(1)
|
666
|
+
#define INT0_vect_num 1
|
667
|
+
|
668
|
+
/* Pin Change Interrupt Request 0 */
|
669
|
+
#define PCINT0_vect _VECTOR(2)
|
670
|
+
#define PCINT0_vect_num 2
|
671
|
+
|
672
|
+
/* Pin Change Interrupt Request 1 */
|
673
|
+
#define PCINT1_vect _VECTOR(3)
|
674
|
+
#define PCINT1_vect_num 3
|
675
|
+
|
676
|
+
/* Pin Change Interrupt Request 2 */
|
677
|
+
#define PCINT2_vect _VECTOR(4)
|
678
|
+
#define PCINT2_vect_num 4
|
679
|
+
|
680
|
+
/* Watchdog Time-out Interrupt */
|
681
|
+
#define WDT_vect _VECTOR(5)
|
682
|
+
#define WDT_vect_num 5
|
683
|
+
|
684
|
+
/* Timer/Counter1 Capture Event */
|
685
|
+
#define TIMER1_CAPT_vect _VECTOR(6)
|
686
|
+
#define TIMER1_CAPT_vect_num 6
|
687
|
+
|
688
|
+
/* Timer/Counter1 Capture Event */
|
689
|
+
#define TIM1_CAPT_vect _VECTOR(6)
|
690
|
+
#define TIM1_CAPT_vect_num 6
|
691
|
+
|
692
|
+
/* Timer/Counter1 Compare Match A */
|
693
|
+
#define TIMER1_COMPA_vect _VECTOR(7)
|
694
|
+
#define TIMER1_COMPA_vect_num 7
|
695
|
+
|
696
|
+
/* Timer/Counter1 Compare Match A */
|
697
|
+
#define TIM1_COMPA_vect _VECTOR(7)
|
698
|
+
#define TIM1_COMPA_vect_num 7
|
699
|
+
|
700
|
+
/* Timer/Counter1 Compare Match B */
|
701
|
+
#define TIMER1_COMPB_vect _VECTOR(8)
|
702
|
+
#define TIMER1_COMPB_vect_num 8
|
703
|
+
|
704
|
+
/* Timer/Counter1 Compare Match B */
|
705
|
+
#define TIM1_COMPB_vect _VECTOR(8)
|
706
|
+
#define TIM1_COMPB_vect_num 8
|
707
|
+
|
708
|
+
/* Timer/Counter1 Overflow */
|
709
|
+
#define TIMER1_OVF_vect _VECTOR(9)
|
710
|
+
#define TIMER1_OVF_vect_num 9
|
711
|
+
|
712
|
+
/* Timer/Counter1 Overflow */
|
713
|
+
#define TIM1_OVF_vect _VECTOR(9)
|
714
|
+
#define TIM1_OVF_vect_num 9
|
715
|
+
|
716
|
+
/* TimerCounter0 Compare Match A */
|
717
|
+
#define TIMER0_COMPA_vect _VECTOR(10)
|
718
|
+
#define TIMER0_COMPA_vect_num 10
|
719
|
+
|
720
|
+
/* TimerCounter0 Compare Match A */
|
721
|
+
#define TIM0_COMPA_vect _VECTOR(10)
|
722
|
+
#define TIM0_COMPA_vect_num 10
|
723
|
+
|
724
|
+
/* TimerCounter0 Compare Match B */
|
725
|
+
#define TIMER0_COMPB_vect _VECTOR(11)
|
726
|
+
#define TIMER0_COMPB_vect_num 11
|
727
|
+
|
728
|
+
/* TimerCounter0 Compare Match B */
|
729
|
+
#define TIM0_COMPB_vect _VECTOR(11)
|
730
|
+
#define TIM0_COMPB_vect_num 11
|
731
|
+
|
732
|
+
/* Timer/Couner0 Overflow */
|
733
|
+
#define TIMER0_OVF_vect _VECTOR(12)
|
734
|
+
#define TIMER0_OVF_vect_num 12
|
735
|
+
|
736
|
+
/* Timer/Couner0 Overflow */
|
737
|
+
#define TIM0_OVF_vect _VECTOR(12)
|
738
|
+
#define TIM0_OVF_vect_num 12
|
739
|
+
|
740
|
+
/* Analog Comparator */
|
741
|
+
#define ANA_COMP_vect _VECTOR(13)
|
742
|
+
#define ANA_COMP_vect_num 13
|
743
|
+
|
744
|
+
/* ADC Conversion Complete */
|
745
|
+
#define ADC_vect _VECTOR(14)
|
746
|
+
#define ADC_vect_num 14
|
747
|
+
|
748
|
+
/* ADC Conversion Complete */
|
749
|
+
#define ADC_READY_vect _VECTOR(14)
|
750
|
+
#define ADC_READY_vect_num 14
|
751
|
+
|
752
|
+
/* USART0, Start */
|
753
|
+
#define USART0_START_vect _VECTOR(15)
|
754
|
+
#define USART0_START_vect_num 15
|
755
|
+
|
756
|
+
/* USART0, Start */
|
757
|
+
#define USART0_RXS_vect _VECTOR(15)
|
758
|
+
#define USART0_RXS_vect_num 15
|
759
|
+
|
760
|
+
/* USART0, Rx Complete */
|
761
|
+
#define USART0_RX_vect _VECTOR(16)
|
762
|
+
#define USART0_RX_vect_num 16
|
763
|
+
|
764
|
+
/* USART0, Rx Complete */
|
765
|
+
#define USART0_RXC_vect _VECTOR(16)
|
766
|
+
#define USART0_RXC_vect_num 16
|
767
|
+
|
768
|
+
/* USART0 Data Register Empty */
|
769
|
+
#define USART0_UDRE_vect _VECTOR(17)
|
770
|
+
#define USART0_UDRE_vect_num 17
|
771
|
+
|
772
|
+
/* USART0 Data Register Empty */
|
773
|
+
#define USART0_DRE_vect _VECTOR(17)
|
774
|
+
#define USART0_DRE_vect_num 17
|
775
|
+
|
776
|
+
/* USART0, Tx Complete */
|
777
|
+
#define USART0_TX_vect _VECTOR(18)
|
778
|
+
#define USART0_TX_vect_num 18
|
779
|
+
|
780
|
+
/* USART0, Tx Complete */
|
781
|
+
#define USART0_TXC_vect _VECTOR(18)
|
782
|
+
#define USART0_TXC_vect_num 18
|
783
|
+
|
784
|
+
/* USART1, Start */
|
785
|
+
#define USART1_START_vect _VECTOR(19)
|
786
|
+
#define USART1_START_vect_num 19
|
787
|
+
|
788
|
+
/* USART1, Start */
|
789
|
+
#define USART1_RXS_vect _VECTOR(19)
|
790
|
+
#define USART1_RXS_vect_num 19
|
791
|
+
|
792
|
+
/* USART1, Rx Complete */
|
793
|
+
#define USART1_RX_vect _VECTOR(20)
|
794
|
+
#define USART1_RX_vect_num 20
|
795
|
+
|
796
|
+
/* USART1, Rx Complete */
|
797
|
+
#define USART1_RXC_vect _VECTOR(20)
|
798
|
+
#define USART1_RXC_vect_num 20
|
799
|
+
|
800
|
+
/* USART1 Data Register Empty */
|
801
|
+
#define USART1_UDRE_vect _VECTOR(21)
|
802
|
+
#define USART1_UDRE_vect_num 21
|
803
|
+
|
804
|
+
/* USART1 Data Register Empty */
|
805
|
+
#define USART1_DRE_vect _VECTOR(21)
|
806
|
+
#define USART1_DRE_vect_num 21
|
807
|
+
|
808
|
+
/* USART1, Tx Complete */
|
809
|
+
#define USART1_TX_vect _VECTOR(22)
|
810
|
+
#define USART1_TX_vect_num 22
|
811
|
+
|
812
|
+
/* USART1, Tx Complete */
|
813
|
+
#define USART1_TXC_vect _VECTOR(22)
|
814
|
+
#define USART1_TXC_vect_num 22
|
815
|
+
|
816
|
+
/* USI Start Condition */
|
817
|
+
#define USI_START_vect _VECTOR(23)
|
818
|
+
#define USI_START_vect_num 23
|
819
|
+
|
820
|
+
/* USI Start Condition */
|
821
|
+
#define USI_STR_vect _VECTOR(23)
|
822
|
+
#define USI_STR_vect_num 23
|
823
|
+
|
824
|
+
/* USI Overflow */
|
825
|
+
#define USI_OVERFLOW_vect _VECTOR(24)
|
826
|
+
#define USI_OVERFLOW_vect_num 24
|
827
|
+
|
828
|
+
/* USI Overflow */
|
829
|
+
#define USI_OVF_vect _VECTOR(24)
|
830
|
+
#define USI_OVF_vect_num 24
|
831
|
+
|
832
|
+
/* Two-wire Serial Interface */
|
833
|
+
#define TWI_SLAVE_vect _VECTOR(25)
|
834
|
+
#define TWI_SLAVE_vect_num 25
|
835
|
+
|
836
|
+
/* Two-wire Serial Interface */
|
837
|
+
#define TWI_vect _VECTOR(25)
|
838
|
+
#define TWI_vect_num 25
|
839
|
+
|
840
|
+
/* EEPROM Ready */
|
841
|
+
#define EE_RDY_vect _VECTOR(26)
|
842
|
+
#define EE_RDY_vect_num 26
|
843
|
+
|
844
|
+
/* Touch Sensing */
|
845
|
+
#define QTRIP_vect _VECTOR(27)
|
846
|
+
#define QTRIP_vect_num 27
|
847
|
+
|
848
|
+
#define _VECTORS_SIZE 112
|
849
|
+
|
850
|
+
|
851
|
+
/* Constants */
|
852
|
+
|
853
|
+
#define SPM_PAGESIZE 32
|
854
|
+
#define FLASHSTART 0x0000
|
855
|
+
#define FLASHEND 0x3FFF
|
856
|
+
#define RAMSTART 0x0100
|
857
|
+
#define RAMSIZE 1024
|
858
|
+
#define RAMEND 0x04FF
|
859
|
+
#define E2START 0
|
860
|
+
#define E2SIZE 256
|
861
|
+
#define E2PAGESIZE 4
|
862
|
+
#define E2END 0x00FF
|
863
|
+
#define XRAMEND RAMEND
|
864
|
+
|
865
|
+
|
866
|
+
/* Fuses */
|
867
|
+
|
868
|
+
#define FUSE_MEMORY_SIZE 3
|
869
|
+
|
870
|
+
/* Low Fuse Byte */
|
871
|
+
#define FUSE_SUT_CKSEL0 (unsigned char)~_BV(0)
|
872
|
+
#define FUSE_SUT_CKSEL1 (unsigned char)~_BV(1)
|
873
|
+
#define FUSE_SUT_CKSEL2 (unsigned char)~_BV(2)
|
874
|
+
#define FUSE_SUT_CKSEL3 (unsigned char)~_BV(3)
|
875
|
+
#define FUSE_SUT_CKSEL4 (unsigned char)~_BV(4)
|
876
|
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
877
|
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
878
|
+
#define LFUSE_DEFAULT (FUSE_SUT_CKSEL0 & FUSE_SUT_CKSEL2 & FUSE_SUT_CKSEL3 & FUSE_SUT_CKSEL4 & FUSE_CKDIV8)
|
879
|
+
|
880
|
+
|
881
|
+
/* High Fuse Byte */
|
882
|
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
883
|
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
884
|
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
885
|
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
886
|
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
887
|
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
888
|
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
889
|
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
890
|
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
891
|
+
|
892
|
+
|
893
|
+
/* Extended Fuse Byte */
|
894
|
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
895
|
+
#define FUSE_BODACT0 (unsigned char)~_BV(1)
|
896
|
+
#define FUSE_BODACT1 (unsigned char)~_BV(2)
|
897
|
+
#define FUSE_BODPD0 (unsigned char)~_BV(3)
|
898
|
+
#define FUSE_BODPD1 (unsigned char)~_BV(4)
|
899
|
+
#define EFUSE_DEFAULT (0xFF)
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
/* Lock Bits */
|
904
|
+
#define __LOCK_BITS_EXIST
|
905
|
+
|
906
|
+
|
907
|
+
/* Signature */
|
908
|
+
#define SIGNATURE_0 0x1E
|
909
|
+
#define SIGNATURE_1 0x94
|
910
|
+
#define SIGNATURE_2 0x12
|
911
|
+
|
912
|
+
|
913
|
+
#endif /* #ifdef _AVR_ATTINY1634_H_INCLUDED */
|
914
|
+
|