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,239 @@
1
+ /* Copyright (c) 2007, Atmel Corporation
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in
12
+ the documentation and/or other materials provided with the
13
+ distribution.
14
+
15
+ * Neither the name of the copyright holders nor the names of
16
+ contributors may be used to endorse or promote products derived
17
+ from this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ POSSIBILITY OF SUCH DAMAGE. */
30
+
31
+ /* $Id$ */
32
+
33
+ /* avr/lock.h - Lock Bits API */
34
+
35
+ #ifndef _AVR_LOCK_H_
36
+ #define _AVR_LOCK_H_ 1
37
+
38
+
39
+ /** \file */
40
+ /** \defgroup avr_lock <avr/lock.h>: Lockbit Support
41
+
42
+ \par Introduction
43
+
44
+ The Lockbit API allows a user to specify the lockbit settings for the
45
+ specific AVR device they are compiling for. These lockbit settings will be
46
+ placed in a special section in the ELF output file, after linking.
47
+
48
+ Programming tools can take advantage of the lockbit information embedded in
49
+ the ELF file, by extracting this information and determining if the lockbits
50
+ need to be programmed after programming the Flash and EEPROM memories.
51
+ This also allows a single ELF file to contain all the
52
+ information needed to program an AVR.
53
+
54
+ To use the Lockbit API, include the <avr/io.h> header file, which in turn
55
+ automatically includes the individual I/O header file and the <avr/lock.h>
56
+ file. These other two files provides everything necessary to set the AVR
57
+ lockbits.
58
+
59
+ \par Lockbit API
60
+
61
+ Each I/O header file may define up to 3 macros that controls what kinds
62
+ of lockbits are available to the user.
63
+
64
+ If __LOCK_BITS_EXIST is defined, then two lock bits are available to the
65
+ user and 3 mode settings are defined for these two bits.
66
+
67
+ If __BOOT_LOCK_BITS_0_EXIST is defined, then the two BLB0 lock bits are
68
+ available to the user and 4 mode settings are defined for these two bits.
69
+
70
+ If __BOOT_LOCK_BITS_1_EXIST is defined, then the two BLB1 lock bits are
71
+ available to the user and 4 mode settings are defined for these two bits.
72
+
73
+ If __BOOT_LOCK_APPLICATION_TABLE_BITS_EXIST is defined then two lock bits
74
+ are available to set the locking mode for the Application Table Section
75
+ (which is used in the XMEGA family).
76
+
77
+ If __BOOT_LOCK_APPLICATION_BITS_EXIST is defined then two lock bits are
78
+ available to set the locking mode for the Application Section (which is used
79
+ in the XMEGA family).
80
+
81
+ If __BOOT_LOCK_BOOT_BITS_EXIST is defined then two lock bits are available
82
+ to set the locking mode for the Boot Loader Section (which is used in the
83
+ XMEGA family).
84
+
85
+ The AVR lockbit modes have inverted values, logical 1 for an unprogrammed
86
+ (disabled) bit and logical 0 for a programmed (enabled) bit. The defined
87
+ macros for each individual lock bit represent this in their definition by a
88
+ bit-wise inversion of a mask. For example, the LB_MODE_3 macro is defined
89
+ as:
90
+ \code
91
+ #define LB_MODE_3 (0xFC)
92
+ ` \endcode
93
+
94
+ To combine the lockbit mode macros together to represent a whole byte,
95
+ use the bitwise AND operator, like so:
96
+ \code
97
+ (LB_MODE_3 & BLB0_MODE_2)
98
+ \endcode
99
+
100
+ <avr/lock.h> also defines a macro that provides a default lockbit value:
101
+ LOCKBITS_DEFAULT which is defined to be 0xFF.
102
+
103
+ See the AVR device specific datasheet for more details about these
104
+ lock bits and the available mode settings.
105
+
106
+ A convenience macro, LOCKMEM, is defined as a GCC attribute for a
107
+ custom-named section of ".lock".
108
+
109
+ A convenience macro, LOCKBITS, is defined that declares a variable, __lock,
110
+ of type unsigned char with the attribute defined by LOCKMEM. This variable
111
+ allows the end user to easily set the lockbit data.
112
+
113
+ \note If a device-specific I/O header file has previously defined LOCKMEM,
114
+ then LOCKMEM is not redefined. If a device-specific I/O header file has
115
+ previously defined LOCKBITS, then LOCKBITS is not redefined. LOCKBITS is
116
+ currently known to be defined in the I/O header files for the XMEGA devices.
117
+
118
+ \par API Usage Example
119
+
120
+ Putting all of this together is easy:
121
+
122
+ \code
123
+ #include <avr/io.h>
124
+
125
+ LOCKBITS = (LB_MODE_1 & BLB0_MODE_3 & BLB1_MODE_4);
126
+
127
+ int main(void)
128
+ {
129
+ return 0;
130
+ }
131
+ \endcode
132
+
133
+ Or:
134
+
135
+ \code
136
+ #include <avr/io.h>
137
+
138
+ unsigned char __lock __attribute__((section (".lock"))) =
139
+ (LB_MODE_1 & BLB0_MODE_3 & BLB1_MODE_4);
140
+
141
+ int main(void)
142
+ {
143
+ return 0;
144
+ }
145
+ \endcode
146
+
147
+
148
+
149
+ However there are a number of caveats that you need to be aware of to
150
+ use this API properly.
151
+
152
+ Be sure to include <avr/io.h> to get all of the definitions for the API.
153
+ The LOCKBITS macro defines a global variable to store the lockbit data. This
154
+ variable is assigned to its own linker section. Assign the desired lockbit
155
+ values immediately in the variable initialization.
156
+
157
+ The .lock section in the ELF file will get its values from the initial
158
+ variable assignment ONLY. This means that you can NOT assign values to
159
+ this variable in functions and the new values will not be put into the
160
+ ELF .lock section.
161
+
162
+ The global variable is declared in the LOCKBITS macro has two leading
163
+ underscores, which means that it is reserved for the "implementation",
164
+ meaning the library, so it will not conflict with a user-named variable.
165
+
166
+ You must initialize the lockbit variable to some meaningful value, even
167
+ if it is the default value. This is because the lockbits default to a
168
+ logical 1, meaning unprogrammed. Normal uninitialized data defaults to all
169
+ locgial zeros. So it is vital that all lockbits are initialized, even with
170
+ default data. If they are not, then the lockbits may not programmed to the
171
+ desired settings and can possibly put your device into an unrecoverable
172
+ state.
173
+
174
+ Be sure to have the -mmcu=<em>device</em> flag in your compile command line and
175
+ your linker command line to have the correct device selected and to have
176
+ the correct I/O header file included when you include <avr/io.h>.
177
+
178
+ You can print out the contents of the .lock section in the ELF file by
179
+ using this command line:
180
+ \code
181
+ avr-objdump -s -j .lock <ELF file>
182
+ \endcode
183
+
184
+ */
185
+
186
+
187
+ #if !(defined(__ASSEMBLER__) || defined(__DOXYGEN__))
188
+
189
+ #ifndef LOCKMEM
190
+ #define LOCKMEM __attribute__((__used__, __section__ (".lock")))
191
+ #endif
192
+
193
+ #ifndef LOCKBITS
194
+ #define LOCKBITS unsigned char __lock LOCKMEM
195
+ #endif
196
+
197
+ /* Lock Bit Modes */
198
+ #if defined(__LOCK_BITS_EXIST)
199
+ #define LB_MODE_1 (0xFF)
200
+ #define LB_MODE_2 (0xFE)
201
+ #define LB_MODE_3 (0xFC)
202
+ #endif
203
+
204
+ #if defined(__BOOT_LOCK_BITS_0_EXIST)
205
+ #define BLB0_MODE_1 (0xFF)
206
+ #define BLB0_MODE_2 (0xFB)
207
+ #define BLB0_MODE_3 (0xF3)
208
+ #define BLB0_MODE_4 (0xF7)
209
+ #endif
210
+
211
+ #if defined(__BOOT_LOCK_BITS_1_EXIST)
212
+ #define BLB1_MODE_1 (0xFF)
213
+ #define BLB1_MODE_2 (0xEF)
214
+ #define BLB1_MODE_3 (0xCF)
215
+ #define BLB1_MODE_4 (0xDF)
216
+ #endif
217
+
218
+ #if defined(__BOOT_LOCK_APPLICATION_TABLE_BITS_EXIST)
219
+ #define BLBAT0 ~_BV(2)
220
+ #define BLBAT1 ~_BV(3)
221
+ #endif
222
+
223
+ #if defined(__BOOT_LOCK_APPLICATION_BITS_EXIST)
224
+ #define BLBA0 ~_BV(4)
225
+ #define BLBA1 ~_BV(5)
226
+ #endif
227
+
228
+ #if defined(__BOOT_LOCK_BOOT_BITS_EXIST)
229
+ #define BLBB0 ~_BV(6)
230
+ #define BLBB1 ~_BV(7)
231
+ #endif
232
+
233
+
234
+ #define LOCKBITS_DEFAULT (0xFF)
235
+
236
+ #endif /* !(__ASSEMBLER || __DOXYGEN__) */
237
+
238
+
239
+ #endif /* _AVR_LOCK_H_ */
@@ -0,0 +1,549 @@
1
+ /* Copyright (c) 2003 Theodore A. Roth
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in
12
+ the documentation and/or other materials provided with the
13
+ distribution.
14
+
15
+ * Neither the name of the copyright holders nor the names of
16
+ contributors may be used to endorse or promote products derived
17
+ from this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ POSSIBILITY OF SUCH DAMAGE. */
30
+
31
+ /* $Id$ */
32
+
33
+ #ifndef _AVR_PORTPINS_H_
34
+ #define _AVR_PORTPINS_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
+ /* Define Generic PORTn, DDn, and PINn values. */
43
+
44
+ /* Port Data Register (generic) */
45
+ #define PORT7 7
46
+ #define PORT6 6
47
+ #define PORT5 5
48
+ #define PORT4 4
49
+ #define PORT3 3
50
+ #define PORT2 2
51
+ #define PORT1 1
52
+ #define PORT0 0
53
+
54
+ /* Port Data Direction Register (generic) */
55
+ #define DD7 7
56
+ #define DD6 6
57
+ #define DD5 5
58
+ #define DD4 4
59
+ #define DD3 3
60
+ #define DD2 2
61
+ #define DD1 1
62
+ #define DD0 0
63
+
64
+ /* Port Input Pins (generic) */
65
+ #define PIN7 7
66
+ #define PIN6 6
67
+ #define PIN5 5
68
+ #define PIN4 4
69
+ #define PIN3 3
70
+ #define PIN2 2
71
+ #define PIN1 1
72
+ #define PIN0 0
73
+
74
+ /* Define PORTxn an Pxn values for all possible port pins if not defined already by io.h. */
75
+
76
+ /* PORT A */
77
+
78
+ #if defined(PA0) && !defined(PORTA0)
79
+ # define PORTA0 PA0
80
+ #elif defined(PORTA0) && !defined(PA0)
81
+ # define PA0 PORTA0
82
+ #endif
83
+ #if defined(PA1) && !defined(PORTA1)
84
+ # define PORTA1 PA1
85
+ #elif defined(PORTA1) && !defined(PA1)
86
+ # define PA1 PORTA1
87
+ #endif
88
+ #if defined(PA2) && !defined(PORTA2)
89
+ # define PORTA2 PA2
90
+ #elif defined(PORTA2) && !defined(PA2)
91
+ # define PA2 PORTA2
92
+ #endif
93
+ #if defined(PA3) && !defined(PORTA3)
94
+ # define PORTA3 PA3
95
+ #elif defined(PORTA3) && !defined(PA3)
96
+ # define PA3 PORTA3
97
+ #endif
98
+ #if defined(PA4) && !defined(PORTA4)
99
+ # define PORTA4 PA4
100
+ #elif defined(PORTA4) && !defined(PA4)
101
+ # define PA4 PORTA4
102
+ #endif
103
+ #if defined(PA5) && !defined(PORTA5)
104
+ # define PORTA5 PA5
105
+ #elif defined(PORTA5) && !defined(PA5)
106
+ # define PA5 PORTA5
107
+ #endif
108
+ #if defined(PA6) && !defined(PORTA6)
109
+ # define PORTA6 PA6
110
+ #elif defined(PORTA6) && !defined(PA6)
111
+ # define PA6 PORTA6
112
+ #endif
113
+ #if defined(PA7) && !defined(PORTA7)
114
+ # define PORTA7 PA7
115
+ #elif defined(PORTA7) && !defined(PA7)
116
+ # define PA7 PORTA7
117
+ #endif
118
+
119
+ /* PORT B */
120
+
121
+ #if defined(PB0) && !defined(PORTB0)
122
+ # define PORTB0 PB0
123
+ #elif defined(PORTB0) && !defined(PB0)
124
+ # define PB0 PORTB0
125
+ #endif
126
+ #if defined(PB1) && !defined(PORTB1)
127
+ # define PORTB1 PB1
128
+ #elif defined(PORTB1) && !defined(PB1)
129
+ # define PB1 PORTB1
130
+ #endif
131
+ #if defined(PB2) && !defined(PORTB2)
132
+ # define PORTB2 PB2
133
+ #elif defined(PORTB2) && !defined(PB2)
134
+ # define PB2 PORTB2
135
+ #endif
136
+ #if defined(PB3) && !defined(PORTB3)
137
+ # define PORTB3 PB3
138
+ #elif defined(PORTB3) && !defined(PB3)
139
+ # define PB3 PORTB3
140
+ #endif
141
+ #if defined(PB4) && !defined(PORTB4)
142
+ # define PORTB4 PB4
143
+ #elif defined(PORTB4) && !defined(PB4)
144
+ # define PB4 PORTB4
145
+ #endif
146
+ #if defined(PB5) && !defined(PORTB5)
147
+ # define PORTB5 PB5
148
+ #elif defined(PORTB5) && !defined(PB5)
149
+ # define PB5 PORTB5
150
+ #endif
151
+ #if defined(PB6) && !defined(PORTB6)
152
+ # define PORTB6 PB6
153
+ #elif defined(PORTB6) && !defined(PB6)
154
+ # define PB6 PORTB6
155
+ #endif
156
+ #if defined(PB7) && !defined(PORTB7)
157
+ # define PORTB7 PB7
158
+ #elif defined(PORTB7) && !defined(PB7)
159
+ # define PB7 PORTB7
160
+ #endif
161
+
162
+ /* PORT C */
163
+
164
+ #if defined(PC0) && !defined(PORTC0)
165
+ # define PORTC0 PC0
166
+ #elif defined(PORTC0) && !defined(PC0)
167
+ # define PC0 PORTC0
168
+ #endif
169
+ #if defined(PC1) && !defined(PORTC1)
170
+ # define PORTC1 PC1
171
+ #elif defined(PORTC1) && !defined(PC1)
172
+ # define PC1 PORTC1
173
+ #endif
174
+ #if defined(PC2) && !defined(PORTC2)
175
+ # define PORTC2 PC2
176
+ #elif defined(PORTC2) && !defined(PC2)
177
+ # define PC2 PORTC2
178
+ #endif
179
+ #if defined(PC3) && !defined(PORTC3)
180
+ # define PORTC3 PC3
181
+ #elif defined(PORTC3) && !defined(PC3)
182
+ # define PC3 PORTC3
183
+ #endif
184
+ #if defined(PC4) && !defined(PORTC4)
185
+ # define PORTC4 PC4
186
+ #elif defined(PORTC4) && !defined(PC4)
187
+ # define PC4 PORTC4
188
+ #endif
189
+ #if defined(PC5) && !defined(PORTC5)
190
+ # define PORTC5 PC5
191
+ #elif defined(PORTC5) && !defined(PC5)
192
+ # define PC5 PORTC5
193
+ #endif
194
+ #if defined(PC6) && !defined(PORTC6)
195
+ # define PORTC6 PC6
196
+ #elif defined(PORTC6) && !defined(PC6)
197
+ # define PC6 PORTC6
198
+ #endif
199
+ #if defined(PC7) && !defined(PORTC7)
200
+ # define PORTC7 PC7
201
+ #elif defined(PORTC7) && !defined(PC7)
202
+ # define PC7 PORTC7
203
+ #endif
204
+
205
+ /* PORT D */
206
+
207
+ #if defined(PD0) && !defined(PORTD0)
208
+ # define PORTD0 PD0
209
+ #elif defined(PORTD0) && !defined(PD0)
210
+ # define PD0 PORTD0
211
+ #endif
212
+ #if defined(PD1) && !defined(PORTD1)
213
+ # define PORTD1 PD1
214
+ #elif defined(PORTD1) && !defined(PD1)
215
+ # define PD1 PORTD1
216
+ #endif
217
+ #if defined(PD2) && !defined(PORTD2)
218
+ # define PORTD2 PD2
219
+ #elif defined(PORTD2) && !defined(PD2)
220
+ # define PD2 PORTD2
221
+ #endif
222
+ #if defined(PD3) && !defined(PORTD3)
223
+ # define PORTD3 PD3
224
+ #elif defined(PORTD3) && !defined(PD3)
225
+ # define PD3 PORTD3
226
+ #endif
227
+ #if defined(PD4) && !defined(PORTD4)
228
+ # define PORTD4 PD4
229
+ #elif defined(PORTD4) && !defined(PD4)
230
+ # define PD4 PORTD4
231
+ #endif
232
+ #if defined(PD5) && !defined(PORTD5)
233
+ # define PORTD5 PD5
234
+ #elif defined(PORTD5) && !defined(PD5)
235
+ # define PD5 PORTD5
236
+ #endif
237
+ #if defined(PD6) && !defined(PORTD6)
238
+ # define PORTD6 PD6
239
+ #elif defined(PORTD6) && !defined(PD6)
240
+ # define PD6 PORTD6
241
+ #endif
242
+ #if defined(PD7) && !defined(PORTD7)
243
+ # define PORTD7 PD7
244
+ #elif defined(PORTD7) && !defined(PD7)
245
+ # define PD7 PORTD7
246
+ #endif
247
+
248
+ /* PORT E */
249
+
250
+ #if defined(PE0) && !defined(PORTE0)
251
+ # define PORTE0 PE0
252
+ #elif defined(PORTE0) && !defined(PE0)
253
+ # define PE0 PORTE0
254
+ #endif
255
+ #if defined(PE1) && !defined(PORTE1)
256
+ # define PORTE1 PE1
257
+ #elif defined(PORTE1) && !defined(PE1)
258
+ # define PE1 PORTE1
259
+ #endif
260
+ #if defined(PE2) && !defined(PORTE2)
261
+ # define PORTE2 PE2
262
+ #elif defined(PORTE2) && !defined(PE2)
263
+ # define PE2 PORTE2
264
+ #endif
265
+ #if defined(PE3) && !defined(PORTE3)
266
+ # define PORTE3 PE3
267
+ #elif defined(PORTE3) && !defined(PE3)
268
+ # define PE3 PORTE3
269
+ #endif
270
+ #if defined(PE4) && !defined(PORTE4)
271
+ # define PORTE4 PE4
272
+ #elif defined(PORTE4) && !defined(PE4)
273
+ # define PE4 PORTE4
274
+ #endif
275
+ #if defined(PE5) && !defined(PORTE5)
276
+ # define PORTE5 PE5
277
+ #elif defined(PORTE5) && !defined(PE5)
278
+ # define PE5 PORTE5
279
+ #endif
280
+ #if defined(PE6) && !defined(PORTE6)
281
+ # define PORTE6 PE6
282
+ #elif defined(PORTE6) && !defined(PE6)
283
+ # define PE6 PORTE6
284
+ #endif
285
+ #if defined(PE7) && !defined(PORTE7)
286
+ # define PORTE7 PE7
287
+ #elif defined(PORTE7) && !defined(PE7)
288
+ # define PE7 PORTE7
289
+ #endif
290
+
291
+ /* PORT F */
292
+
293
+ #if defined(PF0) && !defined(PORTF0)
294
+ # define PORTF0 PF0
295
+ #elif defined(PORTF0) && !defined(PF0)
296
+ # define PF0 PORTF0
297
+ #endif
298
+ #if defined(PF1) && !defined(PORTF1)
299
+ # define PORTF1 PF1
300
+ #elif defined(PORTF1) && !defined(PF1)
301
+ # define PF1 PORTF1
302
+ #endif
303
+ #if defined(PF2) && !defined(PORTF2)
304
+ # define PORTF2 PF2
305
+ #elif defined(PORTF2) && !defined(PF2)
306
+ # define PF2 PORTF2
307
+ #endif
308
+ #if defined(PF3) && !defined(PORTF3)
309
+ # define PORTF3 PF3
310
+ #elif defined(PORTF3) && !defined(PF3)
311
+ # define PF3 PORTF3
312
+ #endif
313
+ #if defined(PF4) && !defined(PORTF4)
314
+ # define PORTF4 PF4
315
+ #elif defined(PORTF4) && !defined(PF4)
316
+ # define PF4 PORTF4
317
+ #endif
318
+ #if defined(PF5) && !defined(PORTF5)
319
+ # define PORTF5 PF5
320
+ #elif defined(PORTF5) && !defined(PF5)
321
+ # define PF5 PORTF5
322
+ #endif
323
+ #if defined(PF6) && !defined(PORTF6)
324
+ # define PORTF6 PF6
325
+ #elif defined(PORTF6) && !defined(PF6)
326
+ # define PF6 PORTF6
327
+ #endif
328
+ #if defined(PF7) && !defined(PORTF7)
329
+ # define PORTF7 PF7
330
+ #elif defined(PORTF7) && !defined(PF7)
331
+ # define PF7 PORTF7
332
+ #endif
333
+
334
+ /* PORT G */
335
+
336
+ #if defined(PG0) && !defined(PORTG0)
337
+ # define PORTG0 PG0
338
+ #elif defined(PORTG0) && !defined(PG0)
339
+ # define PG0 PORTG0
340
+ #endif
341
+ #if defined(PG1) && !defined(PORTG1)
342
+ # define PORTG1 PG1
343
+ #elif defined(PORTG1) && !defined(PG1)
344
+ # define PG1 PORTG1
345
+ #endif
346
+ #if defined(PG2) && !defined(PORTG2)
347
+ # define PORTG2 PG2
348
+ #elif defined(PORTG2) && !defined(PG2)
349
+ # define PG2 PORTG2
350
+ #endif
351
+ #if defined(PG3) && !defined(PORTG3)
352
+ # define PORTG3 PG3
353
+ #elif defined(PORTG3) && !defined(PG3)
354
+ # define PG3 PORTG3
355
+ #endif
356
+ #if defined(PG4) && !defined(PORTG4)
357
+ # define PORTG4 PG4
358
+ #elif defined(PORTG4) && !defined(PG4)
359
+ # define PG4 PORTG4
360
+ #endif
361
+ #if defined(PG5) && !defined(PORTG5)
362
+ # define PORTG5 PG5
363
+ #elif defined(PORTG5) && !defined(PG5)
364
+ # define PG5 PORTG5
365
+ #endif
366
+ #if defined(PG6) && !defined(PORTG6)
367
+ # define PORTG6 PG6
368
+ #elif defined(PORTG6) && !defined(PG6)
369
+ # define PG6 PORTG6
370
+ #endif
371
+ #if defined(PG7) && !defined(PORTG7)
372
+ # define PORTG7 PG7
373
+ #elif defined(PORTG7) && !defined(PG7)
374
+ # define PG7 PORTG7
375
+ #endif
376
+
377
+ /* PORT H */
378
+
379
+ #if defined(PH0) && !defined(PORTH0)
380
+ # define PORTH0 PH0
381
+ #elif defined(PORTH0) && !defined(PH0)
382
+ # define PH0 PORTH0
383
+ #endif
384
+ #if defined(PH1) && !defined(PORTH1)
385
+ # define PORTH1 PH1
386
+ #elif defined(PORTH1) && !defined(PH1)
387
+ # define PH1 PORTH1
388
+ #endif
389
+ #if defined(PH2) && !defined(PORTH2)
390
+ # define PORTH2 PH2
391
+ #elif defined(PORTH2) && !defined(PH2)
392
+ # define PH2 PORTH2
393
+ #endif
394
+ #if defined(PH3) && !defined(PORTH3)
395
+ # define PORTH3 PH3
396
+ #elif defined(PORTH3) && !defined(PH3)
397
+ # define PH3 PORTH3
398
+ #endif
399
+ #if defined(PH4) && !defined(PORTH4)
400
+ # define PORTH4 PH4
401
+ #elif defined(PORTH4) && !defined(PH4)
402
+ # define PH4 PORTH4
403
+ #endif
404
+ #if defined(PH5) && !defined(PORTH5)
405
+ # define PORTH5 PH5
406
+ #elif defined(PORTH5) && !defined(PH5)
407
+ # define PH5 PORTH5
408
+ #endif
409
+ #if defined(PH6) && !defined(PORTH6)
410
+ # define PORTH6 PH6
411
+ #elif defined(PORTH6) && !defined(PH6)
412
+ # define PH6 PORTH6
413
+ #endif
414
+ #if defined(PH7) && !defined(PORTH7)
415
+ # define PORTH7 PH7
416
+ #elif defined(PORTH7) && !defined(PH7)
417
+ # define PH7 PORTH7
418
+ #endif
419
+
420
+ /* PORT J */
421
+
422
+ #if defined(PJ0) && !defined(PORTJ0)
423
+ # define PORTJ0 PJ0
424
+ #elif defined(PORTJ0) && !defined(PJ0)
425
+ # define PJ0 PORTJ0
426
+ #endif
427
+ #if defined(PJ1) && !defined(PORTJ1)
428
+ # define PORTJ1 PJ1
429
+ #elif defined(PORTJ1) && !defined(PJ1)
430
+ # define PJ1 PORTJ1
431
+ #endif
432
+ #if defined(PJ2) && !defined(PORTJ2)
433
+ # define PORTJ2 PJ2
434
+ #elif defined(PORTJ2) && !defined(PJ2)
435
+ # define PJ2 PORTJ2
436
+ #endif
437
+ #if defined(PJ3) && !defined(PORTJ3)
438
+ # define PORTJ3 PJ3
439
+ #elif defined(PORTJ3) && !defined(PJ3)
440
+ # define PJ3 PORTJ3
441
+ #endif
442
+ #if defined(PJ4) && !defined(PORTJ4)
443
+ # define PORTJ4 PJ4
444
+ #elif defined(PORTJ4) && !defined(PJ4)
445
+ # define PJ4 PORTJ4
446
+ #endif
447
+ #if defined(PJ5) && !defined(PORTJ5)
448
+ # define PORTJ5 PJ5
449
+ #elif defined(PORTJ5) && !defined(PJ5)
450
+ # define PJ5 PORTJ5
451
+ #endif
452
+ #if defined(PJ6) && !defined(PORTJ6)
453
+ # define PORTJ6 PJ6
454
+ #elif defined(PORTJ6) && !defined(PJ6)
455
+ # define PJ6 PORTJ6
456
+ #endif
457
+ #if defined(PJ7) && !defined(PORTJ7)
458
+ # define PORTJ7 PJ7
459
+ #elif defined(PORTJ7) && !defined(PJ7)
460
+ # define PJ7 PORTJ7
461
+ #endif
462
+
463
+ /* PORT K */
464
+
465
+ #if defined(PK0) && !defined(PORTK0)
466
+ # define PORTK0 PK0
467
+ #elif defined(PORTK0) && !defined(PK0)
468
+ # define PK0 PORTK0
469
+ #endif
470
+ #if defined(PK1) && !defined(PORTK1)
471
+ # define PORTK1 PK1
472
+ #elif defined(PORTK1) && !defined(PK1)
473
+ # define PK1 PORTK1
474
+ #endif
475
+ #if defined(PK2) && !defined(PORTK2)
476
+ # define PORTK2 PK2
477
+ #elif defined(PORTK2) && !defined(PK2)
478
+ # define PK2 PORTK2
479
+ #endif
480
+ #if defined(PK3) && !defined(PORTK3)
481
+ # define PORTK3 PK3
482
+ #elif defined(PORTK3) && !defined(PK3)
483
+ # define PK3 PORTK3
484
+ #endif
485
+ #if defined(PK4) && !defined(PORTK4)
486
+ # define PORTK4 PK4
487
+ #elif defined(PORTK4) && !defined(PK4)
488
+ # define PK4 PORTK4
489
+ #endif
490
+ #if defined(PK5) && !defined(PORTK5)
491
+ # define PORTK5 PK5
492
+ #elif defined(PORTK5) && !defined(PK5)
493
+ # define PK5 PORTK5
494
+ #endif
495
+ #if defined(PK6) && !defined(PORTK6)
496
+ # define PORTK6 PK6
497
+ #elif defined(PORTK6) && !defined(PK6)
498
+ # define PK6 PORTK6
499
+ #endif
500
+ #if defined(PK7) && !defined(PORTK7)
501
+ # define PORTK7 PK7
502
+ #elif defined(PORTK7) && !defined(PK7)
503
+ # define PK7 PORTK7
504
+ #endif
505
+
506
+ /* PORT L */
507
+
508
+ #if defined(PL0) && !defined(PORTL0)
509
+ # define PORTL0 PL0
510
+ #elif defined(PORTL0) && !defined(PL0)
511
+ # define PL0 PORTL0
512
+ #endif
513
+ #if defined(PL1) && !defined(PORTL1)
514
+ # define PORTL1 PL1
515
+ #elif defined(PORTL1) && !defined(PL1)
516
+ # define PL1 PORTL1
517
+ #endif
518
+ #if defined(PL2) && !defined(PORTL2)
519
+ # define PORTL2 PL2
520
+ #elif defined(PORTL2) && !defined(PL2)
521
+ # define PL2 PORTL2
522
+ #endif
523
+ #if defined(PL3) && !defined(PORTL3)
524
+ # define PORTL3 PL3
525
+ #elif defined(PORTL3) && !defined(PL3)
526
+ # define PL3 PORTL3
527
+ #endif
528
+ #if defined(PL4) && !defined(PORTL4)
529
+ # define PORTL4 PL4
530
+ #elif defined(PORTL4) && !defined(PL4)
531
+ # define PL4 PORTL4
532
+ #endif
533
+ #if defined(PL5) && !defined(PORTL5)
534
+ # define PORTL5 PL5
535
+ #elif defined(PORTL5) && !defined(PL5)
536
+ # define PL5 PORTL5
537
+ #endif
538
+ #if defined(PL6) && !defined(PORTL6)
539
+ # define PORTL6 PL6
540
+ #elif defined(PORTL6) && !defined(PL6)
541
+ # define PL6 PORTL6
542
+ #endif
543
+ #if defined(PL7) && !defined(PORTL7)
544
+ # define PORTL7 PL7
545
+ #elif defined(PORTL7) && !defined(PL7)
546
+ # define PL7 PORTL7
547
+ #endif
548
+
549
+ #endif /* _AVR_PORTPINS_H_ */