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,100 @@
1
+ /* Copyright (c) 2004,2005, Colin O'Flynn <coflynn@newae.com>
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: iocan128.h 1767 2008-10-17 23:27:53Z arcanum $ */
32
+
33
+ /* iocan128.h - definitions for CAN128 */
34
+
35
+ #ifndef _AVR_IOCAN128_H_
36
+ #define _AVR_IOCAN128_H_ 1
37
+
38
+ #include "iocanxx.h"
39
+
40
+ /* Constants */
41
+ #define SPM_PAGESIZE 256
42
+ #define RAMSTART 0x100
43
+ #define RAMEND 0x10FF /* Last On-Chip SRAM Location */
44
+ #define XRAMEND 0xFFFF
45
+ #define E2END 0x0FFF
46
+ #define E2PAGESIZE 8
47
+ #define FLASHEND 0x1FFFF
48
+
49
+
50
+ /* Fuses */
51
+
52
+ #define FUSE_MEMORY_SIZE 3
53
+
54
+ /* Low Fuse Byte */
55
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0)
56
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1)
57
+ #define FUSE_CKSEL2 (unsigned char)~_BV(2)
58
+ #define FUSE_CKSEL3 (unsigned char)~_BV(3)
59
+ #define FUSE_SUT0 (unsigned char)~_BV(4)
60
+ #define FUSE_SUT1 (unsigned char)~_BV(5)
61
+ #define FUSE_CKOUT (unsigned char)~_BV(6)
62
+ #define FUSE_CKDIV8 (unsigned char)~_BV(7)
63
+ #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
64
+
65
+ /* High Fuse Byte */
66
+ #define FUSE_BOOTRST (unsigned char)~_BV(0)
67
+ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
68
+ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
69
+ #define FUSE_EESAVE (unsigned char)~_BV(3)
70
+ #define FUSE_WDTON (unsigned char)~_BV(4)
71
+ #define FUSE_SPIEN (unsigned char)~_BV(5)
72
+ #define FUSE_JTAGEN (unsigned char)~_BV(6)
73
+ #define FUSE_OCDEN (unsigned char)~_BV(7)
74
+ #define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
75
+
76
+ /* Extended Fuse Byte */
77
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(1)
78
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(2)
79
+ #define FUSE_BODLEVEL2 (unsigned char)~_BV(3)
80
+ #define EFUSE_DEFAULT (0xFF)
81
+
82
+
83
+ /* Lock Bits */
84
+ #define __LOCK_BITS_EXIST
85
+ #define __BOOT_LOCK_BITS_0_EXIST
86
+ #define __BOOT_LOCK_BITS_1_EXIST
87
+
88
+
89
+ /* Signature */
90
+ #define SIGNATURE_0 0x1E
91
+ #define SIGNATURE_1 0x97
92
+ #define SIGNATURE_2 0x81
93
+
94
+ #define SLEEP_MODE_IDLE (0x00<<1)
95
+ #define SLEEP_MODE_ADC (0x01<<1)
96
+ #define SLEEP_MODE_PWR_DOWN (0x02<<1)
97
+ #define SLEEP_MODE_PWR_SAVE (0x03<<1)
98
+ #define SLEEP_MODE_STANDBY (0x06<<1)
99
+
100
+ #endif /* _AVR_IOCAN128_H_ */
@@ -0,0 +1,100 @@
1
+ /* Copyright (c) 2004,2005, Anatoly Sokolov <aesok@pautinka.net>
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: iocan32.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
32
+
33
+ /* iocan32.h - definitions for CAN32 */
34
+
35
+ #ifndef _AVR_IOCAN32_H_
36
+ #define _AVR_IOCAN32_H_ 1
37
+
38
+ #include "iocanxx.h"
39
+
40
+ /* Constants */
41
+ #define SPM_PAGESIZE 256
42
+ #define RAMSTART 0x100
43
+ #define RAMEND 0x08FF /* Last On-Chip SRAM Location */
44
+ #define XRAMEND 0xFFFF
45
+ #define E2END 0x03FF
46
+ #define E2PAGESIZE 8
47
+ #define FLASHEND 0x7FFF
48
+
49
+
50
+ /* Fuses */
51
+
52
+ #define FUSE_MEMORY_SIZE 3
53
+
54
+ /* Low Fuse Byte */
55
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0)
56
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1)
57
+ #define FUSE_CKSEL2 (unsigned char)~_BV(2)
58
+ #define FUSE_CKSEL3 (unsigned char)~_BV(3)
59
+ #define FUSE_SUT0 (unsigned char)~_BV(4)
60
+ #define FUSE_SUT1 (unsigned char)~_BV(5)
61
+ #define FUSE_CKOUT (unsigned char)~_BV(6)
62
+ #define FUSE_CKDIV8 (unsigned char)~_BV(7)
63
+ #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
64
+
65
+ /* High Fuse Byte */
66
+ #define FUSE_BOOTRST (unsigned char)~_BV(0)
67
+ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
68
+ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
69
+ #define FUSE_EESAVE (unsigned char)~_BV(3)
70
+ #define FUSE_WDTON (unsigned char)~_BV(4)
71
+ #define FUSE_SPIEN (unsigned char)~_BV(5)
72
+ #define FUSE_JTAGEN (unsigned char)~_BV(6)
73
+ #define FUSE_OCDEN (unsigned char)~_BV(7)
74
+ #define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
75
+
76
+ /* Extended Fuse Byte */
77
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(1)
78
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(2)
79
+ #define FUSE_BODLEVEL2 (unsigned char)~_BV(3)
80
+ #define EFUSE_DEFAULT (0xFF)
81
+
82
+
83
+ /* Lock Bits */
84
+ #define __LOCK_BITS_EXIST
85
+ #define __BOOT_LOCK_BITS_0_EXIST
86
+ #define __BOOT_LOCK_BITS_1_EXIST
87
+
88
+
89
+ /* Signature */
90
+ #define SIGNATURE_0 0x1E
91
+ #define SIGNATURE_1 0x95
92
+ #define SIGNATURE_2 0x81
93
+
94
+ #define SLEEP_MODE_IDLE (0x00<<1)
95
+ #define SLEEP_MODE_ADC (0x01<<1)
96
+ #define SLEEP_MODE_PWR_DOWN (0x02<<1)
97
+ #define SLEEP_MODE_PWR_SAVE (0x03<<1)
98
+ #define SLEEP_MODE_STANDBY (0x06<<1)
99
+
100
+ #endif /* _AVR_IOCAN32_H_ */
@@ -0,0 +1,100 @@
1
+ /* Copyright (c) 2004,2005, Anatoly Sokolov <aesok@pautinka.net>
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: iocan64.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
32
+
33
+ /* iocan64.h - definitions for CAN64 */
34
+
35
+ #ifndef _AVR_IOCAN64_H_
36
+ #define _AVR_IOCAN64_H_ 1
37
+
38
+ #include "iocanxx.h"
39
+
40
+ /* Constants */
41
+ #define SPM_PAGESIZE 256
42
+ #define RAMSTART 0x100
43
+ #define RAMEND 0x10FF /* Last On-Chip SRAM Location */
44
+ #define XRAMEND 0xFFFF
45
+ #define E2END 0x07FF
46
+ #define E2PAGESIZE 8
47
+ #define FLASHEND 0xFFFF
48
+
49
+
50
+ /* Fuses */
51
+
52
+ #define FUSE_MEMORY_SIZE 3
53
+
54
+ /* Low Fuse Byte */
55
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0)
56
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1)
57
+ #define FUSE_CKSEL2 (unsigned char)~_BV(2)
58
+ #define FUSE_CKSEL3 (unsigned char)~_BV(3)
59
+ #define FUSE_SUT0 (unsigned char)~_BV(4)
60
+ #define FUSE_SUT1 (unsigned char)~_BV(5)
61
+ #define FUSE_CKOUT (unsigned char)~_BV(6)
62
+ #define FUSE_CKDIV8 (unsigned char)~_BV(7)
63
+ #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
64
+
65
+ /* High Fuse Byte */
66
+ #define FUSE_BOOTRST (unsigned char)~_BV(0)
67
+ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
68
+ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
69
+ #define FUSE_EESAVE (unsigned char)~_BV(3)
70
+ #define FUSE_WDTON (unsigned char)~_BV(4)
71
+ #define FUSE_SPIEN (unsigned char)~_BV(5)
72
+ #define FUSE_JTAGEN (unsigned char)~_BV(6)
73
+ #define FUSE_OCDEN (unsigned char)~_BV(7)
74
+ #define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN & FUSE_JTAGEN)
75
+
76
+ /* Extended Fuse Byte */
77
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(1)
78
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(2)
79
+ #define FUSE_BODLEVEL2 (unsigned char)~_BV(3)
80
+ #define EFUSE_DEFAULT (0xFF)
81
+
82
+
83
+ /* Lock Bits */
84
+ #define __LOCK_BITS_EXIST
85
+ #define __BOOT_LOCK_BITS_0_EXIST
86
+ #define __BOOT_LOCK_BITS_1_EXIST
87
+
88
+
89
+ /* Signature */
90
+ #define SIGNATURE_0 0x1E
91
+ #define SIGNATURE_1 0x96
92
+ #define SIGNATURE_2 0x81
93
+
94
+ #define SLEEP_MODE_IDLE (0x00<<1)
95
+ #define SLEEP_MODE_ADC (0x01<<1)
96
+ #define SLEEP_MODE_PWR_DOWN (0x02<<1)
97
+ #define SLEEP_MODE_PWR_SAVE (0x03<<1)
98
+ #define SLEEP_MODE_STANDBY (0x06<<1)
99
+
100
+ #endif /* _AVR_IOCAN64_H_ */
@@ -0,0 +1,2020 @@
1
+ /* Copyright (c) 2004,2005,2006 Colin O'Flynn <coflynn@newae.com>
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: iocanxx.h 2225 2011-03-02 16:27:26Z arcanum $ */
32
+
33
+ /* This file is based largely on:
34
+ - iom128.h by Peter Jansen (bit defines)
35
+ - iom169.h by Juergen Schilling <juergen.schilling@honeywell.com>
36
+ (register addresses)
37
+ - AT90CAN128 Datasheet (bit defines and register addresses)
38
+ - Appnote on Mega128 --> AT90Can128 Conversion (for what registers I need
39
+ to change) */
40
+
41
+ /* iocanxx.h - definitions for AT90CAN32, AT90CAN64 and AT90CAN128 */
42
+
43
+ #ifndef _AVR_IOCANXX_H_
44
+ #define _AVR_IOCANXX_H_ 1
45
+
46
+ /* This file should only be included from <avr/io.h>, never directly. */
47
+
48
+ #ifndef _AVR_IO_H_
49
+ # error "Include <avr/io.h> instead of this file."
50
+ #endif
51
+
52
+ #ifndef _AVR_IOXXX_H_
53
+ # define _AVR_IOXXX_H_ "iocanxx.h"
54
+ #else
55
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
56
+ #endif
57
+
58
+ /* I/O registers and bit definitions. */
59
+
60
+ /* RegDef: Port A */
61
+ #define PINA _SFR_IO8(0x00)
62
+ #define DDRA _SFR_IO8(0x01)
63
+ #define PORTA _SFR_IO8(0x02)
64
+
65
+ /* RegDef: Port B */
66
+ #define PINB _SFR_IO8(0x03)
67
+ #define DDRB _SFR_IO8(0x04)
68
+ #define PORTB _SFR_IO8(0x05)
69
+
70
+ /* RegDef: Port C */
71
+ #define PINC _SFR_IO8(0x06)
72
+ #define DDRC _SFR_IO8(0x07)
73
+ #define PORTC _SFR_IO8(0x08)
74
+
75
+ /* RegDef: Port D */
76
+ #define PIND _SFR_IO8(0x09)
77
+ #define DDRD _SFR_IO8(0x0A)
78
+ #define PORTD _SFR_IO8(0x0B)
79
+
80
+ /* RegDef: Port E */
81
+ #define PINE _SFR_IO8(0x0C)
82
+ #define DDRE _SFR_IO8(0x0D)
83
+ #define PORTE _SFR_IO8(0x0E)
84
+
85
+ /* RegDef: Port F */
86
+ #define PINF _SFR_IO8(0x0F)
87
+ #define DDRF _SFR_IO8(0x10)
88
+ #define PORTF _SFR_IO8(0x11)
89
+
90
+ /* RegDef: Port G */
91
+ #define PING _SFR_IO8(0x12)
92
+ #define DDRG _SFR_IO8(0x13)
93
+ #define PORTG _SFR_IO8(0x14)
94
+
95
+ /* RegDef: Timer/Counter 0 interrupt Flag Register */
96
+ #define TIFR0 _SFR_IO8(0x15)
97
+
98
+ /* RegDef: Timer/Counter 1 interrupt Flag Register */
99
+ #define TIFR1 _SFR_IO8(0x16)
100
+
101
+ /* RegDef: Timer/Counter 2 interrupt Flag Register */
102
+ #define TIFR2 _SFR_IO8(0x17)
103
+
104
+ /* RegDef: Timer/Counter 3 interrupt Flag Register */
105
+ #define TIFR3 _SFR_IO8(0x18)
106
+
107
+ /* RegDef: External Interrupt Flag Register */
108
+ #define EIFR _SFR_IO8(0x1C)
109
+
110
+ /* RegDef: External Interrupt Mask Register */
111
+ #define EIMSK _SFR_IO8(0x1D)
112
+
113
+ /* RegDef: General Purpose I/O Register 0 */
114
+ #define GPIOR0 _SFR_IO8(0x1E)
115
+
116
+ /* RegDef: EEPROM Control Register */
117
+ #define EECR _SFR_IO8(0x1F)
118
+
119
+ /* RegDef: EEPROM Data Register */
120
+ #define EEDR _SFR_IO8(0x20)
121
+
122
+ /* RegDef: EEPROM Address Register */
123
+ #define EEAR _SFR_IO16(0x21)
124
+ #define EEARL _SFR_IO8(0x21)
125
+ #define EEARH _SFR_IO8(0x22)
126
+
127
+ /* 6-char sequence denoting where to find the EEPROM registers in memory space.
128
+ Adresses denoted in hex syntax with uppercase letters. Used by the EEPROM
129
+ subroutines.
130
+ First two letters: EECR address.
131
+ Second two letters: EEDR address.
132
+ Last two letters: EEAR address. */
133
+ #define __EEPROM_REG_LOCATIONS__ 1F2021
134
+
135
+ /* RegDef: General Timer/Counter Control Register */
136
+ #define GTCCR _SFR_IO8(0x23)
137
+
138
+ /* RegDef: Timer/Counter Control Register A */
139
+ #define TCCR0A _SFR_IO8(0x24)
140
+
141
+ /* RegDef: Timer/Counter Register */
142
+ #define TCNT0 _SFR_IO8(0x26)
143
+
144
+ /* RegDef: Output Compare Register A */
145
+ #define OCR0A _SFR_IO8(0x27)
146
+
147
+ /* RegDef: General Purpose I/O Register 1 */
148
+ #define GPIOR1 _SFR_IO8(0x2A)
149
+
150
+ /* RegDef: General Purpose I/O Register 2 */
151
+ #define GPIOR2 _SFR_IO8(0x2B)
152
+
153
+ /* RegDef: SPI Control Register */
154
+ #define SPCR _SFR_IO8(0x2C)
155
+
156
+ /* RegDef: SPI Status Register */
157
+ #define SPSR _SFR_IO8(0x2D)
158
+
159
+ /* RegDef: SPI Data Register */
160
+ #define SPDR _SFR_IO8(0x2E)
161
+
162
+ /* RegDef: Analog Comperator Control and Status Register */
163
+ #define ACSR _SFR_IO8(0x30)
164
+
165
+ /* RegDef: On-chip Debug Register */
166
+ #define OCDR _SFR_IO8(0x31)
167
+
168
+ /* RegDef: Sleep Mode Control Register */
169
+ #define SMCR _SFR_IO8(0x33)
170
+
171
+ /* RegDef: MCU Status Register */
172
+ #define MCUSR _SFR_IO8(0x34)
173
+
174
+ /* RegDef: MCU Control Rgeister */
175
+ #define MCUCR _SFR_IO8(0x35)
176
+
177
+ /* RegDef: Store Program Memory Control and Status Register */
178
+ #define SPMCSR _SFR_IO8(0x37)
179
+
180
+ /* RegDef: RAMPZ register. */
181
+ #define RAMPZ _SFR_IO8(0x3B)
182
+
183
+ /* RegDef: Watchdog Timer Control Register */
184
+ #define WDTCR _SFR_MEM8(0x60)
185
+
186
+ /* RegDef: Clock Prescale Register */
187
+ #define CLKPR _SFR_MEM8(0x61)
188
+
189
+ /* RegDef: Oscillator Calibration Register */
190
+ #define OSCCAL _SFR_MEM8(0x66)
191
+
192
+ /* RegDef: External Interrupt Control Register A */
193
+ #define EICRA _SFR_MEM8(0x69)
194
+
195
+ /* RegDef: External Interrupt Control Register B */
196
+ #define EICRB _SFR_MEM8(0x6A)
197
+
198
+ /* RegDef: Timer/Counter 0 Interrupt Mask Register */
199
+ #define TIMSK0 _SFR_MEM8(0x6E)
200
+
201
+ /* RegDef: Timer/Counter 1 Interrupt Mask Register */
202
+ #define TIMSK1 _SFR_MEM8(0x6F)
203
+
204
+ /* RegDef: Timer/Counter 2 Interrupt Mask Register */
205
+ #define TIMSK2 _SFR_MEM8(0x70)
206
+
207
+ /* RegDef: Timer/Counter 3 Interrupt Mask Register */
208
+ #define TIMSK3 _SFR_MEM8(0x71)
209
+
210
+ /* RegDef: External Memory Control Register A */
211
+ #define XMCRA _SFR_MEM8(0x74)
212
+
213
+ /* RegDef: External Memory Control Register A */
214
+ #define XMCRB _SFR_MEM8(0x75)
215
+
216
+ /* RegDef: ADC Data Register */
217
+ #ifndef __ASSEMBLER__
218
+ #define ADC _SFR_MEM16(0x78)
219
+ #endif
220
+ #define ADCW _SFR_MEM16(0x78)
221
+ #define ADCL _SFR_MEM8(0x78)
222
+ #define ADCH _SFR_MEM8(0x79)
223
+
224
+ /* RegDef: ADC Control and Status Register A */
225
+ #define ADCSRA _SFR_MEM8(0x7A)
226
+
227
+ /* RegDef: ADC Control and Status Register B */
228
+ #define ADCSRB _SFR_MEM8(0x7B)
229
+
230
+ /* RegDef: ADC Multiplex Selection Register */
231
+ #define ADMUX _SFR_MEM8(0x7C)
232
+
233
+ /* RegDef: Digital Input Disable Register 0 */
234
+ #define DIDR0 _SFR_MEM8(0x7E)
235
+
236
+ /* RegDef: Digital Input Disable Register 1 */
237
+ #define DIDR1 _SFR_MEM8(0x7F)
238
+
239
+ /* RegDef: Timer/Counter1 Control Register A */
240
+ #define TCCR1A _SFR_MEM8(0x80)
241
+
242
+ /* RegDef: Timer/Counter1 Control Register B */
243
+ #define TCCR1B _SFR_MEM8(0x81)
244
+
245
+ /* RegDef: Timer/Counter1 Control Register C */
246
+ #define TCCR1C _SFR_MEM8(0x82)
247
+
248
+ /* RegDef: Timer/Counter1 Register */
249
+ #define TCNT1 _SFR_MEM16(0x84)
250
+ #define TCNT1L _SFR_MEM8(0x84)
251
+ #define TCNT1H _SFR_MEM8(0x85)
252
+
253
+ /* RegDef: Timer/Counter1 Input Capture Register */
254
+ #define ICR1 _SFR_MEM16(0x86)
255
+ #define ICR1L _SFR_MEM8(0x86)
256
+ #define ICR1H _SFR_MEM8(0x87)
257
+
258
+ /* RegDef: Timer/Counter1 Output Compare Register A */
259
+ #define OCR1A _SFR_MEM16(0x88)
260
+ #define OCR1AL _SFR_MEM8(0x88)
261
+ #define OCR1AH _SFR_MEM8(0x89)
262
+
263
+ /* RegDef: Timer/Counter1 Output Compare Register B */
264
+ #define OCR1B _SFR_MEM16(0x8A)
265
+ #define OCR1BL _SFR_MEM8(0x8A)
266
+ #define OCR1BH _SFR_MEM8(0x8B)
267
+
268
+ /* RegDef: Timer/Counter1 Output Compare Register C */
269
+ #define OCR1C _SFR_MEM16(0x8C)
270
+ #define OCR1CL _SFR_MEM8(0x8C)
271
+ #define OCR1CH _SFR_MEM8(0x8D)
272
+
273
+ /* RegDef: Timer/Counter3 Control Register A */
274
+ #define TCCR3A _SFR_MEM8(0x90)
275
+
276
+ /* RegDef: Timer/Counter3 Control Register B */
277
+ #define TCCR3B _SFR_MEM8(0x91)
278
+
279
+ /* RegDef: Timer/Counter3 Control Register C */
280
+ #define TCCR3C _SFR_MEM8(0x92)
281
+
282
+ /* RegDef: Timer/Counter3 Register */
283
+ #define TCNT3 _SFR_MEM16(0x94)
284
+ #define TCNT3L _SFR_MEM8(0x94)
285
+ #define TCNT3H _SFR_MEM8(0x95)
286
+
287
+ /* RegDef: Timer/Counter3 Input Capture Register */
288
+ #define ICR3 _SFR_MEM16(0x96)
289
+ #define ICR3L _SFR_MEM8(0x96)
290
+ #define ICR3H _SFR_MEM8(0x97)
291
+
292
+ /* RegDef: Timer/Counter3 Output Compare Register A */
293
+ #define OCR3A _SFR_MEM16(0x98)
294
+ #define OCR3AL _SFR_MEM8(0x98)
295
+ #define OCR3AH _SFR_MEM8(0x99)
296
+
297
+ /* RegDef: Timer/Counter3 Output Compare Register B */
298
+ #define OCR3B _SFR_MEM16(0x9A)
299
+ #define OCR3BL _SFR_MEM8(0x9A)
300
+ #define OCR3BH _SFR_MEM8(0x9B)
301
+
302
+ /* RegDef: Timer/Counter3 Output Compare Register C */
303
+ #define OCR3C _SFR_MEM16(0x9C)
304
+ #define OCR3CL _SFR_MEM8(0x9C)
305
+ #define OCR3CH _SFR_MEM8(0x9D)
306
+
307
+ /* RegDef: Timer/Counter2 Control Register A */
308
+ #define TCCR2A _SFR_MEM8(0xB0)
309
+
310
+ /* RegDef: Timer/Counter2 Register */
311
+ #define TCNT2 _SFR_MEM8(0xB2)
312
+
313
+ /* RegDef: Timer/Counter2 Output Compare Register */
314
+ #define OCR2A _SFR_MEM8(0xB3)
315
+
316
+ /* RegDef: Asynchronous Status Register */
317
+ #define ASSR _SFR_MEM8(0xB6)
318
+
319
+ /* RegDef: TWI Bit Rate Register */
320
+ #define TWBR _SFR_MEM8(0xB8)
321
+
322
+ /* RegDef: TWI Status Register */
323
+ #define TWSR _SFR_MEM8(0xB9)
324
+
325
+ /* RegDef: TWI (Slave) Address Register */
326
+ #define TWAR _SFR_MEM8(0xBA)
327
+
328
+ /* RegDef: TWI Data Register */
329
+ #define TWDR _SFR_MEM8(0xBB)
330
+
331
+ /* RegDef: TWI Control Register */
332
+ #define TWCR _SFR_MEM8(0xBC)
333
+
334
+ /* RegDef: USART0 Control and Status Register A */
335
+ #define UCSR0A _SFR_MEM8(0xC0)
336
+
337
+ /* RegDef: USART0 Control and Status Register B */
338
+ #define UCSR0B _SFR_MEM8(0xC1)
339
+
340
+ /* RegDef: USART0 Control and Status Register C */
341
+ #define UCSR0C _SFR_MEM8(0xC2)
342
+
343
+ /* RegDef: USART0 Baud Rate Register */
344
+ #define UBRR0 _SFR_MEM16(0xC4)
345
+ #define UBRR0L _SFR_MEM8(0xC4)
346
+ #define UBRR0H _SFR_MEM8(0xC5)
347
+
348
+ /* RegDef: USART0 I/O Data Register */
349
+ #define UDR0 _SFR_MEM8(0xC6)
350
+
351
+ /* RegDef: USART1 Control and Status Register A */
352
+ #define UCSR1A _SFR_MEM8(0xC8)
353
+
354
+ /* RegDef: USART1 Control and Status Register B */
355
+ #define UCSR1B _SFR_MEM8(0xC9)
356
+
357
+ /* RegDef: USART1 Control and Status Register C */
358
+ #define UCSR1C _SFR_MEM8(0xCA)
359
+
360
+ /* RegDef: USART1 Baud Rate Register */
361
+ #define UBRR1 _SFR_MEM16(0xCC)
362
+ #define UBRR1L _SFR_MEM8(0xCC)
363
+ #define UBRR1H _SFR_MEM8(0xCD)
364
+
365
+ /* RegDef: USART1 I/O Data Register */
366
+ #define UDR1 _SFR_MEM8(0xCE)
367
+
368
+ /* RegDef: CAN General Control Register*/
369
+ #define CANGCON _SFR_MEM8(0xD8)
370
+
371
+ /* RegDef: CAN General Status Register*/
372
+ #define CANGSTA _SFR_MEM8(0xD9)
373
+
374
+ /* RegDef: CAN General Interrupt Register*/
375
+ #define CANGIT _SFR_MEM8(0xDA)
376
+
377
+ /* RegDef: CAN General Interrupt Enable Register*/
378
+ #define CANGIE _SFR_MEM8(0xDB)
379
+
380
+ /* Word Definition: CAN Enable MOb Register*/
381
+ #define CANEN _SFR_MEM16(0xDC)
382
+
383
+ /* RegDef: CAN Enable MOb Register*/
384
+ #define CANEN2 _SFR_MEM8(0xDC)
385
+
386
+ /* RegDef: CAN Enable MOb Register*/
387
+ #define CANEN1 _SFR_MEM8(0xDD)
388
+
389
+ /* Word Definition: CAN Enable Interrupt MOb Register*/
390
+ #define CANIE _SFR_MEM16(0xDE)
391
+
392
+ /* RegDef: CAN Enable Interrupt MOb Register*/
393
+ #define CANIE2 _SFR_MEM8(0xDE)
394
+
395
+ /* RegDef: CAN Enable Interrupt MOb Register*/
396
+ #define CANIE1 _SFR_MEM8(0xDF)
397
+
398
+ /* RegDef: CAN Status Interrupt MOb Register*/
399
+ /*
400
+ * WARNING: Do not apply the SIT8...SIT14 constants to bits in the CANSIT
401
+ * register.
402
+ */
403
+ #define CANSIT _SFR_MEM16(0xE0)
404
+ #define CANSIT2 _SFR_MEM8(0xE0)
405
+ #define CANSIT1 _SFR_MEM8(0xE1)
406
+
407
+ /* RegDef: CAN Bit Timing Register 1*/
408
+ #define CANBT1 _SFR_MEM8(0xE2)
409
+
410
+ /* RegDef: CAN Bit Timing Register 2*/
411
+ #define CANBT2 _SFR_MEM8(0xE3)
412
+
413
+ /* RegDef: CAN Bit Timing Register 3*/
414
+ #define CANBT3 _SFR_MEM8(0xE4)
415
+
416
+ /* RegDef: CAN Timer Control Register*/
417
+ #define CANTCON _SFR_MEM8(0xE5)
418
+
419
+ /* RegDef: CAN Timer Register*/
420
+ #define CANTIM _SFR_MEM16(0xE6)
421
+ #define CANTIML _SFR_MEM8(0xE6)
422
+ #define CANTIMH _SFR_MEM8(0xE7)
423
+
424
+ /* RegDef: CAN TTC Timer Register*/
425
+ #define CANTTC _SFR_MEM16(0xE8)
426
+ #define CANTTCL _SFR_MEM8(0xE8)
427
+ #define CANTTCH _SFR_MEM8(0xE9)
428
+
429
+ /* RegDef: CAN Transmitt Error Counter Register*/
430
+ #define CANTEC _SFR_MEM8(0xEA)
431
+
432
+ /* RegDef: CAN Receive Error Counter Register*/
433
+ #define CANREC _SFR_MEM8(0xEB)
434
+
435
+ /* RegDef: CAN Highest Priority MOb Register*/
436
+ #define CANHPMOB _SFR_MEM8(0xEC)
437
+
438
+ /* RegDef: CAN Page MOb Register*/
439
+ #define CANPAGE _SFR_MEM8(0xED)
440
+
441
+ /* RegDef: CAN MOb Status Register*/
442
+ #define CANSTMOB _SFR_MEM8(0xEE)
443
+
444
+ /* RegDef: CAN MOb Control and DLC Register*/
445
+ #define CANCDMOB _SFR_MEM8(0xEF)
446
+
447
+ /* RegDef: CAN Identifier Tag Registers*/
448
+ #define CANIDT _SFR_MEM32(0xF0)
449
+
450
+ #define CANIDT4 _SFR_MEM8(0xF0)
451
+ #define CANIDT3 _SFR_MEM8(0xF1)
452
+ #define CANIDT2 _SFR_MEM8(0xF2)
453
+ #define CANIDT1 _SFR_MEM8(0xF3)
454
+
455
+ /* RegDef: CAN Identifier Mask Registers */
456
+ #define CANIDM _SFR_MEM32(0xF4)
457
+
458
+ #define CANIDM4 _SFR_MEM8(0xF4)
459
+ #define CANIDM3 _SFR_MEM8(0xF5)
460
+ #define CANIDM2 _SFR_MEM8(0xF6)
461
+ #define CANIDM1 _SFR_MEM8(0xF7)
462
+
463
+ /* RegDef: CAN TTC Timer Register*/
464
+ #define CANSTM _SFR_MEM16(0xF8)
465
+ #define CANSTML _SFR_MEM8(0xF8)
466
+ #define CANSTMH _SFR_MEM8(0xF9)
467
+
468
+ /* RegDef: CAN Message Register*/
469
+ #define CANMSG _SFR_MEM8(0xFA)
470
+
471
+ /* Interrupt vectors */
472
+
473
+ /* External Interrupt Request 0 */
474
+ #define INT0_vect_num 1
475
+ #define INT0_vect _VECTOR(1)
476
+ #define SIG_INTERRUPT0 _VECTOR(1)
477
+
478
+ /* External Interrupt Request 1 */
479
+ #define INT1_vect_num 2
480
+ #define INT1_vect _VECTOR(2)
481
+ #define SIG_INTERRUPT1 _VECTOR(2)
482
+
483
+ /* External Interrupt Request 2 */
484
+ #define INT2_vect_num 3
485
+ #define INT2_vect _VECTOR(3)
486
+ #define SIG_INTERRUPT2 _VECTOR(3)
487
+
488
+ /* External Interrupt Request 3 */
489
+ #define INT3_vect_num 4
490
+ #define INT3_vect _VECTOR(4)
491
+ #define SIG_INTERRUPT3 _VECTOR(4)
492
+
493
+ /* External Interrupt Request 4 */
494
+ #define INT4_vect_num 5
495
+ #define INT4_vect _VECTOR(5)
496
+ #define SIG_INTERRUPT4 _VECTOR(5)
497
+
498
+ /* External Interrupt Request 5 */
499
+ #define INT5_vect_num 6
500
+ #define INT5_vect _VECTOR(6)
501
+ #define SIG_INTERRUPT5 _VECTOR(6)
502
+
503
+ /* External Interrupt Request 6 */
504
+ #define INT6_vect_num 7
505
+ #define INT6_vect _VECTOR(7)
506
+ #define SIG_INTERRUPT6 _VECTOR(7)
507
+
508
+ /* External Interrupt Request 7 */
509
+ #define INT7_vect_num 8
510
+ #define INT7_vect _VECTOR(8)
511
+ #define SIG_INTERRUPT7 _VECTOR(8)
512
+
513
+ /* Timer/Counter2 Compare Match */
514
+ #define TIMER2_COMP_vect_num 9
515
+ #define TIMER2_COMP_vect _VECTOR(9)
516
+ #define SIG_OUTPUT_COMPARE2 _VECTOR(9)
517
+
518
+ /* Timer/Counter2 Overflow */
519
+ #define TIMER2_OVF_vect_num 10
520
+ #define TIMER2_OVF_vect _VECTOR(10)
521
+ #define SIG_OVERFLOW2 _VECTOR(10)
522
+
523
+ /* Timer/Counter1 Capture Event */
524
+ #define TIMER1_CAPT_vect_num 11
525
+ #define TIMER1_CAPT_vect _VECTOR(11)
526
+ #define SIG_INPUT_CAPTURE1 _VECTOR(11)
527
+
528
+ /* Timer/Counter1 Compare Match A */
529
+ #define TIMER1_COMPA_vect_num 12
530
+ #define TIMER1_COMPA_vect _VECTOR(12)
531
+ #define SIG_OUTPUT_COMPARE1A _VECTOR(12)
532
+
533
+ /* Timer/Counter Compare Match B */
534
+ #define TIMER1_COMPB_vect_num 13
535
+ #define TIMER1_COMPB_vect _VECTOR(13)
536
+ #define SIG_OUTPUT_COMPARE1B _VECTOR(13)
537
+
538
+ /* Timer/Counter1 Compare Match C */
539
+ #define TIMER1_COMPC_vect_num 14
540
+ #define TIMER1_COMPC_vect _VECTOR(14)
541
+ #define SIG_OUTPUT_COMPARE1C _VECTOR(14)
542
+
543
+ /* Timer/Counter1 Overflow */
544
+ #define TIMER1_OVF_vect_num 15
545
+ #define TIMER1_OVF_vect _VECTOR(15)
546
+ #define SIG_OVERFLOW1 _VECTOR(15)
547
+
548
+ /* Timer/Counter0 Compare Match */
549
+ #define TIMER0_COMP_vect_num 16
550
+ #define TIMER0_COMP_vect _VECTOR(16)
551
+ #define SIG_OUTPUT_COMPARE0 _VECTOR(16)
552
+
553
+ /* Timer/Counter0 Overflow */
554
+ #define TIMER0_OVF_vect_num 17
555
+ #define TIMER0_OVF_vect _VECTOR(17)
556
+ #define SIG_OVERFLOW0 _VECTOR(17)
557
+
558
+ /* CAN Transfer Complete or Error */
559
+ #define CANIT_vect_num 18
560
+ #define CANIT_vect _VECTOR(18)
561
+ #define SIG_CAN_INTERRUPT1 _VECTOR(18)
562
+
563
+ /* CAN Timer Overrun */
564
+ #define OVRIT_vect_num 19
565
+ #define OVRIT_vect _VECTOR(19)
566
+ #define SIG_CAN_OVERFLOW1 _VECTOR(19)
567
+
568
+ /* SPI Serial Transfer Complete */
569
+ #define SPI_STC_vect_num 20
570
+ #define SPI_STC_vect _VECTOR(20)
571
+ #define SIG_SPI _VECTOR(20)
572
+
573
+ /* USART0, Rx Complete */
574
+ #define USART0_RX_vect_num 21
575
+ #define USART0_RX_vect _VECTOR(21)
576
+ #define SIG_UART0_RECV _VECTOR(21)
577
+ #define SIG_USART0_RECV _VECTOR(21)
578
+
579
+ /* USART0 Data Register Empty */
580
+ #define USART0_UDRE_vect_num 22
581
+ #define USART0_UDRE_vect _VECTOR(22)
582
+ #define SIG_UART0_DATA _VECTOR(22)
583
+ #define SIG_USART0_DATA _VECTOR(22)
584
+
585
+ /* USART0, Tx Complete */
586
+ #define USART0_TX_vect_num 23
587
+ #define USART0_TX_vect _VECTOR(23)
588
+ #define SIG_UART0_TRANS _VECTOR(23)
589
+ #define SIG_USART0_TRANS _VECTOR(23)
590
+
591
+ /* Analog Comparator */
592
+ #define ANALOG_COMP_vect_num 24
593
+ #define ANALOG_COMP_vect _VECTOR(24)
594
+ #define SIG_COMPARATOR _VECTOR(24)
595
+
596
+ /* ADC Conversion Complete */
597
+ #define ADC_vect_num 25
598
+ #define ADC_vect _VECTOR(25)
599
+ #define SIG_ADC _VECTOR(25)
600
+
601
+ /* EEPROM Ready */
602
+ #define EE_READY_vect_num 26
603
+ #define EE_READY_vect _VECTOR(26)
604
+ #define SIG_EEPROM_READY _VECTOR(26)
605
+
606
+ /* Timer/Counter3 Capture Event */
607
+ #define TIMER3_CAPT_vect_num 27
608
+ #define TIMER3_CAPT_vect _VECTOR(27)
609
+ #define SIG_INPUT_CAPTURE3 _VECTOR(27)
610
+
611
+ /* Timer/Counter3 Compare Match A */
612
+ #define TIMER3_COMPA_vect_num 28
613
+ #define TIMER3_COMPA_vect _VECTOR(28)
614
+ #define SIG_OUTPUT_COMPARE3A _VECTOR(28)
615
+
616
+ /* Timer/Counter3 Compare Match B */
617
+ #define TIMER3_COMPB_vect_num 29
618
+ #define TIMER3_COMPB_vect _VECTOR(29)
619
+ #define SIG_OUTPUT_COMPARE3B _VECTOR(29)
620
+
621
+ /* Timer/Counter3 Compare Match C */
622
+ #define TIMER3_COMPC_vect_num 30
623
+ #define TIMER3_COMPC_vect _VECTOR(30)
624
+ #define SIG_OUTPUT_COMPARE3C _VECTOR(30)
625
+
626
+ /* Timer/Counter3 Overflow */
627
+ #define TIMER3_OVF_vect_num 31
628
+ #define TIMER3_OVF_vect _VECTOR(31)
629
+ #define SIG_OVERFLOW3 _VECTOR(31)
630
+
631
+ /* USART1, Rx Complete */
632
+ #define USART1_RX_vect_num 32
633
+ #define USART1_RX_vect _VECTOR(32)
634
+ #define SIG_UART1_RECV _VECTOR(32)
635
+ #define SIG_USART1_RECV _VECTOR(32)
636
+
637
+ /* USART1, Data Register Empty */
638
+ #define USART1_UDRE_vect_num 33
639
+ #define USART1_UDRE_vect _VECTOR(33)
640
+ #define SIG_UART1_DATA _VECTOR(33)
641
+ #define SIG_USART1_DATA _VECTOR(33)
642
+
643
+ /* USART1, Tx Complete */
644
+ #define USART1_TX_vect_num 34
645
+ #define USART1_TX_vect _VECTOR(34)
646
+ #define SIG_UART1_TRANS _VECTOR(34)
647
+ #define SIG_USART1_TRANS _VECTOR(34)
648
+
649
+ /* 2-wire Serial Interface */
650
+ #define TWI_vect_num 35
651
+ #define TWI_vect _VECTOR(35)
652
+ #define SIG_2WIRE_SERIAL _VECTOR(35)
653
+
654
+ /* Store Program Memory Read */
655
+ #define SPM_READY_vect_num 36
656
+ #define SPM_READY_vect _VECTOR(36)
657
+ #define SIG_SPM_READY _VECTOR(36)
658
+
659
+ #define _VECTORS_SIZE 148
660
+
661
+ /* The Register Bit names are represented by their bit number (0-7). */
662
+
663
+ /* Register Bits [ASSR] */
664
+ /* Asynchronous Status Register */
665
+ #define EXCLK 4
666
+ #define AS2 3
667
+ #define TCN2UB 2
668
+ #define OCR2UB 1
669
+ #define TCR2UB 0
670
+ /* End Register Bits */
671
+
672
+ /* Register Bits [TWCR] */
673
+ /* 2-wire Control Register - TWCR */
674
+ #define TWINT 7
675
+ #define TWEA 6
676
+ #define TWSTA 5
677
+ #define TWSTO 4
678
+ #define TWWC 3
679
+ #define TWEN 2
680
+ #define TWIE 0
681
+ /* End Register Bits */
682
+
683
+ /* Register Bits [TWAR] */
684
+ /* 2-wire Address Register - TWAR */
685
+ #define TWA6 7
686
+ #define TWA5 6
687
+ #define TWA4 5
688
+ #define TWA3 4
689
+ #define TWA2 3
690
+ #define TWA1 2
691
+ #define TWA0 1
692
+ #define TWGCE 0
693
+ /* End Register Bits */
694
+
695
+ /* Register Bits [TWSR] */
696
+ /* 2-wire Status Register - TWSR */
697
+ #define TWS7 7
698
+ #define TWS6 6
699
+ #define TWS5 5
700
+ #define TWS4 4
701
+ #define TWS3 3
702
+ #define TWPS1 1
703
+ #define TWPS0 0
704
+ /* End Register Bits */
705
+
706
+ /* Register Bits [XMCRB] */
707
+ /* External Memory Control Register B - XMCRB */
708
+ #define XMBK 7
709
+ #define XMM2 2
710
+ #define XMM1 1
711
+ #define XMM0 0
712
+ /* End Register Bits */
713
+
714
+ /* Register Bits [XMCRA] */
715
+ /* External Memory Control Register A - XMCRA */
716
+ #define SRE 7
717
+ #define SRL2 6
718
+ #define SRL1 5
719
+ #define SRL0 4
720
+ #define SRW11 3
721
+ #define SRW10 2
722
+ #define SRW01 1
723
+ #define SRW00 0
724
+ /* End Register Bits */
725
+
726
+ /* Register Bits [RAMPZ] */
727
+ /* RAM Page Z select register - RAMPZ */
728
+ #define RAMPZ0 0
729
+ /* End Register Bits */
730
+
731
+ /* Register Bits [EICRA] */
732
+ /* External Interrupt Control Register A - EICRA */
733
+ #define ISC31 7
734
+ #define ISC30 6
735
+ #define ISC21 5
736
+ #define ISC20 4
737
+ #define ISC11 3
738
+ #define ISC10 2
739
+ #define ISC01 1
740
+ #define ISC00 0
741
+ /* End Register Bits */
742
+
743
+ /* Register Bits [EICRB] */
744
+ /* External Interrupt Control Register B - EICRB */
745
+ #define ISC71 7
746
+ #define ISC70 6
747
+ #define ISC61 5
748
+ #define ISC60 4
749
+ #define ISC51 3
750
+ #define ISC50 2
751
+ #define ISC41 1
752
+ #define ISC40 0
753
+ /* End Register Bits */
754
+
755
+ /* Register Bits [SPMCSR] */
756
+ /* Store Program Memory Control Register - SPMCSR, SPMCR */
757
+ #define SPMIE 7
758
+ #define RWWSB 6
759
+ #define RWWSRE 4
760
+ #define BLBSET 3
761
+ #define PGWRT 2
762
+ #define PGERS 1
763
+ #define SPMEN 0
764
+ /* End Register Bits */
765
+
766
+ /* Register Bits [EIMSK] */
767
+ /* External Interrupt MaSK register - EIMSK */
768
+ #define INT7 7
769
+ #define INT6 6
770
+ #define INT5 5
771
+ #define INT4 4
772
+ #define INT3 3
773
+ #define INT2 2
774
+ #define INT1 1
775
+ #define INT0 0
776
+ /* End Register Bits */
777
+
778
+ /* Register Bits [EIFR] */
779
+ /* External Interrupt Flag Register - EIFR */
780
+ #define INTF7 7
781
+ #define INTF6 6
782
+ #define INTF5 5
783
+ #define INTF4 4
784
+ #define INTF3 3
785
+ #define INTF2 2
786
+ #define INTF1 1
787
+ #define INTF0 0
788
+ /* End Register Bits */
789
+
790
+ /* Register Bits [TCCR2] */
791
+ /* Timer/Counter 2 Control Register - TCCR2 */
792
+ #define FOC2A 7
793
+ #define WGM20 6
794
+ #define COM2A1 5
795
+ #define COM2A0 4
796
+ #define WGM21 3
797
+ #define CS22 2
798
+ #define CS21 1
799
+ #define CS20 0
800
+ /* End Register Bits */
801
+
802
+ /* Register Bits [TCCR1A] */
803
+ /* Timer/Counter 1 Control and Status Register A - TCCR1A */
804
+ #define COM1A1 7
805
+ #define COM1A0 6
806
+ #define COM1B1 5
807
+ #define COM1B0 4
808
+ #define COM1C1 3
809
+ #define COM1C0 2
810
+ #define WGM11 1
811
+ #define WGM10 0
812
+ /* End Register Bits */
813
+
814
+ /* Register Bits [TCCR3A] */
815
+ /* Timer/Counter 3 Control and Status Register A - TCCR3A */
816
+ #define COM3A1 7
817
+ #define COM3A0 6
818
+ #define COM3B1 5
819
+ #define COM3B0 4
820
+ #define COM3C1 3
821
+ #define COM3C0 2
822
+ #define WGM31 1
823
+ #define WGM30 0
824
+ /* End Register Bits */
825
+
826
+ /* Register Bits [TCCR1B] */
827
+ /* Timer/Counter 1 Control and Status Register B - TCCR1B */
828
+ #define ICNC1 7
829
+ #define ICES1 6
830
+ #define WGM13 4
831
+ #define WGM12 3
832
+ #define CS12 2
833
+ #define CS11 1
834
+ #define CS10 0
835
+ /* End Register Bits */
836
+
837
+ /* Register Bits [TCCR3B] */
838
+ /* Timer/Counter 3 Control and Status Register B - TCCR3B */
839
+ #define ICNC3 7
840
+ #define ICES3 6
841
+ #define WGM33 4
842
+ #define WGM32 3
843
+ #define CS32 2
844
+ #define CS31 1
845
+ #define CS30 0
846
+ /* End Register Bits */
847
+
848
+ /* Register Bits [TCCR3C] */
849
+ /* Timer/Counter 3 Control Register C - TCCR3C */
850
+ #define FOC3A 7
851
+ #define FOC3B 6
852
+ #define FOC3C 5
853
+ /* End Register Bits */
854
+
855
+ /* Register Bits [TCCR1C] */
856
+ /* Timer/Counter 1 Control Register C - TCCR1C */
857
+ #define FOC1A 7
858
+ #define FOC1B 6
859
+ #define FOC1C 5
860
+ /* End Register Bits */
861
+
862
+ /* Register Bits [OCDR] */
863
+ /* On-chip Debug Register - OCDR */
864
+ #define IDRD 7
865
+ #define OCDR7 7
866
+ #define OCDR6 6
867
+ #define OCDR5 5
868
+ #define OCDR4 4
869
+ #define OCDR3 3
870
+ #define OCDR2 2
871
+ #define OCDR1 1
872
+ #define OCDR0 0
873
+ /* End Register Bits */
874
+
875
+ /* Register Bits [WDTCR] */
876
+ /* Watchdog Timer Control Register - WDTCR */
877
+ #define WDCE 4
878
+ #define WDE 3
879
+ #define WDP2 2
880
+ #define WDP1 1
881
+ #define WDP0 0
882
+ /* End Register Bits */
883
+
884
+ /* Register Bits [SPSR] */
885
+ /* SPI Status Register - SPSR */
886
+ #define SPIF 7
887
+ #define WCOL 6
888
+ #define SPI2X 0
889
+ /* End Register Bits */
890
+
891
+ /* Register Bits [SPCR] */
892
+ /* SPI Control Register - SPCR */
893
+ #define SPIE 7
894
+ #define SPE 6
895
+ #define DORD 5
896
+ #define MSTR 4
897
+ #define CPOL 3
898
+ #define CPHA 2
899
+ #define SPR1 1
900
+ #define SPR0 0
901
+ /* End Register Bits */
902
+
903
+ /* Register Bits [UCSR1C] */
904
+ /* USART1 Register C - UCSR1C */
905
+ #define UMSEL1 6
906
+ #define UPM11 5
907
+ #define UPM10 4
908
+ #define USBS1 3
909
+ #define UCSZ11 2
910
+ #define UCSZ10 1
911
+ #define UCPOL1 0
912
+ /* End Register Bits */
913
+
914
+ /* Register Bits [UCSR0C] */
915
+ /* USART0 Register C - UCSR0C */
916
+ #define UMSEL0 6
917
+ #define UPM01 5
918
+ #define UPM00 4
919
+ #define USBS0 3
920
+ #define UCSZ01 2
921
+ #define UCSZ00 1
922
+ #define UCPOL0 0
923
+ /* End Register Bits */
924
+
925
+ /* Register Bits [UCSR1A] */
926
+ /* USART1 Status Register A - UCSR1A */
927
+ #define RXC1 7
928
+ #define TXC1 6
929
+ #define UDRE1 5
930
+ #define FE1 4
931
+ #define DOR1 3
932
+ #define UPE1 2
933
+ #define U2X1 1
934
+ #define MPCM1 0
935
+ /* End Register Bits */
936
+
937
+ /* Register Bits [UCSR0A] */
938
+ /* USART0 Status Register A - UCSR0A */
939
+ #define RXC0 7
940
+ #define TXC0 6
941
+ #define UDRE0 5
942
+ #define FE0 4
943
+ #define DOR0 3
944
+ #define UPE0 2
945
+ #define U2X0 1
946
+ #define MPCM0 0
947
+ /* End Register Bits */
948
+
949
+ /* Register Bits [UCSR1B] */
950
+ /* USART1 Control Register B - UCSR1B */
951
+ #define RXCIE1 7
952
+ #define TXCIE1 6
953
+ #define UDRIE1 5
954
+ #define RXEN1 4
955
+ #define TXEN1 3
956
+ #define UCSZ12 2
957
+ #define RXB81 1
958
+ #define TXB81 0
959
+ /* End Register Bits */
960
+
961
+ /* Register Bits [UCSR0B] */
962
+ /* USART0 Control Register B - UCSR0B */
963
+ #define RXCIE0 7
964
+ #define TXCIE0 6
965
+ #define UDRIE0 5
966
+ #define RXEN0 4
967
+ #define TXEN0 3
968
+ #define UCSZ02 2
969
+ #define RXB80 1
970
+ #define TXB80 0
971
+ /* End Register Bits */
972
+
973
+ /* Register Bits [ACSR] */
974
+ /* Analog Comparator Control and Status Register - ACSR */
975
+ #define ACD 7
976
+ #define ACBG 6
977
+ #define ACO 5
978
+ #define ACI 4
979
+ #define ACIE 3
980
+ #define ACIC 2
981
+ #define ACIS1 1
982
+ #define ACIS0 0
983
+ /* End Register Bits */
984
+
985
+ /* Register Bits [ADCSRA] */
986
+ /* ADC Control and status register - ADCSRA */
987
+ #define ADEN 7
988
+ #define ADSC 6
989
+ #define ADATE 5
990
+ #define ADIF 4
991
+ #define ADIE 3
992
+ #define ADPS2 2
993
+ #define ADPS1 1
994
+ #define ADPS0 0
995
+ /* End Register Bits */
996
+
997
+ /*
998
+ The ADHSM bit has been removed from all documentation,
999
+ as being not needed at all since the comparator has proven
1000
+ to be fast enough even without feeding it more power.
1001
+ */
1002
+
1003
+ /* Register Bits [ADCSRB] */
1004
+ /* ADC Control and status register - ADCSRB */
1005
+ #define ACME 6
1006
+ #define ADTS2 2
1007
+ #define ADTS1 1
1008
+ #define ADTS0 0
1009
+ /* End Register Bits */
1010
+
1011
+ /* Register Bits [ADMUX] */
1012
+ /* ADC Multiplexer select - ADMUX */
1013
+ #define REFS1 7
1014
+ #define REFS0 6
1015
+ #define ADLAR 5
1016
+ #define MUX4 4
1017
+ #define MUX3 3
1018
+ #define MUX2 2
1019
+ #define MUX1 1
1020
+ #define MUX0 0
1021
+ /* End Register Bits */
1022
+
1023
+ /* Register Bits [DIDR0] */
1024
+ /* Digital Input Disable Register 0 */
1025
+ #define ADC7D 7
1026
+ #define ADC6D 6
1027
+ #define ADC5D 5
1028
+ #define ADC4D 4
1029
+ #define ADC3D 3
1030
+ #define ADC2D 2
1031
+ #define ADC1D 1
1032
+ #define ADC0D 0
1033
+ /* End Register Bits */
1034
+
1035
+ /* Register Bits [DIDR1] */
1036
+ /* Digital Input Disable Register 1 */
1037
+ #define AIN1D 1
1038
+ #define AIN0D 0
1039
+ /* End Register Bits */
1040
+
1041
+ /* Register Bits [PORTA] */
1042
+ /* Port A Data Register - PORTA */
1043
+ #define PA7 7
1044
+ #define PA6 6
1045
+ #define PA5 5
1046
+ #define PA4 4
1047
+ #define PA3 3
1048
+ #define PA2 2
1049
+ #define PA1 1
1050
+ #define PA0 0
1051
+ /* End Register Bits */
1052
+
1053
+ /* Register Bits [DDRA] */
1054
+ /* Port A Data Direction Register - DDRA */
1055
+ #define DDA7 7
1056
+ #define DDA6 6
1057
+ #define DDA5 5
1058
+ #define DDA4 4
1059
+ #define DDA3 3
1060
+ #define DDA2 2
1061
+ #define DDA1 1
1062
+ #define DDA0 0
1063
+ /* End Register Bits */
1064
+
1065
+ /* Register Bits [PINA] */
1066
+ /* Port A Input Pins - PINA */
1067
+ #define PINA7 7
1068
+ #define PINA6 6
1069
+ #define PINA5 5
1070
+ #define PINA4 4
1071
+ #define PINA3 3
1072
+ #define PINA2 2
1073
+ #define PINA1 1
1074
+ #define PINA0 0
1075
+ /* End Register Bits */
1076
+
1077
+ /* Register Bits [PORTB] */
1078
+ /* Port B Data Register - PORTB */
1079
+ #define PB7 7
1080
+ #define PB6 6
1081
+ #define PB5 5
1082
+ #define PB4 4
1083
+ #define PB3 3
1084
+ #define PB2 2
1085
+ #define PB1 1
1086
+ #define PB0 0
1087
+ /* End Register Bits */
1088
+
1089
+ /* Register Bits [DDRB] */
1090
+ /* Port B Data Direction Register - DDRB */
1091
+ #define DDB7 7
1092
+ #define DDB6 6
1093
+ #define DDB5 5
1094
+ #define DDB4 4
1095
+ #define DDB3 3
1096
+ #define DDB2 2
1097
+ #define DDB1 1
1098
+ #define DDB0 0
1099
+ /* End Register Bits */
1100
+
1101
+ /* Register Bits [PINB] */
1102
+ /* Port B Input Pins - PINB */
1103
+ #define PINB7 7
1104
+ #define PINB6 6
1105
+ #define PINB5 5
1106
+ #define PINB4 4
1107
+ #define PINB3 3
1108
+ #define PINB2 2
1109
+ #define PINB1 1
1110
+ #define PINB0 0
1111
+ /* End Register Bits */
1112
+
1113
+ /* Register Bits [PORTC] */
1114
+ /* Port C Data Register - PORTC */
1115
+ #define PC7 7
1116
+ #define PC6 6
1117
+ #define PC5 5
1118
+ #define PC4 4
1119
+ #define PC3 3
1120
+ #define PC2 2
1121
+ #define PC1 1
1122
+ #define PC0 0
1123
+ /* End Register Bits */
1124
+
1125
+ /* Register Bits [DDRC] */
1126
+ /* Port C Data Direction Register - DDRC */
1127
+ #define DDC7 7
1128
+ #define DDC6 6
1129
+ #define DDC5 5
1130
+ #define DDC4 4
1131
+ #define DDC3 3
1132
+ #define DDC2 2
1133
+ #define DDC1 1
1134
+ #define DDC0 0
1135
+ /* End Register Bits */
1136
+
1137
+ /* Register Bits [PINC] */
1138
+ /* Port C Input Pins - PINC */
1139
+ #define PINC7 7
1140
+ #define PINC6 6
1141
+ #define PINC5 5
1142
+ #define PINC4 4
1143
+ #define PINC3 3
1144
+ #define PINC2 2
1145
+ #define PINC1 1
1146
+ #define PINC0 0
1147
+ /* End Register Bits */
1148
+
1149
+ /* Register Bits [PORTD] */
1150
+ /* Port D Data Register - PORTD */
1151
+ #define PD7 7
1152
+ #define PD6 6
1153
+ #define PD5 5
1154
+ #define PD4 4
1155
+ #define PD3 3
1156
+ #define PD2 2
1157
+ #define PD1 1
1158
+ #define PD0 0
1159
+ /* End Register Bits */
1160
+
1161
+ /* Register Bits [DDRD] */
1162
+ /* Port D Data Direction Register - DDRD */
1163
+ #define DDD7 7
1164
+ #define DDD6 6
1165
+ #define DDD5 5
1166
+ #define DDD4 4
1167
+ #define DDD3 3
1168
+ #define DDD2 2
1169
+ #define DDD1 1
1170
+ #define DDD0 0
1171
+ /* End Register Bits */
1172
+
1173
+ /* Register Bits [PIND] */
1174
+ /* Port D Input Pins - PIND */
1175
+ #define PIND7 7
1176
+ #define PIND6 6
1177
+ #define PIND5 5
1178
+ #define PIND4 4
1179
+ #define PIND3 3
1180
+ #define PIND2 2
1181
+ #define PIND1 1
1182
+ #define PIND0 0
1183
+ /* End Register Bits */
1184
+
1185
+ /* Register Bits [PORTE] */
1186
+ /* Port E Data Register - PORTE */
1187
+ #define PE7 7
1188
+ #define PE6 6
1189
+ #define PE5 5
1190
+ #define PE4 4
1191
+ #define PE3 3
1192
+ #define PE2 2
1193
+ #define PE1 1
1194
+ #define PE0 0
1195
+ /* End Register Bits */
1196
+
1197
+ /* Register Bits [DDRE] */
1198
+ /* Port E Data Direction Register - DDRE */
1199
+ #define DDE7 7
1200
+ #define DDE6 6
1201
+ #define DDE5 5
1202
+ #define DDE4 4
1203
+ #define DDE3 3
1204
+ #define DDE2 2
1205
+ #define DDE1 1
1206
+ #define DDE0 0
1207
+ /* End Register Bits */
1208
+
1209
+ /* Register Bits [PINE] */
1210
+ /* Port E Input Pins - PINE */
1211
+ #define PINE7 7
1212
+ #define PINE6 6
1213
+ #define PINE5 5
1214
+ #define PINE4 4
1215
+ #define PINE3 3
1216
+ #define PINE2 2
1217
+ #define PINE1 1
1218
+ #define PINE0 0
1219
+ /* End Register Bits */
1220
+
1221
+ /* Register Bits [PORTF] */
1222
+ /* Port F Data Register - PORTF */
1223
+ #define PF7 7
1224
+ #define PF6 6
1225
+ #define PF5 5
1226
+ #define PF4 4
1227
+ #define PF3 3
1228
+ #define PF2 2
1229
+ #define PF1 1
1230
+ #define PF0 0
1231
+ /* End Register Bits */
1232
+
1233
+ /* Register Bits [DDRF] */
1234
+ /* Port F Data Direction Register - DDRF */
1235
+ #define DDF7 7
1236
+ #define DDF6 6
1237
+ #define DDF5 5
1238
+ #define DDF4 4
1239
+ #define DDF3 3
1240
+ #define DDF2 2
1241
+ #define DDF1 1
1242
+ #define DDF0 0
1243
+ /* End Register Bits */
1244
+
1245
+ /* Register Bits [PINF] */
1246
+ /* Port F Input Pins - PINF */
1247
+ #define PINF7 7
1248
+ #define PINF6 6
1249
+ #define PINF5 5
1250
+ #define PINF4 4
1251
+ #define PINF3 3
1252
+ #define PINF2 2
1253
+ #define PINF1 1
1254
+ #define PINF0 0
1255
+ /* End Register Bits */
1256
+
1257
+ /* Register Bits [PORTG] */
1258
+ /* Port G Data Register - PORTG */
1259
+ #define PG4 4
1260
+ #define PG3 3
1261
+ #define PG2 2
1262
+ #define PG1 1
1263
+ #define PG0 0
1264
+ /* End Register Bits */
1265
+
1266
+ /* Register Bits [DDRG] */
1267
+ /* Port G Data Direction Register - DDRG */
1268
+ #define DDG4 4
1269
+ #define DDG3 3
1270
+ #define DDG2 2
1271
+ #define DDG1 1
1272
+ #define DDG0 0
1273
+ /* End Register Bits */
1274
+
1275
+ /* Register Bits [PING] */
1276
+ /* Port G Input Pins - PING */
1277
+ #define PING4 4
1278
+ #define PING3 3
1279
+ #define PING2 2
1280
+ #define PING1 1
1281
+ #define PING0 0
1282
+ /* End Register Bits */
1283
+
1284
+
1285
+ /* Register Bits [TIFR0] */
1286
+ /* Timer/Counter 0 interrupt Flag Register */
1287
+ #define OCF0A 1
1288
+ #define TOV0 0
1289
+ /* End Register Bits */
1290
+
1291
+ /* Register Bits [TIFR1] */
1292
+ /* Timer/Counter 1 interrupt Flag Register */
1293
+ #define ICF1 5
1294
+ #define OCF1C 3
1295
+ #define OCF1B 2
1296
+ #define OCF1A 1
1297
+ #define TOV1 0
1298
+ /* End Register Bits */
1299
+
1300
+ /* Register Bits [TIFR2] */
1301
+ /* Timer/Counter 2 interrupt Flag Register */
1302
+ #define OCF2A 1
1303
+ #define TOV2 0
1304
+ /* End Register Bits */
1305
+
1306
+ /* Register Bits [TIFR3] */
1307
+ /* Timer/Counter 3 interrupt Flag Register */
1308
+ #define ICF3 5
1309
+ #define OCF3C 3
1310
+ #define OCF3B 2
1311
+ #define OCF3A 1
1312
+ #define TOV3 0
1313
+ /* End Register Bits */
1314
+
1315
+ /* Register Bits [GPIOR0] */
1316
+ /* General Purpose I/O Register 0 */
1317
+ #define GPIOR07 7
1318
+ #define GPIOR06 6
1319
+ #define GPIOR05 5
1320
+ #define GPIOR04 4
1321
+ #define GPIOR03 3
1322
+ #define GPIOR02 2
1323
+ #define GPIOR01 1
1324
+ #define GPIOR00 0
1325
+ /* End Register Bits */
1326
+
1327
+ /* Register Bits [GPIOR1] */
1328
+ /* General Purpose I/O Register 1 */
1329
+ #define GPIOR17 7
1330
+ #define GPIOR16 6
1331
+ #define GPIOR15 5
1332
+ #define GPIOR14 4
1333
+ #define GPIOR13 3
1334
+ #define GPIOR12 2
1335
+ #define GPIOR11 1
1336
+ #define GPIOR10 0
1337
+ /* End Register Bits */
1338
+
1339
+ /* Register Bits [GPIOR2] */
1340
+ /* General Purpose I/O Register 2 */
1341
+ #define GPIOR27 7
1342
+ #define GPIOR26 6
1343
+ #define GPIOR25 5
1344
+ #define GPIOR24 4
1345
+ #define GPIOR23 3
1346
+ #define GPIOR22 2
1347
+ #define GPIOR21 1
1348
+ #define GPIOR20 0
1349
+ /* End Register Bits */
1350
+
1351
+ /* Register Bits [EECR] */
1352
+ /* EEPROM Control Register */
1353
+ #define EERIE 3
1354
+ #define EEMWE 2
1355
+ #define EEWE 1
1356
+ #define EERE 0
1357
+ /* End Register Bits */
1358
+
1359
+ /* Register Bits [EEDR] */
1360
+ /* EEPROM Data Register */
1361
+ #define EEDR7 7
1362
+ #define EEDR6 6
1363
+ #define EEDR5 5
1364
+ #define EEDR4 4
1365
+ #define EEDR3 3
1366
+ #define EEDR2 2
1367
+ #define EEDR1 1
1368
+ #define EEDR0 0
1369
+ /* End Register Bits */
1370
+
1371
+ /* Register Bits [EEARL] */
1372
+ /* EEPROM Address Register */
1373
+ #define EEAR7 7
1374
+ #define EEAR6 6
1375
+ #define EEAR5 5
1376
+ #define EEAR4 4
1377
+ #define EEAR3 3
1378
+ #define EEAR2 2
1379
+ #define EEAR1 1
1380
+ #define EEAR0 0
1381
+ /* End Register Bits */
1382
+
1383
+ /* Register Bits [EEARH] */
1384
+ /* EEPROM Address Register */
1385
+ #define EEAR11 3
1386
+ #define EEAR10 2
1387
+ #define EEAR9 1
1388
+ #define EEAR8 0
1389
+ /* End Register Bits */
1390
+
1391
+ /* Register Bits [GTCCR] */
1392
+ /* General Timer/Counter Control Register */
1393
+ #define TSM 7
1394
+ #define PSR2 1
1395
+ #define PSR310 0
1396
+ /* End Register Bits */
1397
+
1398
+ /* Register Bits [TCCR0A] */
1399
+ /* Timer/Counter Control Register A */
1400
+ /* ALSO COVERED IN GENERIC SECTION */
1401
+ #define FOC0A 7
1402
+ #define WGM00 6
1403
+ #define COM0A1 5
1404
+ #define COM0A0 4
1405
+ #define WGM01 3
1406
+ #define CS02 2
1407
+ #define CS01 1
1408
+ #define CS00 0
1409
+ /* End Register Bits */
1410
+
1411
+ /* Register Bits [OCR0A] */
1412
+ /* Output Compare Register A */
1413
+ #define OCR0A7 7
1414
+ #define OCR0A6 6
1415
+ #define OCR0A5 5
1416
+ #define OCR0A4 4
1417
+ #define OCR0A3 3
1418
+ #define OCR0A2 2
1419
+ #define OCR0A1 1
1420
+ #define OCR0A0 0
1421
+ /* End Register Bits */
1422
+
1423
+
1424
+ /* Register Bits [SPIDR] */
1425
+ /* SPI Data Register */
1426
+ #define SPD7 7
1427
+ #define SPD6 6
1428
+ #define SPD5 5
1429
+ #define SPD4 4
1430
+ #define SPD3 3
1431
+ #define SPD2 2
1432
+ #define SPD1 1
1433
+ #define SPD0 0
1434
+ /* End Register Bits */
1435
+
1436
+ /* Register Bits [SMCR] */
1437
+ /* Sleep Mode Control Register */
1438
+ #define SM2 3
1439
+ #define SM1 2
1440
+ #define SM0 1
1441
+ #define SE 0
1442
+ /* End Register Bits */
1443
+
1444
+ /* Register Bits [MCUSR] */
1445
+ /* MCU Status Register */
1446
+ #define JTRF 4
1447
+ #define WDRF 3
1448
+ #define BORF 2
1449
+ #define EXTRF 1
1450
+ #define PORF 0
1451
+ /* End Register Bits */
1452
+
1453
+ /* Register Bits [MCUCR] */
1454
+ /* MCU Control Register */
1455
+ #define JTD 7
1456
+ #define PUD 4
1457
+ #define IVSEL 1
1458
+ #define IVCE 0
1459
+ /* End Register Bits */
1460
+
1461
+ /* Register Bits [CLKPR] */
1462
+ /* Clock Prescale Register */
1463
+ #define CLKPCE 7
1464
+ #define CLKPS3 3
1465
+ #define CLKPS2 2
1466
+ #define CLKPS1 1
1467
+ #define CLKPS0 0
1468
+ /* End Register Bits */
1469
+
1470
+ /* Register Bits [OSCCAL] */
1471
+ /* Oscillator Calibration Register */
1472
+ #define CAL6 6
1473
+ #define CAL5 5
1474
+ #define CAL4 4
1475
+ #define CAL3 3
1476
+ #define CAL2 2
1477
+ #define CAL1 1
1478
+ #define CAL0 0
1479
+ /* End Register Bits */
1480
+
1481
+ /* Register Bits [TIMSK0] */
1482
+ /* Timer/Counter 0 interrupt mask Register */
1483
+ #define OCIE0A 1
1484
+ #define TOIE0 0
1485
+ /* End Register Bits */
1486
+
1487
+ /* Register Bits [TIMSK1] */
1488
+ /* Timer/Counter 1 interrupt mask Register */
1489
+ #define ICIE1 5
1490
+ #define OCIE1C 3
1491
+ #define OCIE1B 2
1492
+ #define OCIE1A 1
1493
+ #define TOIE1 0
1494
+ /* End Register Bits */
1495
+
1496
+ /* Register Bits [TIMSK2] */
1497
+ /* Timer/Counter 2 interrupt mask Register */
1498
+ #define OCIE2A 1
1499
+ #define TOIE2 0
1500
+ /* End Register Bits */
1501
+
1502
+ /* Register Bits [TIMSK3] */
1503
+ /* Timer/Counter 3 interrupt mask Register */
1504
+ #define ICIE3 5
1505
+ #define OCIE3C 3
1506
+ #define OCIE3B 2
1507
+ #define OCIE3A 1
1508
+ #define TOIE3 0
1509
+ /* End Register Bits */
1510
+
1511
+ //Begin CAN specific parts
1512
+
1513
+ /* Register Bits [CANGCON] */
1514
+ /* CAN General Control Register */
1515
+ #define ABRQ 7
1516
+ #define OVRQ 6
1517
+ #define TTC 5
1518
+ #define SYNTTC 4
1519
+ #define LISTEN 3
1520
+ #define TEST 2
1521
+ #define ENASTB 1
1522
+ #define SWRES 0
1523
+ /* End Register Bits */
1524
+
1525
+ /* Register Bits [CANGSTA] */
1526
+ /* CAN General Status Register */
1527
+ #define OVFG 6
1528
+ #define OVRG 6
1529
+ #define TXBSY 4
1530
+ #define RXBSY 3
1531
+ #define ENFG 2
1532
+ #define BOFF 1
1533
+ #define ERRP 0
1534
+ /* End Register Bits */
1535
+
1536
+ /* Register Bits [CANGIT] */
1537
+ /* CAN General Interrupt Register */
1538
+ #define CANIT 7
1539
+ #define BOFFIT 6
1540
+ #define OVRTIM 5
1541
+ #define BXOK 4
1542
+ #define SERG 3
1543
+ #define CERG 2
1544
+ #define FERG 1
1545
+ #define AERG 0
1546
+ /* End Register Bits */
1547
+
1548
+ /* Register Bits [CANGIE] */
1549
+ /* CAN General Interrupt Enable */
1550
+ #define ENIT 7
1551
+ #define ENBOFF 6
1552
+ #define ENRX 5
1553
+ #define ENTX 4
1554
+ #define ENERR 3
1555
+ #define ENBX 2
1556
+ #define ENERG 1
1557
+ #define ENOVRT 0
1558
+ /* End Register Bits */
1559
+
1560
+ /* Register Bits [CANEN2] */
1561
+ /* CAN Enable MOb Register */
1562
+ #define ENMOB7 7
1563
+ #define ENMOB6 6
1564
+ #define ENMOB5 5
1565
+ #define ENMOB4 4
1566
+ #define ENMOB3 3
1567
+ #define ENMOB2 2
1568
+ #define ENMOB1 1
1569
+ #define ENMOB0 0
1570
+ /* End Register Bits */
1571
+
1572
+ /* Register Bits [CANEN1] */
1573
+ /* CAN Enable MOb Register */
1574
+ #define ENMOB14 6
1575
+ #define ENMOB13 5
1576
+ #define ENMOB12 4
1577
+ #define ENMOB11 3
1578
+ #define ENMOB10 2
1579
+ #define ENMOB9 1
1580
+ #define ENMOB8 0
1581
+ /* End Register Bits */
1582
+
1583
+ /* Register Bits [CANIE2] */
1584
+ /* CAN Interrupt Enable MOb Register */
1585
+ #define IEMOB7 7
1586
+ #define IEMOB6 6
1587
+ #define IEMOB5 5
1588
+ #define IEMOB4 4
1589
+ #define IEMOB3 3
1590
+ #define IEMOB2 2
1591
+ #define IEMOB1 1
1592
+ #define IEMOB0 0
1593
+ /* End Register Bits */
1594
+
1595
+ /* Register Bits [CANIE1] */
1596
+ /* CAN Interrupt Enable MOb Register */
1597
+ #define IEMOB14 6
1598
+ #define IEMOB13 5
1599
+ #define IEMOB12 4
1600
+ #define IEMOB11 3
1601
+ #define IEMOB10 2
1602
+ #define IEMOB9 1
1603
+ #define IEMOB8 0
1604
+ /* End Register Bits */
1605
+
1606
+ /* Register Bits [CANSIT2] */
1607
+ /* CAN Status Interrupt MOb Register */
1608
+ #define SIT7 7
1609
+ #define SIT6 6
1610
+ #define SIT5 5
1611
+ #define SIT4 4
1612
+ #define SIT3 3
1613
+ #define SIT2 2
1614
+ #define SIT1 1
1615
+ #define SIT0 0
1616
+ /* End Register Bits */
1617
+
1618
+ /* Register Bits [CANSIT1] */
1619
+ /* CAN Status Interrupt MOb Register */
1620
+ #define SIT14 6
1621
+ #define SIT13 5
1622
+ #define SIT12 4
1623
+ #define SIT11 3
1624
+ #define SIT10 2
1625
+ #define SIT9 1
1626
+ #define SIT8 0
1627
+ /* End Register Bits */
1628
+
1629
+ /* Register Bits [CANBT1] */
1630
+ /* Bit Timing Register 1 */
1631
+ #define BRP5 6
1632
+ #define BRP4 5
1633
+ #define BRP3 4
1634
+ #define BRP2 3
1635
+ #define BRP1 2
1636
+ #define BRP0 1
1637
+ /* End Register Bits */
1638
+
1639
+ /* Register Bits [CANBT2] */
1640
+ /* Bit Timing Register 2 */
1641
+ #define SJW1 6
1642
+ #define SJW0 5
1643
+ #define PRS2 3
1644
+ #define PRS1 2
1645
+ #define PRS0 1
1646
+ /* End Register Bits */
1647
+
1648
+ /* Register Bits [CANBT3] */
1649
+ /* Bit Timing Register 3 */
1650
+ #define PHS22 6
1651
+ #define PHS21 5
1652
+ #define PHS20 4
1653
+ #define PHS12 3
1654
+ #define PHS11 2
1655
+ #define PHS10 1
1656
+ #define SMP 0
1657
+ /* End Register Bits */
1658
+
1659
+ /* Register Bits [CANTCON] */
1660
+ /* CAN Timer Control Register */
1661
+ #define TPRSC7 7
1662
+ #define TPRSC6 6
1663
+ #define TPRSC5 5
1664
+ #define TPRSC4 4
1665
+ #define TPRSC3 3
1666
+ #define TPRSC2 2
1667
+ #define TPRSC1 1
1668
+ #define TPRSC0 0
1669
+ /* End Register Bits */
1670
+
1671
+ /* Register Bits [CANTIML] */
1672
+ /* CAN Timer Register Low */
1673
+ #define CANTIM7 7
1674
+ #define CANTIM6 6
1675
+ #define CANTIM5 5
1676
+ #define CANTIM4 4
1677
+ #define CANTIM3 3
1678
+ #define CANTIM2 2
1679
+ #define CANTIM1 1
1680
+ #define CANTIM0 0
1681
+ /* End Register Bits */
1682
+
1683
+ /* Register Bits [CANTIMH] */
1684
+ /* CAN Timer Register High */
1685
+ #define CANTIM15 7
1686
+ #define CANTIM14 6
1687
+ #define CANTIM13 5
1688
+ #define CANTIM12 4
1689
+ #define CANTIM11 3
1690
+ #define CANTIM10 2
1691
+ #define CANTIM9 1
1692
+ #define CANTIM8 0
1693
+ /* End Register Bits */
1694
+
1695
+ /* Register Bits [CANTTCL] */
1696
+ /* CAN TTC Timer Register Low */
1697
+ #define TIMTTC7 7
1698
+ #define TIMTTC6 6
1699
+ #define TIMTTC5 5
1700
+ #define TIMTTC4 4
1701
+ #define TIMTTC3 3
1702
+ #define TIMTTC2 2
1703
+ #define TIMTTC1 1
1704
+ #define TIMTTC0 0
1705
+ /* End Register Bits */
1706
+
1707
+ /* Register Bits [CANTTCH] */
1708
+ /* CAN TTC Timer Register High */
1709
+ #define TIMTTC15 7
1710
+ #define TIMTTC14 6
1711
+ #define TIMTTC13 5
1712
+ #define TIMTTC12 4
1713
+ #define TIMTTC11 3
1714
+ #define TIMTTC10 2
1715
+ #define TIMTTC9 1
1716
+ #define TIMTTC8 0
1717
+ /* End Register Bits */
1718
+
1719
+ /* Register Bits [CANTEC] */
1720
+ /* CAN Transmitt Error Counter */
1721
+ #define TEC7 7
1722
+ #define TEC6 6
1723
+ #define TEC5 5
1724
+ #define TEC4 4
1725
+ #define TEC3 3
1726
+ #define TEC2 2
1727
+ #define TEC1 1
1728
+ #define TEC0 0
1729
+ /* End Register Bits */
1730
+
1731
+ /* Register Bits [CANREC] */
1732
+ /* CAN Receive Error Counter */
1733
+ #define REC7 7
1734
+ #define REC6 6
1735
+ #define REC5 5
1736
+ #define REC4 4
1737
+ #define REC3 3
1738
+ #define REC2 2
1739
+ #define REC1 1
1740
+ #define REC0 0
1741
+ /* End Register Bits */
1742
+
1743
+ /* Register Bits [CANHPMOB] */
1744
+ /* Highest Priority MOb */
1745
+ #define HPMOB3 7
1746
+ #define HPMOB2 6
1747
+ #define HPMOB1 5
1748
+ #define HPMOB0 4
1749
+ #define CGP3 3
1750
+ #define CGP2 2
1751
+ #define CGP1 1
1752
+ #define CGP0 0
1753
+ /* End Register Bits */
1754
+
1755
+ /* Register Bits [CANPAGE] */
1756
+ /* CAN Page MOb Register */
1757
+ #define MOBNB3 7
1758
+ #define MOBNB2 6
1759
+ #define MOBNB1 5
1760
+ #define MOBNB0 4
1761
+ #define AINC 3
1762
+ #define INDX2 2
1763
+ #define INDX1 1
1764
+ #define INDX0 0
1765
+ /* End Register Bits */
1766
+
1767
+ /* Register Bits [CANSTMOB] */
1768
+ /* CAN MOb Status Register */
1769
+ #define DLCW 7
1770
+ #define TXOK 6
1771
+ #define RXOK 5
1772
+ #define BERR 4
1773
+ #define SERR 3
1774
+ #define CERR 2
1775
+ #define FERR 1
1776
+ #define AERR 0
1777
+ /* End Register Bits */
1778
+
1779
+ /* Register Bits [CANCDMOB] */
1780
+ /* CAN MOb Control and DLC Register */
1781
+ #define CONMOB1 7
1782
+ #define CONMOB0 6
1783
+ #define RPLV 5
1784
+ #define IDE 4
1785
+ #define DLC3 3
1786
+ #define DLC2 2
1787
+ #define DLC1 1
1788
+ #define DLC0 0
1789
+ /* End Register Bits */
1790
+
1791
+ /* Register Bits [CANIDT4] */
1792
+ /* CAN Identifier Tag Register 4 */
1793
+ #define IDT4 7
1794
+ #define IDT3 6
1795
+ #define IDT2 5
1796
+ #define IDT1 4
1797
+ #define IDT0 3
1798
+ #define RTRTAG 2
1799
+ #define RB1TAG 1
1800
+ #define RB0TAG 0
1801
+ /* End Register Bits */
1802
+
1803
+ /* Register Bits [CANIDT3] */
1804
+ /* CAN Identifier Tag Register 3 */
1805
+ #define IDT12 7
1806
+ #define IDT11 6
1807
+ #define IDT10 5
1808
+ #define IDT9 4
1809
+ #define IDT8 3
1810
+ #define IDT7 2
1811
+ #define IDT6 1
1812
+ #define IDT5 0
1813
+ /* End Register Bits */
1814
+
1815
+ /* Register Bits [CANIDT2] */
1816
+ /* CAN Identifier Tag Register 2 */
1817
+ #define IDT20 7
1818
+ #define IDT19 6
1819
+ #define IDT18 5
1820
+ #define IDT17 4
1821
+ #define IDT16 3
1822
+ #define IDT15 2
1823
+ #define IDT14 1
1824
+ #define IDT13 0
1825
+ /* End Register Bits */
1826
+
1827
+ /* Register Bits [CANIDT1] */
1828
+ /* CAN Identifier Tag Register 1 */
1829
+ #define IDT28 7
1830
+ #define IDT27 6
1831
+ #define IDT26 5
1832
+ #define IDT25 4
1833
+ #define IDT24 3
1834
+ #define IDT23 2
1835
+ #define IDT22 1
1836
+ #define IDT21 0
1837
+ /* End Register Bits */
1838
+
1839
+ /* Register Bits [CANIDM4] */
1840
+ /* CAN Identifier Mask Register 4 */
1841
+ #define IDMSK4 7
1842
+ #define IDMSK3 6
1843
+ #define IDMSK2 5
1844
+ #define IDMSK1 4
1845
+ #define IDMSK0 3
1846
+ #define RTRMSK 2
1847
+ #define IDEMSK 0
1848
+ /* End Register Bits */
1849
+
1850
+ /* Register Bits [CANIDM3] */
1851
+ /* CAN Identifier Mask Register 3 */
1852
+ #define IDMSK12 7
1853
+ #define IDMSK11 6
1854
+ #define IDMSK10 5
1855
+ #define IDMSK9 4
1856
+ #define IDMSK8 3
1857
+ #define IDMSK7 2
1858
+ #define IDMSK6 1
1859
+ #define IDMSK5 0
1860
+ /* End Register Bits */
1861
+
1862
+ /* Register Bits [CANIDM2] */
1863
+ /* CAN Identifier Mask Register 2 */
1864
+ #define IDMSK20 7
1865
+ #define IDMSK19 6
1866
+ #define IDMSK18 5
1867
+ #define IDMSK17 4
1868
+ #define IDMSK16 3
1869
+ #define IDMSK15 2
1870
+ #define IDMSK14 1
1871
+ #define IDMSK13 0
1872
+ /* End Register Bits */
1873
+
1874
+ /* Register Bits [CANIDM1] */
1875
+ /* CAN Identifier Mask Register 1 */
1876
+ #define IDMSK28 7
1877
+ #define IDMSK27 6
1878
+ #define IDMSK26 5
1879
+ #define IDMSK25 4
1880
+ #define IDMSK24 3
1881
+ #define IDMSK23 2
1882
+ #define IDMSK22 1
1883
+ #define IDMSK21 0
1884
+ /* End Register Bits */
1885
+
1886
+ /* Register Bits [CANSTML] */
1887
+ /* CAN Timer Register of some sort, low*/
1888
+ #define TIMSTM7 7
1889
+ #define TIMSTM6 6
1890
+ #define TIMSTM5 5
1891
+ #define TIMSTM4 4
1892
+ #define TIMSTM3 3
1893
+ #define TIMSTM2 2
1894
+ #define TIMSTM1 1
1895
+ #define TIMSTM0 0
1896
+ /* End Register Bits */
1897
+
1898
+ /* Register Bits [CANSTMH] */
1899
+ /* CAN Timer Register of some sort, high */
1900
+ #define TIMSTM15 7
1901
+ #define TIMSTM14 6
1902
+ #define TIMSTM13 5
1903
+ #define TIMSTM12 4
1904
+ #define TIMSTM11 3
1905
+ #define TIMSTM10 2
1906
+ #define TIMSTM9 1
1907
+ #define TIMSTM8 0
1908
+ /* End Register Bits */
1909
+
1910
+ /* Register Bits [CANMSG] */
1911
+ /* CAN Message Register */
1912
+ #define MSG7 7
1913
+ #define MSG6 6
1914
+ #define MSG5 5
1915
+ #define MSG4 4
1916
+ #define MSG3 3
1917
+ #define MSG2 2
1918
+ #define MSG1 1
1919
+ #define MSG0 0
1920
+ /* End Register Bits */
1921
+
1922
+ /* Begin Verbatim */
1923
+
1924
+ /* Timer/Counter Control Register (generic) */
1925
+ #define FOC 7
1926
+ #define WGM0 6
1927
+ #define COM1 5
1928
+ #define COM0 4
1929
+ #define WGM1 3
1930
+ #define CS2 2
1931
+ #define CS1 1
1932
+ #define CS0 0
1933
+
1934
+ /* Timer/Counter Control Register A (generic) */
1935
+ #define COMA1 7
1936
+ #define COMA0 6
1937
+ #define COMB1 5
1938
+ #define COMB0 4
1939
+ #define COMC1 3
1940
+ #define COMC0 2
1941
+ #define WGMA1 1
1942
+ #define WGMA0 0
1943
+
1944
+ /* Timer/Counter Control and Status Register B (generic) */
1945
+ #define ICNC 7
1946
+ #define ICES 6
1947
+ #define WGMB3 4
1948
+ #define WGMB2 3
1949
+ #define CSB2 2
1950
+ #define CSB1 1
1951
+ #define CSB0 0
1952
+
1953
+ /* Timer/Counter Control Register C (generic) */
1954
+ #define FOCA 7
1955
+ #define FOCB 6
1956
+ #define FOCC 5
1957
+
1958
+ /* Port Data Register (generic) */
1959
+ #define PORT7 7
1960
+ #define PORT6 6
1961
+ #define PORT5 5
1962
+ #define PORT4 4
1963
+ #define PORT3 3
1964
+ #define PORT2 2
1965
+ #define PORT1 1
1966
+ #define PORT0 0
1967
+
1968
+ /* Port Data Direction Register (generic) */
1969
+ #define DD7 7
1970
+ #define DD6 6
1971
+ #define DD5 5
1972
+ #define DD4 4
1973
+ #define DD3 3
1974
+ #define DD2 2
1975
+ #define DD1 1
1976
+ #define DD0 0
1977
+
1978
+ /* Port Input Pins (generic) */
1979
+ #define PIN7 7
1980
+ #define PIN6 6
1981
+ #define PIN5 5
1982
+ #define PIN4 4
1983
+ #define PIN3 3
1984
+ #define PIN2 2
1985
+ #define PIN1 1
1986
+ #define PIN0 0
1987
+
1988
+ /* USART Status Register A (generic) */
1989
+ #define RXC 7
1990
+ #define TXC 6
1991
+ #define UDRE 5
1992
+ #define FE 4
1993
+ #define DOR 3
1994
+ #define UPE 2
1995
+ #define U2X 1
1996
+ #define MPCM 0
1997
+
1998
+ /* USART Control Register B (generic) */
1999
+ #define RXCIE 7
2000
+ #define TXCIE 6
2001
+ #define UDRIE 5
2002
+ #define RXEN 4
2003
+ #define TXEN 3
2004
+ #define UCSZ 2
2005
+ #define UCSZ2 2 /* new name in datasheet (2467E-AVR-05/02) */
2006
+ #define RXB8 1
2007
+ #define TXB8 0
2008
+
2009
+ /* USART Register C (generic) */
2010
+ #define UMSEL 6
2011
+ #define UPM1 5
2012
+ #define UPM0 4
2013
+ #define USBS 3
2014
+ #define UCSZ1 2
2015
+ #define UCSZ0 1
2016
+ #define UCPOL 0
2017
+
2018
+ /* End Verbatim */
2019
+
2020
+ #endif /* _AVR_IOCANXX_H_ */