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.
Files changed (295) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +77 -1
  3. data/cpp/arduino/Arduino.cpp +17 -7
  4. data/cpp/arduino/Arduino.h +151 -5
  5. data/cpp/arduino/ArduinoDefines.h +90 -0
  6. data/cpp/arduino/AvrMath.h +18 -28
  7. data/cpp/arduino/Godmode.cpp +62 -0
  8. data/cpp/arduino/Godmode.h +74 -0
  9. data/cpp/arduino/HardwareSerial.h +81 -0
  10. data/cpp/arduino/Print.h +67 -0
  11. data/cpp/arduino/Stream.h +210 -0
  12. data/cpp/arduino/WCharacter.h +96 -0
  13. data/cpp/arduino/WString.h +164 -0
  14. data/cpp/arduino/binary.h +518 -0
  15. data/cpp/arduino/include/README.md +3 -0
  16. data/cpp/arduino/include/common.h +333 -0
  17. data/cpp/arduino/include/fuse.h +274 -0
  18. data/cpp/arduino/include/io.h +643 -0
  19. data/cpp/arduino/include/io1200.h +274 -0
  20. data/cpp/arduino/include/io2313.h +385 -0
  21. data/cpp/arduino/include/io2323.h +210 -0
  22. data/cpp/arduino/include/io2333.h +461 -0
  23. data/cpp/arduino/include/io2343.h +214 -0
  24. data/cpp/arduino/include/io43u32x.h +440 -0
  25. data/cpp/arduino/include/io43u35x.h +432 -0
  26. data/cpp/arduino/include/io4414.h +500 -0
  27. data/cpp/arduino/include/io4433.h +489 -0
  28. data/cpp/arduino/include/io4434.h +588 -0
  29. data/cpp/arduino/include/io76c711.h +499 -0
  30. data/cpp/arduino/include/io8515.h +501 -0
  31. data/cpp/arduino/include/io8534.h +217 -0
  32. data/cpp/arduino/include/io8535.h +589 -0
  33. data/cpp/arduino/include/io86r401.h +309 -0
  34. data/cpp/arduino/include/io90pwm1.h +1157 -0
  35. data/cpp/arduino/include/io90pwm161.h +918 -0
  36. data/cpp/arduino/include/io90pwm216.h +1225 -0
  37. data/cpp/arduino/include/io90pwm2b.h +1466 -0
  38. data/cpp/arduino/include/io90pwm316.h +1272 -0
  39. data/cpp/arduino/include/io90pwm3b.h +1466 -0
  40. data/cpp/arduino/include/io90pwm81.h +1036 -0
  41. data/cpp/arduino/include/io90pwmx.h +1415 -0
  42. data/cpp/arduino/include/io90scr100.h +1719 -0
  43. data/cpp/arduino/include/ioa5272.h +803 -0
  44. data/cpp/arduino/include/ioa5505.h +803 -0
  45. data/cpp/arduino/include/ioa5702m322.h +2591 -0
  46. data/cpp/arduino/include/ioa5782.h +1843 -0
  47. data/cpp/arduino/include/ioa5790.h +907 -0
  48. data/cpp/arduino/include/ioa5790n.h +922 -0
  49. data/cpp/arduino/include/ioa5791.h +923 -0
  50. data/cpp/arduino/include/ioa5795.h +756 -0
  51. data/cpp/arduino/include/ioa5831.h +1949 -0
  52. data/cpp/arduino/include/ioa6285.h +740 -0
  53. data/cpp/arduino/include/ioa6286.h +740 -0
  54. data/cpp/arduino/include/ioa6289.h +847 -0
  55. data/cpp/arduino/include/ioa6612c.h +795 -0
  56. data/cpp/arduino/include/ioa6613c.h +795 -0
  57. data/cpp/arduino/include/ioa6614q.h +798 -0
  58. data/cpp/arduino/include/ioa6616c.h +865 -0
  59. data/cpp/arduino/include/ioa6617c.h +865 -0
  60. data/cpp/arduino/include/ioa664251.h +857 -0
  61. data/cpp/arduino/include/ioa8210.h +1843 -0
  62. data/cpp/arduino/include/ioa8510.h +1949 -0
  63. data/cpp/arduino/include/ioat94k.h +565 -0
  64. data/cpp/arduino/include/iocan128.h +100 -0
  65. data/cpp/arduino/include/iocan32.h +100 -0
  66. data/cpp/arduino/include/iocan64.h +100 -0
  67. data/cpp/arduino/include/iocanxx.h +2020 -0
  68. data/cpp/arduino/include/iom103.h +735 -0
  69. data/cpp/arduino/include/iom128.h +1299 -0
  70. data/cpp/arduino/include/iom1280.h +101 -0
  71. data/cpp/arduino/include/iom1281.h +101 -0
  72. data/cpp/arduino/include/iom1284.h +1099 -0
  73. data/cpp/arduino/include/iom1284p.h +1219 -0
  74. data/cpp/arduino/include/iom1284rfr2.h +2690 -0
  75. data/cpp/arduino/include/iom128a.h +1070 -0
  76. data/cpp/arduino/include/iom128rfa1.h +5385 -0
  77. data/cpp/arduino/include/iom128rfr2.h +2706 -0
  78. data/cpp/arduino/include/iom16.h +676 -0
  79. data/cpp/arduino/include/iom161.h +726 -0
  80. data/cpp/arduino/include/iom162.h +1022 -0
  81. data/cpp/arduino/include/iom163.h +686 -0
  82. data/cpp/arduino/include/iom164.h +101 -0
  83. data/cpp/arduino/include/iom164a.h +34 -0
  84. data/cpp/arduino/include/iom164p.h +34 -0
  85. data/cpp/arduino/include/iom164pa.h +1016 -0
  86. data/cpp/arduino/include/iom165.h +887 -0
  87. data/cpp/arduino/include/iom165a.h +832 -0
  88. data/cpp/arduino/include/iom165p.h +889 -0
  89. data/cpp/arduino/include/iom165pa.h +948 -0
  90. data/cpp/arduino/include/iom168.h +97 -0
  91. data/cpp/arduino/include/iom168a.h +35 -0
  92. data/cpp/arduino/include/iom168p.h +942 -0
  93. data/cpp/arduino/include/iom168pa.h +843 -0
  94. data/cpp/arduino/include/iom168pb.h +899 -0
  95. data/cpp/arduino/include/iom169.h +1174 -0
  96. data/cpp/arduino/include/iom169a.h +44 -0
  97. data/cpp/arduino/include/iom169p.h +1097 -0
  98. data/cpp/arduino/include/iom169pa.h +1485 -0
  99. data/cpp/arduino/include/iom16a.h +923 -0
  100. data/cpp/arduino/include/iom16hva.h +80 -0
  101. data/cpp/arduino/include/iom16hva2.h +883 -0
  102. data/cpp/arduino/include/iom16hvb.h +1052 -0
  103. data/cpp/arduino/include/iom16hvbrevb.h +1052 -0
  104. data/cpp/arduino/include/iom16m1.h +1571 -0
  105. data/cpp/arduino/include/iom16u2.h +1000 -0
  106. data/cpp/arduino/include/iom16u4.h +1423 -0
  107. data/cpp/arduino/include/iom2560.h +101 -0
  108. data/cpp/arduino/include/iom2561.h +101 -0
  109. data/cpp/arduino/include/iom2564rfr2.h +2691 -0
  110. data/cpp/arduino/include/iom256rfr2.h +2707 -0
  111. data/cpp/arduino/include/iom3000.h +237 -0
  112. data/cpp/arduino/include/iom32.h +755 -0
  113. data/cpp/arduino/include/iom323.h +744 -0
  114. data/cpp/arduino/include/iom324a.h +1014 -0
  115. data/cpp/arduino/include/iom324p.h +1016 -0
  116. data/cpp/arduino/include/iom324pa.h +1372 -0
  117. data/cpp/arduino/include/iom325.h +886 -0
  118. data/cpp/arduino/include/iom3250.h +982 -0
  119. data/cpp/arduino/include/iom3250a.h +34 -0
  120. data/cpp/arduino/include/iom3250p.h +34 -0
  121. data/cpp/arduino/include/iom3250pa.h +1042 -0
  122. data/cpp/arduino/include/iom325a.h +34 -0
  123. data/cpp/arduino/include/iom325p.h +34 -0
  124. data/cpp/arduino/include/iom325pa.h +937 -0
  125. data/cpp/arduino/include/iom328.h +34 -0
  126. data/cpp/arduino/include/iom328p.h +948 -0
  127. data/cpp/arduino/include/iom329.h +1069 -0
  128. data/cpp/arduino/include/iom3290.h +1227 -0
  129. data/cpp/arduino/include/iom3290a.h +34 -0
  130. data/cpp/arduino/include/iom3290pa.h +1123 -0
  131. data/cpp/arduino/include/iom329a.h +34 -0
  132. data/cpp/arduino/include/iom329p.h +1164 -0
  133. data/cpp/arduino/include/iom329pa.h +34 -0
  134. data/cpp/arduino/include/iom32a.h +686 -0
  135. data/cpp/arduino/include/iom32c1.h +1320 -0
  136. data/cpp/arduino/include/iom32hvb.h +1052 -0
  137. data/cpp/arduino/include/iom32hvbrevb.h +953 -0
  138. data/cpp/arduino/include/iom32m1.h +1625 -0
  139. data/cpp/arduino/include/iom32u2.h +1000 -0
  140. data/cpp/arduino/include/iom32u4.h +1512 -0
  141. data/cpp/arduino/include/iom32u6.h +1431 -0
  142. data/cpp/arduino/include/iom406.h +783 -0
  143. data/cpp/arduino/include/iom48.h +93 -0
  144. data/cpp/arduino/include/iom48a.h +35 -0
  145. data/cpp/arduino/include/iom48p.h +936 -0
  146. data/cpp/arduino/include/iom48pa.h +839 -0
  147. data/cpp/arduino/include/iom48pb.h +890 -0
  148. data/cpp/arduino/include/iom64.h +1311 -0
  149. data/cpp/arduino/include/iom640.h +101 -0
  150. data/cpp/arduino/include/iom644.h +101 -0
  151. data/cpp/arduino/include/iom644a.h +34 -0
  152. data/cpp/arduino/include/iom644p.h +101 -0
  153. data/cpp/arduino/include/iom644pa.h +1387 -0
  154. data/cpp/arduino/include/iom644rfr2.h +2685 -0
  155. data/cpp/arduino/include/iom645.h +881 -0
  156. data/cpp/arduino/include/iom6450.h +978 -0
  157. data/cpp/arduino/include/iom6450a.h +34 -0
  158. data/cpp/arduino/include/iom6450p.h +34 -0
  159. data/cpp/arduino/include/iom645a.h +34 -0
  160. data/cpp/arduino/include/iom645p.h +34 -0
  161. data/cpp/arduino/include/iom649.h +1061 -0
  162. data/cpp/arduino/include/iom6490.h +1182 -0
  163. data/cpp/arduino/include/iom6490a.h +34 -0
  164. data/cpp/arduino/include/iom6490p.h +34 -0
  165. data/cpp/arduino/include/iom649a.h +34 -0
  166. data/cpp/arduino/include/iom649p.h +1490 -0
  167. data/cpp/arduino/include/iom64a.h +1084 -0
  168. data/cpp/arduino/include/iom64c1.h +1321 -0
  169. data/cpp/arduino/include/iom64hve.h +1034 -0
  170. data/cpp/arduino/include/iom64hve2.h +767 -0
  171. data/cpp/arduino/include/iom64m1.h +1572 -0
  172. data/cpp/arduino/include/iom64rfr2.h +2701 -0
  173. data/cpp/arduino/include/iom8.h +665 -0
  174. data/cpp/arduino/include/iom8515.h +687 -0
  175. data/cpp/arduino/include/iom8535.h +772 -0
  176. data/cpp/arduino/include/iom88.h +97 -0
  177. data/cpp/arduino/include/iom88a.h +35 -0
  178. data/cpp/arduino/include/iom88p.h +941 -0
  179. data/cpp/arduino/include/iom88pa.h +1185 -0
  180. data/cpp/arduino/include/iom88pb.h +899 -0
  181. data/cpp/arduino/include/iom8a.h +621 -0
  182. data/cpp/arduino/include/iom8hva.h +76 -0
  183. data/cpp/arduino/include/iom8u2.h +997 -0
  184. data/cpp/arduino/include/iomx8.h +808 -0
  185. data/cpp/arduino/include/iomxx0_1.h +1692 -0
  186. data/cpp/arduino/include/iomxx4.h +954 -0
  187. data/cpp/arduino/include/iomxxhva.h +550 -0
  188. data/cpp/arduino/include/iotn10.h +512 -0
  189. data/cpp/arduino/include/iotn11.h +255 -0
  190. data/cpp/arduino/include/iotn12.h +288 -0
  191. data/cpp/arduino/include/iotn13.h +395 -0
  192. data/cpp/arduino/include/iotn13a.h +394 -0
  193. data/cpp/arduino/include/iotn15.h +363 -0
  194. data/cpp/arduino/include/iotn1634.h +914 -0
  195. data/cpp/arduino/include/iotn167.h +883 -0
  196. data/cpp/arduino/include/iotn20.h +776 -0
  197. data/cpp/arduino/include/iotn22.h +221 -0
  198. data/cpp/arduino/include/iotn2313.h +702 -0
  199. data/cpp/arduino/include/iotn2313a.h +812 -0
  200. data/cpp/arduino/include/iotn24.h +94 -0
  201. data/cpp/arduino/include/iotn24a.h +846 -0
  202. data/cpp/arduino/include/iotn25.h +93 -0
  203. data/cpp/arduino/include/iotn26.h +422 -0
  204. data/cpp/arduino/include/iotn261.h +93 -0
  205. data/cpp/arduino/include/iotn261a.h +987 -0
  206. data/cpp/arduino/include/iotn28.h +297 -0
  207. data/cpp/arduino/include/iotn4.h +477 -0
  208. data/cpp/arduino/include/iotn40.h +767 -0
  209. data/cpp/arduino/include/iotn4313.h +813 -0
  210. data/cpp/arduino/include/iotn43u.h +604 -0
  211. data/cpp/arduino/include/iotn44.h +94 -0
  212. data/cpp/arduino/include/iotn441.h +903 -0
  213. data/cpp/arduino/include/iotn44a.h +844 -0
  214. data/cpp/arduino/include/iotn45.h +93 -0
  215. data/cpp/arduino/include/iotn461.h +94 -0
  216. data/cpp/arduino/include/iotn461a.h +987 -0
  217. data/cpp/arduino/include/iotn48.h +806 -0
  218. data/cpp/arduino/include/iotn5.h +512 -0
  219. data/cpp/arduino/include/iotn828.h +911 -0
  220. data/cpp/arduino/include/iotn84.h +94 -0
  221. data/cpp/arduino/include/iotn841.h +903 -0
  222. data/cpp/arduino/include/iotn84a.h +844 -0
  223. data/cpp/arduino/include/iotn85.h +93 -0
  224. data/cpp/arduino/include/iotn861.h +94 -0
  225. data/cpp/arduino/include/iotn861a.h +988 -0
  226. data/cpp/arduino/include/iotn87.h +859 -0
  227. data/cpp/arduino/include/iotn88.h +806 -0
  228. data/cpp/arduino/include/iotn9.h +477 -0
  229. data/cpp/arduino/include/iotnx4.h +482 -0
  230. data/cpp/arduino/include/iotnx5.h +442 -0
  231. data/cpp/arduino/include/iotnx61.h +541 -0
  232. data/cpp/arduino/include/iousb1286.h +101 -0
  233. data/cpp/arduino/include/iousb1287.h +101 -0
  234. data/cpp/arduino/include/iousb162.h +101 -0
  235. data/cpp/arduino/include/iousb646.h +102 -0
  236. data/cpp/arduino/include/iousb647.h +102 -0
  237. data/cpp/arduino/include/iousb82.h +95 -0
  238. data/cpp/arduino/include/iousbxx2.h +807 -0
  239. data/cpp/arduino/include/iousbxx6_7.h +1336 -0
  240. data/cpp/arduino/include/iox128a1.h +7236 -0
  241. data/cpp/arduino/include/iox128a1u.h +8305 -0
  242. data/cpp/arduino/include/iox128a3.h +6987 -0
  243. data/cpp/arduino/include/iox128a3u.h +7697 -0
  244. data/cpp/arduino/include/iox128a4u.h +7309 -0
  245. data/cpp/arduino/include/iox128b1.h +6872 -0
  246. data/cpp/arduino/include/iox128b3.h +6288 -0
  247. data/cpp/arduino/include/iox128c3.h +6264 -0
  248. data/cpp/arduino/include/iox128d3.h +5749 -0
  249. data/cpp/arduino/include/iox128d4.h +5562 -0
  250. data/cpp/arduino/include/iox16a4.h +6748 -0
  251. data/cpp/arduino/include/iox16a4u.h +7309 -0
  252. data/cpp/arduino/include/iox16c4.h +6078 -0
  253. data/cpp/arduino/include/iox16d4.h +5717 -0
  254. data/cpp/arduino/include/iox16e5.h +7699 -0
  255. data/cpp/arduino/include/iox192a3.h +6987 -0
  256. data/cpp/arduino/include/iox192a3u.h +7697 -0
  257. data/cpp/arduino/include/iox192c3.h +6264 -0
  258. data/cpp/arduino/include/iox192d3.h +5749 -0
  259. data/cpp/arduino/include/iox256a3.h +6987 -0
  260. data/cpp/arduino/include/iox256a3b.h +6983 -0
  261. data/cpp/arduino/include/iox256a3bu.h +7706 -0
  262. data/cpp/arduino/include/iox256a3u.h +7697 -0
  263. data/cpp/arduino/include/iox256c3.h +6264 -0
  264. data/cpp/arduino/include/iox256d3.h +5709 -0
  265. data/cpp/arduino/include/iox32a4.h +6747 -0
  266. data/cpp/arduino/include/iox32a4u.h +7309 -0
  267. data/cpp/arduino/include/iox32c3.h +6264 -0
  268. data/cpp/arduino/include/iox32c4.h +6078 -0
  269. data/cpp/arduino/include/iox32d3.h +5105 -0
  270. data/cpp/arduino/include/iox32d4.h +5685 -0
  271. data/cpp/arduino/include/iox32e5.h +7699 -0
  272. data/cpp/arduino/include/iox384c3.h +6849 -0
  273. data/cpp/arduino/include/iox384d3.h +5833 -0
  274. data/cpp/arduino/include/iox64a1.h +7236 -0
  275. data/cpp/arduino/include/iox64a1u.h +8305 -0
  276. data/cpp/arduino/include/iox64a3.h +6987 -0
  277. data/cpp/arduino/include/iox64a3u.h +7697 -0
  278. data/cpp/arduino/include/iox64a4u.h +7309 -0
  279. data/cpp/arduino/include/iox64b1.h +6454 -0
  280. data/cpp/arduino/include/iox64b3.h +6288 -0
  281. data/cpp/arduino/include/iox64c3.h +6264 -0
  282. data/cpp/arduino/include/iox64d3.h +5764 -0
  283. data/cpp/arduino/include/iox64d4.h +5555 -0
  284. data/cpp/arduino/include/iox8e5.h +7699 -0
  285. data/cpp/arduino/include/lock.h +239 -0
  286. data/cpp/arduino/include/portpins.h +549 -0
  287. data/cpp/arduino/include/version.h +90 -0
  288. data/cpp/arduino/include/xmega.h +71 -0
  289. data/cpp/unittest/Assertion.h +9 -4
  290. data/cpp/unittest/Compare.h +93 -0
  291. data/lib/arduino_ci/arduino_installation.rb +1 -1
  292. data/lib/arduino_ci/cpp_library.rb +4 -1
  293. data/lib/arduino_ci/version.rb +1 -1
  294. data/misc/default.yaml +7 -0
  295. metadata +285 -2
