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,395 @@
1
+ /* Copyright (c) 2004, Theodore A. Roth
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: iotn13.h 2236 2011-03-17 21:53:39Z arcanum $ */
32
+
33
+ /* avr/iotn13.h - definitions for ATtiny13 */
34
+
35
+ /* Verified 5/20/04 by Bruce Graham */
36
+
37
+ #ifndef _AVR_IOTN13_H_
38
+ #define _AVR_IOTN13_H_ 1
39
+
40
+ /* This file should only be included from <avr/io.h>, never directly. */
41
+
42
+ #ifndef _AVR_IO_H_
43
+ # error "Include <avr/io.h> instead of this file."
44
+ #endif
45
+
46
+ #ifndef _AVR_IOXXX_H_
47
+ # define _AVR_IOXXX_H_ "iotn13.h"
48
+ #else
49
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
50
+ #endif
51
+
52
+ /* I/O registers and bit names */
53
+
54
+ /* ADC Control and Status Register B */
55
+ #define ADCSRB _SFR_IO8(0x03)
56
+ # define ACME 6
57
+ # define ADTS2 2
58
+ # define ADTS1 1
59
+ # define ADTS0 0
60
+
61
+ /* ADC Data Register */
62
+ #ifndef __ASSEMBLER__
63
+ #define ADC _SFR_IO16 (0x04)
64
+ #endif
65
+ #define ADCW _SFR_IO16 (0x04)
66
+ #define ADCL _SFR_IO8(0x04)
67
+ #define ADCH _SFR_IO8(0x05)
68
+
69
+ /* ADC Control and Status Register A */
70
+ #define ADCSRA _SFR_IO8(0x06)
71
+ # define ADEN 7
72
+ # define ADSC 6
73
+ # define ADATE 5
74
+ # define ADIF 4
75
+ # define ADIE 3
76
+ # define ADPS2 2
77
+ # define ADPS1 1
78
+ # define ADPS0 0
79
+
80
+ /* ADC Multiplex Selection Register */
81
+ #define ADMUX _SFR_IO8(0x07)
82
+ # define REFS0 6
83
+ # define ADLAR 5
84
+ # define MUX1 1
85
+ # define MUX0 0
86
+
87
+ /* Analog Comparator Control and Status Register */
88
+ #define ACSR _SFR_IO8(0x08)
89
+ # define ACD 7
90
+ # define ACBG 6
91
+ # define ACO 5
92
+ # define ACI 4
93
+ # define ACIE 3
94
+ # define ACIS1 1
95
+ # define ACIS0 0
96
+
97
+ /* Digital Input Disable Register 0 */
98
+ #define DIDR0 _SFR_IO8(0x14)
99
+ # define ADC0D 5
100
+ # define ADC2D 4
101
+ # define ADC3D 3
102
+ # define ADC1D 2
103
+ # define AIN1D 1
104
+ # define AIN0D 0
105
+
106
+ /* PIN Change Mask Register */
107
+ #define PCMSK _SFR_IO8(0x15)
108
+ # define PCINT5 5
109
+ # define PCINT4 4
110
+ # define PCINT3 3
111
+ # define PCINT2 2
112
+ # define PCINT1 1
113
+ # define PCINT0 0
114
+
115
+ /* Port B Pin Utilization [2535D-AVR-04/04]
116
+ - PORTB5 = PCINT5/RESET#/ADC0/dW
117
+ - PORTB4 = PCINT4/ADC2
118
+ - PORTB3 = PCINT3/CLKI/ADC3
119
+ - PORTB2 = SCK/ADC1/T0/PCINT2
120
+ - PORTB1 = MISO/AIN1/OC0B/INT0/PCINT1
121
+ - PORTB0 = MOSI/AIN0/OC0A/PCINT0 */
122
+
123
+ /* Input Pins, Port B */
124
+ #define PINB _SFR_IO8(0x16)
125
+ # define PINB5 5
126
+ # define PINB4 4
127
+ # define PINB3 3
128
+ # define PINB2 2
129
+ # define PINB1 1
130
+ # define PINB0 0
131
+
132
+ /* Data Direction Register, Port B */
133
+ #define DDRB _SFR_IO8(0x17)
134
+ # define DDB5 5
135
+ # define DDB4 4
136
+ # define DDB3 3
137
+ # define DDB2 2
138
+ # define DDB1 1
139
+ # define DDB0 0
140
+
141
+ /* Data Register, Port B */
142
+ #define PORTB _SFR_IO8(0x18)
143
+ # define PB5 5
144
+ # define PB4 4
145
+ # define PB3 3
146
+ # define PB2 2
147
+ # define PB1 1
148
+ # define PB0 0
149
+
150
+ /* ATtiny EEPROM Control Register EECR */
151
+ #define EECR _SFR_IO8(0x1C)
152
+ #define EEPM1 5
153
+ #define EEPM0 4
154
+ #define EERIE 3
155
+ #define EEMPE 2
156
+ #define EEPE 1
157
+ #define EERE 0
158
+
159
+ /* EEPROM Data Register */
160
+ #define EEDR _SFR_IO8(0x1D)
161
+
162
+ /* The EEPROM Address Register EEAR[6:0] */
163
+ #define EEAR _SFR_IO8(0x1E)
164
+ #define EEARL _SFR_IO8(0x1E)
165
+
166
+ /* Watchdog Timer Control Register */
167
+ #define WDTCR _SFR_IO8(0x21)
168
+ # define WDTIF 7
169
+ # define WDTIE 6
170
+ # define WDP3 5
171
+ # define WDCE 4
172
+ # define WDE 3
173
+ # define WDP2 2
174
+ # define WDP1 1
175
+ # define WDP0 0
176
+
177
+ /* Clock Prescale Register */
178
+ #define CLKPR _SFR_IO8(0x26)
179
+ # define CLKPCE 7
180
+ # define CLKPS3 3
181
+ # define CLKPS2 2
182
+ # define CLKPS1 1
183
+ # define CLKPS0 0
184
+
185
+ /* General Timer/Counter Control Register */
186
+ #define GTCCR _SFR_IO8(0x28)
187
+ # define TSM 7
188
+ # define PSR10 0
189
+
190
+ /* Output Compare 0 Register B */
191
+ #define OCR0B _SFR_IO8(0x29)
192
+
193
+ /* debugWIRE Data Register */
194
+ #define DWDR _SFR_IO8(0x2e)
195
+
196
+ /* Timer/Counter 0 Control Register A */
197
+ #define TCCR0A _SFR_IO8(0x2f)
198
+ # define COM0A1 7
199
+ # define COM0A0 6
200
+ # define COM0B1 5
201
+ # define COM0B0 4
202
+ # define WGM01 1
203
+ # define WGM00 0
204
+
205
+ /* Oscillator Calibration Register */
206
+ #define OSCCAL _SFR_IO8(0x31)
207
+
208
+ /* Timer/Counter0 (8-bit) */
209
+ #define TCNT0 _SFR_IO8(0x32)
210
+
211
+ /* Timer/Counter 0 Control Register B */
212
+ #define TCCR0B _SFR_IO8(0x33)
213
+ # define FOC0A 7
214
+ # define FOC0B 6
215
+ # define WGM02 3
216
+ # define CS02 2
217
+ # define CS01 1
218
+ # define CS00 0
219
+
220
+ /* MCU General Status Register */
221
+ #define MCUSR _SFR_IO8(0x34)
222
+ # define WDRF 3
223
+ # define BORF 2
224
+ # define EXTRF 1
225
+ # define PORF 0
226
+
227
+ /* MCU General Control Register */
228
+ #define MCUCR _SFR_IO8(0x35)
229
+ # define PUD 6
230
+ # define SE 5
231
+ # define SM1 4
232
+ # define SM0 3
233
+ # define ISC01 1
234
+ # define ISC00 0
235
+
236
+ /* Output Compare 0 REgister A */
237
+ #define OCR0A _SFR_IO8(0x36)
238
+
239
+ /* Store Program Memory Control and Status Register */
240
+ #define SPMCSR _SFR_IO8(0x37)
241
+ # define CTPB 4
242
+ # define RFLB 3
243
+ # define PGWRT 2
244
+ # define PGERS 1
245
+ # define SPMEN 0
246
+ # define SELFPRGEN 0
247
+
248
+ /* Timer/Counter 0 Interrupt Flag Register */
249
+ #define TIFR0 _SFR_IO8(0x38)
250
+ # define OCF0B 3
251
+ # define OCF0A 2
252
+ # define TOV0 1
253
+
254
+ /* Timer/Counter 0 Interrupt MaSK Register */
255
+ #define TIMSK0 _SFR_IO8(0x39)
256
+ # define OCIE0B 3
257
+ # define OCIE0A 2
258
+ # define TOIE0 1
259
+
260
+ /* General Interrupt Flag Register */
261
+ #define GIFR _SFR_IO8(0x3a)
262
+ # define INTF0 6
263
+ # define PCIF 5
264
+
265
+ /* General Interrupt MaSK register */
266
+ #define GIMSK _SFR_IO8(0x3b)
267
+ # define INT0 6
268
+ # define PCIE 5
269
+
270
+ /* SPL and SREG are defined in <avr/io.h> */
271
+
272
+ /* From the datasheet:
273
+ 1 0x0000 RESET External Pin, Power-on Reset, Brown-out Reset, Watchdog Reset
274
+ 2 0x0001 INT0 External Interrupt Request 0
275
+ 3 0x0002 PCINT0 Pin Change Interrupt Request 0
276
+ 4 0x0003 TIM0_OVF Timer/Counter Overflow
277
+ 5 0x0004 EE_RDY EEPROM Ready
278
+ 6 0x0005 ANA_COMP Analog Comparator
279
+ 7 0x0006 TIM0_COMPA Timer/Counter Compare Match A
280
+ 8 0x0007 TIM0_COMPB Timer/Counter Compare Match B
281
+ 9 0x0008 WDT Watchdog Time-out
282
+ 10 0x0009 ADC ADC Conversion Complete */
283
+
284
+ /* External Interrupt 0 */
285
+ #define INT0_vect_num 1
286
+ #define INT0_vect _VECTOR(1)
287
+ #define SIG_INTERRUPT0 _VECTOR(1)
288
+
289
+ /* External Interrupt Request 0 */
290
+ #define PCINT0_vect_num 2
291
+ #define PCINT0_vect _VECTOR(2)
292
+ #define SIG_PIN_CHANGE0 _VECTOR(2)
293
+
294
+ /* Timer/Counter0 Overflow */
295
+ #define TIM0_OVF_vect_num 3
296
+ #define TIM0_OVF_vect _VECTOR(3)
297
+ #define SIG_OVERFLOW0 _VECTOR(3)
298
+
299
+ /* EEPROM Ready */
300
+ #define EE_RDY_vect_num 4
301
+ #define EE_RDY_vect _VECTOR(4)
302
+ #define SIG_EEPROM_READY _VECTOR(4)
303
+
304
+ /* Analog Comparator */
305
+ #define ANA_COMP_vect_num 5
306
+ #define ANA_COMP_vect _VECTOR(5)
307
+ #define SIG_COMPARATOR _VECTOR(5)
308
+
309
+ /* Timer/Counter Compare Match A */
310
+ #define TIM0_COMPA_vect_num 6
311
+ #define TIM0_COMPA_vect _VECTOR(6)
312
+ #define SIG_OUTPUT_COMPARE0A _VECTOR(6)
313
+
314
+ /* Timer/Counter Compare Match B */
315
+ #define TIM0_COMPB_vect_num 7
316
+ #define TIM0_COMPB_vect _VECTOR(7)
317
+ #define SIG_OUTPUT_COMPARE0B _VECTOR(7)
318
+
319
+ /* Watchdog Time-out */
320
+ #define WDT_vect_num 8
321
+ #define WDT_vect _VECTOR(8)
322
+ #define SIG_WATCHDOG_TIMEOUT _VECTOR(8)
323
+
324
+ /* ADC Conversion Complete */
325
+ #define ADC_vect_num 9
326
+ #define ADC_vect _VECTOR(9)
327
+ #define SIG_ADC _VECTOR(9)
328
+
329
+ #define _VECTORS_SIZE 20
330
+
331
+ #define SPM_PAGESIZE 32
332
+ #define RAMSTART (0x60)
333
+ #define RAMEND 0x9F
334
+ #define XRAMEND RAMEND
335
+ #define E2END 0x3F
336
+ #define E2PAGESIZE 4
337
+ #define FLASHEND 0x3FF
338
+
339
+
340
+ /* Fuses */
341
+
342
+ #define FUSE_MEMORY_SIZE 2
343
+
344
+ /* Low Fuse Byte */
345
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0)
346
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1)
347
+ #define FUSE_SUT0 (unsigned char)~_BV(2)
348
+ #define FUSE_SUT1 (unsigned char)~_BV(3)
349
+ #define FUSE_CKDIV8 (unsigned char)~_BV(4)
350
+ #define FUSE_WDTON (unsigned char)~_BV(5)
351
+ #define FUSE_EESAVE (unsigned char)~_BV(6)
352
+ #define FUSE_SPIEN (unsigned char)~_BV(7)
353
+ #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_SUT0 & FUSE_CKDIV8 & FUSE_SPIEN)
354
+
355
+ /* High Fuse Byte */
356
+ #define FUSE_RSTDISBL (unsigned char)~_BV(0)
357
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(1)
358
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(2)
359
+ #define FUSE_DWEN (unsigned char)~_BV(3)
360
+ #define FUSE_SPMEN (unsigned char)~_BV(4)
361
+ #define HFUSE_DEFAULT (0xFF)
362
+
363
+
364
+ /* Lock Bits */
365
+ #define __LOCK_BITS_EXIST
366
+
367
+
368
+ /* Signature */
369
+ #define SIGNATURE_0 0x1E
370
+ #define SIGNATURE_1 0x90
371
+ #define SIGNATURE_2 0x07
372
+
373
+
374
+ /* Deprecated items */
375
+ #if !defined(__AVR_LIBC_DEPRECATED_ENABLE__)
376
+
377
+ #pragma GCC system_header
378
+
379
+ #pragma GCC poison SIG_INTERRUPT0
380
+ #pragma GCC poison SIG_PIN_CHANGE0
381
+ #pragma GCC poison SIG_OVERFLOW0
382
+ #pragma GCC poison SIG_EEPROM_READY
383
+ #pragma GCC poison SIG_COMPARATOR
384
+ #pragma GCC poison SIG_OUTPUT_COMPARE0A
385
+ #pragma GCC poison SIG_OUTPUT_COMPARE0B
386
+ #pragma GCC poison SIG_WATCHDOG_TIMEOUT
387
+ #pragma GCC poison SIG_ADC
388
+
389
+ #endif /* !defined(__AVR_LIBC_DEPRECATED_ENABLE__) */
390
+
391
+ #define SLEEP_MODE_IDLE (0x00<<3)
392
+ #define SLEEP_MODE_ADC (0x01<<3)
393
+ #define SLEEP_MODE_PWR_DOWN (0x02<<3)
394
+
395
+ #endif /* _AVR_IOTN13_H_*/
@@ -0,0 +1,394 @@
1
+ /* Copyright (c) 2008 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: iotn13a.h 1955 2009-04-28 08:51:16Z arcanum $ */
32
+
33
+ /* avr/iotn13a.h - definitions for ATtiny13 */
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_ "iotn13a.h"
43
+ #else
44
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
45
+ #endif
46
+
47
+
48
+ #ifndef _AVR_ATTINY13A_H_
49
+ #define _AVR_ATTINY13A_H_ 1
50
+
51
+
52
+ /* Registers and associated bit numbers. */
53
+
54
+ #define ADCSRB _SFR_IO8(0x03)
55
+ #define ADTS0 0
56
+ #define ADTS1 1
57
+ #define ADTS2 2
58
+ #define ACME 6
59
+
60
+ #ifndef __ASSEMBLER__
61
+ #define ADC _SFR_IO16(0x04)
62
+ #endif
63
+ #define ADCW _SFR_IO16(0x04)
64
+
65
+ #define ADCL _SFR_IO8(0x04)
66
+ #define ADCL0 0
67
+ #define ADCL1 1
68
+ #define ADCL2 2
69
+ #define ADCL3 3
70
+ #define ADCL4 4
71
+ #define ADCL5 5
72
+ #define ADCL6 6
73
+ #define ADCL7 7
74
+
75
+ #define ADCH _SFR_IO8(0x05)
76
+ #define ADCH0 0
77
+ #define ADCH1 1
78
+ #define ADCH2 2
79
+ #define ADCH3 3
80
+ #define ADCH4 4
81
+ #define ADCH5 5
82
+ #define ADCH6 6
83
+ #define ADCH7 7
84
+
85
+ #define ADCSRA _SFR_IO8(0x06)
86
+ #define ADPS0 0
87
+ #define ADPS1 1
88
+ #define ADPS2 2
89
+ #define ADIE 3
90
+ #define ADIF 4
91
+ #define ADATE 5
92
+ #define ADSC 6
93
+ #define ADEN 7
94
+
95
+ #define ADMUX _SFR_IO8(0x07)
96
+ #define MUX0 0
97
+ #define MUX1 1
98
+ #define ADLAR 5
99
+ #define REFS0 6
100
+
101
+ #define ACSR _SFR_IO8(0x08)
102
+ #define ACIS0 0
103
+ #define ACIS1 1
104
+ #define ACIE 3
105
+ #define ACI 4
106
+ #define ACO 5
107
+ #define ACBG 6
108
+ #define ACD 7
109
+
110
+ #define DIDR0 _SFR_IO8(0x14)
111
+ #define AIN0D 0
112
+ #define AIN1D 1
113
+ #define ADC1D 2
114
+ #define ADC3D 3
115
+ #define ADC2D 4
116
+ #define ADC0D 5
117
+
118
+ #define PCMSK _SFR_IO8(0x15)
119
+ #define PCINT0 0
120
+ #define PCINT1 1
121
+ #define PCINT2 2
122
+ #define PCINT3 3
123
+ #define PCINT4 4
124
+ #define PCINT5 5
125
+
126
+ #define PINB _SFR_IO8(0x16)
127
+ #define PINB0 0
128
+ #define PINB1 1
129
+ #define PINB2 2
130
+ #define PINB3 3
131
+ #define PINB4 4
132
+ #define PINB5 5
133
+
134
+ #define DDRB _SFR_IO8(0x17)
135
+ #define DDB0 0
136
+ #define DDB1 1
137
+ #define DDB2 2
138
+ #define DDB3 3
139
+ #define DDB4 4
140
+ #define DDB5 5
141
+
142
+ #define PORTB _SFR_IO8(0x18)
143
+ #define PORTB0 0
144
+ #define PORTB1 1
145
+ #define PORTB2 2
146
+ #define PORTB3 3
147
+ #define PORTB4 4
148
+ #define PORTB5 5
149
+
150
+ #define EECR _SFR_IO8(0x1C)
151
+ #define EERE 0
152
+ #define EEWE 1
153
+ #define EEPE EEWE
154
+ #define EEMWE 2
155
+ #define EEMPE EEMWE
156
+ #define EERIE 3
157
+ #define EEPM0 4
158
+ #define EEPM1 5
159
+
160
+ #define EEDR _SFR_IO8(0x1D)
161
+ #define EEDR0 0
162
+ #define EEDR1 1
163
+ #define EEDR2 2
164
+ #define EEDR3 3
165
+ #define EEDR4 4
166
+ #define EEDR5 5
167
+ #define EEDR6 6
168
+ #define EEDR7 7
169
+
170
+ #define EEARL _SFR_IO8(0x1E)
171
+
172
+ #define EEAR _SFR_IO8(0x1E)
173
+ #define EEAR0 0
174
+ #define EEAR1 1
175
+ #define EEAR2 2
176
+ #define EEAR3 3
177
+ #define EEAR4 4
178
+ #define EEAR5 5
179
+
180
+ #define WDTCR _SFR_IO8(0x21)
181
+ #define WDP0 0
182
+ #define WDP1 1
183
+ #define WDP2 2
184
+ #define WDE 3
185
+ #define WDCE 4
186
+ #define WDP3 5
187
+ #define WDTIE 6
188
+ #define WDTIF 7
189
+
190
+ #define PRR _SFR_IO8(0x25)
191
+ #define PRADC 0
192
+ #define PRTIM0 1
193
+
194
+ #define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRTIM0))
195
+ #define __AVR_HAVE_PRR_PRADC
196
+ #define __AVR_HAVE_PRR_PRTIM0
197
+
198
+ #define CLKPR _SFR_IO8(0x26)
199
+ #define CLKPS0 0
200
+ #define CLKPS1 1
201
+ #define CLKPS2 2
202
+ #define CLKPS3 3
203
+ #define CLKPCE 7
204
+
205
+ #define GTCCR _SFR_IO8(0x28)
206
+ #define PSR10 0
207
+ #define TSM 7
208
+
209
+ #define OCR0B _SFR_IO8(0x29)
210
+ #define OCR0B_0 0
211
+ #define OCR0B_1 1
212
+ #define OCR0B_2 2
213
+ #define OCR0B_3 3
214
+ #define OCR0B_4 4
215
+ #define OCR0B_5 5
216
+ #define OCR0B_6 6
217
+ #define OCR0B_7 7
218
+
219
+ #define DWDR _SFR_IO8(0x2E)
220
+ #define DWDR0 0
221
+ #define DWDR1 1
222
+ #define DWDR2 2
223
+ #define DWDR3 3
224
+ #define DWDR4 4
225
+ #define DWDR5 5
226
+ #define DWDR6 6
227
+ #define DWDR7 7
228
+
229
+ #define TCCR0A _SFR_IO8(0x2F)
230
+ #define WGM00 0
231
+ #define WGM01 1
232
+ #define COM0B0 4
233
+ #define COM0B1 5
234
+ #define COM0A0 6
235
+ #define COM0A1 7
236
+
237
+ #define BODCR _SFR_IO8(0x30)
238
+ #define BODSE 0
239
+ #define BODS 1
240
+
241
+ #define OSCCAL _SFR_IO8(0x31)
242
+ #define CAL0 0
243
+ #define CAL1 1
244
+ #define CAL2 2
245
+ #define CAL3 3
246
+ #define CAL4 4
247
+ #define CAL5 5
248
+ #define CAL6 6
249
+
250
+ #define TCNT0 _SFR_IO8(0x32)
251
+ #define TCNT0_0 0
252
+ #define TCNT0_1 1
253
+ #define TCNT0_2 2
254
+ #define TCNT0_3 3
255
+ #define TCNT0_4 4
256
+ #define TCNT0_5 5
257
+ #define TCNT0_6 6
258
+ #define TCNT0_7 7
259
+
260
+ #define TCCR0B _SFR_IO8(0x33)
261
+ #define CS00 0
262
+ #define CS01 1
263
+ #define CS02 2
264
+ #define WGM02 3
265
+ #define FOC0B 6
266
+ #define FOC0A 7
267
+
268
+ #define MCUSR _SFR_IO8(0x34)
269
+ #define PORF 0
270
+ #define EXTRF 1
271
+ #define BORF 2
272
+ #define WDRF 3
273
+
274
+ #define MCUCR _SFR_IO8(0x35)
275
+ #define ISC00 0
276
+ #define ISC01 1
277
+ #define SM0 3
278
+ #define SM1 4
279
+ #define SE 5
280
+ #define PUD 6
281
+
282
+ #define OCR0A _SFR_IO8(0x36)
283
+ #define OCR0A_0 0
284
+ #define OCR0A_1 1
285
+ #define OCR0A_2 2
286
+ #define OCR0A_3 3
287
+ #define OCR0A_4 4
288
+ #define OCR0A_5 5
289
+ #define OCR0A_6 6
290
+ #define OCR0A_7 7
291
+
292
+ #define SPMCSR _SFR_IO8(0x37)
293
+ #define SPMEN 0
294
+ #define PGERS 1
295
+ #define PGWRT 2
296
+ #define RFLB 3
297
+ #define CTPB 4
298
+
299
+ #define TIFR0 _SFR_IO8(0x38)
300
+ #define TOV0 1
301
+ #define OCF0A 2
302
+ #define OCF0B 3
303
+
304
+ #define TIMSK0 _SFR_IO8(0x39)
305
+ #define TOIE0 1
306
+ #define OCIE0A 2
307
+ #define OCIE0B 3
308
+
309
+ #define GIFR _SFR_IO8(0x3A)
310
+ #define PCIF 5
311
+ #define INTF0 6
312
+
313
+ #define GIMSK _SFR_IO8(0x3B)
314
+ #define PCIE 5
315
+ #define INT0 6
316
+
317
+
318
+ /* Interrupt vectors */
319
+ /* Vector 0 is the reset vector */
320
+ #define INT0_vect_num 1
321
+ #define INT0_vect _VECTOR(1) /* External Interrupt 0 */
322
+ #define PCINT0_vect_num 2
323
+ #define PCINT0_vect _VECTOR(2) /* External Interrupt Request 0 */
324
+ #define TIM0_OVF_vect_num 3
325
+ #define TIM0_OVF_vect _VECTOR(3) /* Timer/Counter0 Overflow */
326
+ #define EE_RDY_vect_num 4
327
+ #define EE_RDY_vect _VECTOR(4) /* EEPROM Ready */
328
+ #define ANA_COMP_vect_num 5
329
+ #define ANA_COMP_vect _VECTOR(5) /* Analog Comparator */
330
+ #define TIM0_COMPA_vect_num 6
331
+ #define TIM0_COMPA_vect _VECTOR(6) /* Timer/Counter Compare Match A */
332
+ #define TIM0_COMPB_vect_num 7
333
+ #define TIM0_COMPB_vect _VECTOR(7) /* Timer/Counter Compare Match B */
334
+ #define WDT_vect_num 8
335
+ #define WDT_vect _VECTOR(8) /* Watchdog Time-out */
336
+ #define ADC_vect_num 9
337
+ #define ADC_vect _VECTOR(9) /* ADC Conversion Complete */
338
+
339
+ #define _VECTOR_SIZE 2 /* Size of individual vector. */
340
+ #define _VECTORS_SIZE (10 * _VECTOR_SIZE)
341
+
342
+
343
+ /* Constants */
344
+ #define SPM_PAGESIZE (32)
345
+ #define RAMSTART (0x60)
346
+ #define RAMSIZE (64)
347
+ #define RAMEND (RAMSTART + RAMSIZE - 1)
348
+ #define XRAMSTART (NA)
349
+ #define XRAMSIZE (0)
350
+ #define XRAMEND RAMEND
351
+ #define E2END (64 - 1)
352
+ #define E2PAGESIZE (4)
353
+ #define FLASHEND (1024 - 1)
354
+
355
+
356
+ /* Fuses */
357
+ #define FUSE_MEMORY_SIZE 2
358
+
359
+ /* Low Fuse Byte */
360
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
361
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
362
+ #define FUSE_SUT0 (unsigned char)~_BV(2) /* Select start-up time */
363
+ #define FUSE_SUT1 (unsigned char)~_BV(3) /* Select start-up time */
364
+ #define FUSE_CKDIV8 (unsigned char)~_BV(4) /* Start up with system clock divided by 8 */
365
+ #define FUSE_WDTON (unsigned char)~_BV(5) /* Watch dog timer always on */
366
+ #define FUSE_EESAVE (unsigned char)~_BV(6) /* Keep EEprom contents during chip erase */
367
+ #define FUSE_SPIEN (unsigned char)~_BV(7) /* SPI programming enable */
368
+ #define LFUSE_DEFAULT (FUSE_SPIEN & FUSE_CKDIV8 & FUSE_SUT0 & FUSE_CKSEL0)
369
+
370
+ /* High Fuse Byte */
371
+ #define FUSE_RSTDISBL (unsigned char)~_BV(0) /* Disable external reset */
372
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(1) /* Enable BOD and select level */
373
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(2) /* Enable BOD and select level */
374
+ #define FUSE_DWEN (unsigned char)~_BV(3) /* DebugWire Enable */
375
+ #define FUSE_SELFPRGEN (unsigned char)~_BV(4) /* Self Programming Enable */
376
+ #define HFUSE_DEFAULT (0xFF)
377
+
378
+
379
+ /* Lock Bits */
380
+ #define __LOCK_BITS_EXIST
381
+
382
+
383
+ /* Signature */
384
+ #define SIGNATURE_0 0x1E
385
+ #define SIGNATURE_1 0x90
386
+ #define SIGNATURE_2 0x07
387
+
388
+
389
+ #define SLEEP_MODE_IDLE (0x00<<3)
390
+ #define SLEEP_MODE_ADC (0x01<<3)
391
+ #define SLEEP_MODE_PWR_DOWN (0x02<<3)
392
+
393
+ #endif /* _AVR_ATTINY13A_H_ */
394
+