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,309 @@
1
+ /* Copyright (c) 2002, Colin O'Flynn
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
+ /* avr/io86r401.h - definitions for AT86RF401 */
32
+
33
+ #ifndef _AVR_IO86RF401_H_
34
+ #define _AVR_IO86RF401_H_ 1
35
+
36
+ /* This file should only be included from <avr/io.h>, never directly. */
37
+
38
+ #ifndef _AVR_IO_H_
39
+ # error "Include <avr/io.h> instead of this file."
40
+ #endif
41
+
42
+ #ifndef _AVR_IOXXX_H_
43
+ # define _AVR_IOXXX_H_ "io86r401.h"
44
+ #else
45
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
46
+ #endif
47
+
48
+ /* Status REGister */
49
+ #define SREG _SFR_IO8(0x3F)
50
+
51
+ /* Stack Pointer */
52
+ #define SP _SFR_IO16(0x3D)
53
+ #define SPH _SFR_IO8(0x3E)
54
+ #define SPL _SFR_IO8(0x3D)
55
+
56
+ /*Battery low configeration register */
57
+ #define BL_CONFIG _SFR_IO8(0x35)
58
+
59
+ /*Button detect register*/
60
+ #define B_DET _SFR_IO8(0x34)
61
+
62
+ /*AVR Configeration register*/
63
+ #define AVR_CONFIG _SFR_IO8(0x33)
64
+
65
+ /* I/O registers */
66
+
67
+ /*Data in register */
68
+ #define IO_DATIN _SFR_IO8(0x32)
69
+
70
+ /*Data out register */
71
+ #define IO_DATOUT _SFR_IO8(0x31)
72
+
73
+ /*IO Enable register */
74
+ #define IO_ENAB _SFR_IO8(0x30)
75
+
76
+ /* Watchdog Timer Control Register */
77
+ #define WDTCR _SFR_IO8(0x22)
78
+
79
+ /* Bit Timer Control Register */
80
+ #define BTCR _SFR_IO8(0x21)
81
+
82
+ #define BTCNT _SFR_IO8(0x20)
83
+
84
+ /*
85
+ NOTE: EEPROM name's changed to have D in front on them, per datasheet, but
86
+ you may want to remove the leading D.
87
+ */
88
+ /* EEPROM Control Register */
89
+
90
+ /* EEPROM Address Register */
91
+ #define DEEAR _SFR_IO8(0x1E)
92
+ #define DEEARL _SFR_IO8(0x1E)
93
+
94
+ /* EEPROM Data Register */
95
+ #define DEEDR _SFR_IO8(0x1D)
96
+ /* EEPROM Control Register */
97
+ #define DEECR _SFR_IO8(0x1C)
98
+
99
+ /* Lock Detector Configuration Register 2 */
100
+ #define LOCKDET2 _SFR_IO8(0x17)
101
+
102
+ /* VCO Tuning Register*/
103
+ #define VCOTUNE _SFR_IO8(0x16)
104
+
105
+ /* Power Attenuation Control Register */
106
+ #define PWR_ATTEN _SFR_IO8(0x14)
107
+
108
+ /* Transmitter Control Register */
109
+ #define TX_CNTL _SFR_IO8(0x12)
110
+
111
+ /* Lock Detector Configuration Register 1 */
112
+ #define LOCKDET1 _SFR_IO8(0x10)
113
+
114
+
115
+ /* Interrupt vectors */
116
+
117
+ /* Transmission Done, Bit Timer Flag 2 Interrupt */
118
+ #define TXDONE_vect_num 1
119
+ #define TXDONE_vect _VECTOR(1)
120
+ #define SIG_TXDONE _VECTOR(1)
121
+
122
+ /* Transmit Buffer Empty, Bit Itmer Flag 0 Interrupt */
123
+ #define TXEMPTY_vect_num 2
124
+ #define TXEMPTY_vect _VECTOR(2)
125
+ #define SIG_TXBE _VECTOR(2)
126
+
127
+ #define _VECTORS_SIZE 12
128
+
129
+ /*
130
+ * The Register Bit names are represented by their bit number (0-7).
131
+ */
132
+
133
+ /* Lock Detector Configuration Register 1 - LOCKDET1 */
134
+ #define UPOK 4
135
+ #define ENKO 3
136
+ #define BOD 2
137
+ #define CS1 1
138
+ #define CS0 0
139
+
140
+ /* Transmit Control Register - TX_CNTL */
141
+ #define TXE 5
142
+ #define TXK 4
143
+ #define LOC 2
144
+
145
+ /* Power Attenuation Control Register - PWR_ATTEN */
146
+ #define PCC2 5
147
+ #define PCC1 4
148
+ #define PCC0 3
149
+ #define PCF2 2
150
+ #define PCF1 1
151
+ #define PCF0 0
152
+
153
+ /* VCO Tuning Register 6 - VCOTUNE --NOTE: [] removed from names*/
154
+ #define VCOVDET1 7
155
+ #define VCOVDET0 6
156
+ #define VCOTUNE4 4
157
+ #define VCOTUNE3 3
158
+ #define VCOTUNE2 2
159
+ #define VCOTUNE1 1
160
+ #define VCOTUNE0 0
161
+
162
+ /* Lock Detector Configuration Register 2 - LOCKDET2 --NOTE: [] removed from names*/
163
+ #define EUD 7
164
+ #define LAT 6
165
+ #define ULC2 5
166
+ #define ULC1 4
167
+ #define ULC0 3
168
+ #define LC2 2
169
+ #define LC1 1
170
+ #define LC0 0
171
+
172
+ /* Data EEPROM Control Register - DEECR */
173
+ #define BSY 3
174
+ #define EEU 2
175
+ #define EEL 1
176
+ #define EER 0
177
+
178
+ /* Data EEPROM Data Register - DEEDR */
179
+ #define ED7 7
180
+ #define ED6 6
181
+ #define ED5 5
182
+ #define ED4 4
183
+ #define ED3 3
184
+ #define ED2 2
185
+ #define ED1 1
186
+ #define ED0 0
187
+
188
+ /* Data EEPROM Address Register - DEEAR */
189
+ #define PA6 6
190
+ #define PA5 5
191
+ #define PA4 4
192
+ #define PA3 3
193
+ #define BA2 2 /* B is not a typo! */
194
+ #define BA1 1
195
+ #define BA0 0
196
+
197
+ /* Bit Timer Count Register - BTCNT */
198
+ #define C7 7
199
+ #define C6 6
200
+ #define C5 5
201
+ #define C4 4
202
+ #define C3 3
203
+ #define C2 2
204
+ #define C1 1
205
+ #define C0 0
206
+
207
+ /* Bit Timer Control Register - BTCR */
208
+ #define C9 7
209
+ #define C8 6
210
+ #define M1 5
211
+ #define M0 4
212
+ #define IE 3
213
+ #define F2 2
214
+ #define DATA 1
215
+ #define F0 0
216
+
217
+ /* Watchdog Timer Control Register - WDTCR */
218
+ #define WDTOE 4
219
+ #define WDE 3
220
+ #define WDP2 2
221
+ #define WDP1 1
222
+ #define WDP0 0
223
+
224
+ /* I/O Enable Register - IO_ENAB */
225
+ #define BOHYST 6
226
+ #define IOE5 5
227
+ #define IOE4 4
228
+ #define IOE3 3
229
+ #define IOE2 2
230
+ #define IOE1 1
231
+ #define IOE0 0
232
+
233
+ /* Note: No PORTB or whatever, this is the equivalent. */
234
+ /* I/O Data Out Register - IO_DATOUT */
235
+ #define IOO5 5
236
+ #define IOO4 4
237
+ #define IOO3 3
238
+ #define IOO2 2
239
+ #define IOO1 1
240
+ #define IOO0 0
241
+
242
+ /* Note: No PINB or whatever, this is the equivalent. */
243
+ /* I/O Data In Register - IO_DATIN */
244
+ #define IOI5 5
245
+ #define IOI4 4
246
+ #define IOI3 3
247
+ #define IOI2 2
248
+ #define IOI1 1
249
+ #define IOI0 0
250
+
251
+ /* AVR Configuration Register - AVR_CONFIG */
252
+ #define ACS1 6
253
+ #define ACS0 5
254
+ #define TM 4
255
+ #define BD 3
256
+ #define BLI 2
257
+ #define SLEEP 1
258
+ #define BBM 0
259
+
260
+ /* Button Detect Register - B_DET */
261
+ #define BD5 5
262
+ #define BD4 4
263
+ #define BD3 3
264
+ #define BD2 2
265
+ #define BD1 1
266
+ #define BD0 0
267
+
268
+ /* Battery Low Configuration Register - BL_CONFIG */
269
+ #define BL 7
270
+ #define BLV 6
271
+ #define BL5 5
272
+ #define BL4 4
273
+ #define BL3 3
274
+ #define BL2 2
275
+ #define BL1 1
276
+ #define BL0 0
277
+
278
+ /* Pointer definition */
279
+ #define XL r26
280
+ #define XH r27
281
+ #define YL r28
282
+ #define YH r29
283
+ #define ZL r30
284
+ #define ZH r31
285
+
286
+ /* Constants */
287
+ #define RAMSTART 0x60
288
+ #define RAMEND 0xDF
289
+ #define XRAMEND RAMEND
290
+ #define E2END 0x7F
291
+ #define E2PAGESIZE 0
292
+ #define FLASHEND 0x07FF
293
+
294
+
295
+ /* Fuses */
296
+ #define FUSE_MEMORY_SIZE 0
297
+
298
+
299
+ /* Lock Bits */
300
+ #define __LOCK_BITS_EXIST
301
+
302
+
303
+ /* Signature */
304
+ #define SIGNATURE_0 0x1E
305
+ #define SIGNATURE_1 0x91
306
+ #define SIGNATURE_2 0x81
307
+
308
+
309
+ #endif /* _AVR_IO86RF401_H_ */
@@ -0,0 +1,1157 @@
1
+ /* Copyright (c) 2005, Andrey Pashchenko
2
+ Copyright (c) 2007, Anatoly Sokolov
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright
12
+ notice, this list of conditions and the following disclaimer in
13
+ the documentation and/or other materials provided with the
14
+ distribution.
15
+
16
+ * Neither the name of the copyright holders nor the names of
17
+ contributors may be used to endorse or promote products derived
18
+ from this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ POSSIBILITY OF SUCH DAMAGE. */
31
+
32
+ /* $Id: io90pwm1.h 2225 2011-03-02 16:27:26Z arcanum $ */
33
+
34
+ /* avr/iopwm1.h - definitions for AT90PWM1 device */
35
+
36
+ #ifndef _AVR_IOPWM1_H_
37
+ #define _AVR_IOPWM1_H_ 1
38
+
39
+ /* This file should only be included from <avr/io.h>, never directly. */
40
+
41
+ #ifndef _AVR_IO_H_
42
+ # error "Include <avr/io.h> instead of this file."
43
+ #endif
44
+
45
+ #ifndef _AVR_IOXXX_H_
46
+ # define _AVR_IOXXX_H_ "iopwm1.h"
47
+ #else
48
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
49
+ #endif
50
+
51
+ /* I/O registers */
52
+
53
+ /* Reserved [0x00..0x02] */
54
+
55
+ /* Port B Input Pins Address */
56
+ #define PINB _SFR_IO8(0x03)
57
+ /* PINB */
58
+ #define PINB7 7
59
+ #define PINB6 6
60
+ #define PINB5 5
61
+ #define PINB4 4
62
+ #define PINB3 3
63
+ #define PINB2 2
64
+ #define PINB1 1
65
+ #define PINB0 0
66
+
67
+ /* Port B Data Direction Register */
68
+ #define DDRB _SFR_IO8(0x04)
69
+ /* DDRB */
70
+ #define DDB7 7
71
+ #define DDB6 6
72
+ #define DDB5 5
73
+ #define DDB4 4
74
+ #define DDB3 3
75
+ #define DDB2 2
76
+ #define DDB1 1
77
+ #define DDB0 0
78
+
79
+ /* Port B Data Register */
80
+ #define PORTB _SFR_IO8(0x05)
81
+ /* PORTB */
82
+ #define PB7 7
83
+ #define PB6 6
84
+ #define PB5 5
85
+ #define PB4 4
86
+ #define PB3 3
87
+ #define PB2 2
88
+ #define PB1 1
89
+ #define PB0 0
90
+
91
+ /* Reserved [0x06..0x08] */
92
+
93
+ /* Port D Input Pins Address */
94
+ #define PIND _SFR_IO8(0x09)
95
+ /* PIND */
96
+ #define PIND7 7
97
+ #define PIND6 6
98
+ #define PIND5 5
99
+ #define PIND4 4
100
+ #define PIND3 3
101
+ #define PIND2 2
102
+ #define PIND1 1
103
+ #define PIND0 0
104
+
105
+ /* Port D Data Direction Register */
106
+ #define DDRD _SFR_IO8(0x0A)
107
+ /* DDRD */
108
+ #define DDD7 7
109
+ #define DDD6 6
110
+ #define DDD5 5
111
+ #define DDD4 4
112
+ #define DDD3 3
113
+ #define DDD2 2
114
+ #define DDD1 1
115
+ #define DDD0 0
116
+
117
+ /* Port D Data Register */
118
+ #define PORTD _SFR_IO8(0x0B)
119
+ /* PORTD */
120
+ #define PD7 7
121
+ #define PD6 6
122
+ #define PD5 5
123
+ #define PD4 4
124
+ #define PD3 3
125
+ #define PD2 2
126
+ #define PD1 1
127
+ #define PD0 0
128
+
129
+ /* Port E Input Pins Address */
130
+ #define PINE _SFR_IO8(0x0C)
131
+ /* PINE */
132
+ #define PINE2 2
133
+ #define PINE1 1
134
+ #define PINE0 0
135
+
136
+ /* Port E Data Direction Register */
137
+ #define DDRE _SFR_IO8(0x0D)
138
+ /* DDRE */
139
+ #define DDE2 2
140
+ #define DDE1 1
141
+ #define DDE0 0
142
+
143
+ /* Port E Data Register */
144
+ #define PORTE _SFR_IO8(0x0E)
145
+ /* PORTE */
146
+ #define PE2 2
147
+ #define PE1 1
148
+ #define PE0 0
149
+
150
+ /* Reserved [0x0F..0x14] */
151
+
152
+ /* Timer/Counter 0 Interrupt Flag Register */
153
+ #define TIFR0 _SFR_IO8(0x15)
154
+ /* TIFR0 */
155
+ #define OCF0B 2 /* Output Compare Flag 0B */
156
+ #define OCF0A 1 /* Output Compare Flag 0A */
157
+ #define TOV0 0 /* Overflow Flag */
158
+
159
+ /* Timer/Counter1 Interrupt Flag Register */
160
+ #define TIFR1 _SFR_IO8(0x16)
161
+ /* TIFR1 */
162
+ #define ICF1 5 /* Input Capture Flag 1 */
163
+ #define OCF1B 2 /* Output Compare Flag 1B*/
164
+ #define OCF1A 1 /* Output Compare Flag 1A*/
165
+ #define TOV1 0 /* Overflow Flag */
166
+
167
+ /* Reserved [0x17..0x18] */
168
+
169
+ /* General Purpose I/O Register 1 */
170
+ #define GPIOR1 _SFR_IO8(0x19)
171
+ /* GPIOR1 */
172
+ #define GPIOR17 7
173
+ #define GPIOR16 6
174
+ #define GPIOR15 5
175
+ #define GPIOR14 4
176
+ #define GPIOR13 3
177
+ #define GPIOR12 2
178
+ #define GPIOR11 1
179
+ #define GPIOR10 0
180
+
181
+ /* General Purpose I/O Register 2 */
182
+ #define GPIOR2 _SFR_IO8(0x1A)
183
+ /* GPIOR2 */
184
+ #define GPIOR27 7
185
+ #define GPIOR26 6
186
+ #define GPIOR25 5
187
+ #define GPIOR24 4
188
+ #define GPIOR23 3
189
+ #define GPIOR22 2
190
+ #define GPIOR21 1
191
+ #define GPIOR20 0
192
+
193
+ /* General Purpose I/O Register 3 */
194
+ #define GPIOR3 _SFR_IO8(0x1B)
195
+ /* GPIOR3 */
196
+ #define GPIOR37 7
197
+ #define GPIOR36 6
198
+ #define GPIOR35 5
199
+ #define GPIOR34 4
200
+ #define GPIOR33 3
201
+ #define GPIOR32 2
202
+ #define GPIOR31 1
203
+ #define GPIOR30 0
204
+
205
+ /* External Interrupt Flag Register */
206
+ #define EIFR _SFR_IO8(0x1C)
207
+ /* EIFR */
208
+ #define INTF3 3
209
+ #define INTF2 2
210
+ #define INTF1 1
211
+ #define INTF0 0
212
+
213
+ /* External Interrupt Mask Register */
214
+ #define EIMSK _SFR_IO8(0x1D)
215
+ /* EIMSK */
216
+ #define INT3 3 /* External Interrupt Request 3 Enable */
217
+ #define INT2 2 /* External Interrupt Request 2 Enable */
218
+ #define INT1 1 /* External Interrupt Request 1 Enable */
219
+ #define INT0 0 /* External Interrupt Request 0 Enable */
220
+
221
+ /* General Purpose I/O Register 0 */
222
+ #define GPIOR0 _SFR_IO8(0x1E)
223
+ /* GPIOR0 */
224
+ #define GPIOR07 7
225
+ #define GPIOR06 6
226
+ #define GPIOR05 5
227
+ #define GPIOR04 4
228
+ #define GPIOR03 3
229
+ #define GPIOR02 2
230
+ #define GPIOR01 1
231
+ #define GPIOR00 0
232
+
233
+ /* EEPROM Control Register */
234
+ #define EECR _SFR_IO8(0x1F)
235
+ /* EECR */
236
+ #define EERIE 3 /* EEPROM Ready Interrupt Enable */
237
+ #define EEMWE 2 /* EEPROM Master Write Enable */
238
+ #define EEWE 1 /* EEPROM Write Enable */
239
+ #define EERE 0 /* EEPROM Read Enable */
240
+
241
+ /* EEPROM Data Register */
242
+ #define EEDR _SFR_IO8(0x20)
243
+ /* EEDR */
244
+ #define EEDR7 7
245
+ #define EEDR6 6
246
+ #define EEDR5 5
247
+ #define EEDR4 4
248
+ #define EEDR3 3
249
+ #define EEDR2 2
250
+ #define EEDR1 1
251
+ #define EEDR0 0
252
+
253
+ /* The EEPROM Address Registers */
254
+ #define EEAR _SFR_IO16(0x21)
255
+ #define EEARL _SFR_IO8(0x21)
256
+ #define EEARH _SFR_IO8(0x22)
257
+ /* EEARH */
258
+ #define EEAR11 3
259
+ #define EEAR10 2
260
+ #define EEAR9 1
261
+ #define EEAR8 0
262
+ /* EEARL */
263
+ #define EEAR7 7
264
+ #define EEAR6 6
265
+ #define EEAR5 5
266
+ #define EEAR4 4
267
+ #define EEAR3 3
268
+ #define EEAR2 2
269
+ #define EEAR1 1
270
+ #define EEAR0 0
271
+
272
+ /* 6-char sequence denoting where to find the EEPROM registers in memory space.
273
+ Adresses denoted in hex syntax with uppercase letters. Used by the EEPROM
274
+ subroutines.
275
+ First two letters: EECR address.
276
+ Second two letters: EEDR address.
277
+ Last two letters: EEAR address. */
278
+ #define __EEPROM_REG_LOCATIONS__ 1F2021
279
+
280
+ /* General Timer/Counter Control Register */
281
+ #define GTCCR _SFR_IO8(0x23)
282
+ /* GTCCR */
283
+ #define TSM 7 /* Timer/Counter Synchronization Mode */
284
+ #define ICPSEL1 6 /* Timer1 Input Capture Selection Bit */
285
+ #define PSRSYNC 0
286
+
287
+ /* Timer/Counter Control Register A */
288
+ #define TCCR0A _SFR_IO8(0x24)
289
+ /* TCCR0A */
290
+ #define COM0A1 7 /* Compare Output Mode, Phase Correct PWM Mode */
291
+ #define COM0A0 6 /* Compare Output Mode, Phase Correct PWM Mode */
292
+ #define COM0B1 5 /* Compare Output Mode, Fast PWm */
293
+ #define COM0B0 4 /* Compare Output Mode, Fast PWm */
294
+ #define WGM01 1 /* Waveform Generation Mode */
295
+ #define WGM00 0 /* Waveform Generation Mode */
296
+
297
+ /* Timer/Counter Control Register B */
298
+ #define TCCR0B _SFR_IO8(0x25)
299
+ /* TCCR0B */
300
+ #define FOC0A 7 /* Force Output Compare A */
301
+ #define FOC0B 6 /* Force Output Compare B */
302
+ #define WGM02 3 /* Waveform Generation Mode */
303
+ #define CS02 2 /* Clock Select */
304
+ #define CS01 1 /* Clock Select */
305
+ #define CS00 0 /* Clock Select */
306
+
307
+ /* Timer/Counter0 Register */
308
+ #define TCNT0 _SFR_IO8(0x26)
309
+ /* TCNT0 */
310
+ #define TCNT07 7
311
+ #define TCNT06 6
312
+ #define TCNT05 5
313
+ #define TCNT04 4
314
+ #define TCNT03 3
315
+ #define TCNT02 2
316
+ #define TCNT01 1
317
+ #define TCNT00 0
318
+
319
+ /* Timer/Counter0 Output Compare Register A */
320
+ #define OCR0A _SFR_IO8(0x27)
321
+ /* OCR0A */
322
+ #define OCR0A7 7
323
+ #define OCR0A6 6
324
+ #define OCR0A5 5
325
+ #define OCR0A4 4
326
+ #define OCR0A3 3
327
+ #define OCR0A2 2
328
+ #define OCR0A1 1
329
+ #define OCR0A0 0
330
+
331
+ /* Timer/Counter0 Output Compare Register B */
332
+ #define OCR0B _SFR_IO8(0x28)
333
+ /* OCR0B */
334
+ #define OCR0B7 7
335
+ #define OCR0B6 6
336
+ #define OCR0B5 5
337
+ #define OCR0B4 4
338
+ #define OCR0B3 3
339
+ #define OCR0B2 2
340
+ #define OCR0B1 1
341
+ #define OCR0B0 0
342
+
343
+ /* PLL Control and Status Register */
344
+ #define PLLCSR _SFR_IO8(0x29)
345
+ /* PLLCSR */
346
+ #define PLLF 2
347
+ #define PLLE 1 /* PLL Enable */
348
+ #define PLOCK 0 /* PLL Lock Detector */
349
+
350
+ /* Reserved [0x2A..0x2B] */
351
+
352
+ /* SPI Control Register */
353
+ #define SPCR _SFR_IO8(0x2C)
354
+ /* SPCR */
355
+ #define SPIE 7 /* SPI Interrupt Enable */
356
+ #define SPE 6 /* SPI Enable */
357
+ #define DORD 5 /* Data Order */
358
+ #define MSTR 4 /* Master/Slave Select */
359
+ #define CPOL 3 /* Clock polarity */
360
+ #define CPHA 2 /* Clock Phase */
361
+ #define SPR1 1 /* SPI Clock Rate Select 1 */
362
+ #define SPR0 0 /* SPI Clock Rate Select 0 */
363
+
364
+ /* SPI Status Register */
365
+ #define SPSR _SFR_IO8(0x2D)
366
+ /* SPSR */
367
+ #define SPIF 7 /* SPI Interrupt Flag */
368
+ #define WCOL 6 /* Write Collision Flag */
369
+ #define SPI2X 0 /* Double SPI Speed Bit */
370
+
371
+ /* SPI Data Register */
372
+ #define SPDR _SFR_IO8(0x2E)
373
+ /* SPDR */
374
+ #define SPD7 7
375
+ #define SPD6 6
376
+ #define SPD5 5
377
+ #define SPD4 4
378
+ #define SPD3 3
379
+ #define SPD2 2
380
+ #define SPD1 1
381
+ #define SPD0 0
382
+
383
+ /* Reserved [0x2F] */
384
+
385
+ /* Analog Comparator Status Register */
386
+ #define ACSR _SFR_IO8(0x30)
387
+ /* ACSR */
388
+ #define ACCKDIV 7 /* Analog Comparator Clock Divider */
389
+ #define AC2IF 6 /* Analog Comparator 2 Interrupt Flag Bit */
390
+ #define AC0IF 4 /* Analog Comparator 0 Interrupt Flag Bit */
391
+ #define AC2O 2 /* Analog Comparator 2 Output Bit */
392
+ #define AC0O 0 /* Analog Comparator 0 Output Bit */
393
+
394
+ /* Monitor Data Register */
395
+ #define MONDR _SFR_IO8(0x31)
396
+
397
+ /* Monitor Stop Mode Control Register */
398
+ #define MSMCR _SFR_IO8(0x32)
399
+
400
+ /* Sleep Mode Control Register */
401
+ #define SMCR _SFR_IO8(0x33)
402
+ /* SMCR */
403
+ #define SM2 3 /* Sleep Mode Select bit2 */
404
+ #define SM1 2 /* Sleep Mode Select bit1 */
405
+ #define SM0 1 /* Sleep Mode Select bit0 */
406
+ #define SE 0 /* Sleep Enable */
407
+
408
+ /* MCU Status Register */
409
+ #define MCUSR _SFR_IO8(0x34)
410
+ /* MCUSR */
411
+ #define WDRF 3 /* Watchdog Reset Flag */
412
+ #define BORF 2 /* Brown-out Reset Flag */
413
+ #define EXTRF 1 /* External Reset Flag */
414
+ #define PORF 0 /* Power-on reset flag */
415
+
416
+ /* MCU Control Register */
417
+ #define MCUCR _SFR_IO8(0x35)
418
+ /* MCUCR */
419
+ #define SPIPS 7 /* SPI Pin Select */
420
+ #define PUD 4 /* Pull-up disable */
421
+ #define IVSEL 1 /* Interrupt Vector Select */
422
+ #define IVCE 0 /* Interrupt Vector Change Enable */
423
+
424
+ /* Reserved [0x36] */
425
+
426
+ /* Store Program Memory Control Register */
427
+ #define SPMCSR _SFR_IO8(0x37)
428
+ /* SPMCSR */
429
+ #define SPMIE 7 /* SPM Interrupt Enable */
430
+ #define RWWSB 6 /* Read While Write Section Busy */
431
+ #define RWWSRE 4 /* Read While Write section read enable */
432
+ #define BLBSET 3 /* Boot Lock Bit Set */
433
+ #define PGWRT 2 /* Page Write */
434
+ #define PGERS 1 /* Page Erase */
435
+ #define SPMEN 0 /* Store Program Memory Enable */
436
+
437
+ /* Reserved [0x38..0x3C] */
438
+
439
+ /* 0x3D..0x3E SP [defined in <avr/io.h>] */
440
+ /* 0x3F SREG [defined in <avr/io.h>] */
441
+
442
+ /* Watchdog Timer Control Register */
443
+ #define WDTCSR _SFR_MEM8(0x60)
444
+ /* WDTCSR */
445
+ #define WDIF 7 /* Watchdog Timeout Interrupt Flag */
446
+ #define WDIE 6 /* Watchdog Timeout Interrupt Enable */
447
+ #define WDP3 5 /* Watchdog Timer Prescaler bit3 */
448
+ #define WDCE 4 /* Watchdog Change Enable */
449
+ #define WDE 3 /* Watchdog Enable */
450
+ #define WDP2 2 /* Watchdog Timer Prescaler bit2 */
451
+ #define WDP1 1 /* Watchdog Timer Prescaler bit1 */
452
+ #define WDP0 0 /* Watchdog Timer Prescaler bit0 */
453
+
454
+ /* Clock Prescaler Register */
455
+ #define CLKPR _SFR_MEM8(0x61)
456
+ /* CLKPR */
457
+ #define CLKPCE 7 /* Clock Prescaler Change Enable */
458
+ #define CLKPS3 3 /* Clock Prescaler Select bit3 */
459
+ #define CLKPS2 2 /* Clock Prescaler Select bit2 */
460
+ #define CLKPS1 1 /* Clock Prescaler Select bit1 */
461
+ #define CLKPS0 0 /* Clock Prescaler Select bit0 */
462
+
463
+ /* Reserved [0x62..0x63] */
464
+
465
+ /* Power Reduction Register */
466
+ #define PRR _SFR_MEM8(0x64)
467
+ /* PRR */
468
+ #define PRPSC2 7 /* Power Reduction PSC2 */
469
+ #define PRPSC1 6 /* Power Reduction PSC1 */
470
+ #define PRPSC0 5 /* Power Reduction PSC0 */
471
+ #define PRTIM1 4 /* Power Reduction Timer/Counter1 */
472
+ #define PRTIM0 3 /* Power Reduction Timer/Counter0 */
473
+ #define PRSPI 2 /* Power Reduction Serial Peripheral Interface */
474
+ #define PRADC 0 /* Power Reduction ADC */
475
+
476
+ #define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRSPI)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRPSC0)|(1<<PRPSC1)|(1<<PRPSC2))
477
+ #define __AVR_HAVE_PRR_PRADC
478
+ #define __AVR_HAVE_PRR_PRSPI
479
+ #define __AVR_HAVE_PRR_PRTIM0
480
+ #define __AVR_HAVE_PRR_PRTIM1
481
+ #define __AVR_HAVE_PRR_PRPSC0
482
+ #define __AVR_HAVE_PRR_PRPSC1
483
+ #define __AVR_HAVE_PRR_PRPSC2
484
+
485
+ /* Reserved [0x65] */
486
+
487
+ /* Oscillator Calibration Value */
488
+ #define OSCCAL _SFR_MEM8(0x66)
489
+ /* OSCCAL */
490
+ #define CAL6 6
491
+ #define CAL5 5
492
+ #define CAL4 4
493
+ #define CAL3 3
494
+ #define CAL2 2
495
+ #define CAL1 1
496
+ #define CAL0 0
497
+
498
+ /* Reserved [0x67..0x68] */
499
+
500
+ /* External Interrupt Control Register A */
501
+ #define EICRA _SFR_MEM8(0x69)
502
+ /* EICRA */
503
+ #define ISC31 7
504
+ #define ISC30 6
505
+ #define ISC21 5
506
+ #define ISC20 4
507
+ #define ISC11 3
508
+ #define ISC10 2
509
+ #define ISC01 1
510
+ #define ISC00 0
511
+
512
+ /* Reserved [0x6A..0x6D] */
513
+
514
+ /* Timer/Counter0 Interrupt Mask Register */
515
+ #define TIMSK0 _SFR_MEM8(0x6E)
516
+ /* TIMSK0 */
517
+ #define OCIE0B 2 /* Output Compare Match B Interrupt Enable */
518
+ #define OCIE0A 1 /* Output Compare Match A Interrupt Enable */
519
+ #define TOIE0 0 /* Overflow Interrupt Enable */
520
+
521
+ /* Timer/Counter1 Interrupt Mask Register */
522
+ #define TIMSK1 _SFR_MEM8(0x6F)
523
+ /* TIMSK1 */
524
+ #define ICIE1 5 /* Input Capture Interrupt Enable */
525
+ #define OCIE1B 2 /* Output Compare Match B Interrupt Enable */
526
+ #define OCIE1A 1 /* Output Compare Match A Interrupt Enable */
527
+ #define TOIE1 0 /* Overflow Interrupt Enable */
528
+
529
+ /* Reserved [0x70..0x75] */
530
+
531
+ /* Amplifier 0 Control and Status register */
532
+ #define AMP0CSR _SFR_MEM8(0x76)
533
+ #define AMP0EN 7
534
+ #define AMP0IS 6
535
+ #define AMP0G1 5
536
+ #define AMP0G0 4
537
+ #define AMP0TS1 1
538
+ #define AMP0TS0 0
539
+
540
+ /* Reserved [0x77] */
541
+
542
+ /* ADC Result Data Register */
543
+ #ifndef __ASSEMBLER__
544
+ #define ADC _SFR_MEM16(0x78)
545
+ #endif
546
+ #define ADCW _SFR_MEM16(0x78)
547
+ #define ADCL _SFR_MEM8(0x78)
548
+ #define ADCH _SFR_MEM8(0x79)
549
+
550
+ /* ADC Control and Status Register A */
551
+ #define ADCSRA _SFR_MEM8(0x7A)
552
+ /* ADCSRA */
553
+ #define ADEN 7 /* ADC Enable */
554
+ #define ADSC 6 /* ADC Start Conversion */
555
+ #define ADATE 5 /* ADC Auto Trigger Enable */
556
+ #define ADIF 4 /* ADC Interrupt Flag */
557
+ #define ADIE 3 /* ADC Interrupt Enable */
558
+ #define ADPS2 2 /* ADC Prescaler Select bit2 */
559
+ #define ADPS1 1 /* ADC Prescaler Select bit1 */
560
+ #define ADPS0 0 /* ADC Prescaler Select bit0 */
561
+
562
+ /* ADC Control and Status Register B */
563
+ #define ADCSRB _SFR_MEM8(0x7B)
564
+ /* ADCSRB */
565
+ #define ADTS3 3 /* ADC Auto Trigger Source 2 */
566
+ #define ADTS2 2 /* ADC Auto Trigger Source 2 */
567
+ #define ADTS1 1 /* ADC Auto Trigger Source 1 */
568
+ #define ADTS0 0 /* ADC Auto Trigger Source 0 */
569
+
570
+ /* ADC multiplexer Selection Register */
571
+ #define ADMUX _SFR_MEM8(0x7C)
572
+ /* ADMUX */
573
+ #define REFS1 7 /* Reference Selection bit1 */
574
+ #define REFS0 6 /* Reference Selection bit0 */
575
+ #define ADLAR 5 /* Left Adjust Result */
576
+ #define MUX3 3 /* Analog Channel and Gain Selection bit3 */
577
+ #define MUX2 2 /* Analog Channel and Gain Selection bit2 */
578
+ #define MUX1 1 /* Analog Channel and Gain Selection bit1 */
579
+ #define MUX0 0 /* Analog Channel and Gain Selection bit0 */
580
+
581
+ /* Reserved [0x7D] */
582
+
583
+ /* Digital Input Disable Register 0 */
584
+ #define DIDR0 _SFR_MEM8(0x7E)
585
+ /* DIDR0 */
586
+ #define ADC7D 7 /* ADC7 Digital input Disable */
587
+ #define ADC6D 6 /* ADC6 Digital input Disable */
588
+ #define ADC5D 5 /* ADC5 Digital input Disable */
589
+ #define ADC4D 4 /* ADC4 Digital input Disable */
590
+ #define ADC3D 3 /* ADC3 Digital input Disable */
591
+ #define ADC2D 2 /* ADC2 Digital input Disable */
592
+ #define ADC1D 1 /* ADC1 Digital input Disable */
593
+ #define ADC0D 0 /* ADC0 Digital input Disable */
594
+
595
+ /* Digital Input Disable Register 1 */
596
+ #define DIDR1 _SFR_MEM8(0x7F)
597
+ /* DIDR1 */
598
+ #define ACMP0D 5
599
+ #define AMP0PD 4
600
+ #define AMP0ND 3
601
+ #define ADC10D 2 /* ADC10 Digital input Disable */
602
+ #define ADC9D 1 /* ADC9 Digital input Disable */
603
+ #define ADC8D 0 /* ADC8 Digital input Disable */
604
+
605
+ /* Timer/Counter1 Control Register A */
606
+ #define TCCR1A _SFR_MEM8(0x80)
607
+ /* TCCR1A */
608
+ #define COM1A1 7 /* Comparet Ouput Mode 1A, bit 1 */
609
+ #define COM1A0 6 /* Comparet Ouput Mode 1A, bit 0 */
610
+ #define COM1B1 5 /* Compare Output Mode 1B, bit 1 */
611
+ #define COM1B0 4 /* Compare Output Mode 1B, bit 0 */
612
+ #define WGM11 1 /* Waveform Generation Mode */
613
+ #define WGM10 0 /* Waveform Generation Mode */
614
+
615
+ /* Timer/Counter1 Control Register B */
616
+ #define TCCR1B _SFR_MEM8(0x81)
617
+ /* TCCR1B */
618
+ #define ICNC1 7 /* Input Capture 1 Noise Canceler */
619
+ #define ICES1 6 /* Input Capture 1 Edge Select */
620
+ #define WGM13 4 /* Waveform Generation Mode */
621
+ #define WGM12 3 /* Waveform Generation Mode */
622
+ #define CS12 2 /* Prescaler source of Timer/Counter 1 */
623
+ #define CS11 1 /* Prescaler source of Timer/Counter 1 */
624
+ #define CS10 0 /* Prescaler source of Timer/Counter 1 */
625
+
626
+ /* Timer/Counter1 Control Register C */
627
+ #define TCCR1C _SFR_MEM8(0x82)
628
+ /* TCCR1C */
629
+ #define FOC1A 7 /* Force Output Compare for Channel A */
630
+ #define FOC1B 6 /* Force Output Compare for Channel B */
631
+
632
+ /* Reserved [0x83] */
633
+
634
+ /* Timer/Counter1 */
635
+ #define TCNT1 _SFR_MEM16(0x84)
636
+ #define TCNT1L _SFR_MEM8(0x84)
637
+ #define TCNT1H _SFR_MEM8(0x85)
638
+ /* TCNT1H */
639
+ #define TCNT115 7
640
+ #define TCNT114 6
641
+ #define TCNT113 5
642
+ #define TCNT112 4
643
+ #define TCNT111 3
644
+ #define TCNT110 2
645
+ #define TCNT19 1
646
+ #define TCNT18 0
647
+ /* TCNT1L */
648
+ #define TCNT17 7
649
+ #define TCNT16 6
650
+ #define TCNT15 5
651
+ #define TCNT14 4
652
+ #define TCNT13 3
653
+ #define TCNT12 2
654
+ #define TCNT11 1
655
+ #define TCNT10 0
656
+
657
+ /* Input Capture Register 1 */
658
+ #define ICR1 _SFR_MEM16(0x86)
659
+ #define ICR1L _SFR_MEM8(0x86)
660
+ #define ICR1H _SFR_MEM8(0x87)
661
+ /* ICR1H */
662
+ #define ICR115 7
663
+ #define ICR114 6
664
+ #define ICR113 5
665
+ #define ICR112 4
666
+ #define ICR111 3
667
+ #define ICR110 2
668
+ #define ICR19 1
669
+ #define ICR18 0
670
+ /* ICR1L */
671
+ #define ICR17 7
672
+ #define ICR16 6
673
+ #define ICR15 5
674
+ #define ICR14 4
675
+ #define ICR13 3
676
+ #define ICR12 2
677
+ #define ICR11 1
678
+ #define ICR10 0
679
+
680
+ /* Output Compare Register 1 A */
681
+ #define OCR1A _SFR_MEM16(0x88)
682
+ #define OCR1AL _SFR_MEM8(0x88)
683
+ #define OCR1AH _SFR_MEM8(0x89)
684
+ /* OCR1AH */
685
+ #define OCR1A15 7
686
+ #define OCR1A14 6
687
+ #define OCR1A13 5
688
+ #define OCR1A12 4
689
+ #define OCR1A11 3
690
+ #define OCR1A10 2
691
+ #define OCR1A9 1
692
+ #define OCR1A8 0
693
+ /* OCR1AL */
694
+ #define OCR1A7 7
695
+ #define OCR1A6 6
696
+ #define OCR1A5 5
697
+ #define OCR1A4 4
698
+ #define OCR1A3 3
699
+ #define OCR1A2 2
700
+ #define OCR1A1 1
701
+ #define OCR1A0 0
702
+
703
+ /* Output Compare Register 1 B */
704
+ #define OCR1B _SFR_MEM16(0x8A)
705
+ #define OCR1BL _SFR_MEM8(0x8A)
706
+ #define OCR1BH _SFR_MEM8(0x8B)
707
+ /* OCR1BH */
708
+ #define OCR1B15 7
709
+ #define OCR1B14 6
710
+ #define OCR1B13 5
711
+ #define OCR1B12 4
712
+ #define OCR1B11 3
713
+ #define OCR1B10 2
714
+ #define OCR1B9 1
715
+ #define OCR1B8 0
716
+ /* OCR1BL */
717
+ #define OCR1B7 7
718
+ #define OCR1B6 6
719
+ #define OCR1B5 5
720
+ #define OCR1B4 4
721
+ #define OCR1B3 3
722
+ #define OCR1B2 2
723
+ #define OCR1B1 1
724
+ #define OCR1B0 0
725
+
726
+ /* Reserved [0x8C..0x9F] */
727
+
728
+ /* PSC0 Interrupt Flag Register */
729
+ #define PIFR0 _SFR_MEM8(0xA0)
730
+ /* PIFR0 */
731
+ #define PSEI0 5 /* PSC0 Synchro Error Interrupt */
732
+ #define PEV0B 4 /* PSC0 External Event B Interrupt */
733
+ #define PEV0A 3 /* PSC0 External Event A Interrupt */
734
+ #define PRN01 2 /* PSC0 Ramp Number bit1 */
735
+ #define PRN00 1 /* PSC0 Ramp Number bit0 */
736
+ #define PEOP0 0 /* End Of PSC0 Interrupt */
737
+
738
+ /* PSC0 Interrupt Mask Register */
739
+ #define PIM0 _SFR_MEM8(0xA1)
740
+ /* PIM0 */
741
+ #define PSEIE0 5 /* PSC0 Synchro Error Interrupt Enable */
742
+ #define PEVE0B 4 /* PSC0 External Event B Interrupt Enable */
743
+ #define PEVE0A 3 /* PSC0 External Event A Interrupt Enable */
744
+ #define PEOPE0 0 /* PSC0 End Of Cycle Interrupt Enable */
745
+
746
+ /* Reserved [0xA2..0xA3] */
747
+
748
+ /* PSC2 Interrupt Flag Register */
749
+ #define PIFR2 _SFR_MEM8(0xA4)
750
+ /* PIFR2 */
751
+ #define PSEI2 5 /* PSC2 Synchro Error Interrupt */
752
+ #define PEV2B 4 /* PSC2 External Event B Interrupt */
753
+ #define PEV2A 3 /* PSC2 External Event A Interrupt */
754
+ #define PRN21 2 /* PSC2 Ramp Number bit1 */
755
+ #define PRN20 1 /* PSC2 Ramp Number bit0 */
756
+ #define PEOP2 0 /* End Of PSC2 Interrupt */
757
+
758
+ /* PSC2 Interrupt Mask Register */
759
+ #define PIM2 _SFR_MEM8(0xA5)
760
+ /* PIM2 */
761
+ #define PSEIE2 5 /* PSC2 Synchro Error Interrupt Enable */
762
+ #define PEVE2B 4 /* PSC2 External Event B Interrupt Enable */
763
+ #define PEVE2A 3 /* PSC2 External Event A Interrupt Enable */
764
+ #define PEOPE2 0 /* PSC2 End Of Cycle Interrupt Enable */
765
+
766
+ /* Reserved [0xA6..0xAC] */
767
+
768
+ /* Analog Comparator 0 Control Register */
769
+ #define AC0CON _SFR_MEM8(0xAD)
770
+ /* AC0CON */
771
+ #define AC0EN 7 /* Analog Comparator 0 Enable Bit */
772
+ #define AC0IE 6 /* Analog Comparator 0 Interrupt Enable bit */
773
+ #define AC0IS1 5 /* Analog Comparator 0 Interrupt Select bit1 */
774
+ #define AC0IS0 4 /* Analog Comparator 0 Interrupt Select bit0 */
775
+ #define AC0M2 2 /* Analog Comparator 0 Multiplexer register bit2 */
776
+ #define AC0M1 1 /* Analog Comparator 0 Multiplexer register bit1 */
777
+ #define AC0M0 0 /* Analog Comparator 0 Multiplexer register bit0 */
778
+
779
+ /* Reserved [0xB0..0xAE] */
780
+
781
+ /* Analog Comparator 2 Control Register */
782
+ #define AC2CON _SFR_MEM8(0xAF)
783
+ /* AC2CON */
784
+ #define AC2EN 7 /* Analog Comparator 2 Enable Bit */
785
+ #define AC2IE 6 /* Analog Comparator 2 Interrupt Enable bit */
786
+ #define AC2IS1 5 /* Analog Comparator 2 Interrupt Select bit1 */
787
+ #define AC2IS0 4 /* Analog Comparator 2 Interrupt Select bit0 */
788
+ #define AC2M2 2 /* Analog Comparator 2 Multiplexer register bit2 */
789
+ #define AC2M1 1 /* Analog Comparator 2 Multiplexer register bit1 */
790
+ #define AC2M0 0 /* Analog Comparator 2 Multiplexer register bit0 */
791
+
792
+ /* Reserved [0xB0..0xCF] */
793
+
794
+ /* PSC 0 Synchro and Output Configuration */
795
+ #define PSOC0 _SFR_MEM8(0xD0)
796
+ /* PSOC0 */
797
+ #define PSYNC01 5 /* Synchronization Out for ADC Selection bit1 */
798
+ #define PSYNC00 4 /* Synchronization Out for ADC Selection bit0 */
799
+ #define POEN0B 2 /* PSC 0 OUT Part B Output Enable */
800
+ #define POEN0A 0 /* PSC 0 OUT Part A Output Enable */
801
+
802
+ /* Reserved [0xD1] */
803
+
804
+ /* Output Compare SA Registers */
805
+ #define OCR0SA _SFR_MEM16(0xD2)
806
+ #define OCR0SAL _SFR_MEM8(0xD2)
807
+ #define OCR0SAH _SFR_MEM8(0xD3)
808
+
809
+ /* Output Compare RA Registers */
810
+ #define OCR0RA _SFR_MEM16(0xD4)
811
+ #define OCR0RAL _SFR_MEM8(0xD4)
812
+ #define OCR0RAH _SFR_MEM8(0xD5)
813
+
814
+ /* Output Compare SB Registers */
815
+ #define OCR0SB _SFR_MEM16(0xD6)
816
+ #define OCR0SBL _SFR_MEM8(0xD6)
817
+ #define OCR0SBH _SFR_MEM8(0xD7)
818
+
819
+ /* Output Compare RB Registers */
820
+ #define OCR0RB _SFR_MEM16(0xD8)
821
+ #define OCR0RBL _SFR_MEM8(0xD8)
822
+ #define OCR0RBH _SFR_MEM8(0xD9)
823
+
824
+ /* PSC 0 Configuration Register */
825
+ #define PCNF0 _SFR_MEM8(0xDA)
826
+ /* PCNF0 */
827
+ #define PFIFTY0 7 /* PSC 0 Fifty */
828
+ #define PALOCK0 6 /* PSC 0 Autolock */
829
+ #define PLOCK0 5 /* PSC 0 Lock */
830
+ #define PMODE01 4 /* PSC 0 Mode bit1 */
831
+ #define PMODE00 3 /* PSC 0 Mode bit0 */
832
+ #define POP0 2 /* PSC 0 Output Polarity */
833
+ #define PCLKSEL0 1 /* PSC 0 Input Clock Select */
834
+
835
+ /* PSC 0 Control Register */
836
+ #define PCTL0 _SFR_MEM8(0xDB)
837
+ /* PCTL0 */
838
+ #define PPRE01 7 /* PSC 0 Prescaler Select bit1 */
839
+ #define PPRE00 6 /* PSC 0 Prescaler Select bit0 */
840
+ #define PBFM0 5 /* Balance Flank Width Modulation */
841
+ #define PAOC0B 4 /* PSC 0 Asynchronous Output Control B */
842
+ #define PAOC0A 3 /* PSC 0 Asynchronous Output Control A */
843
+ #define PARUN0 2 /* PSC 0 Autorun */
844
+ #define PCCYC0 1 /* PSC 0 Complete Cycle */
845
+ #define PRUN0 0 /* PSC 0 Run */
846
+
847
+ /* PSC 0 Input A Control Register */
848
+ #define PFRC0A _SFR_MEM8(0xDC)
849
+ /* PFRC0A */
850
+ #define PCAE0A 7 /* PSC 0 Capture Enable Input Part A */
851
+ #define PISEL0A 6 /* PSC 0 Input Select for Part A */
852
+ #define PELEV0A 5 /* PSC 0 Edge Level Selector of Input Part A */
853
+ #define PFLTE0A 4 /* PSC 0 Filter Enable on Input Part A */
854
+ #define PRFM0A3 3 /* PSC 0 Fault Mode bit3 */
855
+ #define PRFM0A2 2 /* PSC 0 Fault Mode bit2 */
856
+ #define PRFM0A1 1 /* PSC 0 Fault Mode bit1 */
857
+ #define PRFM0A0 0 /* PSC 0 Fault Mode bit0 */
858
+
859
+ /* PSC 0 Input B Control Register */
860
+ #define PFRC0B _SFR_MEM8(0xDD)
861
+ /* PFRC0B */
862
+ #define PCAE0B 7 /* PSC 0 Capture Enable Input Part B */
863
+ #define PISEL0B 6 /* PSC 0 Input Select for Part B */
864
+ #define PELEV0B 5 /* PSC 0 Edge Level Selector of Input Part B */
865
+ #define PFLTE0B 4 /* PSC 0 Filter Enable on Input Part B */
866
+ #define PRFM0B3 3 /* PSC 0 Fault Mode bit3 */
867
+ #define PRFM0B2 2 /* PSC 0 Fault Mode bit2 */
868
+ #define PRFM0B1 1 /* PSC 0 Fault Mode bit1 */
869
+ #define PRFM0B0 0 /* PSC 0 Fault Mode bit0 */
870
+
871
+ /* PSC 0 Input Capture Registers */
872
+ #define PICR0 _SFR_MEM16(0xDE)
873
+
874
+ #define PICR0L _SFR_MEM8(0xDE)
875
+
876
+ #define PICR0H _SFR_MEM8(0xDF)
877
+ #define PCST0 7 /* PSC Capture Software Trig bit */
878
+
879
+ /* Reserved [0xE0..0xEF] */
880
+
881
+ /* PSC 2 Synchro and Output Configuration */
882
+ #define PSOC2 _SFR_MEM8(0xF0)
883
+ /* PSOC2 */
884
+ #define POS23 7 /* PSCOUT23 Selection */
885
+ #define POS22 6 /* PSCOUT22 Selection */
886
+ #define PSYNC21 5 /* Synchronization Out for ADC Selection bit1 */
887
+ #define PSYNC20 4 /* Synchronization Out for ADC Selection bit0 */
888
+ #define POEN2D 3 /* PSCOUT23 Output Enable */
889
+ #define POEN2B 2 /* PSC 2 OUT Part B Output Enable */
890
+ #define POEN2C 1 /* PSCOUT22 Output Enable */
891
+ #define POEN2A 0 /* PSC 2 OUT Part A Output Enable */
892
+
893
+ /* PSC 2 Output Matrix */
894
+ #define POM2 _SFR_MEM8(0xF1)
895
+ /* POM2 */
896
+ #define POMV2B3 7 /* Output Matrix Output B Ramp 3 */
897
+ #define POMV2B2 6 /* Output Matrix Output B Ramp 2 */
898
+ #define POMV2B1 5 /* Output Matrix Output B Ramp 1 */
899
+ #define POMV2B0 4 /* Output Matrix Output B Ramp 0 */
900
+ #define POMV2A3 3 /* Output Matrix Output A Ramp 3 */
901
+ #define POMV2A2 2 /* Output Matrix Output A Ramp 2 */
902
+ #define POMV2A1 1 /* Output Matrix Output A Ramp 1 */
903
+ #define POMV2A0 0 /* Output Matrix Output A Ramp 0 */
904
+
905
+ /* Output Compare SA Registers */
906
+ #define OCR2SA _SFR_MEM16(0xF2)
907
+ #define OCR2SAL _SFR_MEM8(0xF2)
908
+ #define OCR2SAH _SFR_MEM8(0xF3)
909
+
910
+ /* Output Compare RA Registers */
911
+ #define OCR2RA _SFR_MEM16(0xF4)
912
+ #define OCR2RAL _SFR_MEM8(0xF4)
913
+ #define OCR2RAH _SFR_MEM8(0xF5)
914
+
915
+ /* Output Compare SB Registers */
916
+ #define OCR2SB _SFR_MEM16(0xF6)
917
+ #define OCR2SBL _SFR_MEM8(0xF6)
918
+ #define OCR2SBH _SFR_MEM8(0xF7)
919
+
920
+ /* Output Compare RB Registers */
921
+ #define OCR2RB _SFR_MEM16(0xF8)
922
+ #define OCR2RBL _SFR_MEM8(0xF8)
923
+ #define OCR2RBH _SFR_MEM8(0xF9)
924
+
925
+ /* PSC 2 Configuration Register */
926
+ #define PCNF2 _SFR_MEM8(0xFA)
927
+ /* PCNF2 */
928
+ #define PFIFTY2 7 /* PSC 2 Fifty */
929
+ #define PALOCK2 6 /* PSC 2 Autolock */
930
+ #define PLOCK2 5 /* PSC 2 Lock */
931
+ #define PMODE21 4 /* PSC 2 Mode bit1 */
932
+ #define PMODE20 3 /* PSC 2 Mode bit0 */
933
+ #define POP2 2 /* PSC 2 Output Polarity */
934
+ #define PCLKSEL2 1 /* PSC 2 Input Clock Select */
935
+ #define POME2 0 /* PSC 2 Output Matrix Enable */
936
+
937
+ /* PSC 2 Control Register */
938
+ #define PCTL2 _SFR_MEM8(0xFB)
939
+ /* PCTL2 */
940
+ #define PPRE21 7 /* PSC 2 Prescaler Select bit1 */
941
+ #define PPRE20 6 /* PSC 2 Prescaler Select bit0 */
942
+ #define PBFM2 5 /* Balance Flank Width Modulation */
943
+ #define PAOC2B 4 /* PSC 2 Asynchronous Output Control B */
944
+ #define PAOC2A 3 /* PSC 2 Asynchronous Output Control A */
945
+ #define PARUN2 2 /* PSC 2 Autorun */
946
+ #define PCCYC2 1 /* PSC 2 Complete Cycle */
947
+ #define PRUN2 0 /* PSC 2 Run */
948
+
949
+ /* PSC 2 Input A Control Register */
950
+ #define PFRC2A _SFR_MEM8(0xFC)
951
+ /* PFRC2A */
952
+ #define PCAE2A 7 /* PSC 2 Capture Enable Input Part A */
953
+ #define PISEL2A 6 /* PSC 2 Input Select for Part A */
954
+ #define PELEV2A 5 /* PSC 2 Edge Level Selector of Input Part A */
955
+ #define PFLTE2A 4 /* PSC 2 Filter Enable on Input Part A */
956
+ #define PRFM2A3 3 /* PSC 2 Fault Mode bit3 */
957
+ #define PRFM2A2 2 /* PSC 2 Fault Mode bit2 */
958
+ #define PRFM2A1 1 /* PSC 2 Fault Mode bit1 */
959
+ #define PRFM2A0 0 /* PSC 2 Fault Mode bit0 */
960
+
961
+ /* PSC 2 Input B Control Register */
962
+ #define PFRC2B _SFR_MEM8(0xFD)
963
+ /* PFRC2B */
964
+ #define PCAE2B 7 /* PSC 2 Capture Enable Input Part B */
965
+ #define PISEL2B 6 /* PSC 2 Input Select for Part B */
966
+ #define PELEV2B 5 /* PSC 2 Edge Level Selector of Input Part B */
967
+ #define PFLTE2B 4 /* PSC 2 Filter Enable on Input Part B */
968
+ #define PRFM2B3 3 /* PSC 2 Fault Mode bit3 */
969
+ #define PRFM2B2 2 /* PSC 2 Fault Mode bit2 */
970
+ #define PRFM2B1 1 /* PSC 2 Fault Mode bit1 */
971
+ #define PRFM2B0 0 /* PSC 2 Fault Mode bit0 */
972
+
973
+ /* PSC 2 Input Capture Registers */
974
+ #define PICR2 _SFR_MEM16(0xFE)
975
+
976
+ #define PICR2L _SFR_MEM8(0xFE)
977
+
978
+ #define PICR2H _SFR_MEM8(0xFF)
979
+ #define PCST2 7 /* PSC Capture Software Trig bit */
980
+ /* not implemented on AT90PWM2/AT90PWM3 */
981
+
982
+
983
+ /* Interrupt vectors */
984
+ /* PSC2 Capture Event */
985
+ #define PSC2_CAPT_vect_num 1
986
+ #define PSC2_CAPT_vect _VECTOR(1)
987
+ #define SIG_PSC2_CAPTURE _VECTOR(1)
988
+
989
+ /* PSC2 End Cycle */
990
+ #define PSC2_EC_vect_num 2
991
+ #define PSC2_EC_vect _VECTOR(2)
992
+ #define SIG_PSC2_END_CYCLE _VECTOR(2)
993
+
994
+ /* PSC0 Capture Event */
995
+ #define PSC0_CAPT_vect_num 5
996
+ #define PSC0_CAPT_vect _VECTOR(5)
997
+ #define SIG_PSC0_CAPTURE _VECTOR(5)
998
+
999
+ /* PSC0 End Cycle */
1000
+ #define PSC0_EC_vect_num 6
1001
+ #define PSC0_EC_vect _VECTOR(6)
1002
+ #define SIG_PSC0_END_CYCLE _VECTOR(6)
1003
+
1004
+ /* Analog Comparator 0 */
1005
+ #define ANALOG_COMP_0_vect_num 7
1006
+ #define ANALOG_COMP_0_vect _VECTOR(7)
1007
+ #define SIG_COMPARATOR0 _VECTOR(7)
1008
+
1009
+ /* Analog Comparator 2 */
1010
+ #define ANALOG_COMP_2_vect_num 9
1011
+ #define ANALOG_COMP_2_vect _VECTOR(9)
1012
+ #define SIG_COMPARATOR2 _VECTOR(9)
1013
+
1014
+ /* External Interrupt Request 0 */
1015
+ #define INT0_vect_num 10
1016
+ #define INT0_vect _VECTOR(10)
1017
+ #define SIG_INTERRUPT0 _VECTOR(10)
1018
+
1019
+ /* Timer/Counter1 Capture Event */
1020
+ #define TIMER1_CAPT_vect_num 11
1021
+ #define TIMER1_CAPT_vect _VECTOR(11)
1022
+ #define SIG_INPUT_CAPTURE1 _VECTOR(11)
1023
+
1024
+ /* Timer/Counter1 Compare Match A */
1025
+ #define TIMER1_COMPA_vect_num 12
1026
+ #define TIMER1_COMPA_vect _VECTOR(12)
1027
+ #define SIG_OUTPUT_COMPARE1A _VECTOR(12)
1028
+ #define SIG_OUTPUT_COMPARE1_A _VECTOR(12)
1029
+
1030
+ /* Timer/Counter Compare Match B */
1031
+ #define TIMER1_COMPB_vect_num 13
1032
+ #define TIMER1_COMPB_vect _VECTOR(13)
1033
+ #define SIG_OUTPUT_COMPARE1B _VECTOR(13)
1034
+ #define SIG_OUTPUT_COMPARE1_B _VECTOR(13)
1035
+
1036
+ /* Timer/Counter1 Overflow */
1037
+ #define TIMER1_OVF_vect_num 15
1038
+ #define TIMER1_OVF_vect _VECTOR(15)
1039
+ #define SIG_OVERFLOW1 _VECTOR(15)
1040
+
1041
+ /* Timer/Counter0 Compare Match A */
1042
+ #define TIMER0_COMP_A_vect_num 16
1043
+ #define TIMER0_COMP_A_vect _VECTOR(16)
1044
+ #define SIG_OUTPUT_COMPARE0A _VECTOR(16)
1045
+ #define SIG_OUTPUT_COMPARE0_A _VECTOR(16)
1046
+
1047
+ /* Timer/Counter0 Overflow */
1048
+ #define TIMER0_OVF_vect_num 17
1049
+ #define TIMER0_OVF_vect _VECTOR(17)
1050
+ #define SIG_OVERFLOW0 _VECTOR(17)
1051
+
1052
+ /* ADC Conversion Complete */
1053
+ #define ADC_vect_num 18
1054
+ #define ADC_vect _VECTOR(18)
1055
+ #define SIG_ADC _VECTOR(18)
1056
+
1057
+ /* External Interrupt Request 1 */
1058
+ #define INT1_vect_num 19
1059
+ #define INT1_vect _VECTOR(19)
1060
+ #define SIG_INTERRUPT1 _VECTOR(19)
1061
+
1062
+ /* SPI Serial Transfer Complete */
1063
+ #define SPI_STC_vect_num 20
1064
+ #define SPI_STC_vect _VECTOR(20)
1065
+ #define SIG_SPI _VECTOR(20)
1066
+
1067
+ /* External Interrupt Request 2 */
1068
+ #define INT2_vect_num 24
1069
+ #define INT2_vect _VECTOR(24)
1070
+ #define SIG_INTERRUPT2 _VECTOR(24)
1071
+
1072
+ /* Watchdog Timeout Interrupt */
1073
+ #define WDT_vect_num 25
1074
+ #define WDT_vect _VECTOR(25)
1075
+ #define SIG_WDT _VECTOR(25)
1076
+ #define SIG_WATCHDOG_TIMEOUT _VECTOR(25)
1077
+
1078
+ /* EEPROM Ready */
1079
+ #define EE_READY_vect_num 26
1080
+ #define EE_READY_vect _VECTOR(26)
1081
+ #define SIG_EEPROM_READY _VECTOR(26)
1082
+
1083
+ /* Timer Counter 0 Compare Match B */
1084
+ #define TIMER0_COMPB_vect_num 27
1085
+ #define TIMER0_COMPB_vect _VECTOR(27)
1086
+ #define SIG_OUTPUT_COMPARE0B _VECTOR(27)
1087
+ #define SIG_OUTPUT_COMPARE0_B _VECTOR(27)
1088
+
1089
+ /* External Interrupt Request 3 */
1090
+ #define INT3_vect_num 28
1091
+ #define INT3_vect _VECTOR(28)
1092
+ #define SIG_INTERRUPT3 _VECTOR(28)
1093
+
1094
+ /* Store Program Memory Read */
1095
+ #define SPM_READY_vect_num 31
1096
+ #define SPM_READY_vect _VECTOR(31)
1097
+ #define SIG_SPM_READY _VECTOR(31)
1098
+
1099
+ #define _VECTORS_SIZE 64
1100
+
1101
+ /* Constants */
1102
+ #define SPM_PAGESIZE 64
1103
+
1104
+ #define RAMSTART 0x100
1105
+ #define RAMEND 0x02FF
1106
+ #define XRAMEND RAMEND
1107
+ #define E2END 0x01FF
1108
+ #define FLASHEND 0x1FFF
1109
+
1110
+
1111
+ /* Fuse Information */
1112
+
1113
+ #define FUSE_MEMORY_SIZE 3
1114
+
1115
+ /* Low Fuse Byte */
1116
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
1117
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
1118
+ #define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
1119
+ #define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
1120
+ #define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
1121
+ #define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
1122
+ #define FUSE_CKOUT (unsigned char)~_BV(6) /* Oscillator output option */
1123
+ #define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
1124
+ #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
1125
+
1126
+ /* High Fuse Byte */
1127
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
1128
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
1129
+ #define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
1130
+ #define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
1131
+ #define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog timer always on */
1132
+ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
1133
+ #define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
1134
+ #define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Diasble */
1135
+ #define HFUSE_DEFAULT (FUSE_SPIEN)
1136
+
1137
+ /* Extended Fuse Byte */
1138
+ #define FUSE_BOOTRST (unsigned char)~_BV(0)
1139
+ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
1140
+ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
1141
+ #define FUSE_PSCRV (unsigned char)~_BV(4)
1142
+ #define FUSE_PSC0RB (unsigned char)~_BV(5)
1143
+ #define FUSE_PSC2RB (unsigned char)~_BV(7)
1144
+ #define EFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1)
1145
+
1146
+
1147
+ /* Lock Bits */
1148
+ #define __LOCK_BITS_EXIST
1149
+ #define __BOOT_LOCK_BITS_0_EXIST
1150
+ #define __BOOT_LOCK_BITS_1_EXIST
1151
+
1152
+ #define SLEEP_MODE_IDLE (0x00<<1)
1153
+ #define SLEEP_MODE_ADC (0x01<<1)
1154
+ #define SLEEP_MODE_PWR_DOWN (0x02<<1)
1155
+ #define SLEEP_MODE_STANDBY (0x06<<1)
1156
+
1157
+ #endif /* _AVR_IOPWM1_H_ */