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,1415 @@
1
+ /* Copyright (c) 2005, Andrey Pashchenko
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: io90pwmx.h 2225 2011-03-02 16:27:26Z arcanum $ */
32
+
33
+ /* avr/io90pwmx.h - definitions for AT90PWM2(B) and AT90PWM3(B) */
34
+
35
+ #ifndef _AVR_IO90PWMX_H_
36
+ #define _AVR_IO90PWMX_H_ 1
37
+
38
+ /* This file should only be included from <avr/io.h>, never directly. */
39
+
40
+ #ifndef _AVR_IO_H_
41
+ # error "Include <avr/io.h> instead of this file."
42
+ #endif
43
+
44
+ #ifndef _AVR_IOXXX_H_
45
+ # define _AVR_IOXXX_H_ "io90pwmX.h"
46
+ #else
47
+ # error "Attempt to include more than one <avr/ioXXX.h> file."
48
+ #endif
49
+
50
+ /* I/O registers */
51
+
52
+ /* Port B Input Pins Address */
53
+ #define PINB _SFR_IO8(0x03)
54
+ /* PINB */
55
+ #define PINB7 7
56
+ #define PINB6 6
57
+ #define PINB5 5
58
+ #define PINB4 4
59
+ #define PINB3 3
60
+ #define PINB2 2
61
+ #define PINB1 1
62
+ #define PINB0 0
63
+
64
+ /* Port B Data Direction Register */
65
+ #define DDRB _SFR_IO8(0x04)
66
+ /* DDRB */
67
+ #define DDB7 7
68
+ #define DDB6 6
69
+ #define DDB5 5
70
+ #define DDB4 4
71
+ #define DDB3 3
72
+ #define DDB2 2
73
+ #define DDB1 1
74
+ #define DDB0 0
75
+
76
+ /* Port B Data Register */
77
+ #define PORTB _SFR_IO8(0x05)
78
+ /* PORTB */
79
+ #define PB7 7
80
+ #define PB6 6
81
+ #define PB5 5
82
+ #define PB4 4
83
+ #define PB3 3
84
+ #define PB2 2
85
+ #define PB1 1
86
+ #define PB0 0
87
+
88
+ /* Port C Input Pins Address */
89
+ #define PINC _SFR_IO8(0x06)
90
+ /* PINC */
91
+ #define PINC7 7
92
+ #define PINC6 6
93
+ #define PINC5 5
94
+ #define PINC4 4
95
+ #define PINC3 3
96
+ #define PINC2 2
97
+ #define PINC1 1
98
+ #define PINC0 0
99
+
100
+ /* Port C Data Direction Register */
101
+ #define DDRC _SFR_IO8(0x07)
102
+ /* DDRC */
103
+ #define DDC7 7
104
+ #define DDC6 6
105
+ #define DDC5 5
106
+ #define DDC4 4
107
+ #define DDC3 3
108
+ #define DDC2 2
109
+ #define DDC1 1
110
+ #define DDC0 0
111
+
112
+ /* Port C Data Register */
113
+ #define PORTC _SFR_IO8(0x08)
114
+ /* PORTC */
115
+ #define PC7 7
116
+ #define PC6 6
117
+ #define PC5 5
118
+ #define PC4 4
119
+ #define PC3 3
120
+ #define PC2 2
121
+ #define PC1 1
122
+ #define PC0 0
123
+
124
+ /* Port D Input Pins Address */
125
+ #define PIND _SFR_IO8(0x09)
126
+ /* PIND */
127
+ #define PIND7 7
128
+ #define PIND6 6
129
+ #define PIND5 5
130
+ #define PIND4 4
131
+ #define PIND3 3
132
+ #define PIND2 2
133
+ #define PIND1 1
134
+ #define PIND0 0
135
+
136
+ /* Port D Data Direction Register */
137
+ #define DDRD _SFR_IO8(0x0A)
138
+ /* DDRD */
139
+ #define DDD7 7
140
+ #define DDD6 6
141
+ #define DDD5 5
142
+ #define DDD4 4
143
+ #define DDD3 3
144
+ #define DDD2 2
145
+ #define DDD1 1
146
+ #define DDD0 0
147
+
148
+ /* Port D Data Register */
149
+ #define PORTD _SFR_IO8(0x0B)
150
+ /* PORTD */
151
+ #define PD7 7
152
+ #define PD6 6
153
+ #define PD5 5
154
+ #define PD4 4
155
+ #define PD3 3
156
+ #define PD2 2
157
+ #define PD1 1
158
+ #define PD0 0
159
+
160
+ /* Port E Input Pins Address */
161
+ #define PINE _SFR_IO8(0x0C)
162
+ /* PINE */
163
+ #define PINE2 2
164
+ #define PINE1 1
165
+ #define PINE0 0
166
+
167
+ /* Port E Data Direction Register */
168
+ #define DDRE _SFR_IO8(0x0D)
169
+ /* DDRE */
170
+ #define DDE2 2
171
+ #define DDE1 1
172
+ #define DDE0 0
173
+
174
+ /* Port E Data Register */
175
+ #define PORTE _SFR_IO8(0x0E)
176
+ /* PORTE */
177
+ #define PE2 2
178
+ #define PE1 1
179
+ #define PE0 0
180
+
181
+ /* Timer/Counter 0 Interrupt Flag Register */
182
+ #define TIFR0 _SFR_IO8(0x15)
183
+ /* TIFR0 */
184
+ #define OCF0B 2 /* Output Compare Flag 0B */
185
+ #define OCF0A 1 /* Output Compare Flag 0A */
186
+ #define TOV0 0 /* Overflow Flag */
187
+
188
+ /* Timer/Counter1 Interrupt Flag Register */
189
+ #define TIFR1 _SFR_IO8(0x16)
190
+ /* TIFR1 */
191
+ #define ICF1 5 /* Input Capture Flag 1 */
192
+ #define OCF1B 2 /* Output Compare Flag 1B*/
193
+ #define OCF1A 1 /* Output Compare Flag 1A*/
194
+ #define TOV1 0 /* Overflow Flag */
195
+
196
+ /* General Purpose I/O Register 1 */
197
+ #define GPIOR1 _SFR_IO8(0x19)
198
+ /* GPIOR1 */
199
+ #define GPIOR17 7
200
+ #define GPIOR16 6
201
+ #define GPIOR15 5
202
+ #define GPIOR14 4
203
+ #define GPIOR13 3
204
+ #define GPIOR12 2
205
+ #define GPIOR11 1
206
+ #define GPIOR10 0
207
+
208
+ /* General Purpose I/O Register 2 */
209
+ #define GPIOR2 _SFR_IO8(0x1A)
210
+ /* GPIOR2 */
211
+ #define GPIOR27 7
212
+ #define GPIOR26 6
213
+ #define GPIOR25 5
214
+ #define GPIOR24 4
215
+ #define GPIOR23 3
216
+ #define GPIOR22 2
217
+ #define GPIOR21 1
218
+ #define GPIOR20 0
219
+
220
+ /* General Purpose I/O Register 3 */
221
+ #define GPIOR3 _SFR_IO8(0x1B)
222
+ /* GPIOR3 */
223
+ #define GPIOR37 7
224
+ #define GPIOR36 6
225
+ #define GPIOR35 5
226
+ #define GPIOR34 4
227
+ #define GPIOR33 3
228
+ #define GPIOR32 2
229
+ #define GPIOR31 1
230
+ #define GPIOR30 0
231
+
232
+ /* External Interrupt Flag Register */
233
+ #define EIFR _SFR_IO8(0x1C)
234
+ /* EIFR */
235
+ #define INTF3 3
236
+ #define INTF2 2
237
+ #define INTF1 1
238
+ #define INTF0 0
239
+
240
+ /* External Interrupt Mask Register */
241
+ #define EIMSK _SFR_IO8(0x1D)
242
+ /* EIMSK */
243
+ #define INT3 3 /* External Interrupt Request 3 Enable */
244
+ #define INT2 2 /* External Interrupt Request 2 Enable */
245
+ #define INT1 1 /* External Interrupt Request 1 Enable */
246
+ #define INT0 0 /* External Interrupt Request 0 Enable */
247
+
248
+ /* General Purpose I/O Register 0 */
249
+ #define GPIOR0 _SFR_IO8(0x1E)
250
+ /* GPIOR0 */
251
+ #define GPIOR07 7
252
+ #define GPIOR06 6
253
+ #define GPIOR05 5
254
+ #define GPIOR04 4
255
+ #define GPIOR03 3
256
+ #define GPIOR02 2
257
+ #define GPIOR01 1
258
+ #define GPIOR00 0
259
+
260
+ /* EEPROM Control Register */
261
+ #define EECR _SFR_IO8(0x1F)
262
+ /* EECR */
263
+ #define EERIE 3 /* EEPROM Ready Interrupt Enable */
264
+ #define EEMWE 2 /* EEPROM Master Write Enable */
265
+ #define EEWE 1 /* EEPROM Write Enable */
266
+ #define EERE 0 /* EEPROM Read Enable */
267
+
268
+ /* EEPROM Data Register */
269
+ #define EEDR _SFR_IO8(0x20)
270
+ /* EEDR */
271
+ #define EEDR7 7
272
+ #define EEDR6 6
273
+ #define EEDR5 5
274
+ #define EEDR4 4
275
+ #define EEDR3 3
276
+ #define EEDR2 2
277
+ #define EEDR1 1
278
+ #define EEDR0 0
279
+
280
+ /* The EEPROM Address Registers */
281
+ #define EEAR _SFR_IO16(0x21)
282
+ #define EEARL _SFR_IO8(0x21)
283
+ #define EEARH _SFR_IO8(0x22)
284
+ /* EEARH */
285
+ #define EEAR11 3
286
+ #define EEAR10 2
287
+ #define EEAR9 1
288
+ #define EEAR8 0
289
+ /* EEARL */
290
+ #define EEAR7 7
291
+ #define EEAR6 6
292
+ #define EEAR5 5
293
+ #define EEAR4 4
294
+ #define EEAR3 3
295
+ #define EEAR2 2
296
+ #define EEAR1 1
297
+ #define EEAR0 0
298
+
299
+ /* 6-char sequence denoting where to find the EEPROM registers in memory space.
300
+ Adresses denoted in hex syntax with uppercase letters. Used by the EEPROM
301
+ subroutines.
302
+ First two letters: EECR address.
303
+ Second two letters: EEDR address.
304
+ Last two letters: EEAR address. */
305
+ #define __EEPROM_REG_LOCATIONS__ 1F2021
306
+
307
+ /* General Timer/Counter Control Register */
308
+ #define GTCCR _SFR_IO8(0x23)
309
+ /* GTCCR */
310
+ #define TSM 7 /* Timer/Counter Synchronization Mode */
311
+ #define ICPSEL1 6 /* Timer1 Input Capture Selection Bit */
312
+ #define PSR10 0 /* Prescaler Reset Timer/Counter1 and Timer/Counter0 */
313
+
314
+ /* Timer/Counter Control Register A */
315
+ #define TCCR0A _SFR_IO8(0x24)
316
+ /* TCCR0A */
317
+ #define COM0A1 7 /* Compare Output Mode, Phase Correct PWM Mode */
318
+ #define COM0A0 6 /* Compare Output Mode, Phase Correct PWM Mode */
319
+ #define COM0B1 5 /* Compare Output Mode, Fast PWm */
320
+ #define COM0B0 4 /* Compare Output Mode, Fast PWm */
321
+ #define WGM01 1 /* Waveform Generation Mode */
322
+ #define WGM00 0 /* Waveform Generation Mode */
323
+
324
+ /* Timer/Counter Control Register B */
325
+ #define TCCR0B _SFR_IO8(0x25)
326
+ /* TCCR0B */
327
+ #define FOC0A 7 /* Force Output Compare A */
328
+ #define FOC0B 6 /* Force Output Compare B */
329
+ #define WGM02 3 /* Waveform Generation Mode */
330
+ #define CS02 2 /* Clock Select */
331
+ #define CS01 1 /* Clock Select */
332
+ #define CS00 0 /* Clock Select */
333
+
334
+ /* Timer/Counter0 Register */
335
+ #define TCNT0 _SFR_IO8(0x26)
336
+ /* TCNT0 */
337
+ #define TCNT07 7
338
+ #define TCNT06 6
339
+ #define TCNT05 5
340
+ #define TCNT04 4
341
+ #define TCNT03 3
342
+ #define TCNT02 2
343
+ #define TCNT01 1
344
+ #define TCNT00 0
345
+
346
+ /* Timer/Counter0 Output Compare Register A */
347
+ #define OCR0A _SFR_IO8(0x27)
348
+ /* OCR0A */
349
+ #define OCR0A7 7
350
+ #define OCR0A6 6
351
+ #define OCR0A5 5
352
+ #define OCR0A4 4
353
+ #define OCR0A3 3
354
+ #define OCR0A2 2
355
+ #define OCR0A1 1
356
+ #define OCR0A0 0
357
+
358
+ /* Timer/Counter0 Output Compare Register B */
359
+ #define OCR0B _SFR_IO8(0x28)
360
+ /* OCR0B */
361
+ #define OCR0B7 7
362
+ #define OCR0B6 6
363
+ #define OCR0B5 5
364
+ #define OCR0B4 4
365
+ #define OCR0B3 3
366
+ #define OCR0B2 2
367
+ #define OCR0B1 1
368
+ #define OCR0B0 0
369
+
370
+ /* PLL Control and Status Register */
371
+ #define PLLCSR _SFR_IO8(0x29)
372
+ /* PLLCSR */
373
+ #define PCKE 2 /* PCK Enable */
374
+ /* Bit 2 has been renamed in later versions of the datasheet. */
375
+ #define PLLF 2 /* PLL Factor */
376
+ #define PLLE 1 /* PLL Enable */
377
+ #define PLOCK 0 /* PLL Lock Detector */
378
+
379
+ /* SPI Control Register */
380
+ #define SPCR _SFR_IO8(0x2C)
381
+ /* SPCR */
382
+ #define SPIE 7 /* SPI Interrupt Enable */
383
+ #define SPE 6 /* SPI Enable */
384
+ #define DORD 5 /* Data Order */
385
+ #define MSTR 4 /* Master/Slave Select */
386
+ #define CPOL 3 /* Clock polarity */
387
+ #define CPHA 2 /* Clock Phase */
388
+ #define SPR1 1 /* SPI Clock Rate Select 1 */
389
+ #define SPR0 0 /* SPI Clock Rate Select 0 */
390
+
391
+ /* SPI Status Register */
392
+ #define SPSR _SFR_IO8(0x2D)
393
+ /* SPSR */
394
+ #define SPIF 7 /* SPI Interrupt Flag */
395
+ #define WCOL 6 /* Write Collision Flag */
396
+ #define SPI2X 0 /* Double SPI Speed Bit */
397
+
398
+ /* SPI Data Register */
399
+ #define SPDR _SFR_IO8(0x2E)
400
+ /* SPDR */
401
+ #define SPD7 7
402
+ #define SPD6 6
403
+ #define SPD5 5
404
+ #define SPD4 4
405
+ #define SPD3 3
406
+ #define SPD2 2
407
+ #define SPD1 1
408
+ #define SPD0 0
409
+
410
+ /* Analog Comparator Status Register */
411
+ #define ACSR _SFR_IO8(0x30)
412
+ /* ACSR */
413
+ #define ACCKDIV 7 /* Analog Comparator Clock Divider */
414
+ #define AC2IF 6 /* Analog Comparator 2 Interrupt Flag Bit */
415
+ #define AC1IF 5 /* Analog Comparator 1 Interrupt Flag Bit */
416
+ #define AC0IF 4 /* Analog Comparator 0 Interrupt Flag Bit */
417
+ #define AC2O 2 /* Analog Comparator 2 Output Bit */
418
+ #define AC1O 1 /* Analog Comparator 1 Output Bit */
419
+ #define AC0O 0 /* Analog Comparator 0 Output Bit */
420
+
421
+ /* Monitor Data Register */
422
+ #define MONDR _SFR_IO8(0x31)
423
+
424
+ /* Monitor Stop Mode Control Register */
425
+ #define MSMCR _SFR_IO8(0x32)
426
+
427
+ /* Sleep Mode Control Register */
428
+ #define SMCR _SFR_IO8(0x33)
429
+ /* SMCR */
430
+ #define SM2 3 /* Sleep Mode Select bit2 */
431
+ #define SM1 2 /* Sleep Mode Select bit1 */
432
+ #define SM0 1 /* Sleep Mode Select bit0 */
433
+ #define SE 0 /* Sleep Enable */
434
+
435
+ /* MCU Status Register */
436
+ #define MCUSR _SFR_IO8(0x34)
437
+ /* MCUSR */
438
+ #define WDRF 3 /* Watchdog Reset Flag */
439
+ #define BORF 2 /* Brown-out Reset Flag */
440
+ #define EXTRF 1 /* External Reset Flag */
441
+ #define PORF 0 /* Power-on reset flag */
442
+
443
+ /* MCU Control Register */
444
+ #define MCUCR _SFR_IO8(0x35)
445
+ /* MCUCR */
446
+ #define SPIPS 7 /* SPI Pin Select */
447
+ #define PUD 4 /* Pull-up disable */
448
+ #define IVSEL 1 /* Interrupt Vector Select */
449
+ #define IVCE 0 /* Interrupt Vector Change Enable */
450
+
451
+ /* Store Program Memory Control Register */
452
+ #define SPMCSR _SFR_IO8(0x37)
453
+ /* SPMCSR */
454
+ #define SPMIE 7 /* SPM Interrupt Enable */
455
+ #define RWWSB 6 /* Read While Write Section Busy */
456
+ #define RWWSRE 4 /* Read While Write section read enable */
457
+ #define BLBSET 3 /* Boot Lock Bit Set */
458
+ #define PGWRT 2 /* Page Write */
459
+ #define PGERS 1 /* Page Erase */
460
+ #define SPMEN 0 /* Store Program Memory Enable */
461
+
462
+ /* 0x3D..0x3E SP [defined in <avr/io.h>] */
463
+ /* 0x3F SREG [defined in <avr/io.h>] */
464
+
465
+ /* Watchdog Timer Control Register */
466
+ #define WDTCSR _SFR_MEM8(0x60)
467
+ /* WDTCSR */
468
+ #define WDIF 7 /* Watchdog Timeout Interrupt Flag */
469
+ #define WDIE 6 /* Watchdog Timeout Interrupt Enable */
470
+ #define WDP3 5 /* Watchdog Timer Prescaler bit3 */
471
+ #define WDCE 4 /* Watchdog Change Enable */
472
+ #define WDE 3 /* Watchdog Enable */
473
+ #define WDP2 2 /* Watchdog Timer Prescaler bit2 */
474
+ #define WDP1 1 /* Watchdog Timer Prescaler bit1 */
475
+ #define WDP0 0 /* Watchdog Timer Prescaler bit0 */
476
+
477
+ /* Clock Prescaler Register */
478
+ #define CLKPR _SFR_MEM8(0x61)
479
+ /* CLKPR */
480
+ #define CLKPCE 7 /* Clock Prescaler Change Enable */
481
+ #define CLKPS3 3 /* Clock Prescaler Select bit3 */
482
+ #define CLKPS2 2 /* Clock Prescaler Select bit2 */
483
+ #define CLKPS1 1 /* Clock Prescaler Select bit1 */
484
+ #define CLKPS0 0 /* Clock Prescaler Select bit0 */
485
+
486
+ /* Power Reduction Register */
487
+ #define PRR _SFR_MEM8(0x64)
488
+ /* PRR */
489
+ #define PRPSC2 7 /* Power Reduction PSC2 */
490
+ #define PRPSC1 6 /* Power Reduction PSC1 */
491
+ #define PRPSC0 5 /* Power Reduction PSC0 */
492
+ #define PRTIM1 4 /* Power Reduction Timer/Counter1 */
493
+ #define PRTIM0 3 /* Power Reduction Timer/Counter0 */
494
+ #define PRSPI 2 /* Power Reduction Serial Peripheral Interface */
495
+ #define PRUSART0 1 /* Power Reduction USART */
496
+ #define PRUSART PRUSART0 /* Define to maintain backward-compatibility */
497
+ #define PRADC 0 /* Power Reduction ADC */
498
+
499
+ #define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSART0)|(1<<PRSPI)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRPSC0)|(1<<PRPSC1)|(1<<PRPSC2))
500
+ #define __AVR_HAVE_PRR_PRADC
501
+ #define __AVR_HAVE_PRR_PRUSART0
502
+ #define __AVR_HAVE_PRR_PRSPI
503
+ #define __AVR_HAVE_PRR_PRTIM0
504
+ #define __AVR_HAVE_PRR_PRTIM1
505
+ #define __AVR_HAVE_PRR_PRPSC0
506
+ #define __AVR_HAVE_PRR_PRPSC1
507
+ #define __AVR_HAVE_PRR_PRPSC2
508
+
509
+ /* Oscillator Calibration Value */
510
+ #define OSCCAL _SFR_MEM8(0x66)
511
+ /* OSCCAL */
512
+ #define CAL6 6
513
+ #define CAL5 5
514
+ #define CAL4 4
515
+ #define CAL3 3
516
+ #define CAL2 2
517
+ #define CAL1 1
518
+ #define CAL0 0
519
+
520
+ /* External Interrupt Control Register A */
521
+ #define EICRA _SFR_MEM8(0x69)
522
+ /* EICRA */
523
+ #define ISC31 7
524
+ #define ISC30 6
525
+ #define ISC21 5
526
+ #define ISC20 4
527
+ #define ISC11 3
528
+ #define ISC10 2
529
+ #define ISC01 1
530
+ #define ISC00 0
531
+
532
+ /* Timer/Counter0 Interrupt Mask Register */
533
+ #define TIMSK0 _SFR_MEM8(0x6E)
534
+ /* TIMSK0 */
535
+ #define OCIE0B 2 /* Output Compare Match B Interrupt Enable */
536
+ #define OCIE0A 1 /* Output Compare Match A Interrupt Enable */
537
+ #define TOIE0 0 /* Overflow Interrupt Enable */
538
+
539
+ /* Timer/Counter1 Interrupt Mask Register */
540
+ #define TIMSK1 _SFR_MEM8(0x6F)
541
+ /* TIMSK1 */
542
+ #define ICIE1 5 /* Input Capture Interrupt Enable */
543
+ #define OCIE1B 2 /* Output Compare Match B Interrupt Enable */
544
+ #define OCIE1A 1 /* Output Compare Match A Interrupt Enable */
545
+ #define TOIE1 0 /* Overflow Interrupt Enable */
546
+
547
+ /* Amplifier 0 Control and Status register */
548
+ #define AMP0CSR _SFR_MEM8(0x76)
549
+ #define AMP0EN 7
550
+ #define AMP0IS 6
551
+ #define AMP0G1 5
552
+ #define AMP0G0 4
553
+ #define AMP0TS1 1
554
+ #define AMP0TS0 0
555
+
556
+ /* Amplifier 1 Control and Status register */
557
+ #define AMP1CSR _SFR_MEM8(0x77)
558
+ #define AMP1EN 7
559
+ #define AMP1IS 6
560
+ #define AMP1G1 5
561
+ #define AMP1G0 4
562
+ #define AMP1TS1 1
563
+ #define AMP1TS0 0
564
+
565
+ /* ADC Result Data Register */
566
+ #ifndef __ASSEMBLER__
567
+ #define ADC _SFR_MEM16(0x78)
568
+ #endif
569
+ #define ADCW _SFR_MEM16(0x78)
570
+ #define ADCL _SFR_MEM8(0x78)
571
+ #define ADCH _SFR_MEM8(0x79)
572
+
573
+ /* ADC Control and Status Register A */
574
+ #define ADCSRA _SFR_MEM8(0x7A)
575
+ /* ADCSRA */
576
+ #define ADEN 7 /* ADC Enable */
577
+ #define ADSC 6 /* ADC Start Conversion */
578
+ #define ADATE 5 /* ADC Auto Trigger Enable */
579
+ #define ADIF 4 /* ADC Interrupt Flag */
580
+ #define ADIE 3 /* ADC Interrupt Enable */
581
+ #define ADPS2 2 /* ADC Prescaler Select bit2 */
582
+ #define ADPS1 1 /* ADC Prescaler Select bit1 */
583
+ #define ADPS0 0 /* ADC Prescaler Select bit0 */
584
+
585
+ /* ADC Control and Status Register B */
586
+ #define ADCSRB _SFR_MEM8(0x7B)
587
+ /* ADCSRB */
588
+ #define ADHSM 7 /* ADC High Speed Mode */
589
+ #define ADASCR 4
590
+ #define ADTS3 3 /* ADC Auto Trigger Source 3 */
591
+ #define ADTS2 2 /* ADC Auto Trigger Source 2 */
592
+ #define ADTS1 1 /* ADC Auto Trigger Source 1 */
593
+ #define ADTS0 0 /* ADC Auto Trigger Source 0 */
594
+
595
+ /* ADC multiplexer Selection Register */
596
+ #define ADMUX _SFR_MEM8(0x7C)
597
+ /* ADMUX */
598
+ #define REFS1 7 /* Reference Selection bit1 */
599
+ #define REFS0 6 /* Reference Selection bit0 */
600
+ #define ADLAR 5 /* Left Adjust Result */
601
+ #define MUX3 3 /* Analog Channel and Gain Selection bit3 */
602
+ #define MUX2 2 /* Analog Channel and Gain Selection bit2 */
603
+ #define MUX1 1 /* Analog Channel and Gain Selection bit1 */
604
+ #define MUX0 0 /* Analog Channel and Gain Selection bit0 */
605
+
606
+ /* Digital Input Disable Register 0 */
607
+ #define DIDR0 _SFR_MEM8(0x7E)
608
+ /* DIDR0 */
609
+ #define ADC7D 7 /* ADC7 Digital input Disable */
610
+ #define ADC6D 6 /* ADC6 Digital input Disable */
611
+ #define ADC5D 5 /* ADC5 Digital input Disable */
612
+ #define ADC4D 4 /* ADC4 Digital input Disable */
613
+ #define ADC3D 3 /* ADC3 Digital input Disable */
614
+ #define ADC2D 2 /* ADC2 Digital input Disable */
615
+ #define ADC1D 1 /* ADC1 Digital input Disable */
616
+ #define ADC0D 0 /* ADC0 Digital input Disable */
617
+
618
+ /* Digital Input Disable Register 1 */
619
+ #define DIDR1 _SFR_MEM8(0x7F)
620
+ /* DIDR1 */
621
+ #define ACMP0D 5
622
+ #define AMP0PD 4
623
+ #define AMP0ND 3
624
+ #define ADC10D 2 /* ADC10 Digital input Disable */
625
+ #define ADC9D 1 /* ADC9 Digital input Disable */
626
+ #define ADC8D 0 /* ADC8 Digital input Disable */
627
+
628
+ /* Timer/Counter1 Control Register A */
629
+ #define TCCR1A _SFR_MEM8(0x80)
630
+ /* TCCR1A */
631
+ #define COM1A1 7 /* Comparet Ouput Mode 1A, bit 1 */
632
+ #define COM1A0 6 /* Comparet Ouput Mode 1A, bit 0 */
633
+ #define COM1B1 5 /* Compare Output Mode 1B, bit 1 */
634
+ #define COM1B0 4 /* Compare Output Mode 1B, bit 0 */
635
+ #define WGM11 1 /* Waveform Generation Mode */
636
+ #define WGM10 0 /* Waveform Generation Mode */
637
+
638
+ /* Timer/Counter1 Control Register B */
639
+ #define TCCR1B _SFR_MEM8(0x81)
640
+ /* TCCR1B */
641
+ #define ICNC1 7 /* Input Capture 1 Noise Canceler */
642
+ #define ICES1 6 /* Input Capture 1 Edge Select */
643
+ #define WGM13 4 /* Waveform Generation Mode */
644
+ #define WGM12 3 /* Waveform Generation Mode */
645
+ #define CS12 2 /* Prescaler source of Timer/Counter 1 */
646
+ #define CS11 1 /* Prescaler source of Timer/Counter 1 */
647
+ #define CS10 0 /* Prescaler source of Timer/Counter 1 */
648
+
649
+ /* Timer/Counter1 Control Register C */
650
+ #define TCCR1C _SFR_MEM8(0x82)
651
+ /* TCCR1C */
652
+ #define FOC1A 7 /* Force Output Compare for Channel A */
653
+ #define FOC1B 6 /* Force Output Compare for Channel B */
654
+
655
+ /* Timer/Counter1 */
656
+ #define TCNT1 _SFR_MEM16(0x84)
657
+ #define TCNT1L _SFR_MEM8(0x84)
658
+ #define TCNT1H _SFR_MEM8(0x85)
659
+ /* TCNT1H */
660
+ #define TCNT115 7
661
+ #define TCNT114 6
662
+ #define TCNT113 5
663
+ #define TCNT112 4
664
+ #define TCNT111 3
665
+ #define TCNT110 2
666
+ #define TCNT19 1
667
+ #define TCNT18 0
668
+ /* TCNT1L */
669
+ #define TCNT17 7
670
+ #define TCNT16 6
671
+ #define TCNT15 5
672
+ #define TCNT14 4
673
+ #define TCNT13 3
674
+ #define TCNT12 2
675
+ #define TCNT11 1
676
+ #define TCNT10 0
677
+
678
+ /* Input Capture Register 1 */
679
+ #define ICR1 _SFR_MEM16(0x86)
680
+ #define ICR1L _SFR_MEM8(0x86)
681
+ #define ICR1H _SFR_MEM8(0x87)
682
+ /* ICR1H */
683
+ #define ICR115 7
684
+ #define ICR114 6
685
+ #define ICR113 5
686
+ #define ICR112 4
687
+ #define ICR111 3
688
+ #define ICR110 2
689
+ #define ICR19 1
690
+ #define ICR18 0
691
+ /* ICR1L */
692
+ #define ICR17 7
693
+ #define ICR16 6
694
+ #define ICR15 5
695
+ #define ICR14 4
696
+ #define ICR13 3
697
+ #define ICR12 2
698
+ #define ICR11 1
699
+ #define ICR10 0
700
+
701
+ /* Output Compare Register 1 A */
702
+ #define OCR1A _SFR_MEM16(0x88)
703
+ #define OCR1AL _SFR_MEM8(0x88)
704
+ #define OCR1AH _SFR_MEM8(0x89)
705
+ /* OCR1AH */
706
+ #define OCR1A15 7
707
+ #define OCR1A14 6
708
+ #define OCR1A13 5
709
+ #define OCR1A12 4
710
+ #define OCR1A11 3
711
+ #define OCR1A10 2
712
+ #define OCR1A9 1
713
+ #define OCR1A8 0
714
+ /* OCR1AL */
715
+ #define OCR1A7 7
716
+ #define OCR1A6 6
717
+ #define OCR1A5 5
718
+ #define OCR1A4 4
719
+ #define OCR1A3 3
720
+ #define OCR1A2 2
721
+ #define OCR1A1 1
722
+ #define OCR1A0 0
723
+
724
+ /* Output Compare Register 1 B */
725
+ #define OCR1B _SFR_MEM16(0x8A)
726
+ #define OCR1BL _SFR_MEM8(0x8A)
727
+ #define OCR1BH _SFR_MEM8(0x8B)
728
+ /* OCR1BH */
729
+ #define OCR1B15 7
730
+ #define OCR1B14 6
731
+ #define OCR1B13 5
732
+ #define OCR1B12 4
733
+ #define OCR1B11 3
734
+ #define OCR1B10 2
735
+ #define OCR1B9 1
736
+ #define OCR1B8 0
737
+ /* OCR1BL */
738
+ #define OCR1B7 7
739
+ #define OCR1B6 6
740
+ #define OCR1B5 5
741
+ #define OCR1B4 4
742
+ #define OCR1B3 3
743
+ #define OCR1B2 2
744
+ #define OCR1B1 1
745
+ #define OCR1B0 0
746
+
747
+ /* PSC0 Interrupt Flag Register */
748
+ #define PIFR0 _SFR_MEM8(0xA0)
749
+ /* PIFR0 */
750
+ #define POAC0B 7 /* PSC0 Output B Activity */
751
+ #define POAC0A 6 /* PSC0 Output A Activity */
752
+ #define PSEI0 5 /* PSC0 Synchro Error Interrupt */
753
+ #define PEV0B 4 /* PSC0 External Event B Interrupt */
754
+ #define PEV0A 3 /* PSC0 External Event A Interrupt */
755
+ #define PRN01 2 /* PSC0 Ramp Number bit1 */
756
+ #define PRN00 1 /* PSC0 Ramp Number bit0 */
757
+ #define PEOP0 0 /* End Of PSC0 Interrupt */
758
+
759
+ /* PSC0 Interrupt Mask Register */
760
+ #define PIM0 _SFR_MEM8(0xA1)
761
+ /* PIM0 */
762
+ #define PSEIE0 5 /* PSC0 Synchro Error Interrupt Enable */
763
+ #define PEVE0B 4 /* PSC0 External Event B Interrupt Enable */
764
+ #define PEVE0A 3 /* PSC0 External Event A Interrupt Enable */
765
+ #define PEOPE0 0 /* PSC0 End Of Cycle Interrupt Enable */
766
+
767
+ /* PSC1 Interrupt Flag Register */
768
+ #define PIFR1 _SFR_MEM8(0xA2)
769
+ /* PIFR1 */
770
+ #define POAC1B 7 /* PSC1 Output B Activity */
771
+ #define POAC1A 6 /* PSC1 Output A Activity */
772
+ #define PSEI1 5 /* PSC1 Synchro Error Interrupt */
773
+ #define PEV1B 4 /* PSC1 External Event B Interrupt */
774
+ #define PEV1A 3 /* PSC1 External Event A Interrupt */
775
+ #define PRN11 2 /* PSC1 Ramp Number bit1 */
776
+ #define PRN10 1 /* PSC1 Ramp Number bit0 */
777
+ #define PEOP1 0 /* End Of PSC1 Interrupt */
778
+
779
+ /* PSC1 Interrupt Mask Register */
780
+ #define PIM1 _SFR_MEM8(0xA3)
781
+ /* PIM1 */
782
+ #define PSEIE1 5 /* PSC1 Synchro Error Interrupt Enable */
783
+ #define PEVE1B 4 /* PSC1 External Event B Interrupt Enable */
784
+ #define PEVE1A 3 /* PSC1 External Event A Interrupt Enable */
785
+ #define PEOPE1 0 /* PSC1 End Of Cycle Interrupt Enable */
786
+
787
+ /* PSC2 Interrupt Flag Register */
788
+ #define PIFR2 _SFR_MEM8(0xA4)
789
+ /* PIFR2 */
790
+ #define POAC2B 7 /* PSC2 Output B Activity */
791
+ #define POAC2A 6 /* PSC2 Output A Activity */
792
+ #define PSEI2 5 /* PSC2 Synchro Error Interrupt */
793
+ #define PEV2B 4 /* PSC2 External Event B Interrupt */
794
+ #define PEV2A 3 /* PSC2 External Event A Interrupt */
795
+ #define PRN21 2 /* PSC2 Ramp Number bit1 */
796
+ #define PRN20 1 /* PSC2 Ramp Number bit0 */
797
+ #define PEOP2 0 /* End Of PSC2 Interrupt */
798
+
799
+ /* PSC2 Interrupt Mask Register */
800
+ #define PIM2 _SFR_MEM8(0xA5)
801
+ /* PIM2 */
802
+ #define PSEIE2 5 /* PSC2 Synchro Error Interrupt Enable */
803
+ #define PEVE2B 4 /* PSC2 External Event B Interrupt Enable */
804
+ #define PEVE2A 3 /* PSC2 External Event A Interrupt Enable */
805
+ #define PEOPE2 0 /* PSC2 End Of Cycle Interrupt Enable */
806
+
807
+ /* Digital to Analog Conversion Control Register */
808
+ #define DACON _SFR_MEM8(0xAA)
809
+ /* DACON */
810
+ #define DAATE 7 /* DAC Auto Trigger Enable bit */
811
+ #define DATS2 6 /* DAC Trigger Selection bit2 */
812
+ #define DATS1 5 /* DAC Trigger Selection bit1 */
813
+ #define DATS0 4 /* DAC Trigger Selection bit0 */
814
+ #define DALA 2 /* Digital to Analog Left Adjust */
815
+ #define DAOE 1 /* Digital to Analog Output Enable bit */
816
+ #define DAEN 0 /* Digital to Analog Enable bit */
817
+
818
+ /* Digital to Analog Converter input Register */
819
+ #define DAC _SFR_MEM16(0xAB)
820
+ #define DACL _SFR_MEM8(0xAB)
821
+ #define DACH _SFR_MEM8(0xAC)
822
+
823
+ /* Analog Comparator 0 Control Register */
824
+ #define AC0CON _SFR_MEM8(0xAD)
825
+ /* AC0CON */
826
+ #define AC0EN 7 /* Analog Comparator 0 Enable Bit */
827
+ #define AC0IE 6 /* Analog Comparator 0 Interrupt Enable bit */
828
+ #define AC0IS1 5 /* Analog Comparator 0 Interrupt Select bit1 */
829
+ #define AC0IS0 4 /* Analog Comparator 0 Interrupt Select bit0 */
830
+ #define AC0M2 2 /* Analog Comparator 0 Multiplexer register bit2 */
831
+ #define AC0M1 1 /* Analog Comparator 0 Multiplexer register bit1 */
832
+ #define AC0M0 0 /* Analog Comparator 0 Multiplexer register bit0 */
833
+
834
+ /* Analog Comparator 1 Control Register */
835
+ #define AC1CON _SFR_MEM8(0xAE)
836
+ /* AC1CON */
837
+ #define AC1EN 7 /* Analog Comparator 1 Enable Bit */
838
+ #define AC1IE 6 /* Analog Comparator 1 Interrupt Enable bit */
839
+ #define AC1IS1 5 /* Analog Comparator 1 Interrupt Select bit1 */
840
+ #define AC1IS0 4 /* Analog Comparator 1 Interrupt Select bit0 */
841
+ #define AC1ICE 3 /* Analog Comparator 1 Interrupt Capture Enable bit */
842
+ #define AC1M2 2 /* Analog Comparator 1 Multiplexer register bit2 */
843
+ #define AC1M1 1 /* Analog Comparator 1 Multiplexer register bit1 */
844
+ #define AC1M0 0 /* Analog Comparator 1 Multiplexer register bit0 */
845
+
846
+ /* Analog Comparator 2 Control Register */
847
+ #define AC2CON _SFR_MEM8(0xAF)
848
+ /* AC2CON */
849
+ #define AC2EN 7 /* Analog Comparator 2 Enable Bit */
850
+ #define AC2IE 6 /* Analog Comparator 2 Interrupt Enable bit */
851
+ #define AC2IS1 5 /* Analog Comparator 2 Interrupt Select bit1 */
852
+ #define AC2IS0 4 /* Analog Comparator 2 Interrupt Select bit0 */
853
+ #define AC2M2 2 /* Analog Comparator 2 Multiplexer register bit2 */
854
+ #define AC2M1 1 /* Analog Comparator 2 Multiplexer register bit1 */
855
+ #define AC2M0 0 /* Analog Comparator 2 Multiplexer register bit0 */
856
+
857
+ /* USART Control and Status Register A */
858
+ #define UCSRA _SFR_MEM8(0xC0)
859
+ /* UCSRA */
860
+ #define RXC 7 /* USART Receive Complete */
861
+ #define TXC 6 /* USART Transmit Complete */
862
+ #define UDRE 5 /* USART Data Register Empty */
863
+ #define FE 4 /* Frame Error */
864
+ #define DOR 3 /* Data OverRun */
865
+ #define UPE 2 /* USART Parity Error */
866
+ #define U2X 1 /* Double the USART Transmission Speed */
867
+ #define MPCM 0 /* Multi-processor Communication Mode */
868
+
869
+ /* USART Control and Status Register B */
870
+ #define UCSRB _SFR_MEM8(0xC1)
871
+ /* UCSRB */
872
+ #define RXCIE 7 /* RX Complete Interrupt Enable */
873
+ #define TXCIE 6 /* TX Complete Interrupt Enable */
874
+ #define UDRIE 5 /* USART Data Register Empty Interrupt Enable */
875
+ #define RXEN 4 /* Receiver Enable */
876
+ #define TXEN 3 /* Transmitter Enable */
877
+ #define UCSZ2 2 /* Character Size */
878
+ #define RXB8 1 /* Receive Data Bit 8 */
879
+ #define TXB8 0 /* Transmit Data Bit 8 */
880
+
881
+ /* USART Control and Status Register C */
882
+ #define UCSRC _SFR_MEM8(0xC2)
883
+ /* UCSRC */
884
+ #define UMSEL 6 /* USART Mode Select */
885
+ #define UPM1 5 /* Parity Mode bit1 */
886
+ #define UPM0 4 /* Parity Mode bit0 */
887
+ #define USBS 3 /* Stop Bit Select */
888
+ #define UCSZ1 2 /* Character Size bit1 */
889
+ #define UCSZ0 1 /* Character Size bit0 */
890
+ #define UCPOL 0 /* Clock Polarity */
891
+
892
+ /* USART Baud Rate Register */
893
+ #define UBRR _SFR_MEM16(0xC4)
894
+ #define UBRRL _SFR_MEM8(0xC4)
895
+ #define UBRRH _SFR_MEM8(0xC5)
896
+
897
+ /* USART I/O Data Register */
898
+ #define UDR _SFR_MEM8(0xC6)
899
+
900
+ /* EUSART Control and Status Register A */
901
+ #define EUCSRA _SFR_MEM8(0xC8)
902
+ /* EUCSRA */
903
+ #define UTxS3 7 /* EUSART Transmit Character Size bit3 */
904
+ #define UTxS2 6 /* EUSART Transmit Character Size bit2 */
905
+ #define UTxS1 5 /* EUSART Transmit Character Size bit1 */
906
+ #define UTxS0 4 /* EUSART Transmit Character Size bit0 */
907
+ #define URxS3 3 /* EUSART Receive Character Size bit3 */
908
+ #define URxS2 2 /* EUSART Receive Character Size bit2 */
909
+ #define URxS1 1 /* EUSART Receive Character Size bit1 */
910
+ #define URxS0 0 /* EUSART Receive Character Size bit0 */
911
+
912
+ /* EUSART Control and Status Register B */
913
+ #define EUCSRB _SFR_MEM8(0xC9)
914
+ /* EUCSRB */
915
+ #define EUSART 4 /* EUSART Enable Bit */
916
+ #define EUSBS 3 /* EUSBS Enable Bit */
917
+ #define EMCH 1 /* Manchester mode */
918
+ #define BODR 0 /* Bit Order */
919
+
920
+ /* EUSART Control and Status Register C */
921
+ #define EUCSRC _SFR_MEM8(0xCA)
922
+ /* EUCSRC */
923
+ #define FEM 3 /* Frame Error Manchester */
924
+ #define F1617 2
925
+ #define STP1 1 /* Stop bits values bit1 */
926
+ #define STP0 0 /* Stop bits values bit0 */
927
+
928
+ /* Manchester receiver Baud Rate Registers */
929
+ #define MUBRR _SFR_MEM16(0xCC)
930
+ #define MUBRRL _SFR_MEM8(0xCC)
931
+ #define MUBRRH _SFR_MEM8(0xCD)
932
+
933
+ /* EUSART I/O Data Register */
934
+ #define EUDR _SFR_MEM8(0xCE)
935
+
936
+ /* PSC 0 Synchro and Output Configuration */
937
+ #define PSOC0 _SFR_MEM8(0xD0)
938
+ /* PSOC0 */
939
+ #define PSYNC01 5 /* Synchronization Out for ADC Selection bit1 */
940
+ #define PSYNC00 4 /* Synchronization Out for ADC Selection bit0 */
941
+ #define POEN0B 2 /* PSC 0 OUT Part B Output Enable */
942
+ #define POEN0A 0 /* PSC 0 OUT Part A Output Enable */
943
+
944
+ /* Output Compare SA Registers */
945
+ #define OCR0SA _SFR_MEM16(0xD2)
946
+ #define OCR0SAL _SFR_MEM8(0xD2)
947
+ #define OCR0SAH _SFR_MEM8(0xD3)
948
+
949
+ /* Output Compare RA Registers */
950
+ #define OCR0RA _SFR_MEM16(0xD4)
951
+ #define OCR0RAL _SFR_MEM8(0xD4)
952
+ #define OCR0RAH _SFR_MEM8(0xD5)
953
+
954
+ /* Output Compare SB Registers */
955
+ #define OCR0SB _SFR_MEM16(0xD6)
956
+ #define OCR0SBL _SFR_MEM8(0xD6)
957
+ #define OCR0SBH _SFR_MEM8(0xD7)
958
+
959
+ /* Output Compare RB Registers */
960
+ #define OCR0RB _SFR_MEM16(0xD8)
961
+ #define OCR0RBL _SFR_MEM8(0xD8)
962
+ #define OCR0RBH _SFR_MEM8(0xD9)
963
+
964
+ /* PSC 0 Configuration Register */
965
+ #define PCNF0 _SFR_MEM8(0xDA)
966
+ /* PCNF0 */
967
+ #define PFIFTY0 7 /* PSC 0 Fifty */
968
+ #define PALOCK0 6 /* PSC 0 Autolock */
969
+ #define PLOCK0 5 /* PSC 0 Lock */
970
+ #define PMODE01 4 /* PSC 0 Mode bit1 */
971
+ #define PMODE00 3 /* PSC 0 Mode bit0 */
972
+ #define POP0 2 /* PSC 0 Output Polarity */
973
+ #define PCLKSEL0 1 /* PSC 0 Input Clock Select */
974
+
975
+ /* PSC 0 Control Register */
976
+ #define PCTL0 _SFR_MEM8(0xDB)
977
+ /* PCTL0 */
978
+ #define PPRE01 7 /* PSC 0 Prescaler Select bit1 */
979
+ #define PPRE00 6 /* PSC 0 Prescaler Select bit0 */
980
+ #define PBFM0 5 /* Balance Flank Width Modulation */
981
+ #define PAOC0B 4 /* PSC 0 Asynchronous Output Control B */
982
+ #define PAOC0A 3 /* PSC 0 Asynchronous Output Control A */
983
+ #define PARUN0 2 /* PSC 0 Autorun */
984
+ #define PCCYC0 1 /* PSC 0 Complete Cycle */
985
+ #define PRUN0 0 /* PSC 0 Run */
986
+
987
+ /* PSC 0 Input A Control Register */
988
+ #define PFRC0A _SFR_MEM8(0xDC)
989
+ /* PFRC0A */
990
+ #define PCAE0A 7 /* PSC 0 Capture Enable Input Part A */
991
+ #define PISEL0A 6 /* PSC 0 Input Select for Part A */
992
+ #define PELEV0A 5 /* PSC 0 Edge Level Selector of Input Part A */
993
+ #define PFLTE0A 4 /* PSC 0 Filter Enable on Input Part A */
994
+ #define PRFM0A3 3 /* PSC 0 Fault Mode bit3 */
995
+ #define PRFM0A2 2 /* PSC 0 Fault Mode bit2 */
996
+ #define PRFM0A1 1 /* PSC 0 Fault Mode bit1 */
997
+ #define PRFM0A0 0 /* PSC 0 Fault Mode bit0 */
998
+
999
+ /* PSC 0 Input B Control Register */
1000
+ #define PFRC0B _SFR_MEM8(0xDD)
1001
+ /* PFRC0B */
1002
+ #define PCAE0B 7 /* PSC 0 Capture Enable Input Part B */
1003
+ #define PISEL0B 6 /* PSC 0 Input Select for Part B */
1004
+ #define PELEV0B 5 /* PSC 0 Edge Level Selector of Input Part B */
1005
+ #define PFLTE0B 4 /* PSC 0 Filter Enable on Input Part B */
1006
+ #define PRFM0B3 3 /* PSC 0 Fault Mode bit3 */
1007
+ #define PRFM0B2 2 /* PSC 0 Fault Mode bit2 */
1008
+ #define PRFM0B1 1 /* PSC 0 Fault Mode bit1 */
1009
+ #define PRFM0B0 0 /* PSC 0 Fault Mode bit0 */
1010
+
1011
+ /* PSC 0 Input Capture Registers */
1012
+ #define PICR0 _SFR_MEM16(0xDE)
1013
+
1014
+ #define PICR0L _SFR_MEM8(0xDE)
1015
+
1016
+ #define PICR0H _SFR_MEM8(0xDF)
1017
+ #define PCST0 7 /* PSC Capture Software Trig bit */
1018
+ /* not implemented on AT90PWM2/AT90PWM3 */
1019
+
1020
+ /* PSC 1 Synchro and Output Configuration */
1021
+ #define PSOC1 _SFR_MEM8(0xE0)
1022
+ /* PSOC1 */
1023
+ #define PSYNC11 5 /* Synchronization Out for ADC Selection bit1 */
1024
+ #define PSYNC10 4 /* Synchronization Out for ADC Selection bit0 */
1025
+ #define POEN1B 2 /* PSC 1 OUT Part B Output Enable */
1026
+ #define POEN1A 0 /* PSC 1 OUT Part A Output Enable */
1027
+
1028
+ /* Output Compare SA Registers */
1029
+ #define OCR1SA _SFR_MEM16(0xE2)
1030
+ #define OCR1SAL _SFR_MEM8(0xE2)
1031
+ #define OCR1SAH _SFR_MEM8(0xE3)
1032
+
1033
+ /* Output Compare RA Registers */
1034
+ #define OCR1RA _SFR_MEM16(0xE4)
1035
+ #define OCR1RAL _SFR_MEM8(0xE4)
1036
+ #define OCR1RAH _SFR_MEM8(0xE5)
1037
+
1038
+ /* Output Compare SB Registers */
1039
+ #define OCR1SB _SFR_MEM16(0xE6)
1040
+ #define OCR1SBL _SFR_MEM8(0xE6)
1041
+ #define OCR1SBH _SFR_MEM8(0xE7)
1042
+
1043
+ /* Output Compare RB Registers */
1044
+ #define OCR1RB _SFR_MEM16(0xE8)
1045
+ #define OCR1RBL _SFR_MEM8(0xE8)
1046
+ #define OCR1RBH _SFR_MEM8(0xE9)
1047
+
1048
+ /* PSC 1 Configuration Register */
1049
+ #define PCNF1 _SFR_MEM8(0xEA)
1050
+ /* PCNF1 */
1051
+ #define PFIFTY1 7 /* PSC 1 Fifty */
1052
+ #define PALOCK1 6 /* PSC 1 Autolock */
1053
+ #define PLOCK1 5 /* PSC 1 Lock */
1054
+ #define PMODE11 4 /* PSC 1 Mode bit1 */
1055
+ #define PMODE10 3 /* PSC 1 Mode bit0 */
1056
+ #define POP1 2 /* PSC 1 Output Polarity */
1057
+ #define PCLKSEL1 1 /* PSC 1 Input Clock Select */
1058
+
1059
+ /* PSC 1 Control Register */
1060
+ #define PCTL1 _SFR_MEM8(0xEB)
1061
+ /* PCTL1 */
1062
+ #define PPRE11 7 /* PSC 1 Prescaler Select bit1 */
1063
+ #define PPRE10 6 /* PSC 1 Prescaler Select bit0 */
1064
+ #define PBFM1 5 /* Balance Flank Width Modulation */
1065
+ #define PAOC1B 4 /* PSC 1 Asynchronous Output Control B */
1066
+ #define PAOC1A 3 /* PSC 1 Asynchronous Output Control A */
1067
+ #define PARUN1 2 /* PSC 1 Autorun */
1068
+ #define PCCYC1 1 /* PSC 1 Complete Cycle */
1069
+ #define PRUN1 0 /* PSC 1 Run */
1070
+
1071
+ /* PSC 1 Input A Control Register */
1072
+ #define PFRC1A _SFR_MEM8(0xEC)
1073
+ /* PFRC1A */
1074
+ #define PCAE1A 7 /* PSC 1 Capture Enable Input Part A */
1075
+ #define PISEL1A 6 /* PSC 1 Input Select for Part A */
1076
+ #define PELEV1A 5 /* PSC 1 Edge Level Selector of Input Part A */
1077
+ #define PFLTE1A 4 /* PSC 1 Filter Enable on Input Part A */
1078
+ #define PRFM1A3 3 /* PSC 1 Fault Mode bit3 */
1079
+ #define PRFM1A2 2 /* PSC 1 Fault Mode bit2 */
1080
+ #define PRFM1A1 1 /* PSC 1 Fault Mode bit1 */
1081
+ #define PRFM1A0 0 /* PSC 1 Fault Mode bit0 */
1082
+
1083
+ /* PSC 1 Input B Control Register */
1084
+ #define PFRC1B _SFR_MEM8(0xED)
1085
+ /* PFRC1B */
1086
+ #define PCAE1B 7 /* PSC 1 Capture Enable Input Part B */
1087
+ #define PISEL1B 6 /* PSC 1 Input Select for Part B */
1088
+ #define PELEV1B 5 /* PSC 1 Edge Level Selector of Input Part B */
1089
+ #define PFLTE1B 4 /* PSC 1 Filter Enable on Input Part B */
1090
+ #define PRFM1B3 3 /* PSC 1 Fault Mode bit3 */
1091
+ #define PRFM1B2 2 /* PSC 1 Fault Mode bit2 */
1092
+ #define PRFM1B1 1 /* PSC 1 Fault Mode bit1 */
1093
+ #define PRFM1B0 0 /* PSC 1 Fault Mode bit0 */
1094
+
1095
+ /* PSC 1 Input Capture Registers */
1096
+ #define PICR1 _SFR_MEM16(0xEE)
1097
+
1098
+ #define PICR1L _SFR_MEM8(0xEE)
1099
+
1100
+ #define PICR1H _SFR_MEM8(0xEF)
1101
+ #define PCST1 7 /* PSC Capture Software Trig bit */
1102
+ /* not implemented on AT90PWM2/AT90PWM3 */
1103
+
1104
+ /* PSC 2 Synchro and Output Configuration */
1105
+ #define PSOC2 _SFR_MEM8(0xF0)
1106
+ /* PSOC2 */
1107
+ #define POS23 7 /* PSCOUT23 Selection */
1108
+ #define POS22 6 /* PSCOUT22 Selection */
1109
+ #define PSYNC21 5 /* Synchronization Out for ADC Selection bit1 */
1110
+ #define PSYNC20 4 /* Synchronization Out for ADC Selection bit0 */
1111
+ #define POEN2D 3 /* PSCOUT23 Output Enable */
1112
+ #define POEN2B 2 /* PSC 2 OUT Part B Output Enable */
1113
+ #define POEN2C 1 /* PSCOUT22 Output Enable */
1114
+ #define POEN2A 0 /* PSC 2 OUT Part A Output Enable */
1115
+
1116
+ /* PSC 2 Output Matrix */
1117
+ #define POM2 _SFR_MEM8(0xF1)
1118
+ /* POM2 */
1119
+ #define POMV2B3 7 /* Output Matrix Output B Ramp 3 */
1120
+ #define POMV2B2 6 /* Output Matrix Output B Ramp 2 */
1121
+ #define POMV2B1 5 /* Output Matrix Output B Ramp 1 */
1122
+ #define POMV2B0 4 /* Output Matrix Output B Ramp 0 */
1123
+ #define POMV2A3 3 /* Output Matrix Output A Ramp 3 */
1124
+ #define POMV2A2 2 /* Output Matrix Output A Ramp 2 */
1125
+ #define POMV2A1 1 /* Output Matrix Output A Ramp 1 */
1126
+ #define POMV2A0 0 /* Output Matrix Output A Ramp 0 */
1127
+
1128
+ /* Output Compare SA Registers */
1129
+ #define OCR2SA _SFR_MEM16(0xF2)
1130
+ #define OCR2SAL _SFR_MEM8(0xF2)
1131
+ #define OCR2SAH _SFR_MEM8(0xF3)
1132
+
1133
+ /* Output Compare RA Registers */
1134
+ #define OCR2RA _SFR_MEM16(0xF4)
1135
+ #define OCR2RAL _SFR_MEM8(0xF4)
1136
+ #define OCR2RAH _SFR_MEM8(0xF5)
1137
+
1138
+ /* Output Compare SB Registers */
1139
+ #define OCR2SB _SFR_MEM16(0xF6)
1140
+ #define OCR2SBL _SFR_MEM8(0xF6)
1141
+ #define OCR2SBH _SFR_MEM8(0xF7)
1142
+
1143
+ /* Output Compare RB Registers */
1144
+ #define OCR2RB _SFR_MEM16(0xF8)
1145
+ #define OCR2RBL _SFR_MEM8(0xF8)
1146
+ #define OCR2RBH _SFR_MEM8(0xF9)
1147
+
1148
+ /* PSC 2 Configuration Register */
1149
+ #define PCNF2 _SFR_MEM8(0xFA)
1150
+ /* PCNF2 */
1151
+ #define PFIFTY2 7 /* PSC 2 Fifty */
1152
+ #define PALOCK2 6 /* PSC 2 Autolock */
1153
+ #define PLOCK2 5 /* PSC 2 Lock */
1154
+ #define PMODE21 4 /* PSC 2 Mode bit1 */
1155
+ #define PMODE20 3 /* PSC 2 Mode bit0 */
1156
+ #define POP2 2 /* PSC 2 Output Polarity */
1157
+ #define PCLKSEL2 1 /* PSC 2 Input Clock Select */
1158
+ #define POME2 0 /* PSC 2 Output Matrix Enable */
1159
+
1160
+ /* PSC 2 Control Register */
1161
+ #define PCTL2 _SFR_MEM8(0xFB)
1162
+ /* PCTL2 */
1163
+ #define PPRE21 7 /* PSC 2 Prescaler Select bit1 */
1164
+ #define PPRE20 6 /* PSC 2 Prescaler Select bit0 */
1165
+ #define PBFM2 5 /* Balance Flank Width Modulation */
1166
+ #define PAOC2B 4 /* PSC 2 Asynchronous Output Control B */
1167
+ #define PAOC2A 3 /* PSC 2 Asynchronous Output Control A */
1168
+ #define PARUN2 2 /* PSC 2 Autorun */
1169
+ #define PCCYC2 1 /* PSC 2 Complete Cycle */
1170
+ #define PRUN2 0 /* PSC 2 Run */
1171
+
1172
+ /* PSC 2 Input A Control Register */
1173
+ #define PFRC2A _SFR_MEM8(0xFC)
1174
+ /* PFRC2A */
1175
+ #define PCAE2A 7 /* PSC 2 Capture Enable Input Part A */
1176
+ #define PISEL2A 6 /* PSC 2 Input Select for Part A */
1177
+ #define PELEV2A 5 /* PSC 2 Edge Level Selector of Input Part A */
1178
+ #define PFLTE2A 4 /* PSC 2 Filter Enable on Input Part A */
1179
+ #define PRFM2A3 3 /* PSC 2 Fault Mode bit3 */
1180
+ #define PRFM2A2 2 /* PSC 2 Fault Mode bit2 */
1181
+ #define PRFM2A1 1 /* PSC 2 Fault Mode bit1 */
1182
+ #define PRFM2A0 0 /* PSC 2 Fault Mode bit0 */
1183
+
1184
+ /* PSC 2 Input B Control Register */
1185
+ #define PFRC2B _SFR_MEM8(0xFD)
1186
+ /* PFRC2B */
1187
+ #define PCAE2B 7 /* PSC 2 Capture Enable Input Part B */
1188
+ #define PISEL2B 6 /* PSC 2 Input Select for Part B */
1189
+ #define PELEV2B 5 /* PSC 2 Edge Level Selector of Input Part B */
1190
+ #define PFLTE2B 4 /* PSC 2 Filter Enable on Input Part B */
1191
+ #define PRFM2B3 3 /* PSC 2 Fault Mode bit3 */
1192
+ #define PRFM2B2 2 /* PSC 2 Fault Mode bit2 */
1193
+ #define PRFM2B1 1 /* PSC 2 Fault Mode bit1 */
1194
+ #define PRFM2B0 0 /* PSC 2 Fault Mode bit0 */
1195
+
1196
+ /* PSC 2 Input Capture Registers */
1197
+ #define PICR2 _SFR_MEM16(0xFE)
1198
+
1199
+ #define PICR2L _SFR_MEM8(0xFE)
1200
+
1201
+ #define PICR2H _SFR_MEM8(0xFF)
1202
+ #define PCST2 7 /* PSC Capture Software Trig bit */
1203
+ /* not implemented on AT90PWM2/AT90PWM3 */
1204
+
1205
+
1206
+ /* Interrupt vectors */
1207
+ /* PSC2 Capture Event */
1208
+ #define PSC2_CAPT_vect_num 1
1209
+ #define PSC2_CAPT_vect _VECTOR(1)
1210
+ #define SIG_PSC2_CAPTURE _VECTOR(1)
1211
+
1212
+ /* PSC2 End Cycle */
1213
+ #define PSC2_EC_vect_num 2
1214
+ #define PSC2_EC_vect _VECTOR(2)
1215
+ #define SIG_PSC2_END_CYCLE _VECTOR(2)
1216
+
1217
+ /* PSC1 Capture Event */
1218
+ #define PSC1_CAPT_vect_num 3
1219
+ #define PSC1_CAPT_vect _VECTOR(3)
1220
+ #define SIG_PSC1_CAPTURE _VECTOR(3)
1221
+
1222
+ /* PSC1 End Cycle */
1223
+ #define PSC1_EC_vect_num 4
1224
+ #define PSC1_EC_vect _VECTOR(4)
1225
+ #define SIG_PSC1_END_CYCLE _VECTOR(4)
1226
+
1227
+ /* PSC0 Capture Event */
1228
+ #define PSC0_CAPT_vect_num 5
1229
+ #define PSC0_CAPT_vect _VECTOR(5)
1230
+ #define SIG_PSC0_CAPTURE _VECTOR(5)
1231
+
1232
+ /* PSC0 End Cycle */
1233
+ #define PSC0_EC_vect_num 6
1234
+ #define PSC0_EC_vect _VECTOR(6)
1235
+ #define SIG_PSC0_END_CYCLE _VECTOR(6)
1236
+
1237
+ /* Analog Comparator 0 */
1238
+ #define ANALOG_COMP_0_vect_num 7
1239
+ #define ANALOG_COMP_0_vect _VECTOR(7)
1240
+ #define SIG_COMPARATOR0 _VECTOR(7)
1241
+
1242
+ /* Analog Comparator 1 */
1243
+ #define ANALOG_COMP_1_vect_num 8
1244
+ #define ANALOG_COMP_1_vect _VECTOR(8)
1245
+ #define SIG_COMPARATOR1 _VECTOR(8)
1246
+
1247
+ /* Analog Comparator 2 */
1248
+ #define ANALOG_COMP_2_vect_num 9
1249
+ #define ANALOG_COMP_2_vect _VECTOR(9)
1250
+ #define SIG_COMPARATOR2 _VECTOR(9)
1251
+
1252
+ /* External Interrupt Request 0 */
1253
+ #define INT0_vect_num 10
1254
+ #define INT0_vect _VECTOR(10)
1255
+ #define SIG_INTERRUPT0 _VECTOR(10)
1256
+
1257
+ /* Timer/Counter1 Capture Event */
1258
+ #define TIMER1_CAPT_vect_num 11
1259
+ #define TIMER1_CAPT_vect _VECTOR(11)
1260
+ #define SIG_INPUT_CAPTURE1 _VECTOR(11)
1261
+
1262
+ /* Timer/Counter1 Compare Match A */
1263
+ #define TIMER1_COMPA_vect_num 12
1264
+ #define TIMER1_COMPA_vect _VECTOR(12)
1265
+ #define SIG_OUTPUT_COMPARE1A _VECTOR(12)
1266
+ #define SIG_OUTPUT_COMPARE1_A _VECTOR(12)
1267
+
1268
+ /* Timer/Counter Compare Match B */
1269
+ #define TIMER1_COMPB_vect_num 13
1270
+ #define TIMER1_COMPB_vect _VECTOR(13)
1271
+ #define SIG_OUTPUT_COMPARE1B _VECTOR(13)
1272
+ #define SIG_OUTPUT_COMPARE1_B _VECTOR(13)
1273
+
1274
+ /* Timer/Counter1 Overflow */
1275
+ #define TIMER1_OVF_vect_num 15
1276
+ #define TIMER1_OVF_vect _VECTOR(15)
1277
+ #define SIG_OVERFLOW1 _VECTOR(15)
1278
+
1279
+ /* Timer/Counter0 Compare Match A */
1280
+ #define TIMER0_COMP_A_vect_num 16
1281
+ #define TIMER0_COMP_A_vect _VECTOR(16)
1282
+ #define SIG_OUTPUT_COMPARE0A _VECTOR(16)
1283
+ #define SIG_OUTPUT_COMPARE0_A _VECTOR(16)
1284
+
1285
+ /* Timer/Counter0 Overflow */
1286
+ #define TIMER0_OVF_vect_num 17
1287
+ #define TIMER0_OVF_vect _VECTOR(17)
1288
+ #define SIG_OVERFLOW0 _VECTOR(17)
1289
+
1290
+ /* ADC Conversion Complete */
1291
+ #define ADC_vect_num 18
1292
+ #define ADC_vect _VECTOR(18)
1293
+ #define SIG_ADC _VECTOR(18)
1294
+
1295
+ /* External Interrupt Request 1 */
1296
+ #define INT1_vect_num 19
1297
+ #define INT1_vect _VECTOR(19)
1298
+ #define SIG_INTERRUPT1 _VECTOR(19)
1299
+
1300
+ /* SPI Serial Transfer Complete */
1301
+ #define SPI_STC_vect_num 20
1302
+ #define SPI_STC_vect _VECTOR(20)
1303
+ #define SIG_SPI _VECTOR(20)
1304
+
1305
+ /* USART, Rx Complete */
1306
+ #define USART_RX_vect_num 21
1307
+ #define USART_RX_vect _VECTOR(21)
1308
+ #define SIG_USART_RECV _VECTOR(21)
1309
+ #define SIG_UART_RECV _VECTOR(21)
1310
+
1311
+ /* USART Data Register Empty */
1312
+ #define USART_UDRE_vect_num 22
1313
+ #define USART_UDRE_vect _VECTOR(22)
1314
+ #define SIG_USART_DATA _VECTOR(22)
1315
+ #define SIG_UART_DATA _VECTOR(22)
1316
+
1317
+ /* USART, Tx Complete */
1318
+ #define USART_TX_vect_num 23
1319
+ #define USART_TX_vect _VECTOR(23)
1320
+ #define SIG_USART_TRANS _VECTOR(23)
1321
+ #define SIG_UART_TRANS _VECTOR(23)
1322
+
1323
+ /* External Interrupt Request 2 */
1324
+ #define INT2_vect_num 24
1325
+ #define INT2_vect _VECTOR(24)
1326
+ #define SIG_INTERRUPT2 _VECTOR(24)
1327
+
1328
+ /* Watchdog Timeout Interrupt */
1329
+ #define WDT_vect_num 25
1330
+ #define WDT_vect _VECTOR(25)
1331
+ #define SIG_WDT _VECTOR(25)
1332
+ #define SIG_WATCHDOG_TIMEOUT _VECTOR(25)
1333
+
1334
+ /* EEPROM Ready */
1335
+ #define EE_READY_vect_num 26
1336
+ #define EE_READY_vect _VECTOR(26)
1337
+ #define SIG_EEPROM_READY _VECTOR(26)
1338
+
1339
+ /* Timer Counter 0 Compare Match B */
1340
+ #define TIMER0_COMPB_vect_num 27
1341
+ #define TIMER0_COMPB_vect _VECTOR(27)
1342
+ #define SIG_OUTPUT_COMPARE0B _VECTOR(27)
1343
+ #define SIG_OUTPUT_COMPARE0_B _VECTOR(27)
1344
+
1345
+ /* External Interrupt Request 3 */
1346
+ #define INT3_vect_num 28
1347
+ #define INT3_vect _VECTOR(28)
1348
+ #define SIG_INTERRUPT3 _VECTOR(28)
1349
+
1350
+ /* Store Program Memory Read */
1351
+ #define SPM_READY_vect_num 31
1352
+ #define SPM_READY_vect _VECTOR(31)
1353
+ #define SIG_SPM_READY _VECTOR(31)
1354
+
1355
+ #define _VECTORS_SIZE 64
1356
+
1357
+ /* Constants */
1358
+ #define SPM_PAGESIZE 64
1359
+
1360
+ #define RAMSTART 0x100
1361
+ #define RAMEND 0x02FF
1362
+ #define XRAMEND RAMEND
1363
+ #define E2END 0x01FF
1364
+ #define E2PAGESIZE 4
1365
+ #define FLASHEND 0x1FFF
1366
+
1367
+
1368
+ /* Fuse Information */
1369
+
1370
+ #define FUSE_MEMORY_SIZE 3
1371
+
1372
+ /* Low Fuse Byte */
1373
+ #define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
1374
+ #define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
1375
+ #define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
1376
+ #define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
1377
+ #define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
1378
+ #define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
1379
+ #define FUSE_CKOUT (unsigned char)~_BV(6) /* Oscillator output option */
1380
+ #define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
1381
+ #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
1382
+
1383
+ /* High Fuse Byte */
1384
+ #define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
1385
+ #define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
1386
+ #define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
1387
+ #define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
1388
+ #define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog timer always on */
1389
+ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
1390
+ #define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
1391
+ #define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Diasble */
1392
+ #define HFUSE_DEFAULT (FUSE_SPIEN)
1393
+
1394
+ /* Extended Fuse Byte */
1395
+ #define FUSE_BOOTRST (unsigned char)~_BV(0)
1396
+ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
1397
+ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
1398
+ #define FUSE_PSCRV (unsigned char)~_BV(4)
1399
+ #define FUSE_PSC0RB (unsigned char)~_BV(5)
1400
+ #define FUSE_PSC1RB (unsigned char)~_BV(6)
1401
+ #define FUSE_PSC2RB (unsigned char)~_BV(7)
1402
+ #define EFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1)
1403
+
1404
+
1405
+ /* Lock Bits */
1406
+ #define __LOCK_BITS_EXIST
1407
+ #define __BOOT_LOCK_BITS_0_EXIST
1408
+ #define __BOOT_LOCK_BITS_1_EXIST
1409
+
1410
+ #define SLEEP_MODE_IDLE (0)
1411
+ #define SLEEP_MODE_ADC _BV(SM0)
1412
+ #define SLEEP_MODE_PWR_DOWN _BV(SM1)
1413
+ #define SLEEP_MODE_STANDBY (_BV(SM1) | _BV(SM2))
1414
+
1415
+ #endif /* _AVR_IO90PWMX_H_ */