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,80 @@
1
+ /* Copyright (c) 2007, Anatoly Sokolov
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in
12
+ the documentation and/or other materials provided with the
13
+ distribution.
14
+
15
+ * Neither the name of the copyright holders nor the names of
16
+ contributors may be used to endorse or promote products derived
17
+ from this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ POSSIBILITY OF SUCH DAMAGE. */
30
+
31
+ /* $Id: iom16hva.h 2102 2010-03-16 22:52:39Z joerg_wunsch $ */
32
+
33
+ /* iom16hva.h - definitions for ATmega16HVA. */
34
+
35
+ #ifndef _AVR_IOM16HVA_H_
36
+ #define _AVR_IOM16HVA_H_ 1
37
+
38
+ #include "iomxxhva.h"
39
+
40
+ /* Constants */
41
+ #define SPM_PAGESIZE 128
42
+ #define RAMSTART 0x100
43
+ #define RAMEND 0x2FF
44
+ #define XRAMEND RAMEND
45
+ #define E2END 0xFF
46
+ #define E2PAGESIZE 4
47
+ #define FLASHEND 0x3FFF
48
+
49
+
50
+ /* Fuses */
51
+
52
+ #define FUSE_MEMORY_SIZE 1
53
+
54
+ /* Low Fuse Byte */
55
+ #define FUSE_SUT0 (unsigned char)~_BV(0)
56
+ #define FUSE_SUT1 (unsigned char)~_BV(1)
57
+ #define FUSE_SUT2 (unsigned char)~_BV(2)
58
+ #define FUSE_SELFPRGEN (unsigned char)~_BV(3)
59
+ #define FUSE_DWEN (unsigned char)~_BV(4)
60
+ #define FUSE_SPIEN (unsigned char)~_BV(5)
61
+ #define FUSE_EESAVE (unsigned char)~_BV(6)
62
+ #define FUSE_WDTON (unsigned char)~_BV(7)
63
+ #define FUSE_DEFAULT (FUSE_SPIEN)
64
+
65
+
66
+ /* Lock Bits */
67
+ #define __LOCK_BITS_EXIST
68
+
69
+
70
+ /* Signature */
71
+ #define SIGNATURE_0 0x1E
72
+ #define SIGNATURE_1 0x94
73
+ #define SIGNATURE_2 0x0C
74
+
75
+ #define SLEEP_MODE_IDLE (0x00<<1)
76
+ #define SLEEP_MODE_ADC (0x01<<1)
77
+ #define SLEEP_MODE_PWR_SAVE (0x03<<1)
78
+ #define SLEEP_MODE_PWR_OFF (0x04<<1)
79
+
80
+ #endif /* _AVR_IOM16HVA_H_ */
@@ -0,0 +1,883 @@
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: iom16hva2.h 2192 2010-11-08 13:53:24Z arcanum $ */
32
+
33
+ /* avr/iom16hva2.h - definitions for ATmega16HVA2 */
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_ "iom16hva2.h"
43
+ #else
44
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
45
+ #endif
46
+
47
+
48
+ #ifndef _AVR_ATmega16HVA2_H_
49
+ #define _AVR_ATmega16HVA2_H_ 1
50
+
51
+
52
+ /* Registers and associated bit numbers. */
53
+
54
+ #define PINA _SFR_IO8(0x00)
55
+ #define PINA0 0
56
+ #define PINA1 1
57
+
58
+ #define DDRA _SFR_IO8(0x01)
59
+ #define DDA0 0
60
+ #define DDA1 1
61
+
62
+ #define PORTA _SFR_IO8(0x02)
63
+ #define PORTA0 0
64
+ #define PORTA1 1
65
+
66
+ #define PINB _SFR_IO8(0x03)
67
+ #define PINB0 0
68
+ #define PINB1 1
69
+ #define PINB2 2
70
+ #define PINB3 3
71
+
72
+ #define DDRB _SFR_IO8(0x04)
73
+ #define DDB0 0
74
+ #define DDB1 1
75
+ #define DDB2 2
76
+ #define DDB3 3
77
+
78
+ #define PORTB _SFR_IO8(0x05)
79
+ #define PORTB0 0
80
+ #define PORTB1 1
81
+ #define PORTB2 2
82
+ #define PORTB3 3
83
+
84
+ #define PINC _SFR_IO8(0x06)
85
+ #define PINC0 0
86
+
87
+ #define PORTC _SFR_IO8(0x08)
88
+ #define PORTC0 0
89
+
90
+ #define TIFR0 _SFR_IO8(0x15)
91
+ #define TOV0 0
92
+ #define OCF0A 1
93
+ #define OCF0B 2
94
+ #define ICF0 3
95
+
96
+ #define TIFR1 _SFR_IO8(0x16)
97
+ #define TOV1 0
98
+ #define OCF1A 1
99
+ #define OCF1B 2
100
+ #define ICF1 3
101
+
102
+ #define OSICSR _SFR_IO8(0x17)
103
+ #define OSIEN 0
104
+ #define OSIST 1
105
+ #define OSISEL0 4
106
+
107
+ #define PCIFR _SFR_IO8(0x1B)
108
+ #define PCIF0 0
109
+
110
+ #define EIFR _SFR_IO8(0x1C)
111
+ #define INTF0 0
112
+ #define INTF1 1
113
+ #define INTF2 2
114
+
115
+ #define EIMSK _SFR_IO8(0x1D)
116
+ #define INT0 0
117
+ #define INT1 1
118
+ #define INT2 2
119
+
120
+ #define GPIOR0 _SFR_IO8(0x1E)
121
+ #define GPIOR00 0
122
+ #define GPIOR01 1
123
+ #define GPIOR02 2
124
+ #define GPIOR03 3
125
+ #define GPIOR04 4
126
+ #define GPIOR05 5
127
+ #define GPIOR06 6
128
+ #define GPIOR07 7
129
+
130
+ #define EECR _SFR_IO8(0x1F)
131
+ #define EERE 0
132
+ #define EEPE 1
133
+ #define EEMPE 2
134
+ #define EERIE 3
135
+ #define EEPM0 4
136
+ #define EEPM1 5
137
+
138
+ #define EEDR _SFR_IO8(0x20)
139
+ #define EEDR0 0
140
+ #define EEDR1 1
141
+ #define EEDR2 2
142
+ #define EEDR3 3
143
+ #define EEDR4 4
144
+ #define EEDR5 5
145
+ #define EEDR6 6
146
+ #define EEDR7 7
147
+
148
+ #define EEAR _SFR_IO8(0x21)
149
+ #define EEAR0 0
150
+ #define EEAR1 1
151
+ #define EEAR2 2
152
+ #define EEAR3 3
153
+ #define EEAR4 4
154
+ #define EEAR5 5
155
+ #define EEAR6 6
156
+ #define EEAR7 7
157
+
158
+ #define GTCCR _SFR_IO8(0x23)
159
+ #define PSRSYNC 0
160
+ #define TSM 7
161
+
162
+ #define TCCR0A _SFR_IO8(0x24)
163
+ #define WGM00 0
164
+ #define ICS0 3
165
+ #define ICES0 4
166
+ #define ICNC0 5
167
+ #define ICEN0 6
168
+ #define TCW0 7
169
+
170
+ #define TCCR0B _SFR_IO8(0x25)
171
+ #define CS00 0
172
+ #define CS01 1
173
+ #define CS02 2
174
+
175
+ #define TCNT0 _SFR_IO16(0x26)
176
+
177
+ #define TCNT0L _SFR_IO8(0x26)
178
+ #define TCNT0L0 0
179
+ #define TCNT0L1 1
180
+ #define TCNT0L2 2
181
+ #define TCNT0L3 3
182
+ #define TCNT0L4 4
183
+ #define TCNT0L5 5
184
+ #define TCNT0L6 6
185
+ #define TCNT0L7 7
186
+
187
+ #define TCNT0H _SFR_IO8(0x27)
188
+ #define TCNT0H0 0
189
+ #define TCNT0H1 1
190
+ #define TCNT0H2 2
191
+ #define TCNT0H3 3
192
+ #define TCNT0H4 4
193
+ #define TCNT0H5 5
194
+ #define TCNT0H6 6
195
+ #define TCNT0H7 7
196
+
197
+ #define OCR0A _SFR_IO8(0x28)
198
+ #define OCR0A0 0
199
+ #define OCR0A1 1
200
+ #define OCR0A2 2
201
+ #define OCR0A3 3
202
+ #define OCR0A4 4
203
+ #define OCR0A5 5
204
+ #define OCR0A6 6
205
+ #define OCR0A7 7
206
+
207
+ #define OCR0B _SFR_IO8(0x29)
208
+ #define OCR0B0 0
209
+ #define OCR0B1 1
210
+ #define OCR0B2 2
211
+ #define OCR0B3 3
212
+ #define OCR0B4 4
213
+ #define OCR0B5 5
214
+ #define OCR0B6 6
215
+ #define OCR0B7 7
216
+
217
+ #define GPIOR1 _SFR_IO8(0x2A)
218
+ #define GPIOR10 0
219
+ #define GPIOR11 1
220
+ #define GPIOR12 2
221
+ #define GPIOR13 3
222
+ #define GPIOR14 4
223
+ #define GPIOR15 5
224
+ #define GPIOR16 6
225
+ #define GPIOR17 7
226
+
227
+ #define GPIOR2 _SFR_IO8(0x2B)
228
+ #define GPIOR20 0
229
+ #define GPIOR21 1
230
+ #define GPIOR22 2
231
+ #define GPIOR23 3
232
+ #define GPIOR24 4
233
+ #define GPIOR25 5
234
+ #define GPIOR26 6
235
+ #define GPIOR27 7
236
+
237
+ #define SPCR _SFR_IO8(0x2C)
238
+ #define SPR0 0
239
+ #define SPR1 1
240
+ #define CPHA 2
241
+ #define CPOL 3
242
+ #define MSTR 4
243
+ #define DORD 5
244
+ #define SPE 6
245
+ #define SPIE 7
246
+
247
+ #define SPSR _SFR_IO8(0x2D)
248
+ #define SPI2X 0
249
+ #define WCOL 6
250
+ #define SPIF 7
251
+
252
+ #define SPDR _SFR_IO8(0x2E)
253
+ #define SPDR0 0
254
+ #define SPDR1 1
255
+ #define SPDR2 2
256
+ #define SPDR3 3
257
+ #define SPDR4 4
258
+ #define SPDR5 5
259
+ #define SPDR6 6
260
+ #define SPDR7 7
261
+
262
+ #define DWDR _SFR_IO8(0x31)
263
+
264
+ #define SMCR _SFR_IO8(0x33)
265
+ #define SE 0
266
+ #define SM0 1
267
+ #define SM1 2
268
+ #define SM2 3
269
+
270
+ #define MCUSR _SFR_IO8(0x34)
271
+ #define PORF 0
272
+ #define EXTRF 1
273
+ #define BODRF 2
274
+ #define WDRF 3
275
+ #define OCDRF 4
276
+
277
+ #define MCUCR _SFR_IO8(0x35)
278
+ #define PUD 4
279
+ #define CKOE 5
280
+
281
+ #define SPMCSR _SFR_IO8(0x37)
282
+ #define SPMEN 0
283
+ #define PGERS 1
284
+ #define PGWRT 2
285
+ #define RFLB 3
286
+ #define CTPB 4
287
+ #define SIGRD 5
288
+
289
+ #define WDTCSR _SFR_MEM8(0x60)
290
+ #define WDP0 0
291
+ #define WDP1 1
292
+ #define WDP2 2
293
+ #define WDE 3
294
+ #define WDCE 4
295
+ #define WDP3 5
296
+ #define WDIE 6
297
+ #define WDIF 7
298
+
299
+ #define CLKPR _SFR_MEM8(0x61)
300
+ #define CLKPS0 0
301
+ #define CLKPS1 1
302
+ #define CLKPCE 7
303
+
304
+ #define PRR0 _SFR_MEM8(0x64)
305
+ #define PRVADC 0
306
+ #define PRTIM0 1
307
+ #define PRTIM1 2
308
+ #define PRSPI 3
309
+ #define PRVRM 5
310
+
311
+ #define __AVR_HAVE_PRR0 ((1<<PRVADC)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRSPI)|(1<<PRVRM))
312
+ #define __AVR_HAVE_PRR0_PRVADC
313
+ #define __AVR_HAVE_PRR0_PRTIM0
314
+ #define __AVR_HAVE_PRR0_PRTIM1
315
+ #define __AVR_HAVE_PRR0_PRSPI
316
+ #define __AVR_HAVE_PRR0_PRVRM
317
+
318
+ #define FOSCCAL _SFR_MEM8(0x66)
319
+ #define FCAL0 0
320
+ #define FCAL1 1
321
+ #define FCAL2 2
322
+ #define FCAL3 3
323
+ #define FCAL4 4
324
+ #define FCAL5 5
325
+ #define FCAL6 6
326
+ #define FCAL7 7
327
+
328
+ #define PCICR _SFR_MEM8(0x68)
329
+ #define PCIE0 0
330
+
331
+ #define EICRA _SFR_MEM8(0x69)
332
+ #define ISC00 0
333
+ #define ISC01 1
334
+ #define ISC10 2
335
+ #define ISC11 3
336
+ #define ISC20 4
337
+ #define ISC21 5
338
+
339
+ #define PCMSK0 _SFR_MEM8(0x6B)
340
+ #define PCINT0 0
341
+ #define PCINT1 1
342
+ #define PCINT2 2
343
+ #define PCINT3 3
344
+
345
+ #define TIMSK0 _SFR_MEM8(0x6E)
346
+ #define TOIE0 0
347
+ #define OCIE0A 1
348
+ #define OCIE0B 2
349
+ #define ICIE0 3
350
+
351
+ #define TIMSK1 _SFR_MEM8(0x6F)
352
+ #define TOIE1 0
353
+ #define OCIE1A 1
354
+ #define OCIE1B 2
355
+ #define ICIE1 3
356
+
357
+ #define VADC _SFR_MEM16(0x78)
358
+
359
+ #define VADCL _SFR_MEM8(0x78)
360
+ #define VADC0 0
361
+ #define VADC1 1
362
+ #define VADC2 2
363
+ #define VADC3 3
364
+ #define VADC4 4
365
+ #define VADC5 5
366
+ #define VADC6 6
367
+ #define VADC7 7
368
+
369
+ #define VADCH _SFR_MEM8(0x79)
370
+ #define VADC8 0
371
+ #define VADC9 1
372
+ #define VADC10 2
373
+ #define VADC11 3
374
+
375
+ #define VADCSR _SFR_MEM8(0x7A)
376
+ #define VADCCIE 0
377
+ #define VADCCIF 1
378
+ #define VADSC 2
379
+ #define VADEN 3
380
+
381
+ #define VADMUX _SFR_MEM8(0x7C)
382
+ #define VADMUX0 0
383
+ #define VADMUX1 1
384
+ #define VADMUX2 2
385
+ #define VADMUX3 3
386
+
387
+ #define DIDR0 _SFR_MEM8(0x7E)
388
+ #define PA0DID 0
389
+ #define PA1DID 1
390
+
391
+ #define TCCR1A _SFR_MEM8(0x80)
392
+ #define WGM10 0
393
+ #define ICS1 3
394
+ #define ICES1 4
395
+ #define ICNC1 5
396
+ #define ICEN1 6
397
+ #define TCW1 7
398
+
399
+ #define TCCR1B _SFR_MEM8(0x81)
400
+ #define CS10 0
401
+ #define CS11 1
402
+ #define CS12 2
403
+
404
+ #define TCNT1 _SFR_MEM16(0x84)
405
+
406
+ #define TCNT1L _SFR_MEM8(0x84)
407
+ #define TCNT1L0 0
408
+ #define TCNT1L1 1
409
+ #define TCNT1L2 2
410
+ #define TCNT1L3 3
411
+ #define TCNT1L4 4
412
+ #define TCNT1L5 5
413
+ #define TCNT1L6 6
414
+ #define TCNT1L7 7
415
+
416
+ #define TCNT1H _SFR_MEM8(0x85)
417
+ #define TCNT1H0 0
418
+ #define TCNT1H1 1
419
+ #define TCNT1H2 2
420
+ #define TCNT1H3 3
421
+ #define TCNT1H4 4
422
+ #define TCNT1H5 5
423
+ #define TCNT1H6 6
424
+ #define TCNT1H7 7
425
+
426
+ #define OCR1A _SFR_MEM8(0x88)
427
+ #define OCR1A0 0
428
+ #define OCR1A1 1
429
+ #define OCR1A2 2
430
+ #define OCR1A3 3
431
+ #define OCR1A4 4
432
+ #define OCR1A5 5
433
+ #define OCR1A6 6
434
+ #define OCR1A7 7
435
+
436
+ #define OCR1B _SFR_MEM8(0x89)
437
+ #define OCR1B0 0
438
+ #define OCR1B1 1
439
+ #define OCR1B2 2
440
+ #define OCR1B3 3
441
+ #define OCR1B4 4
442
+ #define OCR1B5 5
443
+ #define OCR1B6 6
444
+ #define OCR1B7 7
445
+
446
+ #define ROCR _SFR_MEM8(0xC8)
447
+ #define ROCWIE 0
448
+ #define ROCWIF 1
449
+ #define ROCS 7
450
+
451
+ #define BGCCR _SFR_MEM8(0xD0)
452
+ #define BGCC0 0
453
+ #define BGCC1 1
454
+ #define BGCC2 2
455
+ #define BGCC3 3
456
+ #define BGCC4 4
457
+ #define BGCC5 5
458
+ #define BGD 7
459
+
460
+ #define BGCRR _SFR_MEM8(0xD1)
461
+ #define BGCR0 0
462
+ #define BGCR1 1
463
+ #define BGCR2 2
464
+ #define BGCR3 3
465
+ #define BGCR4 4
466
+ #define BGCR5 5
467
+ #define BGCR6 6
468
+ #define BGCR7 7
469
+
470
+ #define CADAC0 _SFR_MEM8(0xE0)
471
+ #define CADAC00 0
472
+ #define CADAC01 1
473
+ #define CADAC02 2
474
+ #define CADAC03 3
475
+ #define CADAC04 4
476
+ #define CADAC05 5
477
+ #define CADAC06 6
478
+ #define CADAC07 7
479
+
480
+ #define CADAC1 _SFR_MEM8(0xE1)
481
+ #define CADAC08 0
482
+ #define CADAC09 1
483
+ #define CADAC10 2
484
+ #define CADAC11 3
485
+ #define CADAC12 4
486
+ #define CADAC13 5
487
+ #define CADAC14 6
488
+ #define CADAC15 7
489
+
490
+ #define CADAC2 _SFR_MEM8(0xE2)
491
+ #define CADAC16 0
492
+ #define CADAC17 1
493
+ #define CADAC18 2
494
+ #define CADAC19 3
495
+ #define CADAC20 4
496
+ #define CADAC21 5
497
+ #define CADAC22 6
498
+ #define CADAC23 7
499
+
500
+ #define CADAC3 _SFR_MEM8(0xE3)
501
+ #define CADAC24 0
502
+ #define CADAC25 1
503
+ #define CADAC26 2
504
+ #define CADAC27 3
505
+ #define CADAC28 4
506
+ #define CADAC29 5
507
+ #define CADAC30 6
508
+ #define CADAC31 7
509
+
510
+ #define CADCSRA _SFR_MEM8(0xE4)
511
+ #define CADSE 0
512
+ #define CADSI0 1
513
+ #define CADSI1 2
514
+ #define CADAS0 3
515
+ #define CADAS1 4
516
+ #define CADUB 5
517
+ #define CADPOL 6
518
+ #define CADEN 7
519
+
520
+ #define CADCSRB _SFR_MEM8(0xE5)
521
+ #define CADICIF 0
522
+ #define CADRCIF 1
523
+ #define CADACIF 2
524
+ #define CADICIE 4
525
+ #define CADRCIE 5
526
+ #define CADACIE 6
527
+
528
+ #define CADRC _SFR_MEM8(0xE6)
529
+ #define CADRC0 0
530
+ #define CADRC1 1
531
+ #define CADRC2 2
532
+ #define CADRC3 3
533
+ #define CADRC4 4
534
+ #define CADRC5 5
535
+ #define CADRC6 6
536
+ #define CADRC7 7
537
+
538
+ #define CADIC _SFR_MEM16(0xE8)
539
+
540
+ #define CADICL _SFR_MEM8(0xE8)
541
+ #define CADICL0 0
542
+ #define CADICL1 1
543
+ #define CADICL2 2
544
+ #define CADICL3 3
545
+ #define CADICL4 4
546
+ #define CADICL5 5
547
+ #define CADICL6 6
548
+ #define CADICL7 7
549
+
550
+ #define CADICH _SFR_MEM8(0xE9)
551
+ #define CADICH0 0
552
+ #define CADICH1 1
553
+ #define CADICH2 2
554
+ #define CADICH3 3
555
+ #define CADICH4 4
556
+ #define CADICH5 5
557
+ #define CADICH6 6
558
+ #define CADICH7 7
559
+
560
+ #define FCSR _SFR_MEM8(0xF0)
561
+ #define CFE 0
562
+ #define DFE 1
563
+ #define CPS 2
564
+ #define DUVRD 3
565
+
566
+ #define BPIMSK _SFR_MEM8(0xF2)
567
+ #define CHCIE 0
568
+ #define DHCIE 1
569
+ #define COCIE 2
570
+ #define DOCIE 3
571
+ #define SCIE 4
572
+
573
+ #define BPIFR _SFR_MEM8(0xF3)
574
+ #define CHCIF 0
575
+ #define DHCIF 1
576
+ #define COCIF 2
577
+ #define DOCIF 3
578
+ #define SCIF 4
579
+
580
+ #define BPSCD _SFR_MEM8(0xF5)
581
+ #define SCDL0 0
582
+ #define SCDL1 1
583
+ #define SCDL2 2
584
+ #define SCDL3 3
585
+ #define SCDL4 4
586
+ #define SCDL5 5
587
+ #define SCDL6 6
588
+ #define SCDL7 7
589
+
590
+ #define BPDOCD _SFR_MEM8(0xF6)
591
+ #define DOCDL0 0
592
+ #define DOCDL1 1
593
+ #define DOCDL2 2
594
+ #define DOCDL3 3
595
+ #define DOCDL4 4
596
+ #define DOCDL5 5
597
+ #define DOCDL6 6
598
+ #define DOCDL7 7
599
+
600
+ #define BPCOCD _SFR_MEM8(0xF7)
601
+ #define COCDL0 0
602
+ #define COCDL1 1
603
+ #define COCDL2 2
604
+ #define COCDL3 3
605
+ #define COCDL4 4
606
+ #define COCDL5 5
607
+ #define COCDL6 6
608
+ #define COCDL7 7
609
+
610
+ #define BPDHCD _SFR_MEM8(0xF8)
611
+ #define DHCDL0 0
612
+ #define DHCDL1 1
613
+ #define DHCDL2 2
614
+ #define DHCDL3 3
615
+ #define DHCDL4 4
616
+ #define DHCDL5 5
617
+ #define DHCDL6 6
618
+ #define DHCDL7 7
619
+
620
+ #define BPCHCD _SFR_MEM8(0xF9)
621
+ #define CHCDL0 0
622
+ #define CHCDL1 1
623
+ #define CHCDL2 2
624
+ #define CHCDL3 3
625
+ #define CHCDL4 4
626
+ #define CHCDL5 5
627
+ #define CHCDL6 6
628
+ #define CHCDL7 7
629
+
630
+ #define BPSCTR _SFR_MEM8(0xFA)
631
+ #define SCPT0 0
632
+ #define SCPT1 1
633
+ #define SCPT2 2
634
+ #define SCPT3 3
635
+ #define SCPT4 4
636
+ #define SCPT5 5
637
+ #define SCPT6 6
638
+
639
+ #define BPOCTR _SFR_MEM8(0xFB)
640
+ #define OCPT0 0
641
+ #define OCPT1 1
642
+ #define OCPT2 2
643
+ #define OCPT3 3
644
+ #define OCPT4 4
645
+ #define OCPT5 5
646
+
647
+ #define BPHCTR _SFR_MEM8(0xFC)
648
+ #define HCPT0 0
649
+ #define HCPT1 1
650
+ #define HCPT2 2
651
+ #define HCPT3 3
652
+ #define HCPT4 4
653
+ #define HCPT5 5
654
+
655
+ #define BPCR _SFR_MEM8(0xFD)
656
+ #define CHCD 0
657
+ #define DHCD 1
658
+ #define COCD 2
659
+ #define DOCD 3
660
+ #define SCD 4
661
+ #define PRMD 7
662
+
663
+ #define BPPLR _SFR_MEM8(0xFE)
664
+ #define BPPL 0
665
+ #define BPPLE 1
666
+
667
+
668
+ /* Interrupt vectors */
669
+ /* Vector 0 is the reset vector */
670
+ #define BPINT_vect_num 1
671
+ #define BPINT_vect _VECTOR(1) /* Battery Protection Interrupt */
672
+ #define VREGMON_vect_num 2
673
+ #define VREGMON_vect _VECTOR(2) /* Voltage regulator monitor interrupt */
674
+ #define INT0_vect_num 3
675
+ #define INT0_vect _VECTOR(3) /* External Interrupt Request 0 */
676
+ #define INT1_vect_num 4
677
+ #define INT1_vect _VECTOR(4) /* External Interrupt Request 1 */
678
+ #define INT2_vect_num 5
679
+ #define INT2_vect _VECTOR(5) /* External Interrupt Request 2 */
680
+ #define PCINT0_vect_num 6
681
+ #define PCINT0_vect _VECTOR(6) /* Pin Change Interrupt Request 0 */
682
+ #define WDT_vect_num 7
683
+ #define WDT_vect _VECTOR(7) /* Watchdog Timeout Interrupt */
684
+ #define TIMER1_IC_vect_num 8
685
+ #define TIMER1_IC_vect _VECTOR(8) /* Timer 1 Input capture */
686
+ #define TIMER1_COMPA_vect_num 9
687
+ #define TIMER1_COMPA_vect _VECTOR(9) /* Timer 1 Compare Match A */
688
+ #define TIMER1_COMPB_vect_num 10
689
+ #define TIMER1_COMPB_vect _VECTOR(10) /* Timer 1 Compare Match B */
690
+ #define TIMER1_OVF_vect_num 11
691
+ #define TIMER1_OVF_vect _VECTOR(11) /* Timer 1 overflow */
692
+ #define TIMER0_IC_vect_num 12
693
+ #define TIMER0_IC_vect _VECTOR(12) /* Timer 0 Input Capture */
694
+ #define TIMER0_COMPA_vect_num 13
695
+ #define TIMER0_COMPA_vect _VECTOR(13) /* Timer 0 Comapre Match A */
696
+ #define TIMER0_COMPB_vect_num 14
697
+ #define TIMER0_COMPB_vect _VECTOR(14) /* Timer 0 Compare Match B */
698
+ #define TIMER0_OVF_vect_num 15
699
+ #define TIMER0_OVF_vect _VECTOR(15) /* Timer 0 Overflow */
700
+ #define SPI_STC_vect_num 16
701
+ #define SPI_STC_vect _VECTOR(16) /* SPI Serial transfer complete */
702
+ #define VADC_vect_num 17
703
+ #define VADC_vect _VECTOR(17) /* Voltage ADC Conversion Complete */
704
+ #define CCADC_CONV_vect_num 18
705
+ #define CCADC_CONV_vect _VECTOR(18) /* Coulomb Counter ADC Conversion Complete */
706
+ #define CCADC_REG_CUR_vect_num 19
707
+ #define CCADC_REG_CUR_vect _VECTOR(19) /* Coloumb Counter ADC Regular Current */
708
+ #define CCADC_ACC_vect_num 20
709
+ #define CCADC_ACC_vect _VECTOR(20) /* Coloumb Counter ADC Accumulator */
710
+ #define EE_READY_vect_num 21
711
+ #define EE_READY_vect _VECTOR(21) /* EEPROM Ready */
712
+
713
+ #define _VECTOR_SIZE 4 /* Size of individual vector. */
714
+ #define _VECTORS_SIZE (22 * _VECTOR_SIZE)
715
+
716
+
717
+ /* Constants */
718
+ #define SPM_PAGESIZE (128)
719
+ #define RAMSTART (0x100)
720
+ #define RAMSIZE (1024)
721
+ #define RAMEND (RAMSTART + RAMSIZE - 1)
722
+ #define XRAMSTART (NA)
723
+ #define XRAMSIZE (NA)
724
+ #define XRAMEND (RAMEND)
725
+ #define E2END (0xFF)
726
+ #define E2PAGESIZE (4)
727
+ #define FLASHEND (0x3FFF)
728
+
729
+
730
+ /* Fuses */
731
+ #define FUSE_MEMORY_SIZE 2
732
+
733
+ /* Low Fuse Byte */
734
+ #define FUSE_SUT0 (unsigned char)~_BV(0) /* Select start-up time */
735
+ #define FUSE_SUT1 (unsigned char)~_BV(1) /* Select start-up time */
736
+ #define FUSE_SUT2 (unsigned char)~_BV(2) /* Select start-up time */
737
+ #define FUSE_SELFPRGEN (unsigned char)~_BV(3) /* Enable self programming */
738
+ #define FUSE_DWEN (unsigned char)~_BV(4) /* Enable debugWIRE */
739
+ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
740
+ #define FUSE_EESAVE (unsigned char)~_BV(6) /* EEPROM memory is preserved through chip erase */
741
+ #define FUSE_WDTON (unsigned char)~_BV(7) /* Watchdog Timer Always On */
742
+ #define LFUSE_DEFAULT (FUSE_SPIEN)
743
+
744
+ /* High Fuse Byte */
745
+ #define FUSE_OSCSEL0 (unsigned char)~_BV(0) /* Oscillator Select 0 */
746
+ #define FUSE_OSCSEL1 (unsigned char)~_BV(1) /* Oscillator Select 1 */
747
+ #define FUSE_COMPMODE (unsigned char)~_BV(2) /* Compatibility mode */
748
+ #define HFUSE_DEFAULT (FUSE_COMPMODE & FUSE_OSCSEL1)
749
+
750
+
751
+ /* Lock Bits */
752
+ #define __LOCK_BITS_EXIST
753
+
754
+
755
+ /* Signature */
756
+ #define SIGNATURE_0 0x1E
757
+ #define SIGNATURE_1 0x94
758
+ #define SIGNATURE_2 0x0E
759
+
760
+
761
+ /* Device Pin Definitions */
762
+ #define PV2_DDR DDRV
763
+ #define PV2_PORT PORTV
764
+ #define PV2_PIN PINV
765
+ #define PV2_BIT 2
766
+
767
+ #define PV1_DDR DDRV
768
+ #define PV1_PORT PORTV
769
+ #define PV1_PIN PINV
770
+ #define PV1_BIT 1
771
+
772
+ #define NV_DDR DDRNV
773
+ #define NV_PORT PORTNV
774
+ #define NV_PIN PINNV
775
+ #define NV_BIT NV
776
+
777
+ #define VFET_DDR DDRVFET
778
+ #define VFET_PORT PORTVFET
779
+ #define VFET_PIN PINVFET
780
+ #define VFET_BIT VFET
781
+
782
+ #define CF1P_DDR DDRCF1P
783
+ #define CF1P_PORT PORTCF1P
784
+ #define CF1P_PIN PINCF1P
785
+ #define CF1P_BIT CF1P
786
+
787
+ #define CF1N_DDR DDRCF1N
788
+ #define CF1N_PORT PORTCF1N
789
+ #define CF1N_PIN PINCF1N
790
+ #define CF1N_BIT CF1N
791
+
792
+ #define CF2P_DDR DDRCF2P
793
+ #define CF2P_PORT PORTCF2P
794
+ #define CF2P_PIN PINCF2P
795
+ #define CF2P_BIT CF2P
796
+
797
+ #define CF2N_DDR DDRCF2N
798
+ #define CF2N_PORT PORTCF2N
799
+ #define CF2N_PIN PINCF2N
800
+ #define CF2N_BIT CF2N
801
+
802
+ #define VREG_DDR DDRVREG
803
+ #define VREG_PORT PORTVREG
804
+ #define VREG_PIN PINVREG
805
+ #define VREG_BIT VREG
806
+
807
+ #define VREF_DDR DDRVREF
808
+ #define VREF_PORT PORTVREF
809
+ #define VREF_PIN PINVREF
810
+ #define VREF_BIT VREF
811
+
812
+ #define VREFGND_DDR DDRVREFGND
813
+ #define VREFGND_PORT PORTVREFGND
814
+ #define VREFGND_PIN PINVREFGND
815
+ #define VREFGND_BIT VREFGND
816
+
817
+ #define PI_DDR DDRI
818
+ #define PI_PORT PORTI
819
+ #define PI_PIN PINI
820
+ #define PI_BIT
821
+
822
+ #define NI_DDR DDRNI
823
+ #define NI_PORT PORTNI
824
+ #define NI_PIN PINNI
825
+ #define NI_BIT NI
826
+
827
+ #define PA0_DDR DDRA
828
+ #define PA0_PORT PORTA
829
+ #define PA0_PIN PINA
830
+ #define PA0_BIT 0
831
+
832
+ #define PA1_DDR DDRA
833
+ #define PA1_PORT PORTA
834
+ #define PA1_PIN PINA
835
+ #define PA1_BIT 1
836
+
837
+ #define PA2_DDR DDRA
838
+ #define PA2_PORT PORTA
839
+ #define PA2_PIN PINA
840
+ #define PA2_BIT 2
841
+
842
+ #define PB0_DDR DDRB
843
+ #define PB0_PORT PORTB
844
+ #define PB0_PIN PINB
845
+ #define PB0_BIT 0
846
+
847
+ #define PB1_DDR DDRB
848
+ #define PB1_PORT PORTB
849
+ #define PB1_PIN PINB
850
+ #define PB1_BIT 1
851
+
852
+ #define PB2_DDR DDRB
853
+ #define PB2_PORT PORTB
854
+ #define PB2_PIN PINB
855
+ #define PB2_BIT 2
856
+
857
+ #define PB3_DDR DDRB
858
+ #define PB3_PORT PORTB
859
+ #define PB3_PIN PINB
860
+ #define PB3_BIT 3
861
+
862
+ #define PC0_DDR DDRC
863
+ #define PC0_PORT PORTC
864
+ #define PC0_PIN PINC
865
+ #define PC0_BIT 0
866
+
867
+ #define BATT_DDR DDRBATT
868
+ #define BATT_PORT PORTBATT
869
+ #define BATT_PIN PINBATT
870
+ #define BATT_BIT BATT
871
+
872
+ #define OC_DDR DDROC
873
+ #define OC_PORT PORTOC
874
+ #define OC_PIN PINOC
875
+ #define OC_BIT OC
876
+
877
+ #define SLEEP_MODE_IDLE (0x00<<1)
878
+ #define SLEEP_MODE_ADC (0x01<<1)
879
+ #define SLEEP_MODE_PWR_SAVE (0x03<<1)
880
+ #define SLEEP_MODE_PWR_OFF (0x04<<1)
881
+
882
+ #endif /* _AVR_ATmega16HVA2_H_ */
883
+