My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

fastio.h 53KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582
  1. /*
  2. This code contibuted by Triffid_Hunter and modified by Kliment
  3. why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
  4. */
  5. #ifndef _ARDUINO_H
  6. #define _ARDUINO_H
  7. #include <avr/io.h>
  8. /*
  9. utility functions
  10. */
  11. #ifndef MASK
  12. /// MASKING- returns \f$2^PIN\f$
  13. #define MASK(PIN) (1 << PIN)
  14. #endif
  15. /*
  16. magic I/O routines
  17. now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
  18. */
  19. /// Read a pin
  20. #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & MASK(DIO ## IO ## _PIN)))
  21. /// write to a pin
  22. // On some boards pins > 0x100 are used. These are not converted to atomic actions. An critical section is needed.
  23. #define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)
  24. #define _WRITE_C(IO, v) do { if (v) { \
  25. CRITICAL_SECTION_START; \
  26. {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); }\
  27. CRITICAL_SECTION_END; \
  28. }\
  29. else {\
  30. CRITICAL_SECTION_START; \
  31. {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }\
  32. CRITICAL_SECTION_END; \
  33. }\
  34. }\
  35. while (0)
  36. #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)
  37. /// toggle a pin
  38. #define _TOGGLE(IO) do {DIO ## IO ## _RPORT = MASK(DIO ## IO ## _PIN); } while (0)
  39. /// set pin as input
  40. #define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~MASK(DIO ## IO ## _PIN); } while (0)
  41. /// set pin as output
  42. #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= MASK(DIO ## IO ## _PIN); } while (0)
  43. /// check if pin is an input
  44. #define _GET_INPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) == 0)
  45. /// check if pin is an output
  46. #define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0)
  47. /// check if pin is an timer
  48. #define _GET_TIMER(IO) ((DIO ## IO ## _PWM)
  49. // why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
  50. /// Read a pin wrapper
  51. #define READ(IO) _READ(IO)
  52. /// Write to a pin wrapper
  53. #define WRITE(IO, v) _WRITE(IO, v)
  54. /// toggle a pin wrapper
  55. #define TOGGLE(IO) _TOGGLE(IO)
  56. /// set pin as input wrapper
  57. #define SET_INPUT(IO) _SET_INPUT(IO)
  58. /// set pin as output wrapper
  59. #define SET_OUTPUT(IO) _SET_OUTPUT(IO)
  60. /// check if pin is an input wrapper
  61. #define GET_INPUT(IO) _GET_INPUT(IO)
  62. /// check if pin is an output wrapper
  63. #define GET_OUTPUT(IO) _GET_OUTPUT(IO)
  64. /// check if pin is an timer wrapper
  65. #define GET_TIMER(IO) _GET_TIMER(IO)
  66. /*
  67. ports and functions
  68. added as necessary or if I feel like it- not a comprehensive list!
  69. */
  70. #if defined (__AVR_ATmega168__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__)
  71. // UART
  72. #define RXD DIO0
  73. #define TXD DIO1
  74. // SPI
  75. #define SCK DIO13
  76. #define MISO DIO12
  77. #define MOSI DIO11
  78. #define SS DIO10
  79. // TWI (I2C)
  80. #define SCL AIO5
  81. #define SDA AIO4
  82. // timers and PWM
  83. #define OC0A DIO6
  84. #define OC0B DIO5
  85. #define OC1A DIO9
  86. #define OC1B DIO10
  87. #define OC2A DIO11
  88. #define OC2B DIO3
  89. #define DEBUG_LED AIO5
  90. /*
  91. pins
  92. */
  93. #define DIO0_PIN PIND0
  94. #define DIO0_RPORT PIND
  95. #define DIO0_WPORT PORTD
  96. #define DIO0_DDR DDRD
  97. #define DIO0_PWM NULL
  98. #define DIO1_PIN PIND1
  99. #define DIO1_RPORT PIND
  100. #define DIO1_WPORT PORTD
  101. #define DIO1_DDR DDRD
  102. #define DIO1_PWM NULL
  103. #define DIO2_PIN PIND2
  104. #define DIO2_RPORT PIND
  105. #define DIO2_WPORT PORTD
  106. #define DIO2_DDR DDRD
  107. #define DIO2_PWM NULL
  108. #define DIO3_PIN PIND3
  109. #define DIO3_RPORT PIND
  110. #define DIO3_WPORT PORTD
  111. #define DIO3_DDR DDRD
  112. #define DIO3_PWM &OCR2B
  113. #define DIO4_PIN PIND4
  114. #define DIO4_RPORT PIND
  115. #define DIO4_WPORT PORTD
  116. #define DIO4_DDR DDRD
  117. #define DIO4_PWM NULL
  118. #define DIO5_PIN PIND5
  119. #define DIO5_RPORT PIND
  120. #define DIO5_WPORT PORTD
  121. #define DIO5_DDR DDRD
  122. #define DIO5_PWM &OCR0B
  123. #define DIO6_PIN PIND6
  124. #define DIO6_RPORT PIND
  125. #define DIO6_WPORT PORTD
  126. #define DIO6_DDR DDRD
  127. #define DIO6_PWM &OCR0A
  128. #define DIO7_PIN PIND7
  129. #define DIO7_RPORT PIND
  130. #define DIO7_WPORT PORTD
  131. #define DIO7_DDR DDRD
  132. #define DIO7_PWM NULL
  133. #define DIO8_PIN PINB0
  134. #define DIO8_RPORT PINB
  135. #define DIO8_WPORT PORTB
  136. #define DIO8_DDR DDRB
  137. #define DIO8_PWM NULL
  138. #define DIO9_PIN PINB1
  139. #define DIO9_RPORT PINB
  140. #define DIO9_WPORT PORTB
  141. #define DIO9_DDR DDRB
  142. #define DIO9_PWM NULL
  143. #define DIO10_PIN PINB2
  144. #define DIO10_RPORT PINB
  145. #define DIO10_WPORT PORTB
  146. #define DIO10_DDR DDRB
  147. #define DIO10_PWM NULL
  148. #define DIO11_PIN PINB3
  149. #define DIO11_RPORT PINB
  150. #define DIO11_WPORT PORTB
  151. #define DIO11_DDR DDRB
  152. #define DIO11_PWM &OCR2A
  153. #define DIO12_PIN PINB4
  154. #define DIO12_RPORT PINB
  155. #define DIO12_WPORT PORTB
  156. #define DIO12_DDR DDRB
  157. #define DIO12_PWM NULL
  158. #define DIO13_PIN PINB5
  159. #define DIO13_RPORT PINB
  160. #define DIO13_WPORT PORTB
  161. #define DIO13_DDR DDRB
  162. #define DIO13_PWM NULL
  163. #define DIO14_PIN PINC0
  164. #define DIO14_RPORT PINC
  165. #define DIO14_WPORT PORTC
  166. #define DIO14_DDR DDRC
  167. #define DIO14_PWM NULL
  168. #define DIO15_PIN PINC1
  169. #define DIO15_RPORT PINC
  170. #define DIO15_WPORT PORTC
  171. #define DIO15_DDR DDRC
  172. #define DIO15_PWM NULL
  173. #define DIO16_PIN PINC2
  174. #define DIO16_RPORT PINC
  175. #define DIO16_WPORT PORTC
  176. #define DIO16_DDR DDRC
  177. #define DIO16_PWM NULL
  178. #define DIO17_PIN PINC3
  179. #define DIO17_RPORT PINC
  180. #define DIO17_WPORT PORTC
  181. #define DIO17_DDR DDRC
  182. #define DIO17_PWM NULL
  183. #define DIO18_PIN PINC4
  184. #define DIO18_RPORT PINC
  185. #define DIO18_WPORT PORTC
  186. #define DIO18_DDR DDRC
  187. #define DIO18_PWM NULL
  188. #define DIO19_PIN PINC5
  189. #define DIO19_RPORT PINC
  190. #define DIO19_WPORT PORTC
  191. #define DIO19_DDR DDRC
  192. #define DIO19_PWM NULL
  193. #define DIO20_PIN PINC6
  194. #define DIO20_RPORT PINC
  195. #define DIO20_WPORT PORTC
  196. #define DIO20_DDR DDRC
  197. #define DIO20_PWM NULL
  198. #define DIO21_PIN PINC7
  199. #define DIO21_RPORT PINC
  200. #define DIO21_WPORT PORTC
  201. #define DIO21_DDR DDRC
  202. #define DIO21_PWM NULL
  203. #undef PB0
  204. #define PB0_PIN PINB0
  205. #define PB0_RPORT PINB
  206. #define PB0_WPORT PORTB
  207. #define PB0_DDR DDRB
  208. #define PB0_PWM NULL
  209. #undef PB1
  210. #define PB1_PIN PINB1
  211. #define PB1_RPORT PINB
  212. #define PB1_WPORT PORTB
  213. #define PB1_DDR DDRB
  214. #define PB1_PWM NULL
  215. #undef PB2
  216. #define PB2_PIN PINB2
  217. #define PB2_RPORT PINB
  218. #define PB2_WPORT PORTB
  219. #define PB2_DDR DDRB
  220. #define PB2_PWM NULL
  221. #undef PB3
  222. #define PB3_PIN PINB3
  223. #define PB3_RPORT PINB
  224. #define PB3_WPORT PORTB
  225. #define PB3_DDR DDRB
  226. #define PB3_PWM &OCR2A
  227. #undef PB4
  228. #define PB4_PIN PINB4
  229. #define PB4_RPORT PINB
  230. #define PB4_WPORT PORTB
  231. #define PB4_DDR DDRB
  232. #define PB4_PWM NULL
  233. #undef PB5
  234. #define PB5_PIN PINB5
  235. #define PB5_RPORT PINB
  236. #define PB5_WPORT PORTB
  237. #define PB5_DDR DDRB
  238. #define PB5_PWM NULL
  239. #undef PB6
  240. #define PB6_PIN PINB6
  241. #define PB6_RPORT PINB
  242. #define PB6_WPORT PORTB
  243. #define PB6_DDR DDRB
  244. #define PB6_PWM NULL
  245. #undef PB7
  246. #define PB7_PIN PINB7
  247. #define PB7_RPORT PINB
  248. #define PB7_WPORT PORTB
  249. #define PB7_DDR DDRB
  250. #define PB7_PWM NULL
  251. #undef PC0
  252. #define PC0_PIN PINC0
  253. #define PC0_RPORT PINC
  254. #define PC0_WPORT PORTC
  255. #define PC0_DDR DDRC
  256. #define PC0_PWM NULL
  257. #undef PC1
  258. #define PC1_PIN PINC1
  259. #define PC1_RPORT PINC
  260. #define PC1_WPORT PORTC
  261. #define PC1_DDR DDRC
  262. #define PC1_PWM NULL
  263. #undef PC2
  264. #define PC2_PIN PINC2
  265. #define PC2_RPORT PINC
  266. #define PC2_WPORT PORTC
  267. #define PC2_DDR DDRC
  268. #define PC2_PWM NULL
  269. #undef PC3
  270. #define PC3_PIN PINC3
  271. #define PC3_RPORT PINC
  272. #define PC3_WPORT PORTC
  273. #define PC3_DDR DDRC
  274. #define PC3_PWM NULL
  275. #undef PC4
  276. #define PC4_PIN PINC4
  277. #define PC4_RPORT PINC
  278. #define PC4_WPORT PORTC
  279. #define PC4_DDR DDRC
  280. #define PC4_PWM NULL
  281. #undef PC5
  282. #define PC5_PIN PINC5
  283. #define PC5_RPORT PINC
  284. #define PC5_WPORT PORTC
  285. #define PC5_DDR DDRC
  286. #define PC5_PWM NULL
  287. #undef PC6
  288. #define PC6_PIN PINC6
  289. #define PC6_RPORT PINC
  290. #define PC6_WPORT PORTC
  291. #define PC6_DDR DDRC
  292. #define PC6_PWM NULL
  293. #undef PC7
  294. #define PC7_PIN PINC7
  295. #define PC7_RPORT PINC
  296. #define PC7_WPORT PORTC
  297. #define PC7_DDR DDRC
  298. #define PC7_PWM NULL
  299. #undef PD0
  300. #define PD0_PIN PIND0
  301. #define PD0_RPORT PIND
  302. #define PD0_WPORT PORTD
  303. #define PD0_DDR DDRD
  304. #define PD0_PWM NULL
  305. #undef PD1
  306. #define PD1_PIN PIND1
  307. #define PD1_RPORT PIND
  308. #define PD1_WPORT PORTD
  309. #define PD1_DDR DDRD
  310. #define PD1_PWM NULL
  311. #undef PD2
  312. #define PD2_PIN PIND2
  313. #define PD2_RPORT PIND
  314. #define PD2_WPORT PORTD
  315. #define PD2_DDR DDRD
  316. #define PD2_PWM NULL
  317. #undef PD3
  318. #define PD3_PIN PIND3
  319. #define PD3_RPORT PIND
  320. #define PD3_WPORT PORTD
  321. #define PD3_DDR DDRD
  322. #define PD3_PWM &OCR2B
  323. #undef PD4
  324. #define PD4_PIN PIND4
  325. #define PD4_RPORT PIND
  326. #define PD4_WPORT PORTD
  327. #define PD4_DDR DDRD
  328. #define PD4_PWM NULL
  329. #undef PD5
  330. #define PD5_PIN PIND5
  331. #define PD5_RPORT PIND
  332. #define PD5_WPORT PORTD
  333. #define PD5_DDR DDRD
  334. #define PD5_PWM &OCR0B
  335. #undef PD6
  336. #define PD6_PIN PIND6
  337. #define PD6_RPORT PIND
  338. #define PD6_WPORT PORTD
  339. #define PD6_DDR DDRD
  340. #define PD6_PWM &OCR0A
  341. #undef PD7
  342. #define PD7_PIN PIND7
  343. #define PD7_RPORT PIND
  344. #define PD7_WPORT PORTD
  345. #define PD7_DDR DDRD
  346. #define PD7_PWM NULL
  347. #endif /* _AVR_ATmega{168,328,328P}__ */
  348. #if defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644PA__) || defined (__AVR_ATmega1284P__)
  349. // UART
  350. #define RXD DIO8
  351. #define TXD DIO9
  352. #define RXD0 DIO8
  353. #define TXD0 DIO9
  354. #define RXD1 DIO10
  355. #define TXD1 DIO11
  356. // SPI
  357. #define SCK DIO7
  358. #define MISO DIO6
  359. #define MOSI DIO5
  360. #define SS DIO4
  361. // TWI (I2C)
  362. #define SCL DIO16
  363. #define SDA DIO17
  364. // timers and PWM
  365. #define OC0A DIO3
  366. #define OC0B DIO4
  367. #define OC1A DIO13
  368. #define OC1B DIO12
  369. #define OC2A DIO15
  370. #define OC2B DIO14
  371. #define DEBUG_LED DIO0
  372. /*
  373. pins
  374. */
  375. #define DIO0_PIN PINB0
  376. #define DIO0_RPORT PINB
  377. #define DIO0_WPORT PORTB
  378. #define DIO0_DDR DDRB
  379. #define DIO0_PWM NULL
  380. #define DIO1_PIN PINB1
  381. #define DIO1_RPORT PINB
  382. #define DIO1_WPORT PORTB
  383. #define DIO1_DDR DDRB
  384. #define DIO1_PWM NULL
  385. #define DIO2_PIN PINB2
  386. #define DIO2_RPORT PINB
  387. #define DIO2_WPORT PORTB
  388. #define DIO2_DDR DDRB
  389. #define DIO2_PWM NULL
  390. #define DIO3_PIN PINB3
  391. #define DIO3_RPORT PINB
  392. #define DIO3_WPORT PORTB
  393. #define DIO3_DDR DDRB
  394. #define DIO3_PWM OCR0A
  395. #define DIO4_PIN PINB4
  396. #define DIO4_RPORT PINB
  397. #define DIO4_WPORT PORTB
  398. #define DIO4_DDR DDRB
  399. #define DIO4_PWM OCR0B
  400. #define DIO5_PIN PINB5
  401. #define DIO5_RPORT PINB
  402. #define DIO5_WPORT PORTB
  403. #define DIO5_DDR DDRB
  404. #define DIO5_PWM NULL
  405. #define DIO6_PIN PINB6
  406. #define DIO6_RPORT PINB
  407. #define DIO6_WPORT PORTB
  408. #define DIO6_DDR DDRB
  409. #define DIO6_PWM NULL
  410. #define DIO7_PIN PINB7
  411. #define DIO7_RPORT PINB
  412. #define DIO7_WPORT PORTB
  413. #define DIO7_DDR DDRB
  414. #define DIO7_PWM NULL
  415. #define DIO8_PIN PIND0
  416. #define DIO8_RPORT PIND
  417. #define DIO8_WPORT PORTD
  418. #define DIO8_DDR DDRD
  419. #define DIO8_PWM NULL
  420. #define DIO9_PIN PIND1
  421. #define DIO9_RPORT PIND
  422. #define DIO9_WPORT PORTD
  423. #define DIO9_DDR DDRD
  424. #define DIO9_PWM NULL
  425. #define DIO10_PIN PIND2
  426. #define DIO10_RPORT PIND
  427. #define DIO10_WPORT PORTD
  428. #define DIO10_DDR DDRD
  429. #define DIO10_PWM NULL
  430. #define DIO11_PIN PIND3
  431. #define DIO11_RPORT PIND
  432. #define DIO11_WPORT PORTD
  433. #define DIO11_DDR DDRD
  434. #define DIO11_PWM NULL
  435. #define DIO12_PIN PIND4
  436. #define DIO12_RPORT PIND
  437. #define DIO12_WPORT PORTD
  438. #define DIO12_DDR DDRD
  439. #define DIO12_PWM OCR1B
  440. #define DIO13_PIN PIND5
  441. #define DIO13_RPORT PIND
  442. #define DIO13_WPORT PORTD
  443. #define DIO13_DDR DDRD
  444. #define DIO13_PWM OCR1A
  445. #define DIO14_PIN PIND6
  446. #define DIO14_RPORT PIND
  447. #define DIO14_WPORT PORTD
  448. #define DIO14_DDR DDRD
  449. #define DIO14_PWM OCR2B
  450. #define DIO15_PIN PIND7
  451. #define DIO15_RPORT PIND
  452. #define DIO15_WPORT PORTD
  453. #define DIO15_DDR DDRD
  454. #define DIO15_PWM OCR2A
  455. #define DIO16_PIN PINC0
  456. #define DIO16_RPORT PINC
  457. #define DIO16_WPORT PORTC
  458. #define DIO16_DDR DDRC
  459. #define DIO16_PWM NULL
  460. #define DIO17_PIN PINC1
  461. #define DIO17_RPORT PINC
  462. #define DIO17_WPORT PORTC
  463. #define DIO17_DDR DDRC
  464. #define DIO17_PWM NULL
  465. #define DIO18_PIN PINC2
  466. #define DIO18_RPORT PINC
  467. #define DIO18_WPORT PORTC
  468. #define DIO18_DDR DDRC
  469. #define DIO18_PWM NULL
  470. #define DIO19_PIN PINC3
  471. #define DIO19_RPORT PINC
  472. #define DIO19_WPORT PORTC
  473. #define DIO19_DDR DDRC
  474. #define DIO19_PWM NULL
  475. #define DIO20_PIN PINC4
  476. #define DIO20_RPORT PINC
  477. #define DIO20_WPORT PORTC
  478. #define DIO20_DDR DDRC
  479. #define DIO20_PWM NULL
  480. #define DIO21_PIN PINC5
  481. #define DIO21_RPORT PINC
  482. #define DIO21_WPORT PORTC
  483. #define DIO21_DDR DDRC
  484. #define DIO21_PWM NULL
  485. #define DIO22_PIN PINC6
  486. #define DIO22_RPORT PINC
  487. #define DIO22_WPORT PORTC
  488. #define DIO22_DDR DDRC
  489. #define DIO22_PWM NULL
  490. #define DIO23_PIN PINC7
  491. #define DIO23_RPORT PINC
  492. #define DIO23_WPORT PORTC
  493. #define DIO23_DDR DDRC
  494. #define DIO23_PWM NULL
  495. #define DIO24_PIN PINA7
  496. #define DIO24_RPORT PINA
  497. #define DIO24_WPORT PORTA
  498. #define DIO24_DDR DDRA
  499. #define DIO24_PWM NULL
  500. #define DIO25_PIN PINA6
  501. #define DIO25_RPORT PINA
  502. #define DIO25_WPORT PORTA
  503. #define DIO25_DDR DDRA
  504. #define DIO25_PWM NULL
  505. #define DIO26_PIN PINA5
  506. #define DIO26_RPORT PINA
  507. #define DIO26_WPORT PORTA
  508. #define DIO26_DDR DDRA
  509. #define DIO26_PWM NULL
  510. #define DIO27_PIN PINA4
  511. #define DIO27_RPORT PINA
  512. #define DIO27_WPORT PORTA
  513. #define DIO27_DDR DDRA
  514. #define DIO27_PWM NULL
  515. #define DIO28_PIN PINA3
  516. #define DIO28_RPORT PINA
  517. #define DIO28_WPORT PORTA
  518. #define DIO28_DDR DDRA
  519. #define DIO28_PWM NULL
  520. #define DIO29_PIN PINA2
  521. #define DIO29_RPORT PINA
  522. #define DIO29_WPORT PORTA
  523. #define DIO29_DDR DDRA
  524. #define DIO29_PWM NULL
  525. #define DIO30_PIN PINA1
  526. #define DIO30_RPORT PINA
  527. #define DIO30_WPORT PORTA
  528. #define DIO30_DDR DDRA
  529. #define DIO30_PWM NULL
  530. #define DIO31_PIN PINA0
  531. #define DIO31_RPORT PINA
  532. #define DIO31_WPORT PORTA
  533. #define DIO31_DDR DDRA
  534. #define DIO31_PWM NULL
  535. #define AIO0_PIN PINA0
  536. #define AIO0_RPORT PINA
  537. #define AIO0_WPORT PORTA
  538. #define AIO0_DDR DDRA
  539. #define AIO0_PWM NULL
  540. #define AIO1_PIN PINA1
  541. #define AIO1_RPORT PINA
  542. #define AIO1_WPORT PORTA
  543. #define AIO1_DDR DDRA
  544. #define AIO1_PWM NULL
  545. #define AIO2_PIN PINA2
  546. #define AIO2_RPORT PINA
  547. #define AIO2_WPORT PORTA
  548. #define AIO2_DDR DDRA
  549. #define AIO2_PWM NULL
  550. #define AIO3_PIN PINA3
  551. #define AIO3_RPORT PINA
  552. #define AIO3_WPORT PORTA
  553. #define AIO3_DDR DDRA
  554. #define AIO3_PWM NULL
  555. #define AIO4_PIN PINA4
  556. #define AIO4_RPORT PINA
  557. #define AIO4_WPORT PORTA
  558. #define AIO4_DDR DDRA
  559. #define AIO4_PWM NULL
  560. #define AIO5_PIN PINA5
  561. #define AIO5_RPORT PINA
  562. #define AIO5_WPORT PORTA
  563. #define AIO5_DDR DDRA
  564. #define AIO5_PWM NULL
  565. #define AIO6_PIN PINA6
  566. #define AIO6_RPORT PINA
  567. #define AIO6_WPORT PORTA
  568. #define AIO6_DDR DDRA
  569. #define AIO6_PWM NULL
  570. #define AIO7_PIN PINA7
  571. #define AIO7_RPORT PINA
  572. #define AIO7_WPORT PORTA
  573. #define AIO7_DDR DDRA
  574. #define AIO7_PWM NULL
  575. #undef PA0
  576. #define PA0_PIN PINA0
  577. #define PA0_RPORT PINA
  578. #define PA0_WPORT PORTA
  579. #define PA0_DDR DDRA
  580. #define PA0_PWM NULL
  581. #undef PA1
  582. #define PA1_PIN PINA1
  583. #define PA1_RPORT PINA
  584. #define PA1_WPORT PORTA
  585. #define PA1_DDR DDRA
  586. #define PA1_PWM NULL
  587. #undef PA2
  588. #define PA2_PIN PINA2
  589. #define PA2_RPORT PINA
  590. #define PA2_WPORT PORTA
  591. #define PA2_DDR DDRA
  592. #define PA2_PWM NULL
  593. #undef PA3
  594. #define PA3_PIN PINA3
  595. #define PA3_RPORT PINA
  596. #define PA3_WPORT PORTA
  597. #define PA3_DDR DDRA
  598. #define PA3_PWM NULL
  599. #undef PA4
  600. #define PA4_PIN PINA4
  601. #define PA4_RPORT PINA
  602. #define PA4_WPORT PORTA
  603. #define PA4_DDR DDRA
  604. #define PA4_PWM NULL
  605. #undef PA5
  606. #define PA5_PIN PINA5
  607. #define PA5_RPORT PINA
  608. #define PA5_WPORT PORTA
  609. #define PA5_DDR DDRA
  610. #define PA5_PWM NULL
  611. #undef PA6
  612. #define PA6_PIN PINA6
  613. #define PA6_RPORT PINA
  614. #define PA6_WPORT PORTA
  615. #define PA6_DDR DDRA
  616. #define PA6_PWM NULL
  617. #undef PA7
  618. #define PA7_PIN PINA7
  619. #define PA7_RPORT PINA
  620. #define PA7_WPORT PORTA
  621. #define PA7_DDR DDRA
  622. #define PA7_PWM NULL
  623. #undef PB0
  624. #define PB0_PIN PINB0
  625. #define PB0_RPORT PINB
  626. #define PB0_WPORT PORTB
  627. #define PB0_DDR DDRB
  628. #define PB0_PWM NULL
  629. #undef PB1
  630. #define PB1_PIN PINB1
  631. #define PB1_RPORT PINB
  632. #define PB1_WPORT PORTB
  633. #define PB1_DDR DDRB
  634. #define PB1_PWM NULL
  635. #undef PB2
  636. #define PB2_PIN PINB2
  637. #define PB2_RPORT PINB
  638. #define PB2_WPORT PORTB
  639. #define PB2_DDR DDRB
  640. #define PB2_PWM NULL
  641. #undef PB3
  642. #define PB3_PIN PINB3
  643. #define PB3_RPORT PINB
  644. #define PB3_WPORT PORTB
  645. #define PB3_DDR DDRB
  646. #define PB3_PWM OCR0A
  647. #undef PB4
  648. #define PB4_PIN PINB4
  649. #define PB4_RPORT PINB
  650. #define PB4_WPORT PORTB
  651. #define PB4_DDR DDRB
  652. #define PB4_PWM OCR0B
  653. #undef PB5
  654. #define PB5_PIN PINB5
  655. #define PB5_RPORT PINB
  656. #define PB5_WPORT PORTB
  657. #define PB5_DDR DDRB
  658. #define PB5_PWM NULL
  659. #undef PB6
  660. #define PB6_PIN PINB6
  661. #define PB6_RPORT PINB
  662. #define PB6_WPORT PORTB
  663. #define PB6_DDR DDRB
  664. #define PB6_PWM NULL
  665. #undef PB7
  666. #define PB7_PIN PINB7
  667. #define PB7_RPORT PINB
  668. #define PB7_WPORT PORTB
  669. #define PB7_DDR DDRB
  670. #define PB7_PWM NULL
  671. #undef PC0
  672. #define PC0_PIN PINC0
  673. #define PC0_RPORT PINC
  674. #define PC0_WPORT PORTC
  675. #define PC0_DDR DDRC
  676. #define PC0_PWM NULL
  677. #undef PC1
  678. #define PC1_PIN PINC1
  679. #define PC1_RPORT PINC
  680. #define PC1_WPORT PORTC
  681. #define PC1_DDR DDRC
  682. #define PC1_PWM NULL
  683. #undef PC2
  684. #define PC2_PIN PINC2
  685. #define PC2_RPORT PINC
  686. #define PC2_WPORT PORTC
  687. #define PC2_DDR DDRC
  688. #define PC2_PWM NULL
  689. #undef PC3
  690. #define PC3_PIN PINC3
  691. #define PC3_RPORT PINC
  692. #define PC3_WPORT PORTC
  693. #define PC3_DDR DDRC
  694. #define PC3_PWM NULL
  695. #undef PC4
  696. #define PC4_PIN PINC4
  697. #define PC4_RPORT PINC
  698. #define PC4_WPORT PORTC
  699. #define PC4_DDR DDRC
  700. #define PC4_PWM NULL
  701. #undef PC5
  702. #define PC5_PIN PINC5
  703. #define PC5_RPORT PINC
  704. #define PC5_WPORT PORTC
  705. #define PC5_DDR DDRC
  706. #define PC5_PWM NULL
  707. #undef PC6
  708. #define PC6_PIN PINC6
  709. #define PC6_RPORT PINC
  710. #define PC6_WPORT PORTC
  711. #define PC6_DDR DDRC
  712. #define PC6_PWM NULL
  713. #undef PC7
  714. #define PC7_PIN PINC7
  715. #define PC7_RPORT PINC
  716. #define PC7_WPORT PORTC
  717. #define PC7_DDR DDRC
  718. #define PC7_PWM NULL
  719. #undef PD0
  720. #define PD0_PIN PIND0
  721. #define PD0_RPORT PIND
  722. #define PD0_WPORT PORTD
  723. #define PD0_DDR DDRD
  724. #define PD0_PWM NULL
  725. #undef PD1
  726. #define PD1_PIN PIND1
  727. #define PD1_RPORT PIND
  728. #define PD1_WPORT PORTD
  729. #define PD1_DDR DDRD
  730. #define PD1_PWM NULL
  731. #undef PD2
  732. #define PD2_PIN PIND2
  733. #define PD2_RPORT PIND
  734. #define PD2_WPORT PORTD
  735. #define PD2_DDR DDRD
  736. #define PD2_PWM NULL
  737. #undef PD3
  738. #define PD3_PIN PIND3
  739. #define PD3_RPORT PIND
  740. #define PD3_WPORT PORTD
  741. #define PD3_DDR DDRD
  742. #define PD3_PWM NULL
  743. #undef PD4
  744. #define PD4_PIN PIND4
  745. #define PD4_RPORT PIND
  746. #define PD4_WPORT PORTD
  747. #define PD4_DDR DDRD
  748. #define PD4_PWM NULL
  749. #undef PD5
  750. #define PD5_PIN PIND5
  751. #define PD5_RPORT PIND
  752. #define PD5_WPORT PORTD
  753. #define PD5_DDR DDRD
  754. #define PD5_PWM NULL
  755. #undef PD6
  756. #define PD6_PIN PIND6
  757. #define PD6_RPORT PIND
  758. #define PD6_WPORT PORTD
  759. #define PD6_DDR DDRD
  760. #define PD6_PWM OCR2B
  761. #undef PD7
  762. #define PD7_PIN PIND7
  763. #define PD7_RPORT PIND
  764. #define PD7_WPORT PORTD
  765. #define PD7_DDR DDRD
  766. #define PD7_PWM OCR2A
  767. #endif /* _AVR_ATmega{644,644P,644PA}__ */
  768. #if defined (__AVR_ATmega1280__) || defined (__AVR_ATmega2560__)
  769. // UART
  770. #define RXD DIO0
  771. #define TXD DIO1
  772. // SPI
  773. #define SCK DIO52
  774. #define MISO DIO50
  775. #define MOSI DIO51
  776. #define SS DIO53
  777. // TWI (I2C)
  778. #define SCL DIO21
  779. #define SDA DIO20
  780. // timers and PWM
  781. #define OC0A DIO13
  782. #define OC0B DIO4
  783. #define OC1A DIO11
  784. #define OC1B DIO12
  785. #define OC2A DIO10
  786. #define OC2B DIO9
  787. #define OC3A DIO5
  788. #define OC3B DIO2
  789. #define OC3C DIO3
  790. #define OC4A DIO6
  791. #define OC4B DIO7
  792. #define OC4C DIO8
  793. #define OC5A DIO46
  794. #define OC5B DIO45
  795. #define OC5C DIO44
  796. // change for your board
  797. #define DEBUG_LED DIO21
  798. /*
  799. pins
  800. */
  801. #define DIO0_PIN PINE0
  802. #define DIO0_RPORT PINE
  803. #define DIO0_WPORT PORTE
  804. #define DIO0_DDR DDRE
  805. #define DIO0_PWM NULL
  806. #define DIO1_PIN PINE1
  807. #define DIO1_RPORT PINE
  808. #define DIO1_WPORT PORTE
  809. #define DIO1_DDR DDRE
  810. #define DIO1_PWM NULL
  811. #define DIO2_PIN PINE4
  812. #define DIO2_RPORT PINE
  813. #define DIO2_WPORT PORTE
  814. #define DIO2_DDR DDRE
  815. #define DIO2_PWM &OCR3BL
  816. #define DIO3_PIN PINE5
  817. #define DIO3_RPORT PINE
  818. #define DIO3_WPORT PORTE
  819. #define DIO3_DDR DDRE
  820. #define DIO3_PWM &OCR3CL
  821. #define DIO4_PIN PING5
  822. #define DIO4_RPORT PING
  823. #define DIO4_WPORT PORTG
  824. #define DIO4_DDR DDRG
  825. #define DIO4_PWM &OCR0B
  826. #define DIO5_PIN PINE3
  827. #define DIO5_RPORT PINE
  828. #define DIO5_WPORT PORTE
  829. #define DIO5_DDR DDRE
  830. #define DIO5_PWM &OCR3AL
  831. #define DIO6_PIN PINH3
  832. #define DIO6_RPORT PINH
  833. #define DIO6_WPORT PORTH
  834. #define DIO6_DDR DDRH
  835. #define DIO6_PWM &OCR4AL
  836. #define DIO7_PIN PINH4
  837. #define DIO7_RPORT PINH
  838. #define DIO7_WPORT PORTH
  839. #define DIO7_DDR DDRH
  840. #define DIO7_PWM &OCR4BL
  841. #define DIO8_PIN PINH5
  842. #define DIO8_RPORT PINH
  843. #define DIO8_WPORT PORTH
  844. #define DIO8_DDR DDRH
  845. #define DIO8_PWM &OCR4CL
  846. #define DIO9_PIN PINH6
  847. #define DIO9_RPORT PINH
  848. #define DIO9_WPORT PORTH
  849. #define DIO9_DDR DDRH
  850. #define DIO9_PWM &OCR2B
  851. #define DIO10_PIN PINB4
  852. #define DIO10_RPORT PINB
  853. #define DIO10_WPORT PORTB
  854. #define DIO10_DDR DDRB
  855. #define DIO10_PWM &OCR2A
  856. #define DIO11_PIN PINB5
  857. #define DIO11_RPORT PINB
  858. #define DIO11_WPORT PORTB
  859. #define DIO11_DDR DDRB
  860. #define DIO11_PWM NULL
  861. #define DIO12_PIN PINB6
  862. #define DIO12_RPORT PINB
  863. #define DIO12_WPORT PORTB
  864. #define DIO12_DDR DDRB
  865. #define DIO12_PWM NULL
  866. #define DIO13_PIN PINB7
  867. #define DIO13_RPORT PINB
  868. #define DIO13_WPORT PORTB
  869. #define DIO13_DDR DDRB
  870. #define DIO13_PWM &OCR0A
  871. #define DIO14_PIN PINJ1
  872. #define DIO14_RPORT PINJ
  873. #define DIO14_WPORT PORTJ
  874. #define DIO14_DDR DDRJ
  875. #define DIO14_PWM NULL
  876. #define DIO15_PIN PINJ0
  877. #define DIO15_RPORT PINJ
  878. #define DIO15_WPORT PORTJ
  879. #define DIO15_DDR DDRJ
  880. #define DIO15_PWM NULL
  881. #define DIO16_PIN PINH1
  882. #define DIO16_RPORT PINH
  883. #define DIO16_WPORT PORTH
  884. #define DIO16_DDR DDRH
  885. #define DIO16_PWM NULL
  886. #define DIO17_PIN PINH0
  887. #define DIO17_RPORT PINH
  888. #define DIO17_WPORT PORTH
  889. #define DIO17_DDR DDRH
  890. #define DIO17_PWM NULL
  891. #define DIO18_PIN PIND3
  892. #define DIO18_RPORT PIND
  893. #define DIO18_WPORT PORTD
  894. #define DIO18_DDR DDRD
  895. #define DIO18_PWM NULL
  896. #define DIO19_PIN PIND2
  897. #define DIO19_RPORT PIND
  898. #define DIO19_WPORT PORTD
  899. #define DIO19_DDR DDRD
  900. #define DIO19_PWM NULL
  901. #define DIO20_PIN PIND1
  902. #define DIO20_RPORT PIND
  903. #define DIO20_WPORT PORTD
  904. #define DIO20_DDR DDRD
  905. #define DIO20_PWM NULL
  906. #define DIO21_PIN PIND0
  907. #define DIO21_RPORT PIND
  908. #define DIO21_WPORT PORTD
  909. #define DIO21_DDR DDRD
  910. #define DIO21_PWM NULL
  911. #define DIO22_PIN PINA0
  912. #define DIO22_RPORT PINA
  913. #define DIO22_WPORT PORTA
  914. #define DIO22_DDR DDRA
  915. #define DIO22_PWM NULL
  916. #define DIO23_PIN PINA1
  917. #define DIO23_RPORT PINA
  918. #define DIO23_WPORT PORTA
  919. #define DIO23_DDR DDRA
  920. #define DIO23_PWM NULL
  921. #define DIO24_PIN PINA2
  922. #define DIO24_RPORT PINA
  923. #define DIO24_WPORT PORTA
  924. #define DIO24_DDR DDRA
  925. #define DIO24_PWM NULL
  926. #define DIO25_PIN PINA3
  927. #define DIO25_RPORT PINA
  928. #define DIO25_WPORT PORTA
  929. #define DIO25_DDR DDRA
  930. #define DIO25_PWM NULL
  931. #define DIO26_PIN PINA4
  932. #define DIO26_RPORT PINA
  933. #define DIO26_WPORT PORTA
  934. #define DIO26_DDR DDRA
  935. #define DIO26_PWM NULL
  936. #define DIO27_PIN PINA5
  937. #define DIO27_RPORT PINA
  938. #define DIO27_WPORT PORTA
  939. #define DIO27_DDR DDRA
  940. #define DIO27_PWM NULL
  941. #define DIO28_PIN PINA6
  942. #define DIO28_RPORT PINA
  943. #define DIO28_WPORT PORTA
  944. #define DIO28_DDR DDRA
  945. #define DIO28_PWM NULL
  946. #define DIO29_PIN PINA7
  947. #define DIO29_RPORT PINA
  948. #define DIO29_WPORT PORTA
  949. #define DIO29_DDR DDRA
  950. #define DIO29_PWM NULL
  951. #define DIO30_PIN PINC7
  952. #define DIO30_RPORT PINC
  953. #define DIO30_WPORT PORTC
  954. #define DIO30_DDR DDRC
  955. #define DIO30_PWM NULL
  956. #define DIO31_PIN PINC6
  957. #define DIO31_RPORT PINC
  958. #define DIO31_WPORT PORTC
  959. #define DIO31_DDR DDRC
  960. #define DIO31_PWM NULL
  961. #define DIO32_PIN PINC5
  962. #define DIO32_RPORT PINC
  963. #define DIO32_WPORT PORTC
  964. #define DIO32_DDR DDRC
  965. #define DIO32_PWM NULL
  966. #define DIO33_PIN PINC4
  967. #define DIO33_RPORT PINC
  968. #define DIO33_WPORT PORTC
  969. #define DIO33_DDR DDRC
  970. #define DIO33_PWM NULL
  971. #define DIO34_PIN PINC3
  972. #define DIO34_RPORT PINC
  973. #define DIO34_WPORT PORTC
  974. #define DIO34_DDR DDRC
  975. #define DIO34_PWM NULL
  976. #define DIO35_PIN PINC2
  977. #define DIO35_RPORT PINC
  978. #define DIO35_WPORT PORTC
  979. #define DIO35_DDR DDRC
  980. #define DIO35_PWM NULL
  981. #define DIO36_PIN PINC1
  982. #define DIO36_RPORT PINC
  983. #define DIO36_WPORT PORTC
  984. #define DIO36_DDR DDRC
  985. #define DIO36_PWM NULL
  986. #define DIO37_PIN PINC0
  987. #define DIO37_RPORT PINC
  988. #define DIO37_WPORT PORTC
  989. #define DIO37_DDR DDRC
  990. #define DIO37_PWM NULL
  991. #define DIO38_PIN PIND7
  992. #define DIO38_RPORT PIND
  993. #define DIO38_WPORT PORTD
  994. #define DIO38_DDR DDRD
  995. #define DIO38_PWM NULL
  996. #define DIO39_PIN PING2
  997. #define DIO39_RPORT PING
  998. #define DIO39_WPORT PORTG
  999. #define DIO39_DDR DDRG
  1000. #define DIO39_PWM NULL
  1001. #define DIO40_PIN PING1
  1002. #define DIO40_RPORT PING
  1003. #define DIO40_WPORT PORTG
  1004. #define DIO40_DDR DDRG
  1005. #define DIO40_PWM NULL
  1006. #define DIO41_PIN PING0
  1007. #define DIO41_RPORT PING
  1008. #define DIO41_WPORT PORTG
  1009. #define DIO41_DDR DDRG
  1010. #define DIO41_PWM NULL
  1011. #define DIO42_PIN PINL7
  1012. #define DIO42_RPORT PINL
  1013. #define DIO42_WPORT PORTL
  1014. #define DIO42_DDR DDRL
  1015. #define DIO42_PWM NULL
  1016. #define DIO43_PIN PINL6
  1017. #define DIO43_RPORT PINL
  1018. #define DIO43_WPORT PORTL
  1019. #define DIO43_DDR DDRL
  1020. #define DIO43_PWM NULL
  1021. #define DIO44_PIN PINL5
  1022. #define DIO44_RPORT PINL
  1023. #define DIO44_WPORT PORTL
  1024. #define DIO44_DDR DDRL
  1025. #define DIO44_PWM &OCR5CL
  1026. #define DIO45_PIN PINL4
  1027. #define DIO45_RPORT PINL
  1028. #define DIO45_WPORT PORTL
  1029. #define DIO45_DDR DDRL
  1030. #define DIO45_PWM &OCR5BL
  1031. #define DIO46_PIN PINL3
  1032. #define DIO46_RPORT PINL
  1033. #define DIO46_WPORT PORTL
  1034. #define DIO46_DDR DDRL
  1035. #define DIO46_PWM &OCR5AL
  1036. #define DIO47_PIN PINL2
  1037. #define DIO47_RPORT PINL
  1038. #define DIO47_WPORT PORTL
  1039. #define DIO47_DDR DDRL
  1040. #define DIO47_PWM NULL
  1041. #define DIO48_PIN PINL1
  1042. #define DIO48_RPORT PINL
  1043. #define DIO48_WPORT PORTL
  1044. #define DIO48_DDR DDRL
  1045. #define DIO48_PWM NULL
  1046. #define DIO49_PIN PINL0
  1047. #define DIO49_RPORT PINL
  1048. #define DIO49_WPORT PORTL
  1049. #define DIO49_DDR DDRL
  1050. #define DIO49_PWM NULL
  1051. #define DIO50_PIN PINB3
  1052. #define DIO50_RPORT PINB
  1053. #define DIO50_WPORT PORTB
  1054. #define DIO50_DDR DDRB
  1055. #define DIO50_PWM NULL
  1056. #define DIO51_PIN PINB2
  1057. #define DIO51_RPORT PINB
  1058. #define DIO51_WPORT PORTB
  1059. #define DIO51_DDR DDRB
  1060. #define DIO51_PWM NULL
  1061. #define DIO52_PIN PINB1
  1062. #define DIO52_RPORT PINB
  1063. #define DIO52_WPORT PORTB
  1064. #define DIO52_DDR DDRB
  1065. #define DIO52_PWM NULL
  1066. #define DIO53_PIN PINB0
  1067. #define DIO53_RPORT PINB
  1068. #define DIO53_WPORT PORTB
  1069. #define DIO53_DDR DDRB
  1070. #define DIO53_PWM NULL
  1071. #define DIO54_PIN PINF0
  1072. #define DIO54_RPORT PINF
  1073. #define DIO54_WPORT PORTF
  1074. #define DIO54_DDR DDRF
  1075. #define DIO54_PWM NULL
  1076. #define DIO55_PIN PINF1
  1077. #define DIO55_RPORT PINF
  1078. #define DIO55_WPORT PORTF
  1079. #define DIO55_DDR DDRF
  1080. #define DIO55_PWM NULL
  1081. #define DIO56_PIN PINF2
  1082. #define DIO56_RPORT PINF
  1083. #define DIO56_WPORT PORTF
  1084. #define DIO56_DDR DDRF
  1085. #define DIO56_PWM NULL
  1086. #define DIO57_PIN PINF3
  1087. #define DIO57_RPORT PINF
  1088. #define DIO57_WPORT PORTF
  1089. #define DIO57_DDR DDRF
  1090. #define DIO57_PWM NULL
  1091. #define DIO58_PIN PINF4
  1092. #define DIO58_RPORT PINF
  1093. #define DIO58_WPORT PORTF
  1094. #define DIO58_DDR DDRF
  1095. #define DIO58_PWM NULL
  1096. #define DIO59_PIN PINF5
  1097. #define DIO59_RPORT PINF
  1098. #define DIO59_WPORT PORTF
  1099. #define DIO59_DDR DDRF
  1100. #define DIO59_PWM NULL
  1101. #define DIO60_PIN PINF6
  1102. #define DIO60_RPORT PINF
  1103. #define DIO60_WPORT PORTF
  1104. #define DIO60_DDR DDRF
  1105. #define DIO60_PWM NULL
  1106. #define DIO61_PIN PINF7
  1107. #define DIO61_RPORT PINF
  1108. #define DIO61_WPORT PORTF
  1109. #define DIO61_DDR DDRF
  1110. #define DIO61_PWM NULL
  1111. #define DIO62_PIN PINK0
  1112. #define DIO62_RPORT PINK
  1113. #define DIO62_WPORT PORTK
  1114. #define DIO62_DDR DDRK
  1115. #define DIO62_PWM NULL
  1116. #define DIO63_PIN PINK1
  1117. #define DIO63_RPORT PINK
  1118. #define DIO63_WPORT PORTK
  1119. #define DIO63_DDR DDRK
  1120. #define DIO63_PWM NULL
  1121. #define DIO64_PIN PINK2
  1122. #define DIO64_RPORT PINK
  1123. #define DIO64_WPORT PORTK
  1124. #define DIO64_DDR DDRK
  1125. #define DIO64_PWM NULL
  1126. #define DIO65_PIN PINK3
  1127. #define DIO65_RPORT PINK
  1128. #define DIO65_WPORT PORTK
  1129. #define DIO65_DDR DDRK
  1130. #define DIO65_PWM NULL
  1131. #define DIO66_PIN PINK4
  1132. #define DIO66_RPORT PINK
  1133. #define DIO66_WPORT PORTK
  1134. #define DIO66_DDR DDRK
  1135. #define DIO66_PWM NULL
  1136. #define DIO67_PIN PINK5
  1137. #define DIO67_RPORT PINK
  1138. #define DIO67_WPORT PORTK
  1139. #define DIO67_DDR DDRK
  1140. #define DIO67_PWM NULL
  1141. #define DIO68_PIN PINK6
  1142. #define DIO68_RPORT PINK
  1143. #define DIO68_WPORT PORTK
  1144. #define DIO68_DDR DDRK
  1145. #define DIO68_PWM NULL
  1146. #define DIO69_PIN PINK7
  1147. #define DIO69_RPORT PINK
  1148. #define DIO69_WPORT PORTK
  1149. #define DIO69_DDR DDRK
  1150. #define DIO69_PWM NULL
  1151. #undef PA0
  1152. #define PA0_PIN PINA0
  1153. #define PA0_RPORT PINA
  1154. #define PA0_WPORT PORTA
  1155. #define PA0_DDR DDRA
  1156. #define PA0_PWM NULL
  1157. #undef PA1
  1158. #define PA1_PIN PINA1
  1159. #define PA1_RPORT PINA
  1160. #define PA1_WPORT PORTA
  1161. #define PA1_DDR DDRA
  1162. #define PA1_PWM NULL
  1163. #undef PA2
  1164. #define PA2_PIN PINA2
  1165. #define PA2_RPORT PINA
  1166. #define PA2_WPORT PORTA
  1167. #define PA2_DDR DDRA
  1168. #define PA2_PWM NULL
  1169. #undef PA3
  1170. #define PA3_PIN PINA3
  1171. #define PA3_RPORT PINA
  1172. #define PA3_WPORT PORTA
  1173. #define PA3_DDR DDRA
  1174. #define PA3_PWM NULL
  1175. #undef PA4
  1176. #define PA4_PIN PINA4
  1177. #define PA4_RPORT PINA
  1178. #define PA4_WPORT PORTA
  1179. #define PA4_DDR DDRA
  1180. #define PA4_PWM NULL
  1181. #undef PA5
  1182. #define PA5_PIN PINA5
  1183. #define PA5_RPORT PINA
  1184. #define PA5_WPORT PORTA
  1185. #define PA5_DDR DDRA
  1186. #define PA5_PWM NULL
  1187. #undef PA6
  1188. #define PA6_PIN PINA6
  1189. #define PA6_RPORT PINA
  1190. #define PA6_WPORT PORTA
  1191. #define PA6_DDR DDRA
  1192. #define PA6_PWM NULL
  1193. #undef PA7
  1194. #define PA7_PIN PINA7
  1195. #define PA7_RPORT PINA
  1196. #define PA7_WPORT PORTA
  1197. #define PA7_DDR DDRA
  1198. #define PA7_PWM NULL
  1199. #undef PB0
  1200. #define PB0_PIN PINB0
  1201. #define PB0_RPORT PINB
  1202. #define PB0_WPORT PORTB
  1203. #define PB0_DDR DDRB
  1204. #define PB0_PWM NULL
  1205. #undef PB1
  1206. #define PB1_PIN PINB1
  1207. #define PB1_RPORT PINB
  1208. #define PB1_WPORT PORTB
  1209. #define PB1_DDR DDRB
  1210. #define PB1_PWM NULL
  1211. #undef PB2
  1212. #define PB2_PIN PINB2
  1213. #define PB2_RPORT PINB
  1214. #define PB2_WPORT PORTB
  1215. #define PB2_DDR DDRB
  1216. #define PB2_PWM NULL
  1217. #undef PB3
  1218. #define PB3_PIN PINB3
  1219. #define PB3_RPORT PINB
  1220. #define PB3_WPORT PORTB
  1221. #define PB3_DDR DDRB
  1222. #define PB3_PWM NULL
  1223. #undef PB4
  1224. #define PB4_PIN PINB4
  1225. #define PB4_RPORT PINB
  1226. #define PB4_WPORT PORTB
  1227. #define PB4_DDR DDRB
  1228. #define PB4_PWM &OCR2A
  1229. #undef PB5
  1230. #define PB5_PIN PINB5
  1231. #define PB5_RPORT PINB
  1232. #define PB5_WPORT PORTB
  1233. #define PB5_DDR DDRB
  1234. #define PB5_PWM NULL
  1235. #undef PB6
  1236. #define PB6_PIN PINB6
  1237. #define PB6_RPORT PINB
  1238. #define PB6_WPORT PORTB
  1239. #define PB6_DDR DDRB
  1240. #define PB6_PWM NULL
  1241. #undef PB7
  1242. #define PB7_PIN PINB7
  1243. #define PB7_RPORT PINB
  1244. #define PB7_WPORT PORTB
  1245. #define PB7_DDR DDRB
  1246. #define PB7_PWM &OCR0A
  1247. #undef PC0
  1248. #define PC0_PIN PINC0
  1249. #define PC0_RPORT PINC
  1250. #define PC0_WPORT PORTC
  1251. #define PC0_DDR DDRC
  1252. #define PC0_PWM NULL
  1253. #undef PC1
  1254. #define PC1_PIN PINC1
  1255. #define PC1_RPORT PINC
  1256. #define PC1_WPORT PORTC
  1257. #define PC1_DDR DDRC
  1258. #define PC1_PWM NULL
  1259. #undef PC2
  1260. #define PC2_PIN PINC2
  1261. #define PC2_RPORT PINC
  1262. #define PC2_WPORT PORTC
  1263. #define PC2_DDR DDRC
  1264. #define PC2_PWM NULL
  1265. #undef PC3
  1266. #define PC3_PIN PINC3
  1267. #define PC3_RPORT PINC
  1268. #define PC3_WPORT PORTC
  1269. #define PC3_DDR DDRC
  1270. #define PC3_PWM NULL
  1271. #undef PC4
  1272. #define PC4_PIN PINC4
  1273. #define PC4_RPORT PINC
  1274. #define PC4_WPORT PORTC
  1275. #define PC4_DDR DDRC
  1276. #define PC4_PWM NULL
  1277. #undef PC5
  1278. #define PC5_PIN PINC5
  1279. #define PC5_RPORT PINC
  1280. #define PC5_WPORT PORTC
  1281. #define PC5_DDR DDRC
  1282. #define PC5_PWM NULL
  1283. #undef PC6
  1284. #define PC6_PIN PINC6
  1285. #define PC6_RPORT PINC
  1286. #define PC6_WPORT PORTC
  1287. #define PC6_DDR DDRC
  1288. #define PC6_PWM NULL
  1289. #undef PC7
  1290. #define PC7_PIN PINC7
  1291. #define PC7_RPORT PINC
  1292. #define PC7_WPORT PORTC
  1293. #define PC7_DDR DDRC
  1294. #define PC7_PWM NULL
  1295. #undef PD0
  1296. #define PD0_PIN PIND0
  1297. #define PD0_RPORT PIND
  1298. #define PD0_WPORT PORTD
  1299. #define PD0_DDR DDRD
  1300. #define PD0_PWM NULL
  1301. #undef PD1
  1302. #define PD1_PIN PIND1
  1303. #define PD1_RPORT PIND
  1304. #define PD1_WPORT PORTD
  1305. #define PD1_DDR DDRD
  1306. #define PD1_PWM NULL
  1307. #undef PD2
  1308. #define PD2_PIN PIND2
  1309. #define PD2_RPORT PIND
  1310. #define PD2_WPORT PORTD
  1311. #define PD2_DDR DDRD
  1312. #define PD2_PWM NULL
  1313. #undef PD3
  1314. #define PD3_PIN PIND3
  1315. #define PD3_RPORT PIND
  1316. #define PD3_WPORT PORTD
  1317. #define PD3_DDR DDRD
  1318. #define PD3_PWM NULL
  1319. #undef PD4
  1320. #define PD4_PIN PIND4
  1321. #define PD4_RPORT PIND
  1322. #define PD4_WPORT PORTD
  1323. #define PD4_DDR DDRD
  1324. #define PD4_PWM NULL
  1325. #undef PD5
  1326. #define PD5_PIN PIND5
  1327. #define PD5_RPORT PIND
  1328. #define PD5_WPORT PORTD
  1329. #define PD5_DDR DDRD
  1330. #define PD5_PWM NULL
  1331. #undef PD6
  1332. #define PD6_PIN PIND6
  1333. #define PD6_RPORT PIND
  1334. #define PD6_WPORT PORTD
  1335. #define PD6_DDR DDRD
  1336. #define PD6_PWM NULL
  1337. #undef PD7
  1338. #define PD7_PIN PIND7
  1339. #define PD7_RPORT PIND
  1340. #define PD7_WPORT PORTD
  1341. #define PD7_DDR DDRD
  1342. #define PD7_PWM NULL
  1343. #undef PE0
  1344. #define PE0_PIN PINE0
  1345. #define PE0_RPORT PINE
  1346. #define PE0_WPORT PORTE
  1347. #define PE0_DDR DDRE
  1348. #define PE0_PWM NULL
  1349. #undef PE1
  1350. #define PE1_PIN PINE1
  1351. #define PE1_RPORT PINE
  1352. #define PE1_WPORT PORTE
  1353. #define PE1_DDR DDRE
  1354. #define PE1_PWM NULL
  1355. #undef PE2
  1356. #define PE2_PIN PINE2
  1357. #define PE2_RPORT PINE
  1358. #define PE2_WPORT PORTE
  1359. #define PE2_DDR DDRE
  1360. #define PE2_PWM NULL
  1361. #undef PE3
  1362. #define PE3_PIN PINE3
  1363. #define PE3_RPORT PINE
  1364. #define PE3_WPORT PORTE
  1365. #define PE3_DDR DDRE
  1366. #define PE3_PWM &OCR3AL
  1367. #undef PE4
  1368. #define PE4_PIN PINE4
  1369. #define PE4_RPORT PINE
  1370. #define PE4_WPORT PORTE
  1371. #define PE4_DDR DDRE
  1372. #define PE4_PWM &OCR3BL
  1373. #undef PE5
  1374. #define PE5_PIN PINE5
  1375. #define PE5_RPORT PINE
  1376. #define PE5_WPORT PORTE
  1377. #define PE5_DDR DDRE
  1378. #define PE5_PWM &OCR3CL
  1379. #undef PE6
  1380. #define PE6_PIN PINE6
  1381. #define PE6_RPORT PINE
  1382. #define PE6_WPORT PORTE
  1383. #define PE6_DDR DDRE
  1384. #define PE6_PWM NULL
  1385. #undef PE7
  1386. #define PE7_PIN PINE7
  1387. #define PE7_RPORT PINE
  1388. #define PE7_WPORT PORTE
  1389. #define PE7_DDR DDRE
  1390. #define PE7_PWM NULL
  1391. #undef PF0
  1392. #define PF0_PIN PINF0
  1393. #define PF0_RPORT PINF
  1394. #define PF0_WPORT PORTF
  1395. #define PF0_DDR DDRF
  1396. #define PF0_PWM NULL
  1397. #undef PF1
  1398. #define PF1_PIN PINF1
  1399. #define PF1_RPORT PINF
  1400. #define PF1_WPORT PORTF
  1401. #define PF1_DDR DDRF
  1402. #define PF1_PWM NULL
  1403. #undef PF2
  1404. #define PF2_PIN PINF2
  1405. #define PF2_RPORT PINF
  1406. #define PF2_WPORT PORTF
  1407. #define PF2_DDR DDRF
  1408. #define PF2_PWM NULL
  1409. #undef PF3
  1410. #define PF3_PIN PINF3
  1411. #define PF3_RPORT PINF
  1412. #define PF3_WPORT PORTF
  1413. #define PF3_DDR DDRF
  1414. #define PF3_PWM NULL
  1415. #undef PF4
  1416. #define PF4_PIN PINF4
  1417. #define PF4_RPORT PINF
  1418. #define PF4_WPORT PORTF
  1419. #define PF4_DDR DDRF
  1420. #define PF4_PWM NULL
  1421. #undef PF5
  1422. #define PF5_PIN PINF5
  1423. #define PF5_RPORT PINF
  1424. #define PF5_WPORT PORTF
  1425. #define PF5_DDR DDRF
  1426. #define PF5_PWM NULL
  1427. #undef PF6
  1428. #define PF6_PIN PINF6
  1429. #define PF6_RPORT PINF
  1430. #define PF6_WPORT PORTF
  1431. #define PF6_DDR DDRF
  1432. #define PF6_PWM NULL
  1433. #undef PF7
  1434. #define PF7_PIN PINF7
  1435. #define PF7_RPORT PINF
  1436. #define PF7_WPORT PORTF
  1437. #define PF7_DDR DDRF
  1438. #define PF7_PWM NULL
  1439. #undef PG0
  1440. #define PG0_PIN PING0
  1441. #define PG0_RPORT PING
  1442. #define PG0_WPORT PORTG
  1443. #define PG0_DDR DDRG
  1444. #define PG0_PWM NULL
  1445. #undef PG1
  1446. #define PG1_PIN PING1
  1447. #define PG1_RPORT PING
  1448. #define PG1_WPORT PORTG
  1449. #define PG1_DDR DDRG
  1450. #define PG1_PWM NULL
  1451. #undef PG2
  1452. #define PG2_PIN PING2
  1453. #define PG2_RPORT PING
  1454. #define PG2_WPORT PORTG
  1455. #define PG2_DDR DDRG
  1456. #define PG2_PWM NULL
  1457. #undef PG3
  1458. #define PG3_PIN PING3
  1459. #define PG3_RPORT PING
  1460. #define PG3_WPORT PORTG
  1461. #define PG3_DDR DDRG
  1462. #define PG3_PWM NULL
  1463. #undef PG4
  1464. #define PG4_PIN PING4
  1465. #define PG4_RPORT PING
  1466. #define PG4_WPORT PORTG
  1467. #define PG4_DDR DDRG
  1468. #define PG4_PWM NULL
  1469. #undef PG5
  1470. #define PG5_PIN PING5
  1471. #define PG5_RPORT PING
  1472. #define PG5_WPORT PORTG
  1473. #define PG5_DDR DDRG
  1474. #define PG5_PWM &OCR0B
  1475. #undef PG6
  1476. #define PG6_PIN PING6
  1477. #define PG6_RPORT PING
  1478. #define PG6_WPORT PORTG
  1479. #define PG6_DDR DDRG
  1480. #define PG6_PWM NULL
  1481. #undef PG7
  1482. #define PG7_PIN PING7
  1483. #define PG7_RPORT PING
  1484. #define PG7_WPORT PORTG
  1485. #define PG7_DDR DDRG
  1486. #define PG7_PWM NULL
  1487. #undef PH0
  1488. #define PH0_PIN PINH0
  1489. #define PH0_RPORT PINH
  1490. #define PH0_WPORT PORTH
  1491. #define PH0_DDR DDRH
  1492. #define PH0_PWM NULL
  1493. #undef PH1
  1494. #define PH1_PIN PINH1
  1495. #define PH1_RPORT PINH
  1496. #define PH1_WPORT PORTH
  1497. #define PH1_DDR DDRH
  1498. #define PH1_PWM NULL
  1499. #undef PH2
  1500. #define PH2_PIN PINH2
  1501. #define PH2_RPORT PINH
  1502. #define PH2_WPORT PORTH
  1503. #define PH2_DDR DDRH
  1504. #define PH2_PWM NULL
  1505. #undef PH3
  1506. #define PH3_PIN PINH3
  1507. #define PH3_RPORT PINH
  1508. #define PH3_WPORT PORTH
  1509. #define PH3_DDR DDRH
  1510. #define PH3_PWM &OCR4AL
  1511. #undef PH4
  1512. #define PH4_PIN PINH4
  1513. #define PH4_RPORT PINH
  1514. #define PH4_WPORT PORTH
  1515. #define PH4_DDR DDRH
  1516. #define PH4_PWM &OCR4BL
  1517. #undef PH5
  1518. #define PH5_PIN PINH5
  1519. #define PH5_RPORT PINH
  1520. #define PH5_WPORT PORTH
  1521. #define PH5_DDR DDRH
  1522. #define PH5_PWM &OCR4CL
  1523. #undef PH6
  1524. #define PH6_PIN PINH6
  1525. #define PH6_RPORT PINH
  1526. #define PH6_WPORT PORTH
  1527. #define PH6_DDR DDRH
  1528. #define PH6_PWM &OCR2B
  1529. #undef PH7
  1530. #define PH7_PIN PINH7
  1531. #define PH7_RPORT PINH
  1532. #define PH7_WPORT PORTH
  1533. #define PH7_DDR DDRH
  1534. #define PH7_PWM NULL
  1535. #undef PJ0
  1536. #define PJ0_PIN PINJ0
  1537. #define PJ0_RPORT PINJ
  1538. #define PJ0_WPORT PORTJ
  1539. #define PJ0_DDR DDRJ
  1540. #define PJ0_PWM NULL
  1541. #undef PJ1
  1542. #define PJ1_PIN PINJ1
  1543. #define PJ1_RPORT PINJ
  1544. #define PJ1_WPORT PORTJ
  1545. #define PJ1_DDR DDRJ
  1546. #define PJ1_PWM NULL
  1547. #undef PJ2
  1548. #define PJ2_PIN PINJ2
  1549. #define PJ2_RPORT PINJ
  1550. #define PJ2_WPORT PORTJ
  1551. #define PJ2_DDR DDRJ
  1552. #define PJ2_PWM NULL
  1553. #undef PJ3
  1554. #define PJ3_PIN PINJ3
  1555. #define PJ3_RPORT PINJ
  1556. #define PJ3_WPORT PORTJ
  1557. #define PJ3_DDR DDRJ
  1558. #define PJ3_PWM NULL
  1559. #undef PJ4
  1560. #define PJ4_PIN PINJ4
  1561. #define PJ4_RPORT PINJ
  1562. #define PJ4_WPORT PORTJ
  1563. #define PJ4_DDR DDRJ
  1564. #define PJ4_PWM NULL
  1565. #undef PJ5
  1566. #define PJ5_PIN PINJ5
  1567. #define PJ5_RPORT PINJ
  1568. #define PJ5_WPORT PORTJ
  1569. #define PJ5_DDR DDRJ
  1570. #define PJ5_PWM NULL
  1571. #undef PJ6
  1572. #define PJ6_PIN PINJ6
  1573. #define PJ6_RPORT PINJ
  1574. #define PJ6_WPORT PORTJ
  1575. #define PJ6_DDR DDRJ
  1576. #define PJ6_PWM NULL
  1577. #undef PJ7
  1578. #define PJ7_PIN PINJ7
  1579. #define PJ7_RPORT PINJ
  1580. #define PJ7_WPORT PORTJ
  1581. #define PJ7_DDR DDRJ
  1582. #define PJ7_PWM NULL
  1583. #undef PK0
  1584. #define PK0_PIN PINK0
  1585. #define PK0_RPORT PINK
  1586. #define PK0_WPORT PORTK
  1587. #define PK0_DDR DDRK
  1588. #define PK0_PWM NULL
  1589. #undef PK1
  1590. #define PK1_PIN PINK1
  1591. #define PK1_RPORT PINK
  1592. #define PK1_WPORT PORTK
  1593. #define PK1_DDR DDRK
  1594. #define PK1_PWM NULL
  1595. #undef PK2
  1596. #define PK2_PIN PINK2
  1597. #define PK2_RPORT PINK
  1598. #define PK2_WPORT PORTK
  1599. #define PK2_DDR DDRK
  1600. #define PK2_PWM NULL
  1601. #undef PK3
  1602. #define PK3_PIN PINK3
  1603. #define PK3_RPORT PINK
  1604. #define PK3_WPORT PORTK
  1605. #define PK3_DDR DDRK
  1606. #define PK3_PWM NULL
  1607. #undef PK4
  1608. #define PK4_PIN PINK4
  1609. #define PK4_RPORT PINK
  1610. #define PK4_WPORT PORTK
  1611. #define PK4_DDR DDRK
  1612. #define PK4_PWM NULL
  1613. #undef PK5
  1614. #define PK5_PIN PINK5
  1615. #define PK5_RPORT PINK
  1616. #define PK5_WPORT PORTK
  1617. #define PK5_DDR DDRK
  1618. #define PK5_PWM NULL
  1619. #undef PK6
  1620. #define PK6_PIN PINK6
  1621. #define PK6_RPORT PINK
  1622. #define PK6_WPORT PORTK
  1623. #define PK6_DDR DDRK
  1624. #define PK6_PWM NULL
  1625. #undef PK7
  1626. #define PK7_PIN PINK7
  1627. #define PK7_RPORT PINK
  1628. #define PK7_WPORT PORTK
  1629. #define PK7_DDR DDRK
  1630. #define PK7_PWM NULL
  1631. #undef PL0
  1632. #define PL0_PIN PINL0
  1633. #define PL0_RPORT PINL
  1634. #define PL0_WPORT PORTL
  1635. #define PL0_DDR DDRL
  1636. #define PL0_PWM NULL
  1637. #undef PL1
  1638. #define PL1_PIN PINL1
  1639. #define PL1_RPORT PINL
  1640. #define PL1_WPORT PORTL
  1641. #define PL1_DDR DDRL
  1642. #define PL1_PWM NULL
  1643. #undef PL2
  1644. #define PL2_PIN PINL2
  1645. #define PL2_RPORT PINL
  1646. #define PL2_WPORT PORTL
  1647. #define PL2_DDR DDRL
  1648. #define PL2_PWM NULL
  1649. #undef PL3
  1650. #define PL3_PIN PINL3
  1651. #define PL3_RPORT PINL
  1652. #define PL3_WPORT PORTL
  1653. #define PL3_DDR DDRL
  1654. #define PL3_PWM &OCR5AL
  1655. #undef PL4
  1656. #define PL4_PIN PINL4
  1657. #define PL4_RPORT PINL
  1658. #define PL4_WPORT PORTL
  1659. #define PL4_DDR DDRL
  1660. #define PL4_PWM &OCR5BL
  1661. #undef PL5
  1662. #define PL5_PIN PINL5
  1663. #define PL5_RPORT PINL
  1664. #define PL5_WPORT PORTL
  1665. #define PL5_DDR DDRL
  1666. #define PL5_PWM &OCR5CL
  1667. #undef PL6
  1668. #define PL6_PIN PINL6
  1669. #define PL6_RPORT PINL
  1670. #define PL6_WPORT PORTL
  1671. #define PL6_DDR DDRL
  1672. #define PL6_PWM NULL
  1673. #undef PL7
  1674. #define PL7_PIN PINL7
  1675. #define PL7_RPORT PINL
  1676. #define PL7_WPORT PORTL
  1677. #define PL7_DDR DDRL
  1678. #define PL7_PWM NULL
  1679. #endif
  1680. #if defined (__AVR_AT90USB1287__) || defined (__AVR_AT90USB1286__)
  1681. // SPI
  1682. #define SCK DIO9
  1683. #define MISO DIO11
  1684. #define MOSI DIO10
  1685. #define SS DIO8
  1686. // change for your board
  1687. #define DEBUG_LED DIO31 /* led D5 red */
  1688. /*
  1689. pins
  1690. */
  1691. #define DIO0_PIN PINA0
  1692. #define DIO0_RPORT PINA
  1693. #define DIO0_WPORT PORTA
  1694. #define DIO0_PWM NULL
  1695. #define DIO0_DDR DDRA
  1696. #define DIO1_PIN PINA1
  1697. #define DIO1_RPORT PINA
  1698. #define DIO1_WPORT PORTA
  1699. #define DIO1_PWM NULL
  1700. #define DIO1_DDR DDRA
  1701. #define DIO2_PIN PINA2
  1702. #define DIO2_RPORT PINA
  1703. #define DIO2_WPORT PORTA
  1704. #define DIO2_PWM NULL
  1705. #define DIO2_DDR DDRA
  1706. #define DIO3_PIN PINA3
  1707. #define DIO3_RPORT PINA
  1708. #define DIO3_WPORT PORTA
  1709. #define DIO3_PWM NULL
  1710. #define DIO3_DDR DDRA
  1711. #define DIO4_PIN PINA4
  1712. #define DIO4_RPORT PINA
  1713. #define DIO4_WPORT PORTA
  1714. #define DIO4_PWM NULL
  1715. #define DIO4_DDR DDRA
  1716. #define DIO5_PIN PINA5
  1717. #define DIO5_RPORT PINA
  1718. #define DIO5_WPORT PORTA
  1719. #define DIO5_PWM NULL
  1720. #define DIO5_DDR DDRA
  1721. #define DIO6_PIN PINA6
  1722. #define DIO6_RPORT PINA
  1723. #define DIO6_WPORT PORTA
  1724. #define DIO6_PWM NULL
  1725. #define DIO6_DDR DDRA
  1726. #define DIO7_PIN PINA7
  1727. #define DIO7_RPORT PINA
  1728. #define DIO7_WPORT PORTA
  1729. #define DIO7_PWM NULL
  1730. #define DIO7_DDR DDRA
  1731. #define DIO8_PIN PINB0
  1732. #define DIO8_RPORT PINB
  1733. #define DIO8_WPORT PORTB
  1734. #define DIO8_PWM NULL
  1735. #define DIO8_DDR DDRB
  1736. #define DIO9_PIN PINB1
  1737. #define DIO9_RPORT PINB
  1738. #define DIO9_WPORT PORTB
  1739. #define DIO9_PWM NULL
  1740. #define DIO9_DDR DDRB
  1741. #define DIO10_PIN PINB2
  1742. #define DIO10_RPORT PINB
  1743. #define DIO10_WPORT PORTB
  1744. #define DIO10_PWM NULL
  1745. #define DIO10_DDR DDRB
  1746. #define DIO11_PIN PINB3
  1747. #define DIO11_RPORT PINB
  1748. #define DIO11_WPORT PORTB
  1749. #define DIO11_PWM NULL
  1750. #define DIO11_DDR DDRB
  1751. #define DIO12_PIN PINB4
  1752. #define DIO12_RPORT PINB
  1753. #define DIO12_WPORT PORTB
  1754. #define DIO12_PWM NULL
  1755. #define DIO12_DDR DDRB
  1756. #define DIO13_PIN PINB5
  1757. #define DIO13_RPORT PINB
  1758. #define DIO13_WPORT PORTB
  1759. #define DIO13_PWM NULL
  1760. #define DIO13_DDR DDRB
  1761. #define DIO14_PIN PINB6
  1762. #define DIO14_RPORT PINB
  1763. #define DIO14_WPORT PORTB
  1764. #define DIO14_PWM NULL
  1765. #define DIO14_DDR DDRB
  1766. #define DIO15_PIN PINB7
  1767. #define DIO15_RPORT PINB
  1768. #define DIO15_WPORT PORTB
  1769. #define DIO15_PWM NULL
  1770. #define DIO15_DDR DDRB
  1771. #define DIO16_PIN PINC0
  1772. #define DIO16_RPORT PINC
  1773. #define DIO16_WPORT PORTC
  1774. #define DIO16_PWM NULL
  1775. #define DIO16_DDR DDRC
  1776. #define DIO17_PIN PINC1
  1777. #define DIO17_RPORT PINC
  1778. #define DIO17_WPORT PORTC
  1779. #define DIO17_PWM NULL
  1780. #define DIO17_DDR DDRC
  1781. #define DIO18_PIN PINC2
  1782. #define DIO18_RPORT PINC
  1783. #define DIO18_WPORT PORTC
  1784. #define DIO18_PWM NULL
  1785. #define DIO18_DDR DDRC
  1786. #define DIO19_PIN PINC3
  1787. #define DIO19_RPORT PINC
  1788. #define DIO19_WPORT PORTC
  1789. #define DIO19_PWM NULL
  1790. #define DIO19_DDR DDRC
  1791. #define DIO20_PIN PINC4
  1792. #define DIO20_RPORT PINC
  1793. #define DIO20_WPORT PORTC
  1794. #define DIO20_PWM NULL
  1795. #define DIO20_DDR DDRC
  1796. #define DIO21_PIN PINC5
  1797. #define DIO21_RPORT PINC
  1798. #define DIO21_WPORT PORTC
  1799. #define DIO21_PWM NULL
  1800. #define DIO21_DDR DDRC
  1801. #define DIO22_PIN PINC6
  1802. #define DIO22_RPORT PINC
  1803. #define DIO22_WPORT PORTC
  1804. #define DIO22_PWM NULL
  1805. #define DIO22_DDR DDRC
  1806. #define DIO23_PIN PINC7
  1807. #define DIO23_RPORT PINC
  1808. #define DIO23_WPORT PORTC
  1809. #define DIO23_PWM NULL
  1810. #define DIO23_DDR DDRC
  1811. #define DIO24_PIN PIND0
  1812. #define DIO24_RPORT PIND
  1813. #define DIO24_WPORT PORTD
  1814. #define DIO24_PWM NULL
  1815. #define DIO24_DDR DDRD
  1816. #define DIO25_PIN PIND1
  1817. #define DIO25_RPORT PIND
  1818. #define DIO25_WPORT PORTD
  1819. #define DIO25_PWM NULL
  1820. #define DIO25_DDR DDRD
  1821. #define DIO26_PIN PIND2
  1822. #define DIO26_RPORT PIND
  1823. #define DIO26_WPORT PORTD
  1824. #define DIO26_PWM NULL
  1825. #define DIO26_DDR DDRD
  1826. #define DIO27_PIN PIND3
  1827. #define DIO27_RPORT PIND
  1828. #define DIO27_WPORT PORTD
  1829. #define DIO27_PWM NULL
  1830. #define DIO27_DDR DDRD
  1831. #define DIO28_PIN PIND4
  1832. #define DIO28_RPORT PIND
  1833. #define DIO28_WPORT PORTD
  1834. #define DIO28_PWM NULL
  1835. #define DIO28_DDR DDRD
  1836. #define DIO29_PIN PIND5
  1837. #define DIO29_RPORT PIND
  1838. #define DIO29_WPORT PORTD
  1839. #define DIO29_PWM NULL
  1840. #define DIO29_DDR DDRD
  1841. #define DIO30_PIN PIND6
  1842. #define DIO30_RPORT PIND
  1843. #define DIO30_WPORT PORTD
  1844. #define DIO30_PWM NULL
  1845. #define DIO30_DDR DDRD
  1846. #define DIO31_PIN PIND7
  1847. #define DIO31_RPORT PIND
  1848. #define DIO31_WPORT PORTD
  1849. #define DIO31_PWM NULL
  1850. #define DIO31_DDR DDRD
  1851. #define DIO32_PIN PINE0
  1852. #define DIO32_RPORT PINE
  1853. #define DIO32_WPORT PORTE
  1854. #define DIO32_PWM NULL
  1855. #define DIO32_DDR DDRE
  1856. #define DIO33_PIN PINE1
  1857. #define DIO33_RPORT PINE
  1858. #define DIO33_WPORT PORTE
  1859. #define DIO33_PWM NULL
  1860. #define DIO33_DDR DDRE
  1861. #define DIO34_PIN PINE2
  1862. #define DIO34_RPORT PINE
  1863. #define DIO34_WPORT PORTE
  1864. #define DIO34_PWM NULL
  1865. #define DIO34_DDR DDRE
  1866. #define DIO35_PIN PINE3
  1867. #define DIO35_RPORT PINE
  1868. #define DIO35_WPORT PORTE
  1869. #define DIO35_PWM NULL
  1870. #define DIO35_DDR DDRE
  1871. #define DIO36_PIN PINE4
  1872. #define DIO36_RPORT PINE
  1873. #define DIO36_WPORT PORTE
  1874. #define DIO36_PWM NULL
  1875. #define DIO36_DDR DDRE
  1876. #define DIO37_PIN PINE5
  1877. #define DIO37_RPORT PINE
  1878. #define DIO37_WPORT PORTE
  1879. #define DIO37_PWM NULL
  1880. #define DIO37_DDR DDRE
  1881. #define DIO38_PIN PINE6
  1882. #define DIO38_RPORT PINE
  1883. #define DIO38_WPORT PORTE
  1884. #define DIO38_PWM NULL
  1885. #define DIO38_DDR DDRE
  1886. #define DIO39_PIN PINE7
  1887. #define DIO39_RPORT PINE
  1888. #define DIO39_WPORT PORTE
  1889. #define DIO39_PWM NULL
  1890. #define DIO39_DDR DDRE
  1891. #define AIO0_PIN PINF0
  1892. #define AIO0_RPORT PINF
  1893. #define AIO0_WPORT PORTF
  1894. #define AIO0_PWM NULL
  1895. #define AIO0_DDR DDRF
  1896. #define AIO1_PIN PINF1
  1897. #define AIO1_RPORT PINF
  1898. #define AIO1_WPORT PORTF
  1899. #define AIO1_PWM NULL
  1900. #define AIO1_DDR DDRF
  1901. #define AIO2_PIN PINF2
  1902. #define AIO2_RPORT PINF
  1903. #define AIO2_WPORT PORTF
  1904. #define AIO2_PWM NULL
  1905. #define AIO2_DDR DDRF
  1906. #define AIO3_PIN PINF3
  1907. #define AIO3_RPORT PINF
  1908. #define AIO3_WPORT PORTF
  1909. #define AIO3_PWM NULL
  1910. #define AIO3_DDR DDRF
  1911. #define AIO4_PIN PINF4
  1912. #define AIO4_RPORT PINF
  1913. #define AIO4_WPORT PORTF
  1914. #define AIO4_PWM NULL
  1915. #define AIO4_DDR DDRF
  1916. #define AIO5_PIN PINF5
  1917. #define AIO5_RPORT PINF
  1918. #define AIO5_WPORT PORTF
  1919. #define AIO5_PWM NULL
  1920. #define AIO5_DDR DDRF
  1921. #define AIO6_PIN PINF6
  1922. #define AIO6_RPORT PINF
  1923. #define AIO6_WPORT PORTF
  1924. #define AIO6_PWM NULL
  1925. #define AIO6_DDR DDRF
  1926. #define AIO7_PIN PINF7
  1927. #define AIO7_RPORT PINF
  1928. #define AIO7_WPORT PORTF
  1929. #define AIO7_PWM NULL
  1930. #define AIO7_DDR DDRF
  1931. #define DIO40_PIN PINF0
  1932. #define DIO40_RPORT PINF
  1933. #define DIO40_WPORT PORTF
  1934. #define DIO40_PWM NULL
  1935. #define DIO40_DDR DDRF
  1936. #define DIO41_PIN PINF1
  1937. #define DIO41_RPORT PINF
  1938. #define DIO41_WPORT PORTF
  1939. #define DIO41_PWM NULL
  1940. #define DIO41_DDR DDRF
  1941. #define DIO42_PIN PINF2
  1942. #define DIO42_RPORT PINF
  1943. #define DIO42_WPORT PORTF
  1944. #define DIO42_PWM NULL
  1945. #define DIO42_DDR DDRF
  1946. #define DIO43_PIN PINF3
  1947. #define DIO43_RPORT PINF
  1948. #define DIO43_WPORT PORTF
  1949. #define DIO43_PWM NULL
  1950. #define DIO43_DDR DDRF
  1951. #define DIO44_PIN PINF4
  1952. #define DIO44_RPORT PINF
  1953. #define DIO44_WPORT PORTF
  1954. #define DIO44_PWM NULL
  1955. #define DIO44_DDR DDRF
  1956. #define DIO45_PIN PINF5
  1957. #define DIO45_RPORT PINF
  1958. #define DIO45_WPORT PORTF
  1959. #define DIO45_PWM NULL
  1960. #define DIO45_DDR DDRF
  1961. #define DIO46_PIN PINF6
  1962. #define DIO46_RPORT PINF
  1963. #define DIO46_WPORT PORTF
  1964. #define DIO46_PWM NULL
  1965. #define DIO46_DDR DDRF
  1966. #define DIO47_PIN PINF7
  1967. #define DIO47_RPORT PINF
  1968. #define DIO47_WPORT PORTF
  1969. #define DIO47_PWM NULL
  1970. #define DIO47_DDR DDRF
  1971. #undef PA0
  1972. #define PA0_PIN PINA0
  1973. #define PA0_RPORT PINA
  1974. #define PA0_WPORT PORTA
  1975. #define PA0_PWM NULL
  1976. #define PA0_DDR DDRA
  1977. #undef PA1
  1978. #define PA1_PIN PINA1
  1979. #define PA1_RPORT PINA
  1980. #define PA1_WPORT PORTA
  1981. #define PA1_PWM NULL
  1982. #define PA1_DDR DDRA
  1983. #undef PA2
  1984. #define PA2_PIN PINA2
  1985. #define PA2_RPORT PINA
  1986. #define PA2_WPORT PORTA
  1987. #define PA2_PWM NULL
  1988. #define PA2_DDR DDRA
  1989. #undef PA3
  1990. #define PA3_PIN PINA3
  1991. #define PA3_RPORT PINA
  1992. #define PA3_WPORT PORTA
  1993. #define PA3_PWM NULL
  1994. #define PA3_DDR DDRA
  1995. #undef PA4
  1996. #define PA4_PIN PINA4
  1997. #define PA4_RPORT PINA
  1998. #define PA4_WPORT PORTA
  1999. #define PA4_PWM NULL
  2000. #define PA4_DDR DDRA
  2001. #undef PA5
  2002. #define PA5_PIN PINA5
  2003. #define PA5_RPORT PINA
  2004. #define PA5_WPORT PORTA
  2005. #define PA5_PWM NULL
  2006. #define PA5_DDR DDRA
  2007. #undef PA6
  2008. #define PA6_PIN PINA6
  2009. #define PA6_RPORT PINA
  2010. #define PA6_WPORT PORTA
  2011. #define PA6_PWM NULL
  2012. #define PA6_DDR DDRA
  2013. #undef PA7
  2014. #define PA7_PIN PINA7
  2015. #define PA7_RPORT PINA
  2016. #define PA7_WPORT PORTA
  2017. #define PA7_PWM NULL
  2018. #define PA7_DDR DDRA
  2019. #undef PB0
  2020. #define PB0_PIN PINB0
  2021. #define PB0_RPORT PINB
  2022. #define PB0_WPORT PORTB
  2023. #define PB0_PWM NULL
  2024. #define PB0_DDR DDRB
  2025. #undef PB1
  2026. #define PB1_PIN PINB1
  2027. #define PB1_RPORT PINB
  2028. #define PB1_WPORT PORTB
  2029. #define PB1_PWM NULL
  2030. #define PB1_DDR DDRB
  2031. #undef PB2
  2032. #define PB2_PIN PINB2
  2033. #define PB2_RPORT PINB
  2034. #define PB2_WPORT PORTB
  2035. #define PB2_PWM NULL
  2036. #define PB2_DDR DDRB
  2037. #undef PB3
  2038. #define PB3_PIN PINB3
  2039. #define PB3_RPORT PINB
  2040. #define PB3_WPORT PORTB
  2041. #define PB3_PWM NULL
  2042. #define PB3_DDR DDRB
  2043. #undef PB4
  2044. #define PB4_PIN PINB4
  2045. #define PB4_RPORT PINB
  2046. #define PB4_WPORT PORTB
  2047. #define PB4_PWM NULL
  2048. #define PB4_DDR DDRB
  2049. #undef PB5
  2050. #define PB5_PIN PINB5
  2051. #define PB5_RPORT PINB
  2052. #define PB5_WPORT PORTB
  2053. #define PB5_PWM NULL
  2054. #define PB5_DDR DDRB
  2055. #undef PB6
  2056. #define PB6_PIN PINB6
  2057. #define PB6_RPORT PINB
  2058. #define PB6_WPORT PORTB
  2059. #define PB6_PWM NULL
  2060. #define PB6_DDR DDRB
  2061. #undef PB7
  2062. #define PB7_PIN PINB7
  2063. #define PB7_RPORT PINB
  2064. #define PB7_WPORT PORTB
  2065. #define PB7_PWM NULL
  2066. #define PB7_DDR DDRB
  2067. #undef PC0
  2068. #define PC0_PIN PINC0
  2069. #define PC0_RPORT PINC
  2070. #define PC0_WPORT PORTC
  2071. #define PC0_PWM NULL
  2072. #define PC0_DDR DDRC
  2073. #undef PC1
  2074. #define PC1_PIN PINC1
  2075. #define PC1_RPORT PINC
  2076. #define PC1_WPORT PORTC
  2077. #define PC1_PWM NULL
  2078. #define PC1_DDR DDRC
  2079. #undef PC2
  2080. #define PC2_PIN PINC2
  2081. #define PC2_RPORT PINC
  2082. #define PC2_WPORT PORTC
  2083. #define PC2_PWM NULL
  2084. #define PC2_DDR DDRC
  2085. #undef PC3
  2086. #define PC3_PIN PINC3
  2087. #define PC3_RPORT PINC
  2088. #define PC3_WPORT PORTC
  2089. #define PC3_PWM NULL
  2090. #define PC3_DDR DDRC
  2091. #undef PC4
  2092. #define PC4_PIN PINC4
  2093. #define PC4_RPORT PINC
  2094. #define PC4_WPORT PORTC
  2095. #define PC4_PWM NULL
  2096. #define PC4_DDR DDRC
  2097. #undef PC5
  2098. #define PC5_PIN PINC5
  2099. #define PC5_RPORT PINC
  2100. #define PC5_WPORT PORTC
  2101. #define PC5_PWM NULL
  2102. #define PC5_DDR DDRC
  2103. #undef PC6
  2104. #define PC6_PIN PINC6
  2105. #define PC6_RPORT PINC
  2106. #define PC6_WPORT PORTC
  2107. #define PC6_PWM NULL
  2108. #define PC6_DDR DDRC
  2109. #undef PC7
  2110. #define PC7_PIN PINC7
  2111. #define PC7_RPORT PINC
  2112. #define PC7_WPORT PORTC
  2113. #define PC7_PWM NULL
  2114. #define PC7_DDR DDRC
  2115. #undef PD0
  2116. #define PD0_PIN PIND0
  2117. #define PD0_RPORT PIND
  2118. #define PD0_WPORT PORTD
  2119. #define PD0_PWM NULL
  2120. #define PD0_DDR DDRD
  2121. #undef PD1
  2122. #define PD1_PIN PIND1
  2123. #define PD1_RPORT PIND
  2124. #define PD1_WPORT PORTD
  2125. #define PD1_PWM NULL
  2126. #define PD1_DDR DDRD
  2127. #undef PD2
  2128. #define PD2_PIN PIND2
  2129. #define PD2_RPORT PIND
  2130. #define PD2_WPORT PORTD
  2131. #define PD2_PWM NULL
  2132. #define PD2_DDR DDRD
  2133. #undef PD3
  2134. #define PD3_PIN PIND3
  2135. #define PD3_RPORT PIND
  2136. #define PD3_WPORT PORTD
  2137. #define PD3_PWM NULL
  2138. #define PD3_DDR DDRD
  2139. #undef PD4
  2140. #define PD4_PIN PIND4
  2141. #define PD4_RPORT PIND
  2142. #define PD4_WPORT PORTD
  2143. #define PD4_PWM NULL
  2144. #define PD4_DDR DDRD
  2145. #undef PD5
  2146. #define PD5_PIN PIND5
  2147. #define PD5_RPORT PIND
  2148. #define PD5_WPORT PORTD
  2149. #define PD5_PWM NULL
  2150. #define PD5_DDR DDRD
  2151. #undef PD6
  2152. #define PD6_PIN PIND6
  2153. #define PD6_RPORT PIND
  2154. #define PD6_WPORT PORTD
  2155. #define PD6_PWM NULL
  2156. #define PD6_DDR DDRD
  2157. #undef PD7
  2158. #define PD7_PIN PIND7
  2159. #define PD7_RPORT PIND
  2160. #define PD7_WPORT PORTD
  2161. #define PD7_PWM NULL
  2162. #define PD7_DDR DDRD
  2163. #undef PE0
  2164. #define PE0_PIN PINE0
  2165. #define PE0_RPORT PINE
  2166. #define PE0_WPORT PORTE
  2167. #define PE0_PWM NULL
  2168. #define PE0_DDR DDRE
  2169. #undef PE1
  2170. #define PE1_PIN PINE1
  2171. #define PE1_RPORT PINE
  2172. #define PE1_WPORT PORTE
  2173. #define PE1_PWM NULL
  2174. #define PE1_DDR DDRE
  2175. #undef PE2
  2176. #define PE2_PIN PINE2
  2177. #define PE2_RPORT PINE
  2178. #define PE2_WPORT PORTE
  2179. #define PE2_PWM NULL
  2180. #define PE2_DDR DDRE
  2181. #undef PE3
  2182. #define PE3_PIN PINE3
  2183. #define PE3_RPORT PINE
  2184. #define PE3_WPORT PORTE
  2185. #define PE3_PWM NULL
  2186. #define PE3_DDR DDRE
  2187. #undef PE4
  2188. #define PE4_PIN PINE4
  2189. #define PE4_RPORT PINE
  2190. #define PE4_WPORT PORTE
  2191. #define PE4_PWM NULL
  2192. #define PE4_DDR DDRE
  2193. #undef PE5
  2194. #define PE5_PIN PINE5
  2195. #define PE5_RPORT PINE
  2196. #define PE5_WPORT PORTE
  2197. #define PE5_PWM NULL
  2198. #define PE5_DDR DDRE
  2199. #undef PE6
  2200. #define PE6_PIN PINE6
  2201. #define PE6_RPORT PINE
  2202. #define PE6_WPORT PORTE
  2203. #define PE6_PWM NULL
  2204. #define PE6_DDR DDRE
  2205. #undef PE7
  2206. #define PE7_PIN PINE7
  2207. #define PE7_RPORT PINE
  2208. #define PE7_WPORT PORTE
  2209. #define PE7_PWM NULL
  2210. #define PE7_DDR DDRE
  2211. #undef PF0
  2212. #define PF0_PIN PINF0
  2213. #define PF0_RPORT PINF
  2214. #define PF0_WPORT PORTF
  2215. #define PF0_PWM NULL
  2216. #define PF0_DDR DDRF
  2217. #undef PF1
  2218. #define PF1_PIN PINF1
  2219. #define PF1_RPORT PINF
  2220. #define PF1_WPORT PORTF
  2221. #define PF1_PWM NULL
  2222. #define PF1_DDR DDRF
  2223. #undef PF2
  2224. #define PF2_PIN PINF2
  2225. #define PF2_RPORT PINF
  2226. #define PF2_WPORT PORTF
  2227. #define PF2_PWM NULL
  2228. #define PF2_DDR DDRF
  2229. #undef PF3
  2230. #define PF3_PIN PINF3
  2231. #define PF3_RPORT PINF
  2232. #define PF3_WPORT PORTF
  2233. #define PF3_PWM NULL
  2234. #define PF3_DDR DDRF
  2235. #undef PF4
  2236. #define PF4_PIN PINF4
  2237. #define PF4_RPORT PINF
  2238. #define PF4_WPORT PORTF
  2239. #define PF4_PWM NULL
  2240. #define PF4_DDR DDRF
  2241. #undef PF5
  2242. #define PF5_PIN PINF5
  2243. #define PF5_RPORT PINF
  2244. #define PF5_WPORT PORTF
  2245. #define PF5_PWM NULL
  2246. #define PF5_DDR DDRF
  2247. #undef PF6
  2248. #define PF6_PIN PINF6
  2249. #define PF6_RPORT PINF
  2250. #define PF6_WPORT PORTF
  2251. #define PF6_PWM NULL
  2252. #define PF6_DDR DDRF
  2253. #undef PF7
  2254. #define PF7_PIN PINF7
  2255. #define PF7_RPORT PINF
  2256. #define PF7_WPORT PORTF
  2257. #define PF7_PWM NULL
  2258. #define PF7_DDR DDRF
  2259. #endif
  2260. #ifndef DIO0_PIN
  2261. #error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request
  2262. #endif
  2263. #endif /* _ARDUINO_H */