My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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