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,93 @@
|
|
1
|
+
/* Copyright (c) 2005, Joerg Wunsch
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
12
|
+
the documentation and/or other materials provided with the
|
13
|
+
distribution.
|
14
|
+
|
15
|
+
* Neither the name of the copyright holders nor the names of
|
16
|
+
contributors may be used to endorse or promote products derived
|
17
|
+
from this software without specific prior written permission.
|
18
|
+
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
22
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
23
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
24
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
25
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
26
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
27
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
28
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
29
|
+
POSSIBILITY OF SUCH DAMAGE. */
|
30
|
+
|
31
|
+
/* $Id: iotn85.h 2115 2010-04-05 23:19:53Z arcanum $ */
|
32
|
+
|
33
|
+
/* avr/iotn85.h - definitions for ATtiny85 */
|
34
|
+
|
35
|
+
#ifndef _AVR_IOTN85_H_
|
36
|
+
#define _AVR_IOTN85_H_ 1
|
37
|
+
|
38
|
+
#include "iotnx5.h"
|
39
|
+
|
40
|
+
/* Constants */
|
41
|
+
#define SPM_PAGESIZE 64
|
42
|
+
#define RAMSTART (0x60)
|
43
|
+
#define RAMEND 0x25F
|
44
|
+
#define XRAMEND RAMEND
|
45
|
+
#define E2END 0x1FF
|
46
|
+
#define E2PAGESIZE 4
|
47
|
+
#define FLASHEND 0x1FFF
|
48
|
+
|
49
|
+
|
50
|
+
/* Fuses */
|
51
|
+
#define FUSE_MEMORY_SIZE 3
|
52
|
+
|
53
|
+
/* Low Fuse Byte */
|
54
|
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
55
|
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
56
|
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
57
|
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
58
|
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
59
|
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
60
|
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
61
|
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
62
|
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
63
|
+
|
64
|
+
/* High Fuse Byte */
|
65
|
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
66
|
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
67
|
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
68
|
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
69
|
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
70
|
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
71
|
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
72
|
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
73
|
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
74
|
+
|
75
|
+
/* Extended Fuse Byte */
|
76
|
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
77
|
+
#define EFUSE_DEFAULT (0xFF)
|
78
|
+
|
79
|
+
|
80
|
+
/* Lock Bits */
|
81
|
+
#define __LOCK_BITS_EXIST
|
82
|
+
|
83
|
+
|
84
|
+
/* Signature */
|
85
|
+
#define SIGNATURE_0 0x1E
|
86
|
+
#define SIGNATURE_1 0x93
|
87
|
+
#define SIGNATURE_2 0x0B
|
88
|
+
|
89
|
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
90
|
+
#define SLEEP_MODE_ADC (0x01<<3)
|
91
|
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
92
|
+
|
93
|
+
#endif /* _AVR_IOTN85_H_ */
|
@@ -0,0 +1,94 @@
|
|
1
|
+
/* Copyright (c) 2006, Anatoly Sokolov
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
12
|
+
the documentation and/or other materials provided with the
|
13
|
+
distribution.
|
14
|
+
|
15
|
+
* Neither the name of the copyright holders nor the names of
|
16
|
+
contributors may be used to endorse or promote products derived
|
17
|
+
from this software without specific prior written permission.
|
18
|
+
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
22
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
23
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
24
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
25
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
26
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
27
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
28
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
29
|
+
POSSIBILITY OF SUCH DAMAGE. */
|
30
|
+
|
31
|
+
/* $Id: iotn861.h 2115 2010-04-05 23:19:53Z arcanum $ */
|
32
|
+
|
33
|
+
/* avr/iotn861.h - definitions for ATtiny861 */
|
34
|
+
|
35
|
+
#ifndef _AVR_IOTN861_H_
|
36
|
+
#define _AVR_IOTN861_H_ 1
|
37
|
+
|
38
|
+
#include "iotnx61.h"
|
39
|
+
|
40
|
+
/* Constants */
|
41
|
+
#define SPM_PAGESIZE 64
|
42
|
+
#define RAMSTART (0x60)
|
43
|
+
#define RAMEND 0x25F
|
44
|
+
#define XRAMEND RAMEND
|
45
|
+
#define E2END 0x1FF
|
46
|
+
#define E2PAGESIZE 4
|
47
|
+
#define FLASHEND 0x1FFF
|
48
|
+
|
49
|
+
|
50
|
+
/* Fuses */
|
51
|
+
#define FUSE_MEMORY_SIZE 3
|
52
|
+
|
53
|
+
/* Low Fuse Byte */
|
54
|
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
|
55
|
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
|
56
|
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
|
57
|
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
|
58
|
+
#define FUSE_SUT0 (unsigned char)~_BV(4)
|
59
|
+
#define FUSE_SUT1 (unsigned char)~_BV(5)
|
60
|
+
#define FUSE_CKOUT (unsigned char)~_BV(6)
|
61
|
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
|
62
|
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
63
|
+
|
64
|
+
/* High Fuse Byte */
|
65
|
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
|
66
|
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
|
67
|
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
|
68
|
+
#define FUSE_EESAVE (unsigned char)~_BV(3)
|
69
|
+
#define FUSE_WDTON (unsigned char)~_BV(4)
|
70
|
+
#define FUSE_SPIEN (unsigned char)~_BV(5)
|
71
|
+
#define FUSE_DWEN (unsigned char)~_BV(6)
|
72
|
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
|
73
|
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
74
|
+
|
75
|
+
/* Extended Fuse Byte */
|
76
|
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0)
|
77
|
+
#define EFUSE_DEFAULT (0xFF)
|
78
|
+
|
79
|
+
|
80
|
+
/* Lock Bits */
|
81
|
+
#define __LOCK_BITS_EXIST
|
82
|
+
|
83
|
+
|
84
|
+
/* Signature */
|
85
|
+
#define SIGNATURE_0 0x1E
|
86
|
+
#define SIGNATURE_1 0x93
|
87
|
+
#define SIGNATURE_2 0x0D
|
88
|
+
|
89
|
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
90
|
+
#define SLEEP_MODE_ADC (0x01<<3)
|
91
|
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
92
|
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
93
|
+
|
94
|
+
#endif /* _AVR_IOTN861_H_ */
|
@@ -0,0 +1,988 @@
|
|
1
|
+
/* Copyright (c) 2009 Atmel Corporation
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
12
|
+
the documentation and/or other materials provided with the
|
13
|
+
distribution.
|
14
|
+
|
15
|
+
* Neither the name of the copyright holders nor the names of
|
16
|
+
contributors may be used to endorse or promote products derived
|
17
|
+
from this software without specific prior written permission.
|
18
|
+
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
22
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
23
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
24
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
25
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
26
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
27
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
28
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
29
|
+
POSSIBILITY OF SUCH DAMAGE. */
|
30
|
+
|
31
|
+
/* $Id: iotn861a.h 2063 2009-11-18 22:06:28Z arcanum $ */
|
32
|
+
|
33
|
+
/* avr/iotn861a.h - definitions for ATtiny861A */
|
34
|
+
|
35
|
+
/* This file should only be included from <avr/io.h>, never directly. */
|
36
|
+
|
37
|
+
#ifndef _AVR_IO_H_
|
38
|
+
# error "Include <avr/io.h> instead of this file."
|
39
|
+
#endif
|
40
|
+
|
41
|
+
#ifndef _AVR_IOXXX_H_
|
42
|
+
# define _AVR_IOXXX_H_ "iotn861a.h"
|
43
|
+
#else
|
44
|
+
# error "Attempt to include more than one <avr/ioXXX.h> file."
|
45
|
+
#endif
|
46
|
+
|
47
|
+
|
48
|
+
#ifndef _AVR_ATtiny861A_H_
|
49
|
+
#define _AVR_ATtiny861A_H_ 1
|
50
|
+
|
51
|
+
|
52
|
+
/* Registers and associated bit numbers. */
|
53
|
+
|
54
|
+
#define TCCR1E _SFR_IO8(0x00)
|
55
|
+
#define OC1OE0 0
|
56
|
+
#define OC1OE1 1
|
57
|
+
#define OC1OE2 2
|
58
|
+
#define OC1OE3 3
|
59
|
+
#define OC1OE4 4
|
60
|
+
#define OC1OE5 5
|
61
|
+
|
62
|
+
#define DIDR0 _SFR_IO8(0x01)
|
63
|
+
#define ADC0D 0
|
64
|
+
#define ADC1D 1
|
65
|
+
#define ADC2D 2
|
66
|
+
#define AREFD 3
|
67
|
+
#define ADC3D 4
|
68
|
+
#define ADC4D 5
|
69
|
+
#define ADC5D 6
|
70
|
+
#define ADC6D 7
|
71
|
+
|
72
|
+
#define DIDR1 _SFR_IO8(0x02)
|
73
|
+
#define ADC7D 4
|
74
|
+
#define ADC8D 5
|
75
|
+
#define ADC9D 6
|
76
|
+
#define ADC10D 7
|
77
|
+
|
78
|
+
#define ADCSRB _SFR_IO8(0x03)
|
79
|
+
#define ADTS0 0
|
80
|
+
#define ADTS1 1
|
81
|
+
#define ADTS2 2
|
82
|
+
#define MUX5 3
|
83
|
+
#define REFS2 4
|
84
|
+
#define IPR 5
|
85
|
+
#define GSEL 6
|
86
|
+
#define BIN 7
|
87
|
+
|
88
|
+
#ifndef __ASSEMBLER__
|
89
|
+
#define ADC _SFR_IO16(0x04)
|
90
|
+
#endif
|
91
|
+
#define ADCW _SFR_IO16(0x04)
|
92
|
+
|
93
|
+
#define ADCL _SFR_IO8(0x04)
|
94
|
+
#define ADCL0 0
|
95
|
+
#define ADCL1 1
|
96
|
+
#define ADCL2 2
|
97
|
+
#define ADCL3 3
|
98
|
+
#define ADCL4 4
|
99
|
+
#define ADCL5 5
|
100
|
+
#define ADCL6 6
|
101
|
+
#define ADCL7 7
|
102
|
+
|
103
|
+
#define ADCH _SFR_IO8(0x05)
|
104
|
+
#define ADCH0 0
|
105
|
+
#define ADCH1 1
|
106
|
+
#define ADCH2 2
|
107
|
+
#define ADCH3 3
|
108
|
+
#define ADCH4 4
|
109
|
+
#define ADCH5 5
|
110
|
+
#define ADCH6 6
|
111
|
+
#define ADCH7 7
|
112
|
+
|
113
|
+
#define ADCSRA _SFR_IO8(0x06)
|
114
|
+
#define ADPS0 0
|
115
|
+
#define ADPS1 1
|
116
|
+
#define ADPS2 2
|
117
|
+
#define ADIE 3
|
118
|
+
#define ADIF 4
|
119
|
+
#define ADATE 5
|
120
|
+
#define ADSC 6
|
121
|
+
#define ADEN 7
|
122
|
+
|
123
|
+
#define ADMUX _SFR_IO8(0x07)
|
124
|
+
#define MUX0 0
|
125
|
+
#define MUX1 1
|
126
|
+
#define MUX2 2
|
127
|
+
#define MUX3 3
|
128
|
+
#define MUX4 4
|
129
|
+
#define ADLAR 5
|
130
|
+
#define REFS0 6
|
131
|
+
#define REFS1 7
|
132
|
+
|
133
|
+
#define ACSRA _SFR_IO8(0x08)
|
134
|
+
#define ACIS0 0
|
135
|
+
#define ACIS1 1
|
136
|
+
#define ACME 2
|
137
|
+
#define ACIE 3
|
138
|
+
#define ACI 4
|
139
|
+
#define ACO 5
|
140
|
+
#define ACBG 6
|
141
|
+
#define ACD 7
|
142
|
+
|
143
|
+
#define ACSRB _SFR_IO8(0x09)
|
144
|
+
#define ACM0 0
|
145
|
+
#define ACM1 1
|
146
|
+
#define ACM2 2
|
147
|
+
#define HLEV 6
|
148
|
+
#define HSEL 7
|
149
|
+
|
150
|
+
#define GPIOR0 _SFR_IO8(0x0A)
|
151
|
+
#define GPIOR00 0
|
152
|
+
#define GPIOR01 1
|
153
|
+
#define GPIOR02 2
|
154
|
+
#define GPIOR03 3
|
155
|
+
#define GPIOR04 4
|
156
|
+
#define GPIOR05 5
|
157
|
+
#define GPIOR06 6
|
158
|
+
#define GPIOR07 7
|
159
|
+
|
160
|
+
#define GPIOR1 _SFR_IO8(0x0B)
|
161
|
+
#define GPIOR10 0
|
162
|
+
#define GPIOR11 1
|
163
|
+
#define GPIOR12 2
|
164
|
+
#define GPIOR13 3
|
165
|
+
#define GPIOR14 4
|
166
|
+
#define GPIOR15 5
|
167
|
+
#define GPIOR16 6
|
168
|
+
#define GPIOR17 7
|
169
|
+
|
170
|
+
#define GPIOR2 _SFR_IO8(0x0C)
|
171
|
+
#define GPIOR20 0
|
172
|
+
#define GPIOR21 1
|
173
|
+
#define GPIOR22 2
|
174
|
+
#define GPIOR23 3
|
175
|
+
#define GPIOR24 4
|
176
|
+
#define GPIOR25 5
|
177
|
+
#define GPIOR26 6
|
178
|
+
#define GPIOR27 7
|
179
|
+
|
180
|
+
#define USICR _SFR_IO8(0x0D)
|
181
|
+
#define USITC 0
|
182
|
+
#define USICLK 1
|
183
|
+
#define USICS0 2
|
184
|
+
#define USICS1 3
|
185
|
+
#define USIWM0 4
|
186
|
+
#define USIWM1 5
|
187
|
+
#define USIOIE 6
|
188
|
+
#define USISIE 7
|
189
|
+
|
190
|
+
#define USISR _SFR_IO8(0x0E)
|
191
|
+
#define USICNT0 0
|
192
|
+
#define USICNT1 1
|
193
|
+
#define USICNT2 2
|
194
|
+
#define USICNT3 3
|
195
|
+
#define USIDC 4
|
196
|
+
#define USIPF 5
|
197
|
+
#define USIOIF 6
|
198
|
+
#define USISIF 7
|
199
|
+
|
200
|
+
#define USIDR _SFR_IO8(0x0F)
|
201
|
+
#define USIDR0 0
|
202
|
+
#define USIDR1 1
|
203
|
+
#define USIDR2 2
|
204
|
+
#define USIDR3 3
|
205
|
+
#define USIDR4 4
|
206
|
+
#define USIDR5 5
|
207
|
+
#define USIDR6 6
|
208
|
+
#define USIDR7 7
|
209
|
+
|
210
|
+
#define USIBR _SFR_IO8(0x10)
|
211
|
+
#define USIBR0 0
|
212
|
+
#define USIBR1 1
|
213
|
+
#define USIBR2 2
|
214
|
+
#define USIBR3 3
|
215
|
+
#define USIBR4 4
|
216
|
+
#define USIBR5 5
|
217
|
+
#define USIBR6 6
|
218
|
+
#define USIBR7 7
|
219
|
+
|
220
|
+
#define USIPP _SFR_IO8(0x11)
|
221
|
+
#define USIPOS 0
|
222
|
+
|
223
|
+
#define OCR0B _SFR_IO8(0x12)
|
224
|
+
#define OCR0B_0 0
|
225
|
+
#define OCR0B_1 1
|
226
|
+
#define OCR0B_2 2
|
227
|
+
#define OCR0B_3 3
|
228
|
+
#define OCR0B_4 4
|
229
|
+
#define OCR0B_5 5
|
230
|
+
#define OCR0B_6 6
|
231
|
+
#define OCR0B_7 7
|
232
|
+
|
233
|
+
#define OCR0A _SFR_IO8(0x13)
|
234
|
+
#define OCR0A_0 0
|
235
|
+
#define OCR0A_1 1
|
236
|
+
#define OCR0A_2 2
|
237
|
+
#define OCR0A_3 3
|
238
|
+
#define OCR0A_4 4
|
239
|
+
#define OCR0A_5 5
|
240
|
+
#define OCR0A_6 6
|
241
|
+
#define OCR0A_7 7
|
242
|
+
|
243
|
+
#define TCNT0H _SFR_IO8(0x14)
|
244
|
+
#define TCNT0H_0 0
|
245
|
+
#define TCNT0H_1 1
|
246
|
+
#define TCNT0H_2 2
|
247
|
+
#define TCNT0H_3 3
|
248
|
+
#define TCNT0H_4 4
|
249
|
+
#define TCNT0H_5 5
|
250
|
+
#define TCNT0H_6 6
|
251
|
+
#define TCNT0H_7 7
|
252
|
+
|
253
|
+
#define TCCR0A _SFR_IO8(0x15)
|
254
|
+
#define WGM00 0
|
255
|
+
#define ACIC0 3
|
256
|
+
#define ICES0 4
|
257
|
+
#define ICNC0 5
|
258
|
+
#define ICEN0 6
|
259
|
+
#define TCW0 7
|
260
|
+
|
261
|
+
#define PINB _SFR_IO8(0x16)
|
262
|
+
#define PINB0 0
|
263
|
+
#define PINB1 1
|
264
|
+
#define PINB2 2
|
265
|
+
#define PINB3 3
|
266
|
+
#define PINB4 4
|
267
|
+
#define PINB5 5
|
268
|
+
#define PINB6 6
|
269
|
+
#define PINB7 7
|
270
|
+
|
271
|
+
#define DDRB _SFR_IO8(0x17)
|
272
|
+
#define DDB0 0
|
273
|
+
#define DDB1 1
|
274
|
+
#define DDB2 2
|
275
|
+
#define DDB3 3
|
276
|
+
#define DDB4 4
|
277
|
+
#define DDB5 5
|
278
|
+
#define DDB6 6
|
279
|
+
#define DDB7 7
|
280
|
+
|
281
|
+
#define PORTB _SFR_IO8(0x18)
|
282
|
+
#define PORTB0 0
|
283
|
+
#define PORTB1 1
|
284
|
+
#define PORTB2 2
|
285
|
+
#define PORTB3 3
|
286
|
+
#define PORTB4 4
|
287
|
+
#define PORTB5 5
|
288
|
+
#define PORTB6 6
|
289
|
+
#define PORTB7 7
|
290
|
+
|
291
|
+
#define PINA _SFR_IO8(0x19)
|
292
|
+
#define PINA0 0
|
293
|
+
#define PINA1 1
|
294
|
+
#define PINA2 2
|
295
|
+
#define PINA3 3
|
296
|
+
#define PINA4 4
|
297
|
+
#define PINA5 5
|
298
|
+
#define PINA6 6
|
299
|
+
#define PINA7 7
|
300
|
+
|
301
|
+
#define DDRA _SFR_IO8(0x1A)
|
302
|
+
#define DDA0 0
|
303
|
+
#define DDA1 1
|
304
|
+
#define DDA2 2
|
305
|
+
#define DDA3 3
|
306
|
+
#define DDA4 4
|
307
|
+
#define DDA5 5
|
308
|
+
#define DDA6 6
|
309
|
+
#define DDA7 7
|
310
|
+
|
311
|
+
#define PORTA _SFR_IO8(0x1B)
|
312
|
+
#define PORTA0 0
|
313
|
+
#define PORTA1 1
|
314
|
+
#define PORTA2 2
|
315
|
+
#define PORTA3 3
|
316
|
+
#define PORTA4 4
|
317
|
+
#define PORTA5 5
|
318
|
+
#define PORTA6 6
|
319
|
+
#define PORTA7 7
|
320
|
+
|
321
|
+
#define EECR _SFR_IO8(0x1C)
|
322
|
+
#define EERE 0
|
323
|
+
#define EEPE 1
|
324
|
+
#define EEMPE 2
|
325
|
+
#define EERIE 3
|
326
|
+
#define EEPM0 4
|
327
|
+
#define EEPM1 5
|
328
|
+
|
329
|
+
#define EEDR _SFR_IO8(0x1D)
|
330
|
+
#define EEDR0 0
|
331
|
+
#define EEDR1 1
|
332
|
+
#define EEDR2 2
|
333
|
+
#define EEDR3 3
|
334
|
+
#define EEDR4 4
|
335
|
+
#define EEDR5 5
|
336
|
+
#define EEDR6 6
|
337
|
+
#define EEDR7 7
|
338
|
+
|
339
|
+
#define EEAR _SFR_IO16(0x1E)
|
340
|
+
|
341
|
+
#define EEARL _SFR_IO8(0x1E)
|
342
|
+
#define EEAR0 0
|
343
|
+
#define EEAR1 1
|
344
|
+
#define EEAR2 2
|
345
|
+
#define EEAR3 3
|
346
|
+
#define EEAR4 4
|
347
|
+
#define EEAR5 5
|
348
|
+
#define EEAR6 6
|
349
|
+
#define EEAR7 7
|
350
|
+
|
351
|
+
#define EEARH _SFR_IO8(0x1F)
|
352
|
+
#define EEAR8 0
|
353
|
+
|
354
|
+
#define DWDR _SFR_IO8(0x20)
|
355
|
+
#define DWDR0 0
|
356
|
+
#define DWDR1 1
|
357
|
+
#define DWDR2 2
|
358
|
+
#define DWDR3 3
|
359
|
+
#define DWDR4 4
|
360
|
+
#define DWDR5 5
|
361
|
+
#define DWDR6 6
|
362
|
+
#define DWDR7 7
|
363
|
+
|
364
|
+
#define WDTCR _SFR_IO8(0x21)
|
365
|
+
#define WDP0 0
|
366
|
+
#define WDP1 1
|
367
|
+
#define WDP2 2
|
368
|
+
#define WDE 3
|
369
|
+
#define WDCE 4
|
370
|
+
#define WDP3 5
|
371
|
+
#define WDIE 6
|
372
|
+
#define WDIF 7
|
373
|
+
|
374
|
+
#define PCMSK1 _SFR_IO8(0x22)
|
375
|
+
#define PCINT8 0
|
376
|
+
#define PCINT9 1
|
377
|
+
#define PCINT10 2
|
378
|
+
#define PCINT11 3
|
379
|
+
#define PCINT12 4
|
380
|
+
#define PCINT13 5
|
381
|
+
#define PCINT14 6
|
382
|
+
#define PCINT15 7
|
383
|
+
|
384
|
+
#define PCMSK0 _SFR_IO8(0x23)
|
385
|
+
#define PCINT0 0
|
386
|
+
#define PCINT1 1
|
387
|
+
#define PCINT2 2
|
388
|
+
#define PCINT3 3
|
389
|
+
#define PCINT4 4
|
390
|
+
#define PCINT5 5
|
391
|
+
#define PCINT6 6
|
392
|
+
#define PCINT7 7
|
393
|
+
|
394
|
+
#define DT1 _SFR_IO8(0x24)
|
395
|
+
#define DT1L0 0
|
396
|
+
#define DT1L1 1
|
397
|
+
#define DT1L2 2
|
398
|
+
#define DT1L3 3
|
399
|
+
#define DT1H0 4
|
400
|
+
#define DT1H1 5
|
401
|
+
#define DT1H2 6
|
402
|
+
#define DT1H3 7
|
403
|
+
|
404
|
+
#define TC1H _SFR_IO8(0x25)
|
405
|
+
#define TC18 0
|
406
|
+
#define TC19 1
|
407
|
+
|
408
|
+
#define TCCR1D _SFR_IO8(0x26)
|
409
|
+
#define WGM10 0
|
410
|
+
#define WGM11 1
|
411
|
+
#define FPF1 2
|
412
|
+
#define FPAC1 3
|
413
|
+
#define FPES1 4
|
414
|
+
#define FPNC1 5
|
415
|
+
#define FPEN1 6
|
416
|
+
#define FPIE1 7
|
417
|
+
|
418
|
+
#define TCCR1C _SFR_IO8(0x27)
|
419
|
+
#define PWM1D 0
|
420
|
+
#define FOC1D 1
|
421
|
+
#define COM1D0 2
|
422
|
+
#define COM1D1 3
|
423
|
+
#define COM1B0S 4
|
424
|
+
#define COM1B1S 5
|
425
|
+
#define COM1A0S 6
|
426
|
+
#define COM1A1S 7
|
427
|
+
|
428
|
+
#define CLKPR _SFR_IO8(0x28)
|
429
|
+
#define CLKPS0 0
|
430
|
+
#define CLKPS1 1
|
431
|
+
#define CLKPS2 2
|
432
|
+
#define CLKPS3 3
|
433
|
+
#define CLKPCE 7
|
434
|
+
|
435
|
+
#define PLLCSR _SFR_IO8(0x29)
|
436
|
+
#define PLOCK 0
|
437
|
+
#define PLLE 1
|
438
|
+
#define PCKE 2
|
439
|
+
#define LSM 7
|
440
|
+
|
441
|
+
#define OCR1D _SFR_IO8(0x2A)
|
442
|
+
#define OCR1D0 0
|
443
|
+
#define OCR1D1 1
|
444
|
+
#define OCR1D2 2
|
445
|
+
#define OCR1D3 3
|
446
|
+
#define OCR1D4 4
|
447
|
+
#define OCR1D5 5
|
448
|
+
#define OCR1D6 6
|
449
|
+
#define OCR1D7 7
|
450
|
+
|
451
|
+
#define OCR1C _SFR_IO8(0x2B)
|
452
|
+
#define OCR1C0 0
|
453
|
+
#define OCR1C1 1
|
454
|
+
#define OCR1C2 2
|
455
|
+
#define OCR1C3 3
|
456
|
+
#define OCR1C4 4
|
457
|
+
#define OCR1C5 5
|
458
|
+
#define OCR1C6 6
|
459
|
+
#define OCR1C7 7
|
460
|
+
|
461
|
+
#define OCR1B _SFR_IO8(0x2C)
|
462
|
+
#define OCR1B0 0
|
463
|
+
#define OCR1B1 1
|
464
|
+
#define OCR1B2 2
|
465
|
+
#define OCR1B3 3
|
466
|
+
#define OCR1B4 4
|
467
|
+
#define OCR1B5 5
|
468
|
+
#define OCR1B6 6
|
469
|
+
#define OCR1B7 7
|
470
|
+
|
471
|
+
#define OCR1A _SFR_IO8(0x2D)
|
472
|
+
#define OCR1A0 0
|
473
|
+
#define OCR1A1 1
|
474
|
+
#define OCR1A2 2
|
475
|
+
#define OCR1A3 3
|
476
|
+
#define OCR1A4 4
|
477
|
+
#define OCR1A5 5
|
478
|
+
#define OCR1A6 6
|
479
|
+
#define OCR1A7 7
|
480
|
+
|
481
|
+
#define TCNT1 _SFR_IO8(0x2E)
|
482
|
+
#define TC1H_0 0
|
483
|
+
#define TC1H_1 1
|
484
|
+
#define TC1H_2 2
|
485
|
+
#define TC1H_3 3
|
486
|
+
#define TC1H_4 4
|
487
|
+
#define TC1H_5 5
|
488
|
+
#define TC1H_6 6
|
489
|
+
#define TC1H_7 7
|
490
|
+
|
491
|
+
#define TCCR1B _SFR_IO8(0x2F)
|
492
|
+
#define CS10 0
|
493
|
+
#define CS11 1
|
494
|
+
#define CS12 2
|
495
|
+
#define CS13 3
|
496
|
+
#define DTPS10 4
|
497
|
+
#define DTPS11 5
|
498
|
+
#define PSR1 6
|
499
|
+
#define PWM1X 7
|
500
|
+
|
501
|
+
#define TCCR1A _SFR_IO8(0x30)
|
502
|
+
#define PWM1B 0
|
503
|
+
#define PWM1A 1
|
504
|
+
#define FOC1B 2
|
505
|
+
#define FOC1A 3
|
506
|
+
#define COM1B0 4
|
507
|
+
#define COM1B1 5
|
508
|
+
#define COM1A0 6
|
509
|
+
#define COM1A1 7
|
510
|
+
|
511
|
+
#define OSCCAL _SFR_IO8(0x31)
|
512
|
+
#define CAL0 0
|
513
|
+
#define CAL1 1
|
514
|
+
#define CAL2 2
|
515
|
+
#define CAL3 3
|
516
|
+
#define CAL4 4
|
517
|
+
#define CAL5 5
|
518
|
+
#define CAL6 6
|
519
|
+
#define CAL7 7
|
520
|
+
|
521
|
+
#define TCNT0L _SFR_IO8(0x32)
|
522
|
+
#define TCNT0L_0 0
|
523
|
+
#define TCNT0L_1 1
|
524
|
+
#define TCNT0L_2 2
|
525
|
+
#define TCNT0L_3 3
|
526
|
+
#define TCNT0L_4 4
|
527
|
+
#define TCNT0L_5 5
|
528
|
+
#define TCNT0L_6 6
|
529
|
+
#define TCNT0L_7 7
|
530
|
+
|
531
|
+
#define TCCR0B _SFR_IO8(0x33)
|
532
|
+
#define CS00 0
|
533
|
+
#define CS01 1
|
534
|
+
#define CS02 2
|
535
|
+
#define PSR0 3
|
536
|
+
#define TSM 4
|
537
|
+
|
538
|
+
#define MCUSR _SFR_IO8(0x34)
|
539
|
+
#define PORF 0
|
540
|
+
#define EXTRF 1
|
541
|
+
#define BORF 2
|
542
|
+
#define WDRF 3
|
543
|
+
|
544
|
+
#define MCUCR _SFR_IO8(0x35)
|
545
|
+
#define ISC00 0
|
546
|
+
#define ISC01 1
|
547
|
+
#define BODSE 2
|
548
|
+
#define SM0 3
|
549
|
+
#define SM1 4
|
550
|
+
#define SE 5
|
551
|
+
#define PUD 6
|
552
|
+
#define BODS 7
|
553
|
+
|
554
|
+
#define PRR _SFR_IO8(0x36)
|
555
|
+
#define PRADC 0
|
556
|
+
#define PRUSI 1
|
557
|
+
#define PRTIM0 2
|
558
|
+
#define PRTIM1 3
|
559
|
+
|
560
|
+
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSI)|(1<<PRTIM0)|(1<<PRTIM1))
|
561
|
+
#define __AVR_HAVE_PRR_PRADC
|
562
|
+
#define __AVR_HAVE_PRR_PRUSI
|
563
|
+
#define __AVR_HAVE_PRR_PRTIM0
|
564
|
+
#define __AVR_HAVE_PRR_PRTIM1
|
565
|
+
|
566
|
+
#define SPMCSR _SFR_IO8(0x37)
|
567
|
+
#define SPMEN 0
|
568
|
+
#define PGERS 1
|
569
|
+
#define PGWRT 2
|
570
|
+
#define RFLB 3
|
571
|
+
#define CTPB 4
|
572
|
+
|
573
|
+
#define TIFR _SFR_IO8(0x38)
|
574
|
+
#define ICF0 0
|
575
|
+
#define TOV0 1
|
576
|
+
#define TOV1 2
|
577
|
+
#define OCF0B 3
|
578
|
+
#define OCF0A 4
|
579
|
+
#define OCF1B 5
|
580
|
+
#define OCF1A 6
|
581
|
+
#define OCF1D 7
|
582
|
+
|
583
|
+
#define TIMSK _SFR_IO8(0x39)
|
584
|
+
#define TICIE0 0
|
585
|
+
#define TOIE0 1
|
586
|
+
#define TOIE1 2
|
587
|
+
#define OCIE0B 3
|
588
|
+
#define OCIE0A 4
|
589
|
+
#define OCIE1B 5
|
590
|
+
#define OCIE1A 6
|
591
|
+
#define OCIE1D 7
|
592
|
+
|
593
|
+
#define GIFR _SFR_IO8(0x3A)
|
594
|
+
#define PCIF 5
|
595
|
+
#define INTF0 6
|
596
|
+
#define INTF1 7
|
597
|
+
|
598
|
+
#define GIMSK _SFR_IO8(0x3B)
|
599
|
+
#define PCIE0 4
|
600
|
+
#define PCIE1 5
|
601
|
+
#define INT0 6
|
602
|
+
#define INT1 7
|
603
|
+
|
604
|
+
|
605
|
+
/* Interrupt vectors */
|
606
|
+
/* Vector 0 is the reset vector */
|
607
|
+
#define INT0_vect_num 1
|
608
|
+
#define INT0_vect _VECTOR(1) /* External Interrupt 0 */
|
609
|
+
#define PCINT_vect_num 2
|
610
|
+
#define PCINT_vect _VECTOR(2) /* Pin Change Interrupt */
|
611
|
+
#define TIMER1_COMPA_vect_num 3
|
612
|
+
#define TIMER1_COMPA_vect _VECTOR(3) /* Timer/Counter1 Compare Match 1A */
|
613
|
+
#define TIMER1_COMPB_vect_num 4
|
614
|
+
#define TIMER1_COMPB_vect _VECTOR(4) /* Timer/Counter1 Compare Match 1B */
|
615
|
+
#define TIMER1_OVF_vect_num 5
|
616
|
+
#define TIMER1_OVF_vect _VECTOR(5) /* Timer/Counter1 Overflow */
|
617
|
+
#define TIMER0_OVF_vect_num 6
|
618
|
+
#define TIMER0_OVF_vect _VECTOR(6) /* Timer/Counter0 Overflow */
|
619
|
+
#define USI_START_vect_num 7
|
620
|
+
#define USI_START_vect _VECTOR(7) /* USI Start */
|
621
|
+
#define USI_OVF_vect_num 8
|
622
|
+
#define USI_OVF_vect _VECTOR(8) /* USI Overflow */
|
623
|
+
#define EE_RDY_vect_num 9
|
624
|
+
#define EE_RDY_vect _VECTOR(9) /* EEPROM Ready */
|
625
|
+
#define ANA_COMP_vect_num 10
|
626
|
+
#define ANA_COMP_vect _VECTOR(10) /* Analog Comparator */
|
627
|
+
#define ADC_vect_num 11
|
628
|
+
#define ADC_vect _VECTOR(11) /* ADC Conversion Complete */
|
629
|
+
#define WDT_vect_num 12
|
630
|
+
#define WDT_vect _VECTOR(12) /* Watchdog Time-Out */
|
631
|
+
#define INT1_vect_num 13
|
632
|
+
#define INT1_vect _VECTOR(13) /* External Interrupt 1 */
|
633
|
+
#define TIMER0_COMPA_vect_num 14
|
634
|
+
#define TIMER0_COMPA_vect _VECTOR(14) /* Timer/Counter0 Compare Match A */
|
635
|
+
#define TIMER0_COMPB_vect_num 15
|
636
|
+
#define TIMER0_COMPB_vect _VECTOR(15) /* Timer/Counter0 Compare Match B */
|
637
|
+
#define TIMER0_CAPT_vect_num 16
|
638
|
+
#define TIMER0_CAPT_vect _VECTOR(16) /* ADC Conversion Complete */
|
639
|
+
#define TIMER1_COMPD_vect_num 17
|
640
|
+
#define TIMER1_COMPD_vect _VECTOR(17) /* Timer/Counter1 Compare Match D */
|
641
|
+
#define FAULT_PROTECTION_vect_num 18
|
642
|
+
#define FAULT_PROTECTION_vect _VECTOR(18) /* Timer/Counter1 Fault Protection */
|
643
|
+
|
644
|
+
#define _VECTOR_SIZE 2 /* Size of individual vector. */
|
645
|
+
#define _VECTORS_SIZE (19 * _VECTOR_SIZE)
|
646
|
+
|
647
|
+
|
648
|
+
/* Constants */
|
649
|
+
#define SPM_PAGESIZE (64)
|
650
|
+
#define RAMSTART (0x60)
|
651
|
+
#define RAMSIZE (512)
|
652
|
+
#define RAMEND (RAMSTART + RAMSIZE - 1)
|
653
|
+
#define XRAMSTART (NA)
|
654
|
+
#define XRAMSIZE (0)
|
655
|
+
#define XRAMEND (RAMEND)
|
656
|
+
#define E2END (0x1FF)
|
657
|
+
#define E2PAGESIZE (4)
|
658
|
+
#define FLASHEND (0x1FFF)
|
659
|
+
|
660
|
+
|
661
|
+
/* Fuses */
|
662
|
+
#define FUSE_MEMORY_SIZE 3
|
663
|
+
|
664
|
+
/* Low Fuse Byte */
|
665
|
+
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock source */
|
666
|
+
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock source */
|
667
|
+
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock source */
|
668
|
+
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock source */
|
669
|
+
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
|
670
|
+
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
|
671
|
+
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Clock Output Enable */
|
672
|
+
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
|
673
|
+
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
|
674
|
+
|
675
|
+
/* High Fuse Byte */
|
676
|
+
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
|
677
|
+
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
|
678
|
+
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
|
679
|
+
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through the Chip Erase */
|
680
|
+
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog Timer always on */
|
681
|
+
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial Program and Data Downloading */
|
682
|
+
#define FUSE_DWEN (unsigned char)~_BV(6) /* DebugWIRE Enable */
|
683
|
+
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset disable */
|
684
|
+
#define HFUSE_DEFAULT (FUSE_SPIEN)
|
685
|
+
|
686
|
+
/* Extended Fuse Byte */
|
687
|
+
#define FUSE_SELFPRGEN (unsigned char)~_BV(0) /* Self-Programming Enable */
|
688
|
+
#define EFUSE_DEFAULT (0xFF)
|
689
|
+
|
690
|
+
|
691
|
+
/* Lock Bits */
|
692
|
+
#define __LOCK_BITS_EXIST
|
693
|
+
|
694
|
+
|
695
|
+
/* Signature */
|
696
|
+
#define SIGNATURE_0 0x1E
|
697
|
+
#define SIGNATURE_1 0x93
|
698
|
+
#define SIGNATURE_2 0x0D
|
699
|
+
|
700
|
+
|
701
|
+
/* Device Pin Definitions */
|
702
|
+
#define DI_B_DDR DDRMOSI
|
703
|
+
#define DI_B_PORT PORTMOSI
|
704
|
+
#define DI_B_PIN PINMOSI
|
705
|
+
#define DI_B_BIT MOSI
|
706
|
+
|
707
|
+
#define SDA_B_DDR DDRMOSI
|
708
|
+
#define SDA_B_PORT PORTMOSI
|
709
|
+
#define SDA_B_PIN PINMOSI
|
710
|
+
#define SDA_B_BIT MOSI
|
711
|
+
|
712
|
+
#define _OC1A_DDR DDRMOSI
|
713
|
+
#define _OC1A_PORT PORTMOSI
|
714
|
+
#define _OC1A_PIN PINMOSI
|
715
|
+
#define _OC1A_BIT MOSI
|
716
|
+
|
717
|
+
#define PCINT8_DDR DDRMOSI
|
718
|
+
#define PCINT8_PORT PORTMOSI
|
719
|
+
#define PCINT8_PIN PINMOSI
|
720
|
+
#define PCINT8_BIT MOSI
|
721
|
+
|
722
|
+
#define PB0_DDR DDRMOSI
|
723
|
+
#define PB0_PORT PORTMOSI
|
724
|
+
#define PB0_PIN PINMOSI
|
725
|
+
#define PB0_BIT MOSI
|
726
|
+
|
727
|
+
#define DO_B_DDR DDRMISO
|
728
|
+
#define DO_B_PORT PORTMISO
|
729
|
+
#define DO_B_PIN PINMISO
|
730
|
+
#define DO_B_BIT MISO
|
731
|
+
|
732
|
+
#define OC1A_DDR DDRMISO
|
733
|
+
#define OC1A_PORT PORTMISO
|
734
|
+
#define OC1A_PIN PINMISO
|
735
|
+
#define OC1A_BIT MISO
|
736
|
+
|
737
|
+
#define PCINT9_DDR DDRMISO
|
738
|
+
#define PCINT9_PORT PORTMISO
|
739
|
+
#define PCINT9_PIN PINMISO
|
740
|
+
#define PCINT9_BIT MISO
|
741
|
+
|
742
|
+
#define PB1_DDR DDRMISO
|
743
|
+
#define PB1_PORT PORTMISO
|
744
|
+
#define PB1_PIN PINMISO
|
745
|
+
#define PB1_BIT MISO
|
746
|
+
|
747
|
+
#define USCK_B_DDR DDRSCK
|
748
|
+
#define USCK_B_PORT PORTSCK
|
749
|
+
#define USCK_B_PIN PINSCK
|
750
|
+
#define USCK_B_BIT SCK
|
751
|
+
|
752
|
+
#define SCL_B_DDR DDRSCK
|
753
|
+
#define SCL_B_PORT PORTSCK
|
754
|
+
#define SCL_B_PIN PINSCK
|
755
|
+
#define SCL_B_BIT SCK
|
756
|
+
|
757
|
+
#define OC1B_DDR DDRSCK
|
758
|
+
#define OC1B_PORT PORTSCK
|
759
|
+
#define OC1B_PIN PINSCK
|
760
|
+
#define OC1B_BIT SCK
|
761
|
+
|
762
|
+
#define PCINT10_DDR DDRSCK
|
763
|
+
#define PCINT10_PORT PORTSCK
|
764
|
+
#define PCINT10_PIN PINSCK
|
765
|
+
#define PCINT10_BIT SCK
|
766
|
+
|
767
|
+
#define PB2_DDR DDRSCK
|
768
|
+
#define PB2_PORT PORTSCK
|
769
|
+
#define PB2_PIN PINSCK
|
770
|
+
#define PB2_BIT SCK
|
771
|
+
|
772
|
+
#define PCINT11_DDR DDROC1B
|
773
|
+
#define PCINT11_PORT PORTOC1B
|
774
|
+
#define PCINT11_PIN PINOC1B
|
775
|
+
#define PCINT11_BIT OC1B
|
776
|
+
|
777
|
+
#define PB3_DDR DDROC1B
|
778
|
+
#define PB3_PORT PORTOC1B
|
779
|
+
#define PB3_PIN PINOC1B
|
780
|
+
#define PB3_BIT OC1B
|
781
|
+
|
782
|
+
#define PCINT12_DDR DDRADC
|
783
|
+
#define PCINT12_PORT PORTADC
|
784
|
+
#define PCINT12_PIN PINADC
|
785
|
+
#define PCINT12_BIT ADC7
|
786
|
+
|
787
|
+
#define _OC1D_DDR DDRADC
|
788
|
+
#define _OC1D_PORT PORTADC
|
789
|
+
#define _OC1D_PIN PINADC
|
790
|
+
#define _OC1D_BIT ADC7
|
791
|
+
|
792
|
+
#define CLKI_DDR DDRADC
|
793
|
+
#define CLKI_PORT PORTADC
|
794
|
+
#define CLKI_PIN PINADC
|
795
|
+
#define CLKI_BIT ADC7
|
796
|
+
|
797
|
+
#define PB4_DDR DDRADC
|
798
|
+
#define PB4_PORT PORTADC
|
799
|
+
#define PB4_PIN PINADC
|
800
|
+
#define PB4_BIT ADC7
|
801
|
+
|
802
|
+
#define PCINT13_DDR DDRADC
|
803
|
+
#define PCINT13_PORT PORTADC
|
804
|
+
#define PCINT13_PIN PINADC
|
805
|
+
#define PCINT13_BIT ADC8
|
806
|
+
|
807
|
+
#define OC1D_DDR DDRADC
|
808
|
+
#define OC1D_PORT PORTADC
|
809
|
+
#define OC1D_PIN PINADC
|
810
|
+
#define OC1D_BIT ADC8
|
811
|
+
|
812
|
+
#define CKLO_DDR DDRADC
|
813
|
+
#define CKLO_PORT PORTADC
|
814
|
+
#define CKLO_PIN PINADC
|
815
|
+
#define CKLO_BIT ADC8
|
816
|
+
|
817
|
+
#define PB5_DDR DDRADC
|
818
|
+
#define PB5_PORT PORTADC
|
819
|
+
#define PB5_PIN PINADC
|
820
|
+
#define PB5_BIT ADC8
|
821
|
+
|
822
|
+
#define INT0_DDR DDRADC
|
823
|
+
#define INT0_PORT PORTADC
|
824
|
+
#define INT0_PIN PINADC
|
825
|
+
#define INT0_BIT ADC9
|
826
|
+
|
827
|
+
#define T0_DDR DDRADC
|
828
|
+
#define T0_PORT PORTADC
|
829
|
+
#define T0_PIN PINADC
|
830
|
+
#define T0_BIT ADC9
|
831
|
+
|
832
|
+
#define PCINT14_DDR DDRADC
|
833
|
+
#define PCINT14_PORT PORTADC
|
834
|
+
#define PCINT14_PIN PINADC
|
835
|
+
#define PCINT14_BIT ADC9
|
836
|
+
|
837
|
+
#define PB6_DDR DDRADC
|
838
|
+
#define PB6_PORT PORTADC
|
839
|
+
#define PB6_PIN PINADC
|
840
|
+
#define PB6_BIT ADC9
|
841
|
+
|
842
|
+
#define PCINT15_DDR DDRADC1
|
843
|
+
#define PCINT15_PORT PORTADC1
|
844
|
+
#define PCINT15_PIN PINADC1
|
845
|
+
#define PCINT15_BIT ADC10
|
846
|
+
|
847
|
+
#define PB7_DDR DDRADC1
|
848
|
+
#define PB7_PORT PORTADC1
|
849
|
+
#define PB7_PIN PINADC1
|
850
|
+
#define PB7_BIT ADC10
|
851
|
+
|
852
|
+
#define AIN1_DDR DDRADC
|
853
|
+
#define AIN1_PORT PORTADC
|
854
|
+
#define AIN1_PIN PINADC
|
855
|
+
#define AIN1_BIT ADC6
|
856
|
+
|
857
|
+
#define PCINT7_DDR DDRADC
|
858
|
+
#define PCINT7_PORT PORTADC
|
859
|
+
#define PCINT7_PIN PINADC
|
860
|
+
#define PCINT7_BIT ADC6
|
861
|
+
|
862
|
+
#define PA7_DDR DDRADC
|
863
|
+
#define PA7_PORT PORTADC
|
864
|
+
#define PA7_PIN PINADC
|
865
|
+
#define PA7_BIT ADC6
|
866
|
+
|
867
|
+
#define AIN0_DDR DDRADC
|
868
|
+
#define AIN0_PORT PORTADC
|
869
|
+
#define AIN0_PIN PINADC
|
870
|
+
#define AIN0_BIT ADC5
|
871
|
+
|
872
|
+
#define PCINT6_DDR DDRADC
|
873
|
+
#define PCINT6_PORT PORTADC
|
874
|
+
#define PCINT6_PIN PINADC
|
875
|
+
#define PCINT6_BIT ADC5
|
876
|
+
|
877
|
+
#define PA6_DDR DDRADC
|
878
|
+
#define PA6_PORT PORTADC
|
879
|
+
#define PA6_PIN PINADC
|
880
|
+
#define PA6_BIT ADC5
|
881
|
+
|
882
|
+
#define AIN2_DDR DDRADC
|
883
|
+
#define AIN2_PORT PORTADC
|
884
|
+
#define AIN2_PIN PINADC
|
885
|
+
#define AIN2_BIT ADC4
|
886
|
+
|
887
|
+
#define PCINT5_DDR DDRADC
|
888
|
+
#define PCINT5_PORT PORTADC
|
889
|
+
#define PCINT5_PIN PINADC
|
890
|
+
#define PCINT5_BIT ADC4
|
891
|
+
|
892
|
+
#define PA5_DDR DDRADC
|
893
|
+
#define PA5_PORT PORTADC
|
894
|
+
#define PA5_PIN PINADC
|
895
|
+
#define PA5_BIT ADC4
|
896
|
+
|
897
|
+
#define ICP0_DDR DDRADC
|
898
|
+
#define ICP0_PORT PORTADC
|
899
|
+
#define ICP0_PIN PINADC
|
900
|
+
#define ICP0_BIT ADC3
|
901
|
+
|
902
|
+
#define PCINT4_DDR DDRADC
|
903
|
+
#define PCINT4_PORT PORTADC
|
904
|
+
#define PCINT4_PIN PINADC
|
905
|
+
#define PCINT4_BIT ADC3
|
906
|
+
|
907
|
+
#define PA4_DDR DDRADC
|
908
|
+
#define PA4_PORT PORTADC
|
909
|
+
#define PA4_PIN PINADC
|
910
|
+
#define PA4_BIT ADC3
|
911
|
+
|
912
|
+
#define PCINT3_DDR DDRAREF
|
913
|
+
#define PCINT3_PORT PORTAREF
|
914
|
+
#define PCINT3_PIN PINAREF
|
915
|
+
#define PCINT3_BIT AREF
|
916
|
+
|
917
|
+
#define PA3_DDR DDRAREF
|
918
|
+
#define PA3_PORT PORTAREF
|
919
|
+
#define PA3_PIN PINAREF
|
920
|
+
#define PA3_BIT AREF
|
921
|
+
|
922
|
+
#define INT1_DDR DDRADC
|
923
|
+
#define INT1_PORT PORTADC
|
924
|
+
#define INT1_PIN PINADC
|
925
|
+
#define INT1_BIT ADC2
|
926
|
+
|
927
|
+
#define USCK_A_DDR DDRADC
|
928
|
+
#define USCK_A_PORT PORTADC
|
929
|
+
#define USCK_A_PIN PINADC
|
930
|
+
#define USCK_A_BIT ADC2
|
931
|
+
|
932
|
+
#define SCL_A_DDR DDRADC
|
933
|
+
#define SCL_A_PORT PORTADC
|
934
|
+
#define SCL_A_PIN PINADC
|
935
|
+
#define SCL_A_BIT ADC2
|
936
|
+
|
937
|
+
#define PCINT2_DDR DDRADC
|
938
|
+
#define PCINT2_PORT PORTADC
|
939
|
+
#define PCINT2_PIN PINADC
|
940
|
+
#define PCINT2_BIT ADC2
|
941
|
+
|
942
|
+
#define PA2_DDR DDRADC
|
943
|
+
#define PA2_PORT PORTADC
|
944
|
+
#define PA2_PIN PINADC
|
945
|
+
#define PA2_BIT ADC2
|
946
|
+
|
947
|
+
#define DO_A_DDR DDRADC
|
948
|
+
#define DO_A_PORT PORTADC
|
949
|
+
#define DO_A_PIN PINADC
|
950
|
+
#define DO_A_BIT ADC1
|
951
|
+
|
952
|
+
#define PCINT1_DDR DDRADC
|
953
|
+
#define PCINT1_PORT PORTADC
|
954
|
+
#define PCINT1_PIN PINADC
|
955
|
+
#define PCINT1_BIT ADC1
|
956
|
+
|
957
|
+
#define PA1_DDR DDRADC
|
958
|
+
#define PA1_PORT PORTADC
|
959
|
+
#define PA1_PIN PINADC
|
960
|
+
#define PA1_BIT ADC1
|
961
|
+
|
962
|
+
#define DI_A_DDR DDRADC
|
963
|
+
#define DI_A_PORT PORTADC
|
964
|
+
#define DI_A_PIN PINADC
|
965
|
+
#define DI_A_BIT ADC0
|
966
|
+
|
967
|
+
#define SDA_A_DDR DDRADC
|
968
|
+
#define SDA_A_PORT PORTADC
|
969
|
+
#define SDA_A_PIN PINADC
|
970
|
+
#define SDA_A_BIT ADC0
|
971
|
+
|
972
|
+
#define PCINT0_DDR DDRADC
|
973
|
+
#define PCINT0_PORT PORTADC
|
974
|
+
#define PCINT0_PIN PINADC
|
975
|
+
#define PCINT0_BIT ADC0
|
976
|
+
|
977
|
+
#define PA0_DDR DDRADC
|
978
|
+
#define PA0_PORT PORTADC
|
979
|
+
#define PA0_PIN PINADC
|
980
|
+
#define PA0_BIT ADC0
|
981
|
+
|
982
|
+
#define SLEEP_MODE_IDLE (0x00<<3)
|
983
|
+
#define SLEEP_MODE_ADC (0x01<<3)
|
984
|
+
#define SLEEP_MODE_PWR_DOWN (0x02<<3)
|
985
|
+
#define SLEEP_MODE_STANDBY (0x03<<3)
|
986
|
+
|
987
|
+
#endif /* _AVR_ATtiny861A_H_ */
|
988
|
+
|