@@ -0,0 +1,1423 @@
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: iom16u4.h 2185 2010-09-22 07:06:35Z aboyapati $ */
32
+
33
+ /* avr/iom16u4.h - definitions for ATmega16U4 */
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_ "iom16u4.h"
43
+ #else
44
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
45
+ #endif
46
+
47
+
48
+ #ifndef _AVR_ATmega16U4_H_
49
+ #define _AVR_ATmega16U4_H_ 1
50
+
51
+
52
+ /* Registers and associated bit numbers. */
53
+
54
+ #define PINB _SFR_IO8(0x03)
55
+ #define PINB0 0
56
+ #define PINB1 1
57
+ #define PINB2 2
58
+ #define PINB3 3
59
+ #define PINB4 4
60
+ #define PINB5 5
61
+ #define PINB6 6
62
+ #define PINB7 7
63
+
64
+ #define DDRB _SFR_IO8(0x04)
65
+ #define DDB0 0
66
+ #define DDB1 1
67
+ #define DDB2 2
68
+ #define DDB3 3
69
+ #define DDB4 4
70
+ #define DDB5 5
71
+ #define DDB6 6
72
+ #define DDB7 7
73
+
74
+ #define PORTB _SFR_IO8(0x05)
75
+ #define PORTB0 0
76
+ #define PORTB1 1
77
+ #define PORTB2 2
78
+ #define PORTB3 3
79
+ #define PORTB4 4
80
+ #define PORTB5 5
81
+ #define PORTB6 6
82
+ #define PORTB7 7
83
+
84
+ #define PINC _SFR_IO8(0x06)
85
+ #define PINC6 6
86
+ #define PINC7 7
87
+
88
+ #define DDRC _SFR_IO8(0x07)
89
+ #define DDC6 6
90
+ #define DDC7 7
91
+
92
+ #define PORTC _SFR_IO8(0x08)
93
+ #define PORTC6 6
94
+ #define PORTC7 7
95
+
96
+ #define PIND _SFR_IO8(0x09)
97
+ #define PIND0 0
98
+ #define PIND1 1
99
+ #define PIND2 2
100
+ #define PIND3 3
101
+ #define PIND4 4
102
+ #define PIND5 5
103
+ #define PIND6 6
104
+ #define PIND7 7
105
+
106
+ #define DDRD _SFR_IO8(0x0A)
107
+ #define DDD0 0
108
+ #define DDD1 1
109
+ #define DDD2 2
110
+ #define DDD3 3
111
+ #define DDD4 4
112
+ #define DDD5 5
113
+ #define DDD6 6
114
+ #define DDD7 7
115
+
116
+ #define PORTD _SFR_IO8(0x0B)
117
+ #define PORTD0 0
118
+ #define PORTD1 1
119
+ #define PORTD2 2
120
+ #define PORTD3 3
121
+ #define PORTD4 4
122
+ #define PORTD5 5
123
+ #define PORTD6 6
124
+ #define PORTD7 7
125
+
126
+ #define PINE _SFR_IO8(0x0C)
127
+ #define PINE2 2
128
+ #define PINE6 6
129
+
130
+ #define DDRE _SFR_IO8(0x0D)
131
+ #define DDE2 2
132
+ #define DDE6 6
133
+
134
+ #define PORTE _SFR_IO8(0x0E)
135
+ #define PORTE2 2
136
+ #define PORTE6 6
137
+
138
+ #define PINF _SFR_IO8(0x0F)
139
+ #define PINF0 0
140
+ #define PINF1 1
141
+ #define PINF4 4
142
+ #define PINF5 5
143
+ #define PINF6 6
144
+ #define PINF7 7
145
+
146
+ #define DDRF _SFR_IO8(0x10)
147
+ #define DDF0 0
148
+ #define DDF1 1
149
+ #define DDF4 4
150
+ #define DDF5 5
151
+ #define DDF6 6
152
+ #define DDF7 7
153
+
154
+ #define PORTF _SFR_IO8(0x11)
155
+ #define PORTF0 0
156
+ #define PORTF1 1
157
+ #define PORTF4 4
158
+ #define PORTF5 5
159
+ #define PORTF6 6
160
+ #define PORTF7 7
161
+
162
+ #define TIFR0 _SFR_IO8(0x15)
163
+ #define TOV0 0
164
+ #define OCF0A 1
165
+ #define OCF0B 2
166
+
167
+ #define TIFR1 _SFR_IO8(0x16)
168
+ #define TOV1 0
169
+ #define OCF1A 1
170
+ #define OCF1B 2
171
+ #define OCF1C 3
172
+ #define ICF1 5
173
+
174
+ #define TIFR2 _SFR_IO8(0x17)
175
+
176
+ #define TIFR3 _SFR_IO8(0x18)
177
+ #define TOV3 0
178
+ #define OCF3A 1
179
+ #define OCF3B 2
180
+ #define OCF3C 3
181
+ #define ICF3 5
182
+
183
+ #define TIFR4 _SFR_IO8(0x19)
184
+ #define TOV4 2
185
+ #define OCF4B 5
186
+ #define OCF4A 6
187
+ #define OCF4D 7
188
+
189
+ #define PCIFR _SFR_IO8(0x1B)
190
+ #define PCIF0 0
191
+
192
+ #define EIFR _SFR_IO8(0x1C)
193
+ #define INTF0 0
194
+ #define INTF1 1
195
+ #define INTF2 2
196
+ #define INTF3 3
197
+ #define INTF4 4
198
+ #define INTF5 5
199
+ #define INTF6 6
200
+ #define INTF7 7
201
+
202
+ #define EIMSK _SFR_IO8(0x1D)
203
+ #define INT0 0
204
+ #define INT1 1
205
+ #define INT2 2
206
+ #define INT3 3
207
+ #define INT4 4
208
+ #define INT5 5
209
+ #define INT6 6
210
+ #define INT7 7
211
+
212
+ #define GPIOR0 _SFR_IO8(0x1E)
213
+ #define GPIOR00 0
214
+ #define GPIOR01 1
215
+ #define GPIOR02 2
216
+ #define GPIOR03 3
217
+ #define GPIOR04 4
218
+ #define GPIOR05 5
219
+ #define GPIOR06 6
220
+ #define GPIOR07 7
221
+
222
+ #define EECR _SFR_IO8(0x1F)
223
+ #define EERE 0
224
+ #define EEPE 1
225
+ #define EEMPE 2
226
+ #define EERIE 3
227
+ #define EEPM0 4
228
+ #define EEPM1 5
229
+
230
+ #define EEDR _SFR_IO8(0x20)
231
+ #define EEDR0 0
232
+ #define EEDR1 1
233
+ #define EEDR2 2
234
+ #define EEDR3 3
235
+ #define EEDR4 4
236
+ #define EEDR5 5
237
+ #define EEDR6 6
238
+ #define EEDR7 7
239
+
240
+ #define EEAR _SFR_IO16(0x21)
241
+
242
+ #define EEARL _SFR_IO8(0x21)
243
+ #define EEAR0 0
244
+ #define EEAR1 1
245
+ #define EEAR2 2
246
+ #define EEAR3 3
247
+ #define EEAR4 4
248
+ #define EEAR5 5
249
+ #define EEAR6 6
250
+ #define EEAR7 7
251
+
252
+ #define EEARH _SFR_IO8(0x22)
253
+ #define EEAR8 0
254
+ #define EEAR9 1
255
+ #define EEAR10 2
256
+ #define EEAR11 3
257
+
258
+ #define GTCCR _SFR_IO8(0x23)
259
+ #define PSRSYNC 0
260
+ #define TSM 7
261
+
262
+ #define TCCR0A _SFR_IO8(0x24)
263
+ #define WGM00 0
264
+ #define WGM01 1
265
+ #define COM0B0 4
266
+ #define COM0B1 5
267
+ #define COM0A0 6
268
+ #define COM0A1 7
269
+
270
+ #define TCCR0B _SFR_IO8(0x25)
271
+ #define CS00 0
272
+ #define CS01 1
273
+ #define CS02 2
274
+ #define WGM02 3
275
+ #define FOC0B 6
276
+ #define FOC0A 7
277
+
278
+ #define TCNT0 _SFR_IO8(0x26)
279
+ #define TCNT0_0 0
280
+ #define TCNT0_1 1
281
+ #define TCNT0_2 2
282
+ #define TCNT0_3 3
283
+ #define TCNT0_4 4
284
+ #define TCNT0_5 5
285
+ #define TCNT0_6 6
286
+ #define TCNT0_7 7
287
+
288
+ #define OCR0A _SFR_IO8(0x27)
289
+ #define OCROA_0 0
290
+ #define OCROA_1 1
291
+ #define OCROA_2 2
292
+ #define OCROA_3 3
293
+ #define OCROA_4 4
294
+ #define OCROA_5 5
295
+ #define OCROA_6 6
296
+ #define OCROA_7 7
297
+
298
+ #define OCR0B _SFR_IO8(0x28)
299
+ #define OCR0B_0 0
300
+ #define OCR0B_1 1
301
+ #define OCR0B_2 2
302
+ #define OCR0B_3 3
303
+ #define OCR0B_4 4
304
+ #define OCR0B_5 5
305
+ #define OCR0B_6 6
306
+ #define OCR0B_7 7
307
+
308
+ #define PLLCSR _SFR_IO8(0x29)
309
+ #define PLOCK 0
310
+ #define PLLE 1
311
+ #define PINDIV 4
312
+
313
+ #define GPIOR1 _SFR_IO8(0x2A)
314
+ #define GPIOR10 0
315
+ #define GPIOR11 1
316
+ #define GPIOR12 2
317
+ #define GPIOR13 3
318
+ #define GPIOR14 4
319
+ #define GPIOR15 5
320
+ #define GPIOR16 6
321
+ #define GPIOR17 7
322
+
323
+ #define GPIOR2 _SFR_IO8(0x2B)
324
+ #define GPIOR20 0
325
+ #define GPIOR21 1
326
+ #define GPIOR22 2
327
+ #define GPIOR23 3
328
+ #define GPIOR24 4
329
+ #define GPIOR25 5
330
+ #define GPIOR26 6
331
+ #define GPIOR27 7
332
+
333
+ #define SPCR _SFR_IO8(0x2C)
334
+ #define SPR0 0
335
+ #define SPR1 1
336
+ #define CPHA 2
337
+ #define CPOL 3
338
+ #define MSTR 4
339
+ #define DORD 5
340
+ #define SPE 6
341
+ #define SPIE 7
342
+
343
+ #define SPSR _SFR_IO8(0x2D)
344
+ #define SPI2X 0
345
+ #define WCOL 6
346
+ #define SPIF 7
347
+
348
+ #define SPDR _SFR_IO8(0x2E)
349
+ #define SPDR0 0
350
+ #define SPDR1 1
351
+ #define SPDR2 2
352
+ #define SPDR3 3
353
+ #define SPDR4 4
354
+ #define SPDR5 5
355
+ #define SPDR6 6
356
+ #define SPDR7 7
357
+
358
+ #define ACSR _SFR_IO8(0x30)
359
+ #define ACIS0 0
360
+ #define ACIS1 1
361
+ #define ACIC 2
362
+ #define ACIE 3
363
+ #define ACI 4
364
+ #define ACO 5
365
+ #define ACBG 6
366
+ #define ACD 7
367
+
368
+ #define OCDR _SFR_IO8(0x31)
369
+ #define OCDR0 0
370
+ #define OCDR1 1
371
+ #define OCDR2 2
372
+ #define OCDR3 3
373
+ #define OCDR4 4
374
+ #define OCDR5 5
375
+ #define OCDR6 6
376
+ #define OCDR7 7
377
+
378
+ #define PLLFRQ _SFR_IO8(0x32)
379
+ #define PDIV0 0
380
+ #define PDIV1 1
381
+ #define PDIV2 2
382
+ #define PDIV3 3
383
+ #define PLLTM0 4
384
+ #define PLLTM1 5
385
+ #define PLLUSB 6
386
+ #define PINMUX 7
387
+
388
+ #define SMCR _SFR_IO8(0x33)
389
+ #define SE 0
390
+ #define SM0 1
391
+ #define SM1 2
392
+ #define SM2 3
393
+
394
+ #define MCUSR _SFR_IO8(0x34)
395
+ #define PORF 0
396
+ #define EXTRF 1
397
+ #define BORF 2
398
+ #define WDRF 3
399
+ #define JTRF 4
400
+
401
+ #define MCUCR _SFR_IO8(0x35)
402
+ #define IVCE 0
403
+ #define IVSEL 1
404
+ #define PUD 4
405
+ #define JTD 7
406
+
407
+ #define SPMCSR _SFR_IO8(0x37)
408
+ #define SPMEN 0
409
+ #define PGERS 1
410
+ #define PGWRT 2
411
+ #define BLBSET 3
412
+ #define RWWSRE 4
413
+ #define SIGRD 5
414
+ #define RWWSB 6
415
+ #define SPMIE 7
416
+
417
+ #define RAMPZ _SFR_IO8(0x3B)
418
+ #define RAMPZ0 0
419
+
420
+ #define EIND _SFR_IO8(0x3C)
421
+ #define EIND0 0
422
+
423
+ #define WDTCSR _SFR_MEM8(0x60)
424
+ #define WDP0 0
425
+ #define WDP1 1
426
+ #define WDP2 2
427
+ #define WDE 3
428
+ #define WDCE 4
429
+ #define WDP3 5
430
+ #define WDIE 6
431
+ #define WDIF 7
432
+
433
+ #define CLKPR _SFR_MEM8(0x61)
434
+ #define CLKPS0 0
435
+ #define CLKPS1 1
436
+ #define CLKPS2 2
437
+ #define CLKPS3 3
438
+ #define CLKPCE 7
439
+
440
+ #define PRR0 _SFR_MEM8(0x64)
441
+ #define PRADC 0
442
+ #define PRUSART0 1
443
+ #define PRSPI 2
444
+ #define PRTIM1 3
445
+ #define PRTIM0 5
446
+ #define PRTIM2 6
447
+ #define PRTWI 7
448
+
449
+ #define __AVR_HAVE_PRR0 ((1<<PRADC)|(1<<PRUSART0)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI))
450
+ #define __AVR_HAVE_PRR0_PRADC
451
+ #define __AVR_HAVE_PRR0_PRUSART0
452
+ #define __AVR_HAVE_PRR0_PRSPI
453
+ #define __AVR_HAVE_PRR0_PRTIM1
454
+ #define __AVR_HAVE_PRR0_PRTIM0
455
+ #define __AVR_HAVE_PRR0_PRTIM2
456
+ #define __AVR_HAVE_PRR0_PRTWI
457
+
458
+ #define PRR1 _SFR_MEM8(0x65)
459
+ #define PRUSART1 0
460
+ #define PRTIM3 3
461
+ #define PRUSB 7
462
+
463
+ #define __AVR_HAVE_PRR1 ((1<<PRUSART1)|(1<<PRTIM3)|(1<<PRUSB))
464
+ #define __AVR_HAVE_PRR1_PRUSART1
465
+ #define __AVR_HAVE_PRR1_PRTIM3
466
+ #define __AVR_HAVE_PRR1_PRUSB
467
+
468
+ #define OSCCAL _SFR_MEM8(0x66)
469
+ #define CAL0 0
470
+ #define CAL1 1
471
+ #define CAL2 2
472
+ #define CAL3 3
473
+ #define CAL4 4
474
+ #define CAL5 5
475
+ #define CAL6 6
476
+ #define CAL7 7
477
+
478
+ #define RCCTRL _SFR_MEM8(0x67)
479
+ #define RCFREQ 0
480
+
481
+ #define PCICR _SFR_MEM8(0x68)
482
+ #define PCIE0 0
483
+
484
+ #define EICRA _SFR_MEM8(0x69)
485
+ #define ISC00 0
486
+ #define ISC01 1
487
+ #define ISC10 2
488
+ #define ISC11 3
489
+ #define ISC20 4
490
+ #define ISC21 5
491
+ #define ISC30 6
492
+ #define ISC31 7
493
+
494
+ #define EICRB _SFR_MEM8(0x6A)
495
+ #define ISC40 0
496
+ #define ISC41 1
497
+ #define ISC50 2
498
+ #define ISC51 3
499
+ #define ISC60 4
500
+ #define ISC61 5
501
+ #define ISC70 6
502
+ #define ISC71 7
503
+
504
+ #define PCMSK0 _SFR_MEM8(0x6B)
505
+ #define PCINT0 0
506
+ #define PCINT1 1
507
+ #define PCINT2 2
508
+ #define PCINT3 3
509
+ #define PCINT4 4
510
+ #define PCINT5 5
511
+ #define PCINT6 6
512
+ #define PCINT7 7
513
+
514
+ #define TIMSK0 _SFR_MEM8(0x6E)
515
+ #define TOIE0 0
516
+ #define OCIE0A 1
517
+ #define OCIE0B 2
518
+
519
+ #define TIMSK1 _SFR_MEM8(0x6F)
520
+ #define TOIE1 0
521
+ #define OCIE1A 1
522
+ #define OCIE1B 2
523
+ #define OCIE1C 3
524
+ #define ICIE1 5
525
+
526
+ #define TIMSK3 _SFR_MEM8(0x71)
527
+ #define TOIE3 0
528
+ #define OCIE3A 1
529
+ #define OCIE3B 2
530
+ #define OCIE3C 3
531
+ #define ICIE3 5
532
+
533
+ #define TIMSK4 _SFR_MEM8(0x72)
534
+ #define TOIE4 2
535
+ #define OCIE4B 5
536
+ #define OCIE4A 6
537
+ #define OCIE4D 7
538
+
539
+ #ifndef __ASSEMBLER__
540
+ #define ADC _SFR_MEM16(0x78)
541
+ #endif
542
+ #define ADCW _SFR_MEM16(0x78)
543
+
544
+ #define ADCL _SFR_MEM8(0x78)
545
+ #define ADCL0 0
546
+ #define ADCL1 1
547
+ #define ADCL2 2
548
+ #define ADCL3 3
549
+ #define ADCL4 4
550
+ #define ADCL5 5
551
+ #define ADCL6 6
552
+ #define ADCL7 7
553
+
554
+ #define ADCH _SFR_MEM8(0x79)
555
+ #define ADCH0 0
556
+ #define ADCH1 1
557
+ #define ADCH2 2
558
+ #define ADCH3 3
559
+ #define ADCH4 4
560
+ #define ADCH5 5
561
+ #define ADCH6 6
562
+ #define ADCH7 7
563
+
564
+ #define ADCSRA _SFR_MEM8(0x7A)
565
+ #define ADPS0 0
566
+ #define ADPS1 1
567
+ #define ADPS2 2
568
+ #define ADIE 3
569
+ #define ADIF 4
570
+ #define ADATE 5
571
+ #define ADSC 6
572
+ #define ADEN 7
573
+
574
+ #define ADCSRB _SFR_MEM8(0x7B)
575
+ #define ADTS0 0
576
+ #define ADTS1 1
577
+ #define ADTS2 2
578
+ #define ADTS3 3
579
+ #define MUX5 5
580
+ #define ACME 6
581
+ #define ADHSM 7
582
+
583
+ #define ADMUX _SFR_MEM8(0x7C)
584
+ #define MUX0 0
585
+ #define MUX1 1
586
+ #define MUX2 2
587
+ #define MUX3 3
588
+ #define MUX4 4
589
+ #define ADLAR 5
590
+ #define REFS0 6
591
+ #define REFS1 7
592
+
593
+ #define DIDR2 _SFR_MEM8(0x7D)
594
+ #define ADC8D 0
595
+ #define ADC9D 1
596
+ #define ADC10D 2
597
+ #define ADC11D 3
598
+ #define ADC12D 4
599
+ #define ADC13D 5
600
+
601
+ #define DIDR0 _SFR_MEM8(0x7E)
602
+ #define ADC0D 0
603
+ #define ADC1D 1
604
+ #define ADC2D 2
605
+ #define ADC3D 3
606
+ #define ADC4D 4
607
+ #define ADC5D 5
608
+ #define ADC6D 6
609
+ #define ADC7D 7
610
+
611
+ #define DIDR1 _SFR_MEM8(0x7F)
612
+ #define AIN0D 0
613
+ #define AIN1D 1
614
+
615
+ #define TCCR1A _SFR_MEM8(0x80)
616
+ #define WGM10 0
617
+ #define WGM11 1
618
+ #define COM1C0 2
619
+ #define COM1C1 3
620
+ #define COM1B0 4
621
+ #define COM1B1 5
622
+ #define COM1A0 6
623
+ #define COM1A1 7
624
+
625
+ #define TCCR1B _SFR_MEM8(0x81)
626
+ #define CS10 0
627
+ #define CS11 1
628
+ #define CS12 2
629
+ #define WGM12 3
630
+ #define WGM13 4
631
+ #define ICES1 6
632
+ #define ICNC1 7
633
+
634
+ #define TCCR1C _SFR_MEM8(0x82)
635
+ #define FOC1C 5
636
+ #define FOC1B 6
637
+ #define FOC1A 7
638
+
639
+ #define TCNT1 _SFR_MEM16(0x84)
640
+
641
+ #define TCNT1L _SFR_MEM8(0x84)
642
+ #define TCNT1L0 0
643
+ #define TCNT1L1 1
644
+ #define TCNT1L2 2
645
+ #define TCNT1L3 3
646
+ #define TCNT1L4 4
647
+ #define TCNT1L5 5
648
+ #define TCNT1L6 6
649
+ #define TCNT1L7 7
650
+
651
+ #define TCNT1H _SFR_MEM8(0x85)
652
+ #define TCNT1H0 0
653
+ #define TCNT1H1 1
654
+ #define TCNT1H2 2
655
+ #define TCNT1H3 3
656
+ #define TCNT1H4 4
657
+ #define TCNT1H5 5
658
+ #define TCNT1H6 6
659
+ #define TCNT1H7 7
660
+
661
+ #define ICR1 _SFR_MEM16(0x86)
662
+
663
+ #define ICR1L _SFR_MEM8(0x86)
664
+ #define ICR1L0 0
665
+ #define ICR1L1 1
666
+ #define ICR1L2 2
667
+ #define ICR1L3 3
668
+ #define ICR1L4 4
669
+ #define ICR1L5 5
670
+ #define ICR1L6 6
671
+ #define ICR1L7 7
672
+
673
+ #define ICR1H _SFR_MEM8(0x87)
674
+ #define ICR1H0 0
675
+ #define ICR1H1 1
676
+ #define ICR1H2 2
677
+ #define ICR1H3 3
678
+ #define ICR1H4 4
679
+ #define ICR1H5 5
680
+ #define ICR1H6 6
681
+ #define ICR1H7 7
682
+
683
+ #define OCR1A _SFR_MEM16(0x88)
684
+
685
+ #define OCR1AL _SFR_MEM8(0x88)
686
+ #define OCR1AL0 0
687
+ #define OCR1AL1 1
688
+ #define OCR1AL2 2
689
+ #define OCR1AL3 3
690
+ #define OCR1AL4 4
691
+ #define OCR1AL5 5
692
+ #define OCR1AL6 6
693
+ #define OCR1AL7 7
694
+
695
+ #define OCR1AH _SFR_MEM8(0x89)
696
+ #define OCR1AH0 0
697
+ #define OCR1AH1 1
698
+ #define OCR1AH2 2
699
+ #define OCR1AH3 3
700
+ #define OCR1AH4 4
701
+ #define OCR1AH5 5
702
+ #define OCR1AH6 6
703
+ #define OCR1AH7 7
704
+
705
+ #define OCR1B _SFR_MEM16(0x8A)
706
+
707
+ #define OCR1BL _SFR_MEM8(0x8A)
708
+ #define OCR1BL0 0
709
+ #define OCR1BL1 1
710
+ #define OCR1BL2 2
711
+ #define OCR1BL3 3
712
+ #define OCR1BL4 4
713
+ #define OCR1BL5 5
714
+ #define OCR1BL6 6
715
+ #define OCR1BL7 7
716
+
717
+ #define OCR1BH _SFR_MEM8(0x8B)
718
+ #define OCR1BH0 0
719
+ #define OCR1BH1 1
720
+ #define OCR1BH2 2
721
+ #define OCR1BH3 3
722
+ #define OCR1BH4 4
723
+ #define OCR1BH5 5
724
+ #define OCR1BH6 6
725
+ #define OCR1BH7 7
726
+
727
+ #define OCR1C _SFR_MEM16(0x8C)
728
+
729
+ #define OCR1CL _SFR_MEM8(0x8C)
730
+ #define OCR1CL0 0
731
+ #define OCR1CL1 1
732
+ #define OCR1CL2 2
733
+ #define OCR1CL3 3
734
+ #define OCR1CL4 4
735
+ #define OCR1CL5 5
736
+ #define OCR1CL6 6
737
+ #define OCR1CL7 7
738
+
739
+ #define OCR1CH _SFR_MEM8(0x8D)
740
+ #define OCR1CH0 0
741
+ #define OCR1CH1 1
742
+ #define OCR1CH2 2
743
+ #define OCR1CH3 3
744
+ #define OCR1CH4 4
745
+ #define OCR1CH5 5
746
+ #define OCR1CH6 6
747
+ #define OCR1CH7 7
748
+
749
+ #define TCCR3A _SFR_MEM8(0x90)
750
+ #define WGM30 0
751
+ #define WGM31 1
752
+ #define COM3C0 2
753
+ #define COM3C1 3
754
+ #define COM3B0 4
755
+ #define COM3B1 5
756
+ #define COM3A0 6
757
+ #define COM3A1 7
758
+
759
+ #define TCCR3B _SFR_MEM8(0x91)
760
+ #define CS30 0
761
+ #define CS31 1
762
+ #define CS32 2
763
+ #define WGM32 3
764
+ #define WGM33 4
765
+ #define ICES3 6
766
+ #define ICNC3 7
767
+
768
+ #define TCCR3C _SFR_MEM8(0x92)
769
+ #define FOC3C 5
770
+ #define FOC3B 6
771
+ #define FOC3A 7
772
+
773
+ #define TCNT3 _SFR_MEM16(0x94)
774
+
775
+ #define TCNT3L _SFR_MEM8(0x94)
776
+ #define TCNT3L0 0
777
+ #define TCNT3L1 1
778
+ #define TCNT3L2 2
779
+ #define TCNT3L3 3
780
+ #define TCNT3L4 4
781
+ #define TCNT3L5 5
782
+ #define TCNT3L6 6
783
+ #define TCNT3L7 7
784
+
785
+ #define TCNT3H _SFR_MEM8(0x95)
786
+ #define TCNT3H0 0
787
+ #define TCNT3H1 1
788
+ #define TCNT3H2 2
789
+ #define TCNT3H3 3
790
+ #define TCNT3H4 4
791
+ #define TCNT3H5 5
792
+ #define TCNT3H6 6
793
+ #define TCNT3H7 7
794
+
795
+ #define ICR3 _SFR_MEM16(0x96)
796
+
797
+ #define ICR3L _SFR_MEM8(0x96)
798
+ #define ICR3L0 0
799
+ #define ICR3L1 1
800
+ #define ICR3L2 2
801
+ #define ICR3L3 3
802
+ #define ICR3L4 4
803
+ #define ICR3L5 5
804
+ #define ICR3L6 6
805
+ #define ICR3L7 7
806
+
807
+ #define ICR3H _SFR_MEM8(0x97)
808
+ #define ICR3H0 0
809
+ #define ICR3H1 1
810
+ #define ICR3H2 2
811
+ #define ICR3H3 3
812
+ #define ICR3H4 4
813
+ #define ICR3H5 5
814
+ #define ICR3H6 6
815
+ #define ICR3H7 7
816
+
817
+ #define OCR3A _SFR_MEM16(0x98)
818
+
819
+ #define OCR3AL _SFR_MEM8(0x98)
820
+ #define OCR3AL0 0
821
+ #define OCR3AL1 1
822
+ #define OCR3AL2 2
823
+ #define OCR3AL3 3
824
+ #define OCR3AL4 4
825
+ #define OCR3AL5 5
826
+ #define OCR3AL6 6
827
+ #define OCR3AL7 7
828
+
829
+ #define OCR3AH _SFR_MEM8(0x99)
830
+ #define OCR3AH0 0
831
+ #define OCR3AH1 1
832
+ #define OCR3AH2 2
833
+ #define OCR3AH3 3
834
+ #define OCR3AH4 4
835
+ #define OCR3AH5 5
836
+ #define OCR3AH6 6
837
+ #define OCR3AH7 7
838
+
839
+ #define OCR3B _SFR_MEM16(0x9A)
840
+
841
+ #define OCR3BL _SFR_MEM8(0x9A)
842
+ #define OCR3BL0 0
843
+ #define OCR3BL1 1
844
+ #define OCR3BL2 2
845
+ #define OCR3BL3 3
846
+ #define OCR3BL4 4
847
+ #define OCR3BL5 5
848
+ #define OCR3BL6 6
849
+ #define OCR3BL7 7
850
+
851
+ #define OCR3BH _SFR_MEM8(0x9B)
852
+ #define OCR3BH0 0
853
+ #define OCR3BH1 1
854
+ #define OCR3BH2 2
855
+ #define OCR3BH3 3
856
+ #define OCR3BH4 4
857
+ #define OCR3BH5 5
858
+ #define OCR3BH6 6
859
+ #define OCR3BH7 7
860
+
861
+ #define OCR3C _SFR_MEM16(0x9C)
862
+
863
+ #define OCR3CL _SFR_MEM8(0x9C)
864
+ #define OCR3CL0 0
865
+ #define OCR3CL1 1
866
+ #define OCR3CL2 2
867
+ #define OCR3CL3 3
868
+ #define OCR3CL4 4
869
+ #define OCR3CL5 5
870
+ #define OCR3CL6 6
871
+ #define OCR3CL7 7
872
+
873
+ #define OCR3CH _SFR_MEM8(0x9D)
874
+ #define OCR3CH0 0
875
+ #define OCR3CH1 1
876
+ #define OCR3CH2 2
877
+ #define OCR3CH3 3
878
+ #define OCR3CH4 4
879
+ #define OCR3CH5 5
880
+ #define OCR3CH6 6
881
+ #define OCR3CH7 7
882
+
883
+ #define TWBR _SFR_MEM8(0xB8)
884
+
885
+ #define TWSR _SFR_MEM8(0xB9)
886
+ #define TWPS0 0
887
+ #define TWPS1 1
888
+ #define TWS3 3
889
+ #define TWS4 4
890
+ #define TWS5 5
891
+ #define TWS6 6
892
+ #define TWS7 7
893
+
894
+ #define TWAR _SFR_MEM8(0xBA)
895
+ #define TWGCE 0
896
+ #define TWA0 1
897
+ #define TWA1 2
898
+ #define TWA2 3
899
+ #define TWA3 4
900
+ #define TWA4 5
901
+ #define TWA5 6
902
+ #define TWA6 7
903
+
904
+ #define TWDR _SFR_MEM8(0xBB)
905
+
906
+ #define TWCR _SFR_MEM8(0xBC)
907
+ #define TWIE 0
908
+ #define TWEN 2
909
+ #define TWWC 3
910
+ #define TWSTO 4
911
+ #define TWSTA 5
912
+ #define TWEA 6
913
+ #define TWINT 7
914
+
915
+ #define TWAMR _SFR_MEM8(0xBD)
916
+ #define TWAM0 1
917
+ #define TWAM1 2
918
+ #define TWAM2 3
919
+ #define TWAM3 4
920
+ #define TWAM4 5
921
+ #define TWAM5 6
922
+ #define TWAM6 7
923
+
924
+ #define TCNT4 _SFR_MEM8(0xBE)
925
+ #define TC40 0
926
+ #define TC41 1
927
+ #define TC42 2
928
+ #define TC43 3
929
+ #define TC44 4
930
+ #define TC45 5
931
+ #define TC46 6
932
+ #define TC47 7
933
+
934
+ #define TC4H _SFR_MEM8(0xBF)
935
+ #define TC48 0
936
+ #define TC49 1
937
+ #define TC410 2
938
+
939
+ #define TCCR4A _SFR_MEM8(0xC0)
940
+ #define PWM4B 0
941
+ #define PWM4A 1
942
+ #define FOC4B 2
943
+ #define FOC4A 3
944
+ #define COM4B0 4
945
+ #define COM4B1 5
946
+ #define COM4A0 6
947
+ #define COM4A1 7
948
+
949
+ #define TCCR4B _SFR_MEM8(0xC1)
950
+ #define CS40 0
951
+ #define CS41 1
952
+ #define CS42 2
953
+ #define CS43 3
954
+ #define DTPS40 4
955
+ #define DTPS41 5
956
+ #define PSR4 6
957
+ #define PWM4X 7
958
+
959
+ #define TCCR4C _SFR_MEM8(0xC2)
960
+ #define PWM4D 0
961
+ #define FOC4D 1
962
+ #define COM4D0 2
963
+ #define COM4D1 3
964
+ #define COM4B0S 4
965
+ #define COM4B1S 5
966
+ #define COM4A0S 6
967
+ #define COM4A1S 7
968
+
969
+ #define TCCR4D _SFR_MEM8(0xC3)
970
+ #define WGM40 0
971
+ #define WGM41 1
972
+ #define FPF4 2
973
+ #define FPAC4 3
974
+ #define FPES4 4
975
+ #define FPNC4 5
976
+ #define FPEN4 6
977
+ #define FPIE4 7
978
+
979
+ #define TCCR4E _SFR_MEM8(0xC4)
980
+ #define OC4OE0 0
981
+ #define OC4OE1 1
982
+ #define OC4OE2 2
983
+ #define OC4OE3 3
984
+ #define OC4OE4 4
985
+ #define OC4OE5 5
986
+ #define ENHC4 6
987
+ #define TLOCK4 7
988
+
989
+ #define CLKSEL0 _SFR_MEM8(0xC5)
990
+ #define CLKS 0
991
+ #define EXTE 2
992
+ #define RCE 3
993
+ #define EXSUT0 4
994
+ #define EXSUT1 5
995
+ #define RCSUT0 6
996
+ #define RCSUT1 7
997
+
998
+ #define CLKSEL1 _SFR_MEM8(0xC6)
999
+ #define EXCKSEL0 0
1000
+ #define EXCKSEL1 1
1001
+ #define EXCKSEL2 2
1002
+ #define EXCKSEL3 3
1003
+ #define RCCKSEL0 4
1004
+ #define RCCKSEL1 5
1005
+ #define RCCKSEL2 6
1006
+ #define RCCKSEL3 7
1007
+
1008
+ #define CLKSTA _SFR_MEM8(0xC7)
1009
+ #define EXTON 0
1010
+ #define RCON 1
1011
+
1012
+ #define UCSR1A _SFR_MEM8(0xC8)
1013
+ #define MPCM1 0
1014
+ #define U2X1 1
1015
+ #define UPE1 2
1016
+ #define DOR1 3
1017
+ #define FE1 4
1018
+ #define UDRE1 5
1019
+ #define TXC1 6
1020
+ #define RXC1 7
1021
+
1022
+ #define UCSR1B _SFR_MEM8(0xC9)
1023
+ #define TXB81 0
1024
+ #define RXB81 1
1025
+ #define UCSZ12 2
1026
+ #define TXEN1 3
1027
+ #define RXEN1 4
1028
+ #define UDRIE1 5
1029
+ #define TXCIE1 6
1030
+ #define RXCIE1 7
1031
+
1032
+ #define UCSR1C _SFR_MEM8(0xCA)
1033
+ #define UCPOL1 0
1034
+ #define UCSZ10 1
1035
+ #define UCSZ11 2
1036
+ #define USBS1 3
1037
+ #define UPM10 4
1038
+ #define UPM11 5
1039
+ #define UMSEL10 6
1040
+ #define UMSEL11 7
1041
+
1042
+ #define UCSR1D _SFR_MEM8(0xCB)
1043
+ #define RTSEN 0
1044
+ #define CTSEN 1
1045
+
1046
+ #define UBRR1 _SFR_MEM16(0xCC)
1047
+
1048
+ #define UBRR1L _SFR_MEM8(0xCC)
1049
+
1050
+ #define UBRR1H _SFR_MEM8(0xCD)
1051
+
1052
+ #define UDR1 _SFR_MEM8(0xCE)
1053
+ #define UDR1_0 0
1054
+ #define UDR1_1 1
1055
+ #define UDR1_2 2
1056
+ #define UDR1_3 3
1057
+ #define UDR1_4 4
1058
+ #define UDR1_5 5
1059
+ #define UDR1_6 6
1060
+ #define UDR1_7 7
1061
+
1062
+ #define OCR4A _SFR_MEM8(0xCF)
1063
+ #define OCR4A0 0
1064
+ #define OCR4A1 1
1065
+ #define OCR4A2 2
1066
+ #define OCR4A3 3
1067
+ #define OCR4A4 4
1068
+ #define OCR4A5 5
1069
+ #define OCR4A6 6
1070
+ #define OCR4A7 7
1071
+
1072
+ #define OCR4B _SFR_MEM8(0xD0)
1073
+ #define OCR4B0 0
1074
+ #define OCR4B1 1
1075
+ #define OCR4B2 2
1076
+ #define OCR4B3 3
1077
+ #define OCR4B4 4
1078
+ #define OCR4B5 5
1079
+ #define OCR4B6 6
1080
+ #define OCR4B7 7
1081
+
1082
+ #define OCR4C _SFR_MEM8(0xD1)
1083
+ #define OCR4C0 0
1084
+ #define OCR4C1 1
1085
+ #define OCR4C2 2
1086
+ #define OCR4C3 3
1087
+ #define OCR4C4 4
1088
+ #define OCR4C5 5
1089
+ #define OCR4C6 6
1090
+ #define OCR4C7 7
1091
+
1092
+ #define OCR4D _SFR_MEM8(0xD2)
1093
+ #define OCR4D0 0
1094
+ #define OCR4D1 1
1095
+ #define OCR4D2 2
1096
+ #define OCR4D3 3
1097
+ #define OCR4D4 4
1098
+ #define OCR4D5 5
1099
+ #define OCR4D6 6
1100
+ #define OCR4D7 7
1101
+
1102
+ #define DT4 _SFR_MEM8(0xD4)
1103
+ #define DT4L0 0
1104
+ #define DT4L1 1
1105
+ #define DT4L2 2
1106
+ #define DT4L3 3
1107
+ #define DT4L4 4
1108
+ #define DT4L5 5
1109
+ #define DT4L6 6
1110
+ #define DT4L7 7
1111
+
1112
+ #define UHWCON _SFR_MEM8(0xD7)
1113
+ #define UVREGE 0
1114
+
1115
+ #define USBCON _SFR_MEM8(0xD8)
1116
+ #define VBUSTE 0
1117
+ #define OTGPADE 4
1118
+ #define FRZCLK 5
1119
+ #define USBE 7
1120
+
1121
+ #define USBSTA _SFR_MEM8(0xD9)
1122
+ #define VBUS 0
1123
+ #define SPEED 3
1124
+
1125
+ #define USBINT _SFR_MEM8(0xDA)
1126
+ #define VBUSTI 0
1127
+
1128
+ #define UDCON _SFR_MEM8(0xE0)
1129
+ #define DETACH 0
1130
+ #define RMWKUP 1
1131
+ #define LSM 2
1132
+ #define RSTCPU 3
1133
+
1134
+ #define UDINT _SFR_MEM8(0xE1)
1135
+ #define SUSPI 0
1136
+ #define SOFI 2
1137
+ #define EORSTI 3
1138
+ #define WAKEUPI 4
1139
+ #define EORSMI 5
1140
+ #define UPRSMI 6
1141
+
1142
+ #define UDIEN _SFR_MEM8(0xE2)
1143
+ #define SUSPE 0
1144
+ #define SOFE 2
1145
+ #define EORSTE 3
1146
+ #define WAKEUPE 4
1147
+ #define EORSME 5
1148
+ #define UPRSME 6
1149
+
1150
+ #define UDADDR _SFR_MEM8(0xE3)
1151
+ #define UADD0 0
1152
+ #define UADD1 1
1153
+ #define UADD2 2
1154
+ #define UADD3 3
1155
+ #define UADD4 4
1156
+ #define UADD5 5
1157
+ #define UADD6 6
1158
+ #define ADDEN 7
1159
+
1160
+ #define UDFNUM _SFR_MEM16(0xE4)
1161
+
1162
+ #define UDFNUML _SFR_MEM8(0xE4)
1163
+ #define FNUM0 0
1164
+ #define FNUM1 1
1165
+ #define FNUM2 2
1166
+ #define FNUM3 3
1167
+ #define FNUM4 4
1168
+ #define FNUM5 5
1169
+ #define FNUM6 6
1170
+ #define FNUM7 7
1171
+
1172
+ #define UDFNUMH _SFR_MEM8(0xE5)
1173
+ #define FNUM8 0
1174
+ #define FNUM9 1
1175
+ #define FNUM10 2
1176
+
1177
+ #define UDMFN _SFR_MEM8(0xE6)
1178
+ #define FNCERR 4
1179
+
1180
+ #define UEINTX _SFR_MEM8(0xE8)
1181
+ #define TXINI 0
1182
+ #define STALLEDI 1
1183
+ #define RXOUTI 2
1184
+ #define RXSTPI 3
1185
+ #define NAKOUTI 4
1186
+ #define RWAL 5
1187
+ #define NAKINI 6
1188
+ #define FIFOCON 7
1189
+
1190
+ #define UENUM _SFR_MEM8(0xE9)
1191
+ #define UENUM_0 0
1192
+ #define UENUM_1 1
1193
+ #define UENUM_2 2
1194
+
1195
+ #define UERST _SFR_MEM8(0xEA)
1196
+ #define EPRST0 0
1197
+ #define EPRST1 1
1198
+ #define EPRST2 2
1199
+ #define EPRST3 3
1200
+ #define EPRST4 4
1201
+ #define EPRST5 5
1202
+ #define EPRST6 6
1203
+
1204
+ #define UECONX _SFR_MEM8(0xEB)
1205
+ #define EPEN 0
1206
+ #define RSTDT 3
1207
+ #define STALLRQC 4
1208
+ #define STALLRQ 5
1209
+
1210
+ #define UECFG0X _SFR_MEM8(0xEC)
1211
+ #define EPDIR 0
1212
+ #define EPTYPE0 6
1213
+ #define EPTYPE1 7
1214
+
1215
+ #define UECFG1X _SFR_MEM8(0xED)
1216
+ #define ALLOC 1
1217
+ #define EPBK0 2
1218
+ #define EPBK1 3
1219
+ #define EPSIZE0 4
1220
+ #define EPSIZE1 5
1221
+ #define EPSIZE2 6
1222
+
1223
+ #define UESTA0X _SFR_MEM8(0xEE)
1224
+ #define NBUSYBK0 0
1225
+ #define NBUSYBK1 1
1226
+ #define DTSEQ0 2
1227
+ #define DTSEQ1 3
1228
+ #define UNDERFI 5
1229
+ #define OVERFI 6
1230
+ #define CFGOK 7
1231
+
1232
+ #define UESTA1X _SFR_MEM8(0xEF)
1233
+ #define CURRBK0 0
1234
+ #define CURRBK1 1
1235
+ #define CTRLDIR 2
1236
+
1237
+ #define UEIENX _SFR_MEM8(0xF0)
1238
+ #define TXINE 0
1239
+ #define STALLEDE 1
1240
+ #define RXOUTE 2
1241
+ #define RXSTPE 3
1242
+ #define NAKOUTE 4
1243
+ #define NAKINE 6
1244
+ #define FLERRE 7
1245
+
1246
+ #define UEDATX _SFR_MEM8(0xF1)
1247
+ #define DAT0 0
1248
+ #define DAT1 1
1249
+ #define DAT2 2
1250
+ #define DAT3 3
1251
+ #define DAT4 4
1252
+ #define DAT5 5
1253
+ #define DAT6 6
1254
+ #define DAT7 7
1255
+
1256
+ #define UEBCLX _SFR_MEM8(0xF2)
1257
+ #define BYCT0 0
1258
+ #define BYCT1 1
1259
+ #define BYCT2 2
1260
+ #define BYCT3 3
1261
+ #define BYCT4 4
1262
+ #define BYCT5 5
1263
+ #define BYCT6 6
1264
+ #define BYCT7 7
1265
+
1266
+ #define UEBCHX _SFR_MEM8(0xF3)
1267
+
1268
+ #define UEINT _SFR_MEM8(0xF4)
1269
+ #define EPINT0 0
1270
+ #define EPINT1 1
1271
+ #define EPINT2 2
1272
+ #define EPINT3 3
1273
+ #define EPINT4 4
1274
+ #define EPINT5 5
1275
+ #define EPINT6 6
1276
+
1277
+
1278
+ /* Interrupt vectors */
1279
+ /* Vector 0 is the reset vector */
1280
+ #define INT0_vect_num 1
1281
+ #define INT0_vect _VECTOR(1) /* External Interrupt Request 0 */
1282
+ #define INT1_vect_num 2
1283
+ #define INT1_vect _VECTOR(2) /* External Interrupt Request 1 */
1284
+ #define INT2_vect_num 3
1285
+ #define INT2_vect _VECTOR(3) /* External Interrupt Request 2 */
1286
+ #define INT3_vect_num 4
1287
+ #define INT3_vect _VECTOR(4) /* External Interrupt Request 3 */
1288
+ #define INT6_vect_num 7
1289
+ #define INT6_vect _VECTOR(7) /* External Interrupt Request 6 */
1290
+ #define PCINT0_vect_num 9
1291
+ #define PCINT0_vect _VECTOR(9) /* Pin Change Interrupt Request 0 */
1292
+ #define USB_GEN_vect_num 10
1293
+ #define USB_GEN_vect _VECTOR(10) /* USB General Interrupt Request */
1294
+ #define USB_COM_vect_num 11
1295
+ #define USB_COM_vect _VECTOR(11) /* USB Endpoint/Pipe Interrupt Communication Request */
1296
+ #define WDT_vect_num 12
1297
+ #define WDT_vect _VECTOR(12) /* Watchdog Time-out Interrupt */
1298
+ #define TIMER1_CAPT_vect_num 16
1299
+ #define TIMER1_CAPT_vect _VECTOR(16) /* Timer/Counter1 Capture Event */
1300
+ #define TIMER1_COMPA_vect_num 17
1301
+ #define TIMER1_COMPA_vect _VECTOR(17) /* Timer/Counter1 Compare Match A */
1302
+ #define TIMER1_COMPB_vect_num 18
1303
+ #define TIMER1_COMPB_vect _VECTOR(18) /* Timer/Counter1 Compare Match B */
1304
+ #define TIMER1_COMPC_vect_num 19
1305
+ #define TIMER1_COMPC_vect _VECTOR(19) /* Timer/Counter1 Compare Match C */
1306
+ #define TIMER1_OVF_vect_num 20
1307
+ #define TIMER1_OVF_vect _VECTOR(20) /* Timer/Counter1 Overflow */
1308
+ #define TIMER0_COMPA_vect_num 21
1309
+ #define TIMER0_COMPA_vect _VECTOR(21) /* Timer/Counter0 Compare Match A */
1310
+ #define TIMER0_COMPB_vect_num 22
1311
+ #define TIMER0_COMPB_vect _VECTOR(22) /* Timer/Counter0 Compare Match B */
1312
+ #define TIMER0_OVF_vect_num 23
1313
+ #define TIMER0_OVF_vect _VECTOR(23) /* Timer/Counter0 Overflow */
1314
+ #define SPI_STC_vect_num 24
1315
+ #define SPI_STC_vect _VECTOR(24) /* SPI Serial Transfer Complete */
1316
+ #define USART1_RX_vect_num 25
1317
+ #define USART1_RX_vect _VECTOR(25) /* USART1, Rx Complete */
1318
+ #define USART1_UDRE_vect_num 26
1319
+ #define USART1_UDRE_vect _VECTOR(26) /* USART1 Data register Empty */
1320
+ #define USART1_TX_vect_num 27
1321
+ #define USART1_TX_vect _VECTOR(27) /* USART1, Tx Complete */
1322
+ #define ANALOG_COMP_vect_num 28
1323
+ #define ANALOG_COMP_vect _VECTOR(28) /* Analog Comparator */
1324
+ #define ADC_vect_num 29
1325
+ #define ADC_vect _VECTOR(29) /* ADC Conversion Complete */
1326
+ #define EE_READY_vect_num 30
1327
+ #define EE_READY_vect _VECTOR(30) /* EEPROM Ready */
1328
+ #define TIMER3_CAPT_vect_num 31
1329
+ #define TIMER3_CAPT_vect _VECTOR(31) /* Timer/Counter3 Capture Event */
1330
+ #define TIMER3_COMPA_vect_num 32
1331
+ #define TIMER3_COMPA_vect _VECTOR(32) /* Timer/Counter3 Compare Match A */
1332
+ #define TIMER3_COMPB_vect_num 33
1333
+ #define TIMER3_COMPB_vect _VECTOR(33) /* Timer/Counter3 Compare Match B */
1334
+ #define TIMER3_COMPC_vect_num 34
1335
+ #define TIMER3_COMPC_vect _VECTOR(34) /* Timer/Counter3 Compare Match C */
1336
+ #define TIMER3_OVF_vect_num 35
1337
+ #define TIMER3_OVF_vect _VECTOR(35) /* Timer/Counter3 Overflow */
1338
+ #define TWI_vect_num 36
1339
+ #define TWI_vect _VECTOR(36) /* 2-wire Serial Interface */
1340
+ #define SPM_READY_vect_num 37
1341
+ #define SPM_READY_vect _VECTOR(37) /* Store Program Memory Read */
1342
+ #define TIMER4_COMPA_vect_num 38
1343
+ #define TIMER4_COMPA_vect _VECTOR(38) /* Timer/Counter4 Compare Match A */
1344
+ #define TIMER4_COMPB_vect_num 39
1345
+ #define TIMER4_COMPB_vect _VECTOR(39) /* Timer/Counter4 Compare Match B */
1346
+ #define TIMER4_COMPD_vect_num 40
1347
+ #define TIMER4_COMPD_vect _VECTOR(40) /* Timer/Counter4 Compare Match D */
1348
+ #define TIMER4_OVF_vect_num 41
1349
+ #define TIMER4_OVF_vect _VECTOR(41) /* Timer/Counter4 Overflow */
1350
+ #define TIMER4_FPF_vect_num 42
1351
+ #define TIMER4_FPF_vect _VECTOR(42) /* Timer/Counter4 Fault Protection Interrupt */
1352
+
1353
+ #define _VECTOR_SIZE 4 /* Size of individual vector. */
1354
+ #define _VECTORS_SIZE (43 * _VECTOR_SIZE)
1355
+
1356
+
1357
+ /* Constants */
1358
+ #define SPM_PAGESIZE (128)
1359
+ #define RAMSTART (0x100)
1360
+ #define RAMSIZE (1280)
1361
+ #define RAMEND (RAMSTART + RAMSIZE - 1)
1362
+ #define XRAMSTART (NA)
1363
+ #define XRAMSIZE (0)
1364
+ #define XRAMEND (RAMEND)
1365
+ #define E2END (0x1FF)
1366
+ #define E2PAGESIZE (4)
1367
+ #define FLASHEND (0x3FFF)
1368
+
1369
+
1370
+ /* Fuses */
1371
+ #define FUSE_MEMORY_SIZE 3
1372
+
1373
+ /* Low Fuse Byte */
1374
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
1375
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
1376
+ #define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
1377
+ #define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
1378
+ #define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
1379
+ #define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
1380
+ #define FUSE_CKOUT (unsigned char)~_BV(6) /* Oscillator options */
1381
+ #define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
1382
+ #define LFUSE_DEFAULT (FUSE_CKDIV8 & FUSE_SUT1 & FUSE_SUT0 & FUSE_CKSEL3 & FUSE_CKSEL2 & FUSE_CKSEL1)
1383
+
1384
+ /* High Fuse Byte */
1385
+ #define FUSE_BOOTRST (unsigned char)~_BV(0) /* Select Reset Vector */
1386
+ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1) /* Select Boot Size */
1387
+ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2) /* Select Boot Size */
1388
+ #define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
1389
+ #define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog timer always on */
1390
+ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
1391
+ #define FUSE_JTAGEN (unsigned char)~_BV(6) /* Enable JTAG */
1392
+ #define FUSE_OCDEN (unsigned char)~_BV(7) /* Enable OCD */
1393
+ #define HFUSE_DEFAULT (FUSE_JTAGEN & FUSE_SPIEN & FUSE_BOOTSZ1 & FUSE_BOOTSZ0)
1394
+
1395
+ /* Extended Fuse Byte */
1396
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
1397
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
1398
+ #define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
1399
+ #define FUSE_HWBE (unsigned char)~_BV(3) /* Hardware Boot Enable */
1400
+ #define EFUSE_DEFAULT (0xFF)
1401
+
1402
+
1403
+ /* Lock Bits */
1404
+ #define __LOCK_BITS_EXIST
1405
+ #define __BOOT_LOCK_BITS_0_EXIST
1406
+ #define __BOOT_LOCK_BITS_1_EXIST
1407
+
1408
+
1409
+ /* Signature */
1410
+ #define SIGNATURE_0 0x1E
1411
+ #define SIGNATURE_1 0x94
1412
+ #define SIGNATURE_2 0x88
1413
+
1414
+
1415
+ #define SLEEP_MODE_IDLE (0x00<<1)
1416
+ #define SLEEP_MODE_ADC (0x01<<1)
1417
+ #define SLEEP_MODE_PWR_DOWN (0x02<<1)
1418
+ #define SLEEP_MODE_PWR_SAVE (0x03<<1)
1419
+ #define SLEEP_MODE_STANDBY (0x06<<1)
1420
+ #define SLEEP_MODE_EXT_STANDBY (0x07<<1)
1421
+
1422
+ #endif /* _AVR_ATmega16U4_H_ */
1423
+