My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

fastio.h 100KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * Contributed by Triffid_Hunter, modified by Kliment, extended by the Marlin team
  24. * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
  25. */
  26. #ifndef _FASTIO_ARDUINO_H
  27. #define _FASTIO_ARDUINO_H
  28. #include <avr/io.h>
  29. #ifndef _BV
  30. #define _BV(PIN) (1 << PIN)
  31. #endif
  32. /**
  33. * Magic I/O routines
  34. *
  35. * Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
  36. */
  37. #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))
  38. // On some boards pins > 0x100 are used. These are not converted to atomic actions. A critical section is needed.
  39. #define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)
  40. #define _WRITE_C(IO, v) do { if (v) { \
  41. CRITICAL_SECTION_START; \
  42. {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } \
  43. CRITICAL_SECTION_END; \
  44. } \
  45. else { \
  46. CRITICAL_SECTION_START; \
  47. {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } \
  48. CRITICAL_SECTION_END; \
  49. } \
  50. } \
  51. while (0)
  52. #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)
  53. #define _TOGGLE(IO) do {DIO ## IO ## _RPORT ^= _BV(DIO ## IO ## _PIN); } while (0)
  54. #define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0)
  55. #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)
  56. #define _GET_INPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) == 0)
  57. #define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) != 0)
  58. #define _GET_TIMER(IO) (DIO ## IO ## _PWM)
  59. #define READ(IO) _READ(IO)
  60. #define WRITE(IO,V) _WRITE(IO,V)
  61. #define TOGGLE(IO) _TOGGLE(IO)
  62. #define SET_INPUT(IO) _SET_INPUT(IO)
  63. #define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
  64. #define SET_OUTPUT(IO) _SET_OUTPUT(IO)
  65. #define GET_INPUT(IO) _GET_INPUT(IO)
  66. #define GET_OUTPUT(IO) _GET_OUTPUT(IO)
  67. #define GET_TIMER(IO) _GET_TIMER(IO)
  68. #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)
  69. /**
  70. * Timer and Interrupt Control
  71. */
  72. // Waveform Generation Modes
  73. typedef enum {
  74. WGM_NORMAL, // 0
  75. WGM_PWM_PC_8, // 1
  76. WGM_PWM_PC_9, // 2
  77. WGM_PWM_PC_10, // 3
  78. WGM_CTC_OCRnA, // 4 COM OCnx
  79. WGM_FAST_PWM_8, // 5
  80. WGM_FAST_PWM_9, // 6
  81. WGM_FAST_PWM_10, // 7
  82. WGM_PWM_PC_FC_ICRn, // 8
  83. WGM_PWM_PC_FC_OCRnA, // 9 COM OCnA
  84. WGM_PWM_PC_ICRn, // 10
  85. WGM_PWM_PC_OCRnA, // 11 COM OCnA
  86. WGM_CTC_ICRn, // 12 COM OCnx
  87. WGM_reserved, // 13
  88. WGM_FAST_PWM_ICRn, // 14 COM OCnA
  89. WGM_FAST_PWM_OCRnA // 15 COM OCnA
  90. } WaveGenMode;
  91. // Compare Modes
  92. typedef enum {
  93. COM_NORMAL, // 0
  94. COM_TOGGLE, // 1 Non-PWM: OCnx ... Both PWM (WGM 9,11,14,15): OCnA only ... else NORMAL
  95. COM_CLEAR_SET, // 2 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
  96. COM_SET_CLEAR // 3 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
  97. } CompareMode;
  98. // Clock Sources
  99. typedef enum {
  100. CS_NONE, // 0
  101. CS_PRESCALER_1, // 1
  102. CS_PRESCALER_8, // 2
  103. CS_PRESCALER_64, // 3
  104. CS_PRESCALER_256, // 4
  105. CS_PRESCALER_1024, // 5
  106. CS_EXT_FALLING, // 6
  107. CS_EXT_RISING // 7
  108. } ClockSource;
  109. // Clock Sources (Timer 2 only)
  110. typedef enum {
  111. CS2_NONE, // 0
  112. CS2_PRESCALER_1, // 1
  113. CS2_PRESCALER_8, // 2
  114. CS2_PRESCALER_32, // 3
  115. CS2_PRESCALER_64, // 4
  116. CS2_PRESCALER_128, // 5
  117. CS2_PRESCALER_256, // 6
  118. CS2_PRESCALER_1024 // 7
  119. } ClockSource2;
  120. // Get interrupt bits in an orderly way
  121. #define GET_WGM(T) (((TCCR##T##A >> WGM##T##0) & 0x3) | ((TCCR##T##B >> WGM##T##2 << 2) & 0xC))
  122. #define GET_CS(T) ((TCCR##T##B >> CS##T##0) & 0x7)
  123. #define GET_COM(T,Q) ((TCCR##T##Q >> COM##T##Q##0) & 0x3)
  124. #define GET_COMA(T) GET_COM(T,A)
  125. #define GET_COMB(T) GET_COM(T,B)
  126. #define GET_COMC(T) GET_COM(T,C)
  127. #define GET_ICNC(T) (!!(TCCR##T##B & _BV(ICNC##T)))
  128. #define GET_ICES(T) (!!(TCCR##T##B & _BV(ICES##T)))
  129. #define GET_FOC(T,Q) (!!(TCCR##T##C & _BV(FOC##T##Q)))
  130. #define GET_FOCA(T) GET_FOC(T,A)
  131. #define GET_FOCB(T) GET_FOC(T,B)
  132. #define GET_FOCC(T) GET_FOC(T,C)
  133. // Set Wave Generation Mode bits
  134. #define _SET_WGM(T,V) do{ \
  135. TCCR##T##A = (TCCR##T##A & ~(0x3 << WGM##T##0)) | (( int(V) & 0x3) << WGM##T##0); \
  136. TCCR##T##B = (TCCR##T##B & ~(0x3 << WGM##T##2)) | (((int(V) >> 2) & 0x3) << WGM##T##2); \
  137. }while(0)
  138. #define SET_WGM(T,V) _SET_WGM(T,WGM_##V)
  139. // Set Clock Select bits
  140. #define _SET_CS(T,V) (TCCR##T##B = (TCCR##T##B & ~(0x7 << CS##T##0)) | ((int(V) & 0x7) << CS##T##0))
  141. #define _SET_CS0(V) _SET_CS(0,V)
  142. #define _SET_CS1(V) _SET_CS(1,V)
  143. #ifdef TCCR2
  144. #define _SET_CS2(V) (TCCR2 = (TCCR2 & ~(0x7 << CS20)) | (int(V) << CS20))
  145. #else
  146. #define _SET_CS2(V) _SET_CS(2,V)
  147. #endif
  148. #define _SET_CS3(V) _SET_CS(3,V)
  149. #define _SET_CS4(V) _SET_CS(4,V)
  150. #define _SET_CS5(V) _SET_CS(5,V)
  151. #define SET_CS0(V) _SET_CS0(CS_##V)
  152. #define SET_CS1(V) _SET_CS1(CS_##V)
  153. #ifdef TCCR2
  154. #define SET_CS2(V) _SET_CS2(CS2_##V)
  155. #else
  156. #define SET_CS2(V) _SET_CS2(CS_##V)
  157. #endif
  158. #define SET_CS3(V) _SET_CS3(CS_##V)
  159. #define SET_CS4(V) _SET_CS4(CS_##V)
  160. #define SET_CS5(V) _SET_CS5(CS_##V)
  161. #define SET_CS(T,V) SET_CS##T(V)
  162. // Set Compare Mode bits
  163. #define _SET_COM(T,Q,V) (TCCR##T##Q = (TCCR##T##Q & ~(0x3 << COM##T##Q##0)) | (int(V) << COM##T##Q##0))
  164. #define _SET_COMA(T,V) _SET_COM(T,A,V)
  165. #define _SET_COMB(T,V) _SET_COM(T,B,V)
  166. #define _SET_COMC(T,V) _SET_COM(T,C,V)
  167. #define _SET_COMS(T,V1,V2,V3) do{ _SET_COMA(T,V1); _SET_COMB(T,V2); _SET_COMC(T,V3); }while(0)
  168. #define SET_COM(T,Q,V) _SET_COM(T,Q,COM_##V)
  169. #define SET_COMA(T,V) SET_COM(T,A,V)
  170. #define SET_COMB(T,V) SET_COM(T,B,V)
  171. #define SET_COMC(T,V) SET_COM(T,C,V)
  172. #define SET_COMS(T,V1,V2,V3) do{ SET_COMA(T,V1); SET_COMB(T,V2); SET_COMC(T,V3); }while(0)
  173. // Set Noise Canceler bit
  174. #define SET_ICNC(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICNC##T) : TCCR##T##B & ~_BV(ICNC##T))
  175. // Set Input Capture Edge Select bit
  176. #define SET_ICES(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICES##T) : TCCR##T##B & ~_BV(ICES##T))
  177. // Set Force Output Compare bit
  178. #define SET_FOC(T,Q,V) (TCCR##T##C = (V) ? TCCR##T##C | _BV(FOC##T##Q) : TCCR##T##C & ~_BV(FOC##T##Q))
  179. #define SET_FOCA(T,V) SET_FOC(T,A,V)
  180. #define SET_FOCB(T,V) SET_FOC(T,B,V)
  181. #define SET_FOCC(T,V) SET_FOC(T,C,V)
  182. /**
  183. * Ports and Functions
  184. */
  185. #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
  186. // UART
  187. #define RXD DIO0
  188. #define TXD DIO1
  189. // SPI
  190. #define SCK DIO13
  191. #define MISO DIO12
  192. #define MOSI DIO11
  193. #define SS DIO10
  194. // TWI (I2C)
  195. #define SCL AIO5
  196. #define SDA AIO4
  197. // timers and PWM
  198. #define OC0A DIO6
  199. #define OC0B DIO5
  200. #define OC1A DIO9
  201. #define OC1B DIO10
  202. #define OC2A DIO11
  203. #define OC2B DIO3
  204. #define DEBUG_LED AIO5
  205. /**
  206. * Pins Info
  207. */
  208. #define DIO0_PIN PIND0
  209. #define DIO0_RPORT PIND
  210. #define DIO0_WPORT PORTD
  211. #define DIO0_DDR DDRD
  212. #define DIO0_PWM NULL
  213. #define DIO1_PIN PIND1
  214. #define DIO1_RPORT PIND
  215. #define DIO1_WPORT PORTD
  216. #define DIO1_DDR DDRD
  217. #define DIO1_PWM NULL
  218. #define DIO2_PIN PIND2
  219. #define DIO2_RPORT PIND
  220. #define DIO2_WPORT PORTD
  221. #define DIO2_DDR DDRD
  222. #define DIO2_PWM NULL
  223. #define DIO3_PIN PIND3
  224. #define DIO3_RPORT PIND
  225. #define DIO3_WPORT PORTD
  226. #define DIO3_DDR DDRD
  227. #define DIO3_PWM &OCR2B
  228. #define DIO4_PIN PIND4
  229. #define DIO4_RPORT PIND
  230. #define DIO4_WPORT PORTD
  231. #define DIO4_DDR DDRD
  232. #define DIO4_PWM NULL
  233. #define DIO5_PIN PIND5
  234. #define DIO5_RPORT PIND
  235. #define DIO5_WPORT PORTD
  236. #define DIO5_DDR DDRD
  237. #define DIO5_PWM &OCR0B
  238. #define DIO6_PIN PIND6
  239. #define DIO6_RPORT PIND
  240. #define DIO6_WPORT PORTD
  241. #define DIO6_DDR DDRD
  242. #define DIO6_PWM &OCR0A
  243. #define DIO7_PIN PIND7
  244. #define DIO7_RPORT PIND
  245. #define DIO7_WPORT PORTD
  246. #define DIO7_DDR DDRD
  247. #define DIO7_PWM NULL
  248. #define DIO8_PIN PINB0
  249. #define DIO8_RPORT PINB
  250. #define DIO8_WPORT PORTB
  251. #define DIO8_DDR DDRB
  252. #define DIO8_PWM NULL
  253. #define DIO9_PIN PINB1
  254. #define DIO9_RPORT PINB
  255. #define DIO9_WPORT PORTB
  256. #define DIO9_DDR DDRB
  257. #define DIO9_PWM NULL
  258. #define DIO10_PIN PINB2
  259. #define DIO10_RPORT PINB
  260. #define DIO10_WPORT PORTB
  261. #define DIO10_DDR DDRB
  262. #define DIO10_PWM NULL
  263. #define DIO11_PIN PINB3
  264. #define DIO11_RPORT PINB
  265. #define DIO11_WPORT PORTB
  266. #define DIO11_DDR DDRB
  267. #define DIO11_PWM &OCR2A
  268. #define DIO12_PIN PINB4
  269. #define DIO12_RPORT PINB
  270. #define DIO12_WPORT PORTB
  271. #define DIO12_DDR DDRB
  272. #define DIO12_PWM NULL
  273. #define DIO13_PIN PINB5
  274. #define DIO13_RPORT PINB
  275. #define DIO13_WPORT PORTB
  276. #define DIO13_DDR DDRB
  277. #define DIO13_PWM NULL
  278. #define DIO14_PIN PINC0
  279. #define DIO14_RPORT PINC
  280. #define DIO14_WPORT PORTC
  281. #define DIO14_DDR DDRC
  282. #define DIO14_PWM NULL
  283. #define DIO15_PIN PINC1
  284. #define DIO15_RPORT PINC
  285. #define DIO15_WPORT PORTC
  286. #define DIO15_DDR DDRC
  287. #define DIO15_PWM NULL
  288. #define DIO16_PIN PINC2
  289. #define DIO16_RPORT PINC
  290. #define DIO16_WPORT PORTC
  291. #define DIO16_DDR DDRC
  292. #define DIO16_PWM NULL
  293. #define DIO17_PIN PINC3
  294. #define DIO17_RPORT PINC
  295. #define DIO17_WPORT PORTC
  296. #define DIO17_DDR DDRC
  297. #define DIO17_PWM NULL
  298. #define DIO18_PIN PINC4
  299. #define DIO18_RPORT PINC
  300. #define DIO18_WPORT PORTC
  301. #define DIO18_DDR DDRC
  302. #define DIO18_PWM NULL
  303. #define DIO19_PIN PINC5
  304. #define DIO19_RPORT PINC
  305. #define DIO19_WPORT PORTC
  306. #define DIO19_DDR DDRC
  307. #define DIO19_PWM NULL
  308. #define DIO20_PIN PINC6
  309. #define DIO20_RPORT PINC
  310. #define DIO20_WPORT PORTC
  311. #define DIO20_DDR DDRC
  312. #define DIO20_PWM NULL
  313. #define DIO21_PIN PINC7
  314. #define DIO21_RPORT PINC
  315. #define DIO21_WPORT PORTC
  316. #define DIO21_DDR DDRC
  317. #define DIO21_PWM NULL
  318. #undef PB0
  319. #define PB0_PIN PINB0
  320. #define PB0_RPORT PINB
  321. #define PB0_WPORT PORTB
  322. #define PB0_DDR DDRB
  323. #define PB0_PWM NULL
  324. #undef PB1
  325. #define PB1_PIN PINB1
  326. #define PB1_RPORT PINB
  327. #define PB1_WPORT PORTB
  328. #define PB1_DDR DDRB
  329. #define PB1_PWM NULL
  330. #undef PB2
  331. #define PB2_PIN PINB2
  332. #define PB2_RPORT PINB
  333. #define PB2_WPORT PORTB
  334. #define PB2_DDR DDRB
  335. #define PB2_PWM NULL
  336. #undef PB3
  337. #define PB3_PIN PINB3
  338. #define PB3_RPORT PINB
  339. #define PB3_WPORT PORTB
  340. #define PB3_DDR DDRB
  341. #define PB3_PWM &OCR2A
  342. #undef PB4
  343. #define PB4_PIN PINB4
  344. #define PB4_RPORT PINB
  345. #define PB4_WPORT PORTB
  346. #define PB4_DDR DDRB
  347. #define PB4_PWM NULL
  348. #undef PB5
  349. #define PB5_PIN PINB5
  350. #define PB5_RPORT PINB
  351. #define PB5_WPORT PORTB
  352. #define PB5_DDR DDRB
  353. #define PB5_PWM NULL
  354. #undef PB6
  355. #define PB6_PIN PINB6
  356. #define PB6_RPORT PINB
  357. #define PB6_WPORT PORTB
  358. #define PB6_DDR DDRB
  359. #define PB6_PWM NULL
  360. #undef PB7
  361. #define PB7_PIN PINB7
  362. #define PB7_RPORT PINB
  363. #define PB7_WPORT PORTB
  364. #define PB7_DDR DDRB
  365. #define PB7_PWM NULL
  366. #undef PC0
  367. #define PC0_PIN PINC0
  368. #define PC0_RPORT PINC
  369. #define PC0_WPORT PORTC
  370. #define PC0_DDR DDRC
  371. #define PC0_PWM NULL
  372. #undef PC1
  373. #define PC1_PIN PINC1
  374. #define PC1_RPORT PINC
  375. #define PC1_WPORT PORTC
  376. #define PC1_DDR DDRC
  377. #define PC1_PWM NULL
  378. #undef PC2
  379. #define PC2_PIN PINC2
  380. #define PC2_RPORT PINC
  381. #define PC2_WPORT PORTC
  382. #define PC2_DDR DDRC
  383. #define PC2_PWM NULL
  384. #undef PC3
  385. #define PC3_PIN PINC3
  386. #define PC3_RPORT PINC
  387. #define PC3_WPORT PORTC
  388. #define PC3_DDR DDRC
  389. #define PC3_PWM NULL
  390. #undef PC4
  391. #define PC4_PIN PINC4
  392. #define PC4_RPORT PINC
  393. #define PC4_WPORT PORTC
  394. #define PC4_DDR DDRC
  395. #define PC4_PWM NULL
  396. #undef PC5
  397. #define PC5_PIN PINC5
  398. #define PC5_RPORT PINC
  399. #define PC5_WPORT PORTC
  400. #define PC5_DDR DDRC
  401. #define PC5_PWM NULL
  402. #undef PC6
  403. #define PC6_PIN PINC6
  404. #define PC6_RPORT PINC
  405. #define PC6_WPORT PORTC
  406. #define PC6_DDR DDRC
  407. #define PC6_PWM NULL
  408. #undef PC7
  409. #define PC7_PIN PINC7
  410. #define PC7_RPORT PINC
  411. #define PC7_WPORT PORTC
  412. #define PC7_DDR DDRC
  413. #define PC7_PWM NULL
  414. #undef PD0
  415. #define PD0_PIN PIND0
  416. #define PD0_RPORT PIND
  417. #define PD0_WPORT PORTD
  418. #define PD0_DDR DDRD
  419. #define PD0_PWM NULL
  420. #undef PD1
  421. #define PD1_PIN PIND1
  422. #define PD1_RPORT PIND
  423. #define PD1_WPORT PORTD
  424. #define PD1_DDR DDRD
  425. #define PD1_PWM NULL
  426. #undef PD2
  427. #define PD2_PIN PIND2
  428. #define PD2_RPORT PIND
  429. #define PD2_WPORT PORTD
  430. #define PD2_DDR DDRD
  431. #define PD2_PWM NULL
  432. #undef PD3
  433. #define PD3_PIN PIND3
  434. #define PD3_RPORT PIND
  435. #define PD3_WPORT PORTD
  436. #define PD3_DDR DDRD
  437. #define PD3_PWM &OCR2B
  438. #undef PD4
  439. #define PD4_PIN PIND4
  440. #define PD4_RPORT PIND
  441. #define PD4_WPORT PORTD
  442. #define PD4_DDR DDRD
  443. #define PD4_PWM NULL
  444. #undef PD5
  445. #define PD5_PIN PIND5
  446. #define PD5_RPORT PIND
  447. #define PD5_WPORT PORTD
  448. #define PD5_DDR DDRD
  449. #define PD5_PWM &OCR0B
  450. #undef PD6
  451. #define PD6_PIN PIND6
  452. #define PD6_RPORT PIND
  453. #define PD6_WPORT PORTD
  454. #define PD6_DDR DDRD
  455. #define PD6_PWM &OCR0A
  456. #undef PD7
  457. #define PD7_PIN PIND7
  458. #define PD7_RPORT PIND
  459. #define PD7_WPORT PORTD
  460. #define PD7_DDR DDRD
  461. #define PD7_PWM NULL
  462. #endif // __AVR_ATmega(168|328|328P)__
  463. #if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
  464. // UART
  465. #define RXD DIO8
  466. #define TXD DIO9
  467. #define RXD0 DIO8
  468. #define TXD0 DIO9
  469. #define RXD1 DIO10
  470. #define TXD1 DIO11
  471. // SPI
  472. #define SCK DIO7
  473. #define MISO DIO6
  474. #define MOSI DIO5
  475. #define SS DIO4
  476. // TWI (I2C)
  477. #define SCL DIO16
  478. #define SDA DIO17
  479. // timers and PWM
  480. #define OC0A DIO3
  481. #define OC0B DIO4
  482. #define OC1A DIO13
  483. #define OC1B DIO12
  484. #define OC2A DIO15
  485. #define OC2B DIO14
  486. #define DEBUG_LED DIO0
  487. /**
  488. * Pins Info
  489. */
  490. #define DIO0_PIN PINB0
  491. #define DIO0_RPORT PINB
  492. #define DIO0_WPORT PORTB
  493. #define DIO0_DDR DDRB
  494. #define DIO0_PWM NULL
  495. #define DIO1_PIN PINB1
  496. #define DIO1_RPORT PINB
  497. #define DIO1_WPORT PORTB
  498. #define DIO1_DDR DDRB
  499. #define DIO1_PWM NULL
  500. #define DIO2_PIN PINB2
  501. #define DIO2_RPORT PINB
  502. #define DIO2_WPORT PORTB
  503. #define DIO2_DDR DDRB
  504. #define DIO2_PWM NULL
  505. #define DIO3_PIN PINB3
  506. #define DIO3_RPORT PINB
  507. #define DIO3_WPORT PORTB
  508. #define DIO3_DDR DDRB
  509. #define DIO3_PWM OCR0A
  510. #define DIO4_PIN PINB4
  511. #define DIO4_RPORT PINB
  512. #define DIO4_WPORT PORTB
  513. #define DIO4_DDR DDRB
  514. #define DIO4_PWM OCR0B
  515. #define DIO5_PIN PINB5
  516. #define DIO5_RPORT PINB
  517. #define DIO5_WPORT PORTB
  518. #define DIO5_DDR DDRB
  519. #define DIO5_PWM NULL
  520. #define DIO6_PIN PINB6
  521. #define DIO6_RPORT PINB
  522. #define DIO6_WPORT PORTB
  523. #define DIO6_DDR DDRB
  524. #define DIO6_PWM NULL
  525. #define DIO7_PIN PINB7
  526. #define DIO7_RPORT PINB
  527. #define DIO7_WPORT PORTB
  528. #define DIO7_DDR DDRB
  529. #define DIO7_PWM NULL
  530. #define DIO8_PIN PIND0
  531. #define DIO8_RPORT PIND
  532. #define DIO8_WPORT PORTD
  533. #define DIO8_DDR DDRD
  534. #define DIO8_PWM NULL
  535. #define DIO9_PIN PIND1
  536. #define DIO9_RPORT PIND
  537. #define DIO9_WPORT PORTD
  538. #define DIO9_DDR DDRD
  539. #define DIO9_PWM NULL
  540. #define DIO10_PIN PIND2
  541. #define DIO10_RPORT PIND
  542. #define DIO10_WPORT PORTD
  543. #define DIO10_DDR DDRD
  544. #define DIO10_PWM NULL
  545. #define DIO11_PIN PIND3
  546. #define DIO11_RPORT PIND
  547. #define DIO11_WPORT PORTD
  548. #define DIO11_DDR DDRD
  549. #define DIO11_PWM NULL
  550. #define DIO12_PIN PIND4
  551. #define DIO12_RPORT PIND
  552. #define DIO12_WPORT PORTD
  553. #define DIO12_DDR DDRD
  554. #define DIO12_PWM OCR1B
  555. #define DIO13_PIN PIND5
  556. #define DIO13_RPORT PIND
  557. #define DIO13_WPORT PORTD
  558. #define DIO13_DDR DDRD
  559. #define DIO13_PWM OCR1A
  560. #define DIO14_PIN PIND6
  561. #define DIO14_RPORT PIND
  562. #define DIO14_WPORT PORTD
  563. #define DIO14_DDR DDRD
  564. #define DIO14_PWM OCR2B
  565. #define DIO15_PIN PIND7
  566. #define DIO15_RPORT PIND
  567. #define DIO15_WPORT PORTD
  568. #define DIO15_DDR DDRD
  569. #define DIO15_PWM OCR2A
  570. #define DIO16_PIN PINC0
  571. #define DIO16_RPORT PINC
  572. #define DIO16_WPORT PORTC
  573. #define DIO16_DDR DDRC
  574. #define DIO16_PWM NULL
  575. #define DIO17_PIN PINC1
  576. #define DIO17_RPORT PINC
  577. #define DIO17_WPORT PORTC
  578. #define DIO17_DDR DDRC
  579. #define DIO17_PWM NULL
  580. #define DIO18_PIN PINC2
  581. #define DIO18_RPORT PINC
  582. #define DIO18_WPORT PORTC
  583. #define DIO18_DDR DDRC
  584. #define DIO18_PWM NULL
  585. #define DIO19_PIN PINC3
  586. #define DIO19_RPORT PINC
  587. #define DIO19_WPORT PORTC
  588. #define DIO19_DDR DDRC
  589. #define DIO19_PWM NULL
  590. #define DIO20_PIN PINC4
  591. #define DIO20_RPORT PINC
  592. #define DIO20_WPORT PORTC
  593. #define DIO20_DDR DDRC
  594. #define DIO20_PWM NULL
  595. #define DIO21_PIN PINC5
  596. #define DIO21_RPORT PINC
  597. #define DIO21_WPORT PORTC
  598. #define DIO21_DDR DDRC
  599. #define DIO21_PWM NULL
  600. #define DIO22_PIN PINC6
  601. #define DIO22_RPORT PINC
  602. #define DIO22_WPORT PORTC
  603. #define DIO22_DDR DDRC
  604. #define DIO22_PWM NULL
  605. #define DIO23_PIN PINC7
  606. #define DIO23_RPORT PINC
  607. #define DIO23_WPORT PORTC
  608. #define DIO23_DDR DDRC
  609. #define DIO23_PWM NULL
  610. #define DIO24_PIN PINA7
  611. #define DIO24_RPORT PINA
  612. #define DIO24_WPORT PORTA
  613. #define DIO24_DDR DDRA
  614. #define DIO24_PWM NULL
  615. #define DIO25_PIN PINA6
  616. #define DIO25_RPORT PINA
  617. #define DIO25_WPORT PORTA
  618. #define DIO25_DDR DDRA
  619. #define DIO25_PWM NULL
  620. #define DIO26_PIN PINA5
  621. #define DIO26_RPORT PINA
  622. #define DIO26_WPORT PORTA
  623. #define DIO26_DDR DDRA
  624. #define DIO26_PWM NULL
  625. #define DIO27_PIN PINA4
  626. #define DIO27_RPORT PINA
  627. #define DIO27_WPORT PORTA
  628. #define DIO27_DDR DDRA
  629. #define DIO27_PWM NULL
  630. #define DIO28_PIN PINA3
  631. #define DIO28_RPORT PINA
  632. #define DIO28_WPORT PORTA
  633. #define DIO28_DDR DDRA
  634. #define DIO28_PWM NULL
  635. #define DIO29_PIN PINA2
  636. #define DIO29_RPORT PINA
  637. #define DIO29_WPORT PORTA
  638. #define DIO29_DDR DDRA
  639. #define DIO29_PWM NULL
  640. #define DIO30_PIN PINA1
  641. #define DIO30_RPORT PINA
  642. #define DIO30_WPORT PORTA
  643. #define DIO30_DDR DDRA
  644. #define DIO30_PWM NULL
  645. #define DIO31_PIN PINA0
  646. #define DIO31_RPORT PINA
  647. #define DIO31_WPORT PORTA
  648. #define DIO31_DDR DDRA
  649. #define DIO31_PWM NULL
  650. #define AIO0_PIN PINA0
  651. #define AIO0_RPORT PINA
  652. #define AIO0_WPORT PORTA
  653. #define AIO0_DDR DDRA
  654. #define AIO0_PWM NULL
  655. #define AIO1_PIN PINA1
  656. #define AIO1_RPORT PINA
  657. #define AIO1_WPORT PORTA
  658. #define AIO1_DDR DDRA
  659. #define AIO1_PWM NULL
  660. #define AIO2_PIN PINA2
  661. #define AIO2_RPORT PINA
  662. #define AIO2_WPORT PORTA
  663. #define AIO2_DDR DDRA
  664. #define AIO2_PWM NULL
  665. #define AIO3_PIN PINA3
  666. #define AIO3_RPORT PINA
  667. #define AIO3_WPORT PORTA
  668. #define AIO3_DDR DDRA
  669. #define AIO3_PWM NULL
  670. #define AIO4_PIN PINA4
  671. #define AIO4_RPORT PINA
  672. #define AIO4_WPORT PORTA
  673. #define AIO4_DDR DDRA
  674. #define AIO4_PWM NULL
  675. #define AIO5_PIN PINA5
  676. #define AIO5_RPORT PINA
  677. #define AIO5_WPORT PORTA
  678. #define AIO5_DDR DDRA
  679. #define AIO5_PWM NULL
  680. #define AIO6_PIN PINA6
  681. #define AIO6_RPORT PINA
  682. #define AIO6_WPORT PORTA
  683. #define AIO6_DDR DDRA
  684. #define AIO6_PWM NULL
  685. #define AIO7_PIN PINA7
  686. #define AIO7_RPORT PINA
  687. #define AIO7_WPORT PORTA
  688. #define AIO7_DDR DDRA
  689. #define AIO7_PWM NULL
  690. #undef PA0
  691. #define PA0_PIN PINA0
  692. #define PA0_RPORT PINA
  693. #define PA0_WPORT PORTA
  694. #define PA0_DDR DDRA
  695. #define PA0_PWM NULL
  696. #undef PA1
  697. #define PA1_PIN PINA1
  698. #define PA1_RPORT PINA
  699. #define PA1_WPORT PORTA
  700. #define PA1_DDR DDRA
  701. #define PA1_PWM NULL
  702. #undef PA2
  703. #define PA2_PIN PINA2
  704. #define PA2_RPORT PINA
  705. #define PA2_WPORT PORTA
  706. #define PA2_DDR DDRA
  707. #define PA2_PWM NULL
  708. #undef PA3
  709. #define PA3_PIN PINA3
  710. #define PA3_RPORT PINA
  711. #define PA3_WPORT PORTA
  712. #define PA3_DDR DDRA
  713. #define PA3_PWM NULL
  714. #undef PA4
  715. #define PA4_PIN PINA4
  716. #define PA4_RPORT PINA
  717. #define PA4_WPORT PORTA
  718. #define PA4_DDR DDRA
  719. #define PA4_PWM NULL
  720. #undef PA5
  721. #define PA5_PIN PINA5
  722. #define PA5_RPORT PINA
  723. #define PA5_WPORT PORTA
  724. #define PA5_DDR DDRA
  725. #define PA5_PWM NULL
  726. #undef PA6
  727. #define PA6_PIN PINA6
  728. #define PA6_RPORT PINA
  729. #define PA6_WPORT PORTA
  730. #define PA6_DDR DDRA
  731. #define PA6_PWM NULL
  732. #undef PA7
  733. #define PA7_PIN PINA7
  734. #define PA7_RPORT PINA
  735. #define PA7_WPORT PORTA
  736. #define PA7_DDR DDRA
  737. #define PA7_PWM NULL
  738. #undef PB0
  739. #define PB0_PIN PINB0
  740. #define PB0_RPORT PINB
  741. #define PB0_WPORT PORTB
  742. #define PB0_DDR DDRB
  743. #define PB0_PWM NULL
  744. #undef PB1
  745. #define PB1_PIN PINB1
  746. #define PB1_RPORT PINB
  747. #define PB1_WPORT PORTB
  748. #define PB1_DDR DDRB
  749. #define PB1_PWM NULL
  750. #undef PB2
  751. #define PB2_PIN PINB2
  752. #define PB2_RPORT PINB
  753. #define PB2_WPORT PORTB
  754. #define PB2_DDR DDRB
  755. #define PB2_PWM NULL
  756. #undef PB3
  757. #define PB3_PIN PINB3
  758. #define PB3_RPORT PINB
  759. #define PB3_WPORT PORTB
  760. #define PB3_DDR DDRB
  761. #define PB3_PWM OCR0A
  762. #undef PB4
  763. #define PB4_PIN PINB4
  764. #define PB4_RPORT PINB
  765. #define PB4_WPORT PORTB
  766. #define PB4_DDR DDRB
  767. #define PB4_PWM OCR0B
  768. #undef PB5
  769. #define PB5_PIN PINB5
  770. #define PB5_RPORT PINB
  771. #define PB5_WPORT PORTB
  772. #define PB5_DDR DDRB
  773. #define PB5_PWM NULL
  774. #undef PB6
  775. #define PB6_PIN PINB6
  776. #define PB6_RPORT PINB
  777. #define PB6_WPORT PORTB
  778. #define PB6_DDR DDRB
  779. #define PB6_PWM NULL
  780. #undef PB7
  781. #define PB7_PIN PINB7
  782. #define PB7_RPORT PINB
  783. #define PB7_WPORT PORTB
  784. #define PB7_DDR DDRB
  785. #define PB7_PWM NULL
  786. #undef PC0
  787. #define PC0_PIN PINC0
  788. #define PC0_RPORT PINC
  789. #define PC0_WPORT PORTC
  790. #define PC0_DDR DDRC
  791. #define PC0_PWM NULL
  792. #undef PC1
  793. #define PC1_PIN PINC1
  794. #define PC1_RPORT PINC
  795. #define PC1_WPORT PORTC
  796. #define PC1_DDR DDRC
  797. #define PC1_PWM NULL
  798. #undef PC2
  799. #define PC2_PIN PINC2
  800. #define PC2_RPORT PINC
  801. #define PC2_WPORT PORTC
  802. #define PC2_DDR DDRC
  803. #define PC2_PWM NULL
  804. #undef PC3
  805. #define PC3_PIN PINC3
  806. #define PC3_RPORT PINC
  807. #define PC3_WPORT PORTC
  808. #define PC3_DDR DDRC
  809. #define PC3_PWM NULL
  810. #undef PC4
  811. #define PC4_PIN PINC4
  812. #define PC4_RPORT PINC
  813. #define PC4_WPORT PORTC
  814. #define PC4_DDR DDRC
  815. #define PC4_PWM NULL
  816. #undef PC5
  817. #define PC5_PIN PINC5
  818. #define PC5_RPORT PINC
  819. #define PC5_WPORT PORTC
  820. #define PC5_DDR DDRC
  821. #define PC5_PWM NULL
  822. #undef PC6
  823. #define PC6_PIN PINC6
  824. #define PC6_RPORT PINC
  825. #define PC6_WPORT PORTC
  826. #define PC6_DDR DDRC
  827. #define PC6_PWM NULL
  828. #undef PC7
  829. #define PC7_PIN PINC7
  830. #define PC7_RPORT PINC
  831. #define PC7_WPORT PORTC
  832. #define PC7_DDR DDRC
  833. #define PC7_PWM NULL
  834. #undef PD0
  835. #define PD0_PIN PIND0
  836. #define PD0_RPORT PIND
  837. #define PD0_WPORT PORTD
  838. #define PD0_DDR DDRD
  839. #define PD0_PWM NULL
  840. #undef PD1
  841. #define PD1_PIN PIND1
  842. #define PD1_RPORT PIND
  843. #define PD1_WPORT PORTD
  844. #define PD1_DDR DDRD
  845. #define PD1_PWM NULL
  846. #undef PD2
  847. #define PD2_PIN PIND2
  848. #define PD2_RPORT PIND
  849. #define PD2_WPORT PORTD
  850. #define PD2_DDR DDRD
  851. #define PD2_PWM NULL
  852. #undef PD3
  853. #define PD3_PIN PIND3
  854. #define PD3_RPORT PIND
  855. #define PD3_WPORT PORTD
  856. #define PD3_DDR DDRD
  857. #define PD3_PWM NULL
  858. #undef PD4
  859. #define PD4_PIN PIND4
  860. #define PD4_RPORT PIND
  861. #define PD4_WPORT PORTD
  862. #define PD4_DDR DDRD
  863. #define PD4_PWM NULL
  864. #undef PD5
  865. #define PD5_PIN PIND5
  866. #define PD5_RPORT PIND
  867. #define PD5_WPORT PORTD
  868. #define PD5_DDR DDRD
  869. #define PD5_PWM NULL
  870. #undef PD6
  871. #define PD6_PIN PIND6
  872. #define PD6_RPORT PIND
  873. #define PD6_WPORT PORTD
  874. #define PD6_DDR DDRD
  875. #define PD6_PWM OCR2B
  876. #undef PD7
  877. #define PD7_PIN PIND7
  878. #define PD7_RPORT PIND
  879. #define PD7_WPORT PORTD
  880. #define PD7_DDR DDRD
  881. #define PD7_PWM OCR2A
  882. #endif // __AVR_ATmega(644|644P|644PA)__
  883. #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  884. // UART
  885. #define RXD DIO0
  886. #define TXD DIO1
  887. // SPI
  888. #define SCK DIO52
  889. #define MISO DIO50
  890. #define MOSI DIO51
  891. #define SS DIO53
  892. // TWI (I2C)
  893. #define SCL DIO21
  894. #define SDA DIO20
  895. // timers and PWM
  896. #define OC0A DIO13
  897. #define OC0B DIO4
  898. #define OC1A DIO11
  899. #define OC1B DIO12
  900. #define OC2A DIO10
  901. #define OC2B DIO9
  902. #define OC3A DIO5
  903. #define OC3B DIO2
  904. #define OC3C DIO3
  905. #define OC4A DIO6
  906. #define OC4B DIO7
  907. #define OC4C DIO8
  908. #define OC5A DIO46
  909. #define OC5B DIO45
  910. #define OC5C DIO44
  911. // change for your board
  912. #define DEBUG_LED DIO21
  913. /**
  914. * Pins Info
  915. */
  916. #define DIO0_PIN PINE0
  917. #define DIO0_RPORT PINE
  918. #define DIO0_WPORT PORTE
  919. #define DIO0_DDR DDRE
  920. #define DIO0_PWM NULL
  921. #define DIO1_PIN PINE1
  922. #define DIO1_RPORT PINE
  923. #define DIO1_WPORT PORTE
  924. #define DIO1_DDR DDRE
  925. #define DIO1_PWM NULL
  926. #define DIO2_PIN PINE4
  927. #define DIO2_RPORT PINE
  928. #define DIO2_WPORT PORTE
  929. #define DIO2_DDR DDRE
  930. #define DIO2_PWM &OCR3BL
  931. #define DIO3_PIN PINE5
  932. #define DIO3_RPORT PINE
  933. #define DIO3_WPORT PORTE
  934. #define DIO3_DDR DDRE
  935. #define DIO3_PWM &OCR3CL
  936. #define DIO4_PIN PING5
  937. #define DIO4_RPORT PING
  938. #define DIO4_WPORT PORTG
  939. #define DIO4_DDR DDRG
  940. #define DIO4_PWM &OCR0B
  941. #define DIO5_PIN PINE3
  942. #define DIO5_RPORT PINE
  943. #define DIO5_WPORT PORTE
  944. #define DIO5_DDR DDRE
  945. #define DIO5_PWM &OCR3AL
  946. #define DIO6_PIN PINH3
  947. #define DIO6_RPORT PINH
  948. #define DIO6_WPORT PORTH
  949. #define DIO6_DDR DDRH
  950. #define DIO6_PWM &OCR4AL
  951. #define DIO7_PIN PINH4
  952. #define DIO7_RPORT PINH
  953. #define DIO7_WPORT PORTH
  954. #define DIO7_DDR DDRH
  955. #define DIO7_PWM &OCR4BL
  956. #define DIO8_PIN PINH5
  957. #define DIO8_RPORT PINH
  958. #define DIO8_WPORT PORTH
  959. #define DIO8_DDR DDRH
  960. #define DIO8_PWM &OCR4CL
  961. #define DIO9_PIN PINH6
  962. #define DIO9_RPORT PINH
  963. #define DIO9_WPORT PORTH
  964. #define DIO9_DDR DDRH
  965. #define DIO9_PWM &OCR2B
  966. #define DIO10_PIN PINB4
  967. #define DIO10_RPORT PINB
  968. #define DIO10_WPORT PORTB
  969. #define DIO10_DDR DDRB
  970. #define DIO10_PWM &OCR2A
  971. #define DIO11_PIN PINB5
  972. #define DIO11_RPORT PINB
  973. #define DIO11_WPORT PORTB
  974. #define DIO11_DDR DDRB
  975. #define DIO11_PWM NULL
  976. #define DIO12_PIN PINB6
  977. #define DIO12_RPORT PINB
  978. #define DIO12_WPORT PORTB
  979. #define DIO12_DDR DDRB
  980. #define DIO12_PWM NULL
  981. #define DIO13_PIN PINB7
  982. #define DIO13_RPORT PINB
  983. #define DIO13_WPORT PORTB
  984. #define DIO13_DDR DDRB
  985. #define DIO13_PWM &OCR0A
  986. #define DIO14_PIN PINJ1
  987. #define DIO14_RPORT PINJ
  988. #define DIO14_WPORT PORTJ
  989. #define DIO14_DDR DDRJ
  990. #define DIO14_PWM NULL
  991. #define DIO15_PIN PINJ0
  992. #define DIO15_RPORT PINJ
  993. #define DIO15_WPORT PORTJ
  994. #define DIO15_DDR DDRJ
  995. #define DIO15_PWM NULL
  996. #define DIO16_PIN PINH1
  997. #define DIO16_RPORT PINH
  998. #define DIO16_WPORT PORTH
  999. #define DIO16_DDR DDRH
  1000. #define DIO16_PWM NULL
  1001. #define DIO17_PIN PINH0
  1002. #define DIO17_RPORT PINH
  1003. #define DIO17_WPORT PORTH
  1004. #define DIO17_DDR DDRH
  1005. #define DIO17_PWM NULL
  1006. #define DIO18_PIN PIND3
  1007. #define DIO18_RPORT PIND
  1008. #define DIO18_WPORT PORTD
  1009. #define DIO18_DDR DDRD
  1010. #define DIO18_PWM NULL
  1011. #define DIO19_PIN PIND2
  1012. #define DIO19_RPORT PIND
  1013. #define DIO19_WPORT PORTD
  1014. #define DIO19_DDR DDRD
  1015. #define DIO19_PWM NULL
  1016. #define DIO20_PIN PIND1
  1017. #define DIO20_RPORT PIND
  1018. #define DIO20_WPORT PORTD
  1019. #define DIO20_DDR DDRD
  1020. #define DIO20_PWM NULL
  1021. #define DIO21_PIN PIND0
  1022. #define DIO21_RPORT PIND
  1023. #define DIO21_WPORT PORTD
  1024. #define DIO21_DDR DDRD
  1025. #define DIO21_PWM NULL
  1026. #define DIO22_PIN PINA0
  1027. #define DIO22_RPORT PINA
  1028. #define DIO22_WPORT PORTA
  1029. #define DIO22_DDR DDRA
  1030. #define DIO22_PWM NULL
  1031. #define DIO23_PIN PINA1
  1032. #define DIO23_RPORT PINA
  1033. #define DIO23_WPORT PORTA
  1034. #define DIO23_DDR DDRA
  1035. #define DIO23_PWM NULL
  1036. #define DIO24_PIN PINA2
  1037. #define DIO24_RPORT PINA
  1038. #define DIO24_WPORT PORTA
  1039. #define DIO24_DDR DDRA
  1040. #define DIO24_PWM NULL
  1041. #define DIO25_PIN PINA3
  1042. #define DIO25_RPORT PINA
  1043. #define DIO25_WPORT PORTA
  1044. #define DIO25_DDR DDRA
  1045. #define DIO25_PWM NULL
  1046. #define DIO26_PIN PINA4
  1047. #define DIO26_RPORT PINA
  1048. #define DIO26_WPORT PORTA
  1049. #define DIO26_DDR DDRA
  1050. #define DIO26_PWM NULL
  1051. #define DIO27_PIN PINA5
  1052. #define DIO27_RPORT PINA
  1053. #define DIO27_WPORT PORTA
  1054. #define DIO27_DDR DDRA
  1055. #define DIO27_PWM NULL
  1056. #define DIO28_PIN PINA6
  1057. #define DIO28_RPORT PINA
  1058. #define DIO28_WPORT PORTA
  1059. #define DIO28_DDR DDRA
  1060. #define DIO28_PWM NULL
  1061. #define DIO29_PIN PINA7
  1062. #define DIO29_RPORT PINA
  1063. #define DIO29_WPORT PORTA
  1064. #define DIO29_DDR DDRA
  1065. #define DIO29_PWM NULL
  1066. #define DIO30_PIN PINC7
  1067. #define DIO30_RPORT PINC
  1068. #define DIO30_WPORT PORTC
  1069. #define DIO30_DDR DDRC
  1070. #define DIO30_PWM NULL
  1071. #define DIO31_PIN PINC6
  1072. #define DIO31_RPORT PINC
  1073. #define DIO31_WPORT PORTC
  1074. #define DIO31_DDR DDRC
  1075. #define DIO31_PWM NULL
  1076. #define DIO32_PIN PINC5
  1077. #define DIO32_RPORT PINC
  1078. #define DIO32_WPORT PORTC
  1079. #define DIO32_DDR DDRC
  1080. #define DIO32_PWM NULL
  1081. #define DIO33_PIN PINC4
  1082. #define DIO33_RPORT PINC
  1083. #define DIO33_WPORT PORTC
  1084. #define DIO33_DDR DDRC
  1085. #define DIO33_PWM NULL
  1086. #define DIO34_PIN PINC3
  1087. #define DIO34_RPORT PINC
  1088. #define DIO34_WPORT PORTC
  1089. #define DIO34_DDR DDRC
  1090. #define DIO34_PWM NULL
  1091. #define DIO35_PIN PINC2
  1092. #define DIO35_RPORT PINC
  1093. #define DIO35_WPORT PORTC
  1094. #define DIO35_DDR DDRC
  1095. #define DIO35_PWM NULL
  1096. #define DIO36_PIN PINC1
  1097. #define DIO36_RPORT PINC
  1098. #define DIO36_WPORT PORTC
  1099. #define DIO36_DDR DDRC
  1100. #define DIO36_PWM NULL
  1101. #define DIO37_PIN PINC0
  1102. #define DIO37_RPORT PINC
  1103. #define DIO37_WPORT PORTC
  1104. #define DIO37_DDR DDRC
  1105. #define DIO37_PWM NULL
  1106. #define DIO38_PIN PIND7
  1107. #define DIO38_RPORT PIND
  1108. #define DIO38_WPORT PORTD
  1109. #define DIO38_DDR DDRD
  1110. #define DIO38_PWM NULL
  1111. #define DIO39_PIN PING2
  1112. #define DIO39_RPORT PING
  1113. #define DIO39_WPORT PORTG
  1114. #define DIO39_DDR DDRG
  1115. #define DIO39_PWM NULL
  1116. #define DIO40_PIN PING1
  1117. #define DIO40_RPORT PING
  1118. #define DIO40_WPORT PORTG
  1119. #define DIO40_DDR DDRG
  1120. #define DIO40_PWM NULL
  1121. #define DIO41_PIN PING0
  1122. #define DIO41_RPORT PING
  1123. #define DIO41_WPORT PORTG
  1124. #define DIO41_DDR DDRG
  1125. #define DIO41_PWM NULL
  1126. #define DIO42_PIN PINL7
  1127. #define DIO42_RPORT PINL
  1128. #define DIO42_WPORT PORTL
  1129. #define DIO42_DDR DDRL
  1130. #define DIO42_PWM NULL
  1131. #define DIO43_PIN PINL6
  1132. #define DIO43_RPORT PINL
  1133. #define DIO43_WPORT PORTL
  1134. #define DIO43_DDR DDRL
  1135. #define DIO43_PWM NULL
  1136. #define DIO44_PIN PINL5
  1137. #define DIO44_RPORT PINL
  1138. #define DIO44_WPORT PORTL
  1139. #define DIO44_DDR DDRL
  1140. #define DIO44_PWM &OCR5CL
  1141. #define DIO45_PIN PINL4
  1142. #define DIO45_RPORT PINL
  1143. #define DIO45_WPORT PORTL
  1144. #define DIO45_DDR DDRL
  1145. #define DIO45_PWM &OCR5BL
  1146. #define DIO46_PIN PINL3
  1147. #define DIO46_RPORT PINL
  1148. #define DIO46_WPORT PORTL
  1149. #define DIO46_DDR DDRL
  1150. #define DIO46_PWM &OCR5AL
  1151. #define DIO47_PIN PINL2
  1152. #define DIO47_RPORT PINL
  1153. #define DIO47_WPORT PORTL
  1154. #define DIO47_DDR DDRL
  1155. #define DIO47_PWM NULL
  1156. #define DIO48_PIN PINL1
  1157. #define DIO48_RPORT PINL
  1158. #define DIO48_WPORT PORTL
  1159. #define DIO48_DDR DDRL
  1160. #define DIO48_PWM NULL
  1161. #define DIO49_PIN PINL0
  1162. #define DIO49_RPORT PINL
  1163. #define DIO49_WPORT PORTL
  1164. #define DIO49_DDR DDRL
  1165. #define DIO49_PWM NULL
  1166. #define DIO50_PIN PINB3
  1167. #define DIO50_RPORT PINB
  1168. #define DIO50_WPORT PORTB
  1169. #define DIO50_DDR DDRB
  1170. #define DIO50_PWM NULL
  1171. #define DIO51_PIN PINB2
  1172. #define DIO51_RPORT PINB
  1173. #define DIO51_WPORT PORTB
  1174. #define DIO51_DDR DDRB
  1175. #define DIO51_PWM NULL
  1176. #define DIO52_PIN PINB1
  1177. #define DIO52_RPORT PINB
  1178. #define DIO52_WPORT PORTB
  1179. #define DIO52_DDR DDRB
  1180. #define DIO52_PWM NULL
  1181. #define DIO53_PIN PINB0
  1182. #define DIO53_RPORT PINB
  1183. #define DIO53_WPORT PORTB
  1184. #define DIO53_DDR DDRB
  1185. #define DIO53_PWM NULL
  1186. #define DIO54_PIN PINF0
  1187. #define DIO54_RPORT PINF
  1188. #define DIO54_WPORT PORTF
  1189. #define DIO54_DDR DDRF
  1190. #define DIO54_PWM NULL
  1191. #define DIO55_PIN PINF1
  1192. #define DIO55_RPORT PINF
  1193. #define DIO55_WPORT PORTF
  1194. #define DIO55_DDR DDRF
  1195. #define DIO55_PWM NULL
  1196. #define DIO56_PIN PINF2
  1197. #define DIO56_RPORT PINF
  1198. #define DIO56_WPORT PORTF
  1199. #define DIO56_DDR DDRF
  1200. #define DIO56_PWM NULL
  1201. #define DIO57_PIN PINF3
  1202. #define DIO57_RPORT PINF
  1203. #define DIO57_WPORT PORTF
  1204. #define DIO57_DDR DDRF
  1205. #define DIO57_PWM NULL
  1206. #define DIO58_PIN PINF4
  1207. #define DIO58_RPORT PINF
  1208. #define DIO58_WPORT PORTF
  1209. #define DIO58_DDR DDRF
  1210. #define DIO58_PWM NULL
  1211. #define DIO59_PIN PINF5
  1212. #define DIO59_RPORT PINF
  1213. #define DIO59_WPORT PORTF
  1214. #define DIO59_DDR DDRF
  1215. #define DIO59_PWM NULL
  1216. #define DIO60_PIN PINF6
  1217. #define DIO60_RPORT PINF
  1218. #define DIO60_WPORT PORTF
  1219. #define DIO60_DDR DDRF
  1220. #define DIO60_PWM NULL
  1221. #define DIO61_PIN PINF7
  1222. #define DIO61_RPORT PINF
  1223. #define DIO61_WPORT PORTF
  1224. #define DIO61_DDR DDRF
  1225. #define DIO61_PWM NULL
  1226. #define DIO62_PIN PINK0
  1227. #define DIO62_RPORT PINK
  1228. #define DIO62_WPORT PORTK
  1229. #define DIO62_DDR DDRK
  1230. #define DIO62_PWM NULL
  1231. #define DIO63_PIN PINK1
  1232. #define DIO63_RPORT PINK
  1233. #define DIO63_WPORT PORTK
  1234. #define DIO63_DDR DDRK
  1235. #define DIO63_PWM NULL
  1236. #define DIO64_PIN PINK2
  1237. #define DIO64_RPORT PINK
  1238. #define DIO64_WPORT PORTK
  1239. #define DIO64_DDR DDRK
  1240. #define DIO64_PWM NULL
  1241. #define DIO65_PIN PINK3
  1242. #define DIO65_RPORT PINK
  1243. #define DIO65_WPORT PORTK
  1244. #define DIO65_DDR DDRK
  1245. #define DIO65_PWM NULL
  1246. #define DIO66_PIN PINK4
  1247. #define DIO66_RPORT PINK
  1248. #define DIO66_WPORT PORTK
  1249. #define DIO66_DDR DDRK
  1250. #define DIO66_PWM NULL
  1251. #define DIO67_PIN PINK5
  1252. #define DIO67_RPORT PINK
  1253. #define DIO67_WPORT PORTK
  1254. #define DIO67_DDR DDRK
  1255. #define DIO67_PWM NULL
  1256. #define DIO68_PIN PINK6
  1257. #define DIO68_RPORT PINK
  1258. #define DIO68_WPORT PORTK
  1259. #define DIO68_DDR DDRK
  1260. #define DIO68_PWM NULL
  1261. #define DIO69_PIN PINK7
  1262. #define DIO69_RPORT PINK
  1263. #define DIO69_WPORT PORTK
  1264. #define DIO69_DDR DDRK
  1265. #define DIO69_PWM NULL
  1266. #define DIO70_PIN PING4
  1267. #define DIO70_RPORT PING
  1268. #define DIO70_WPORT PORTG
  1269. #define DIO70_DDR DDRG
  1270. #define DIO70_PWM NULL
  1271. #define DIO71_PIN PING3
  1272. #define DIO71_RPORT PING
  1273. #define DIO71_WPORT PORTG
  1274. #define DIO71_DDR DDRG
  1275. #define DIO71_PWM NULL
  1276. #define DIO72_PIN PINJ2
  1277. #define DIO72_RPORT PINJ
  1278. #define DIO72_WPORT PORTJ
  1279. #define DIO72_DDR DDRJ
  1280. #define DIO72_PWM NULL
  1281. #define DIO73_PIN PINJ3
  1282. #define DIO73_RPORT PINJ
  1283. #define DIO73_WPORT PORTJ
  1284. #define DIO73_DDR DDRJ
  1285. #define DIO73_PWM NULL
  1286. #define DIO74_PIN PINJ7
  1287. #define DIO74_RPORT PINJ
  1288. #define DIO74_WPORT PORTJ
  1289. #define DIO74_DDR DDRJ
  1290. #define DIO74_PWM NULL
  1291. #define DIO75_PIN PINJ4
  1292. #define DIO75_RPORT PINJ
  1293. #define DIO75_WPORT PORTJ
  1294. #define DIO75_DDR DDRJ
  1295. #define DIO75_PWM NULL
  1296. #define DIO76_PIN PINJ5
  1297. #define DIO76_RPORT PINJ
  1298. #define DIO76_WPORT PORTJ
  1299. #define DIO76_DDR DDRJ
  1300. #define DIO76_PWM NULL
  1301. #define DIO77_PIN PINJ6
  1302. #define DIO77_RPORT PINJ
  1303. #define DIO77_WPORT PORTJ
  1304. #define DIO77_DDR DDRJ
  1305. #define DIO77_PWM NULL
  1306. #define DIO78_PIN PINE2
  1307. #define DIO78_RPORT PINE
  1308. #define DIO78_WPORT PORTE
  1309. #define DIO78_DDR DDRE
  1310. #define DIO78_PWM NULL
  1311. #define DIO79_PIN PINE6
  1312. #define DIO79_RPORT PINE
  1313. #define DIO79_WPORT PORTE
  1314. #define DIO79_DDR DDRE
  1315. #define DIO79_PWM NULL
  1316. #define DIO80_PIN PINE7
  1317. #define DIO80_RPORT PINE
  1318. #define DIO80_WPORT PORTE
  1319. #define DIO80_DDR DDRE
  1320. #define DIO80_PWM NULL
  1321. #define DIO81_PIN PIND4
  1322. #define DIO81_RPORT PIND
  1323. #define DIO81_WPORT PORTD
  1324. #define DIO81_DDR DDRD
  1325. #define DIO81_PWM NULL
  1326. #define DIO82_PIN PIND5
  1327. #define DIO82_RPORT PIND
  1328. #define DIO82_WPORT PORTD
  1329. #define DIO82_DDR DDRD
  1330. #define DIO82_PWM NULL
  1331. #define DIO83_PIN PIND6
  1332. #define DIO83_RPORT PIND
  1333. #define DIO83_WPORT PORTD
  1334. #define DIO83_DDR DDRD
  1335. #define DIO83_PWM NULL
  1336. #define DIO84_PIN PINH2
  1337. #define DIO84_RPORT PINH
  1338. #define DIO84_WPORT PORTH
  1339. #define DIO84_DDR DDRH
  1340. #define DIO84_PWM NULL
  1341. #define DIO85_PIN PINH7
  1342. #define DIO85_RPORT PINH
  1343. #define DIO85_WPORT PORTH
  1344. #define DIO85_DDR DDRH
  1345. #define DIO85_PWM NULL
  1346. #undef PA0
  1347. #define PA0_PIN PINA0
  1348. #define PA0_RPORT PINA
  1349. #define PA0_WPORT PORTA
  1350. #define PA0_DDR DDRA
  1351. #define PA0_PWM NULL
  1352. #undef PA1
  1353. #define PA1_PIN PINA1
  1354. #define PA1_RPORT PINA
  1355. #define PA1_WPORT PORTA
  1356. #define PA1_DDR DDRA
  1357. #define PA1_PWM NULL
  1358. #undef PA2
  1359. #define PA2_PIN PINA2
  1360. #define PA2_RPORT PINA
  1361. #define PA2_WPORT PORTA
  1362. #define PA2_DDR DDRA
  1363. #define PA2_PWM NULL
  1364. #undef PA3
  1365. #define PA3_PIN PINA3
  1366. #define PA3_RPORT PINA
  1367. #define PA3_WPORT PORTA
  1368. #define PA3_DDR DDRA
  1369. #define PA3_PWM NULL
  1370. #undef PA4
  1371. #define PA4_PIN PINA4
  1372. #define PA4_RPORT PINA
  1373. #define PA4_WPORT PORTA
  1374. #define PA4_DDR DDRA
  1375. #define PA4_PWM NULL
  1376. #undef PA5
  1377. #define PA5_PIN PINA5
  1378. #define PA5_RPORT PINA
  1379. #define PA5_WPORT PORTA
  1380. #define PA5_DDR DDRA
  1381. #define PA5_PWM NULL
  1382. #undef PA6
  1383. #define PA6_PIN PINA6
  1384. #define PA6_RPORT PINA
  1385. #define PA6_WPORT PORTA
  1386. #define PA6_DDR DDRA
  1387. #define PA6_PWM NULL
  1388. #undef PA7
  1389. #define PA7_PIN PINA7
  1390. #define PA7_RPORT PINA
  1391. #define PA7_WPORT PORTA
  1392. #define PA7_DDR DDRA
  1393. #define PA7_PWM NULL
  1394. #undef PB0
  1395. #define PB0_PIN PINB0
  1396. #define PB0_RPORT PINB
  1397. #define PB0_WPORT PORTB
  1398. #define PB0_DDR DDRB
  1399. #define PB0_PWM NULL
  1400. #undef PB1
  1401. #define PB1_PIN PINB1
  1402. #define PB1_RPORT PINB
  1403. #define PB1_WPORT PORTB
  1404. #define PB1_DDR DDRB
  1405. #define PB1_PWM NULL
  1406. #undef PB2
  1407. #define PB2_PIN PINB2
  1408. #define PB2_RPORT PINB
  1409. #define PB2_WPORT PORTB
  1410. #define PB2_DDR DDRB
  1411. #define PB2_PWM NULL
  1412. #undef PB3
  1413. #define PB3_PIN PINB3
  1414. #define PB3_RPORT PINB
  1415. #define PB3_WPORT PORTB
  1416. #define PB3_DDR DDRB
  1417. #define PB3_PWM NULL
  1418. #undef PB4
  1419. #define PB4_PIN PINB4
  1420. #define PB4_RPORT PINB
  1421. #define PB4_WPORT PORTB
  1422. #define PB4_DDR DDRB
  1423. #define PB4_PWM &OCR2A
  1424. #undef PB5
  1425. #define PB5_PIN PINB5
  1426. #define PB5_RPORT PINB
  1427. #define PB5_WPORT PORTB
  1428. #define PB5_DDR DDRB
  1429. #define PB5_PWM NULL
  1430. #undef PB6
  1431. #define PB6_PIN PINB6
  1432. #define PB6_RPORT PINB
  1433. #define PB6_WPORT PORTB
  1434. #define PB6_DDR DDRB
  1435. #define PB6_PWM NULL
  1436. #undef PB7
  1437. #define PB7_PIN PINB7
  1438. #define PB7_RPORT PINB
  1439. #define PB7_WPORT PORTB
  1440. #define PB7_DDR DDRB
  1441. #define PB7_PWM &OCR0A
  1442. #undef PC0
  1443. #define PC0_PIN PINC0
  1444. #define PC0_RPORT PINC
  1445. #define PC0_WPORT PORTC
  1446. #define PC0_DDR DDRC
  1447. #define PC0_PWM NULL
  1448. #undef PC1
  1449. #define PC1_PIN PINC1
  1450. #define PC1_RPORT PINC
  1451. #define PC1_WPORT PORTC
  1452. #define PC1_DDR DDRC
  1453. #define PC1_PWM NULL
  1454. #undef PC2
  1455. #define PC2_PIN PINC2
  1456. #define PC2_RPORT PINC
  1457. #define PC2_WPORT PORTC
  1458. #define PC2_DDR DDRC
  1459. #define PC2_PWM NULL
  1460. #undef PC3
  1461. #define PC3_PIN PINC3
  1462. #define PC3_RPORT PINC
  1463. #define PC3_WPORT PORTC
  1464. #define PC3_DDR DDRC
  1465. #define PC3_PWM NULL
  1466. #undef PC4
  1467. #define PC4_PIN PINC4
  1468. #define PC4_RPORT PINC
  1469. #define PC4_WPORT PORTC
  1470. #define PC4_DDR DDRC
  1471. #define PC4_PWM NULL
  1472. #undef PC5
  1473. #define PC5_PIN PINC5
  1474. #define PC5_RPORT PINC
  1475. #define PC5_WPORT PORTC
  1476. #define PC5_DDR DDRC
  1477. #define PC5_PWM NULL
  1478. #undef PC6
  1479. #define PC6_PIN PINC6
  1480. #define PC6_RPORT PINC
  1481. #define PC6_WPORT PORTC
  1482. #define PC6_DDR DDRC
  1483. #define PC6_PWM NULL
  1484. #undef PC7
  1485. #define PC7_PIN PINC7
  1486. #define PC7_RPORT PINC
  1487. #define PC7_WPORT PORTC
  1488. #define PC7_DDR DDRC
  1489. #define PC7_PWM NULL
  1490. #undef PD0
  1491. #define PD0_PIN PIND0
  1492. #define PD0_RPORT PIND
  1493. #define PD0_WPORT PORTD
  1494. #define PD0_DDR DDRD
  1495. #define PD0_PWM NULL
  1496. #undef PD1
  1497. #define PD1_PIN PIND1
  1498. #define PD1_RPORT PIND
  1499. #define PD1_WPORT PORTD
  1500. #define PD1_DDR DDRD
  1501. #define PD1_PWM NULL
  1502. #undef PD2
  1503. #define PD2_PIN PIND2
  1504. #define PD2_RPORT PIND
  1505. #define PD2_WPORT PORTD
  1506. #define PD2_DDR DDRD
  1507. #define PD2_PWM NULL
  1508. #undef PD3
  1509. #define PD3_PIN PIND3
  1510. #define PD3_RPORT PIND
  1511. #define PD3_WPORT PORTD
  1512. #define PD3_DDR DDRD
  1513. #define PD3_PWM NULL
  1514. #undef PD4
  1515. #define PD4_PIN PIND4
  1516. #define PD4_RPORT PIND
  1517. #define PD4_WPORT PORTD
  1518. #define PD4_DDR DDRD
  1519. #define PD4_PWM NULL
  1520. #undef PD5
  1521. #define PD5_PIN PIND5
  1522. #define PD5_RPORT PIND
  1523. #define PD5_WPORT PORTD
  1524. #define PD5_DDR DDRD
  1525. #define PD5_PWM NULL
  1526. #undef PD6
  1527. #define PD6_PIN PIND6
  1528. #define PD6_RPORT PIND
  1529. #define PD6_WPORT PORTD
  1530. #define PD6_DDR DDRD
  1531. #define PD6_PWM NULL
  1532. #undef PD7
  1533. #define PD7_PIN PIND7
  1534. #define PD7_RPORT PIND
  1535. #define PD7_WPORT PORTD
  1536. #define PD7_DDR DDRD
  1537. #define PD7_PWM NULL
  1538. #undef PE0
  1539. #define PE0_PIN PINE0
  1540. #define PE0_RPORT PINE
  1541. #define PE0_WPORT PORTE
  1542. #define PE0_DDR DDRE
  1543. #define PE0_PWM NULL
  1544. #undef PE1
  1545. #define PE1_PIN PINE1
  1546. #define PE1_RPORT PINE
  1547. #define PE1_WPORT PORTE
  1548. #define PE1_DDR DDRE
  1549. #define PE1_PWM NULL
  1550. #undef PE2
  1551. #define PE2_PIN PINE2
  1552. #define PE2_RPORT PINE
  1553. #define PE2_WPORT PORTE
  1554. #define PE2_DDR DDRE
  1555. #define PE2_PWM NULL
  1556. #undef PE3
  1557. #define PE3_PIN PINE3
  1558. #define PE3_RPORT PINE
  1559. #define PE3_WPORT PORTE
  1560. #define PE3_DDR DDRE
  1561. #define PE3_PWM &OCR3AL
  1562. #undef PE4
  1563. #define PE4_PIN PINE4
  1564. #define PE4_RPORT PINE
  1565. #define PE4_WPORT PORTE
  1566. #define PE4_DDR DDRE
  1567. #define PE4_PWM &OCR3BL
  1568. #undef PE5
  1569. #define PE5_PIN PINE5
  1570. #define PE5_RPORT PINE
  1571. #define PE5_WPORT PORTE
  1572. #define PE5_DDR DDRE
  1573. #define PE5_PWM &OCR3CL
  1574. #undef PE6
  1575. #define PE6_PIN PINE6
  1576. #define PE6_RPORT PINE
  1577. #define PE6_WPORT PORTE
  1578. #define PE6_DDR DDRE
  1579. #define PE6_PWM NULL
  1580. #undef PE7
  1581. #define PE7_PIN PINE7
  1582. #define PE7_RPORT PINE
  1583. #define PE7_WPORT PORTE
  1584. #define PE7_DDR DDRE
  1585. #define PE7_PWM NULL
  1586. #undef PF0
  1587. #define PF0_PIN PINF0
  1588. #define PF0_RPORT PINF
  1589. #define PF0_WPORT PORTF
  1590. #define PF0_DDR DDRF
  1591. #define PF0_PWM NULL
  1592. #undef PF1
  1593. #define PF1_PIN PINF1
  1594. #define PF1_RPORT PINF
  1595. #define PF1_WPORT PORTF
  1596. #define PF1_DDR DDRF
  1597. #define PF1_PWM NULL
  1598. #undef PF2
  1599. #define PF2_PIN PINF2
  1600. #define PF2_RPORT PINF
  1601. #define PF2_WPORT PORTF
  1602. #define PF2_DDR DDRF
  1603. #define PF2_PWM NULL
  1604. #undef PF3
  1605. #define PF3_PIN PINF3
  1606. #define PF3_RPORT PINF
  1607. #define PF3_WPORT PORTF
  1608. #define PF3_DDR DDRF
  1609. #define PF3_PWM NULL
  1610. #undef PF4
  1611. #define PF4_PIN PINF4
  1612. #define PF4_RPORT PINF
  1613. #define PF4_WPORT PORTF
  1614. #define PF4_DDR DDRF
  1615. #define PF4_PWM NULL
  1616. #undef PF5
  1617. #define PF5_PIN PINF5
  1618. #define PF5_RPORT PINF
  1619. #define PF5_WPORT PORTF
  1620. #define PF5_DDR DDRF
  1621. #define PF5_PWM NULL
  1622. #undef PF6
  1623. #define PF6_PIN PINF6
  1624. #define PF6_RPORT PINF
  1625. #define PF6_WPORT PORTF
  1626. #define PF6_DDR DDRF
  1627. #define PF6_PWM NULL
  1628. #undef PF7
  1629. #define PF7_PIN PINF7
  1630. #define PF7_RPORT PINF
  1631. #define PF7_WPORT PORTF
  1632. #define PF7_DDR DDRF
  1633. #define PF7_PWM NULL
  1634. #undef PG0
  1635. #define PG0_PIN PING0
  1636. #define PG0_RPORT PING
  1637. #define PG0_WPORT PORTG
  1638. #define PG0_DDR DDRG
  1639. #define PG0_PWM NULL
  1640. #undef PG1
  1641. #define PG1_PIN PING1
  1642. #define PG1_RPORT PING
  1643. #define PG1_WPORT PORTG
  1644. #define PG1_DDR DDRG
  1645. #define PG1_PWM NULL
  1646. #undef PG2
  1647. #define PG2_PIN PING2
  1648. #define PG2_RPORT PING
  1649. #define PG2_WPORT PORTG
  1650. #define PG2_DDR DDRG
  1651. #define PG2_PWM NULL
  1652. #undef PG3
  1653. #define PG3_PIN PING3
  1654. #define PG3_RPORT PING
  1655. #define PG3_WPORT PORTG
  1656. #define PG3_DDR DDRG
  1657. #define PG3_PWM NULL
  1658. #undef PG4
  1659. #define PG4_PIN PING4
  1660. #define PG4_RPORT PING
  1661. #define PG4_WPORT PORTG
  1662. #define PG4_DDR DDRG
  1663. #define PG4_PWM NULL
  1664. #undef PG5
  1665. #define PG5_PIN PING5
  1666. #define PG5_RPORT PING
  1667. #define PG5_WPORT PORTG
  1668. #define PG5_DDR DDRG
  1669. #define PG5_PWM &OCR0B
  1670. #undef PH0
  1671. #define PH0_PIN PINH0
  1672. #define PH0_RPORT PINH
  1673. #define PH0_WPORT PORTH
  1674. #define PH0_DDR DDRH
  1675. #define PH0_PWM NULL
  1676. #undef PH1
  1677. #define PH1_PIN PINH1
  1678. #define PH1_RPORT PINH
  1679. #define PH1_WPORT PORTH
  1680. #define PH1_DDR DDRH
  1681. #define PH1_PWM NULL
  1682. #undef PH2
  1683. #define PH2_PIN PINH2
  1684. #define PH2_RPORT PINH
  1685. #define PH2_WPORT PORTH
  1686. #define PH2_DDR DDRH
  1687. #define PH2_PWM NULL
  1688. #undef PH3
  1689. #define PH3_PIN PINH3
  1690. #define PH3_RPORT PINH
  1691. #define PH3_WPORT PORTH
  1692. #define PH3_DDR DDRH
  1693. #define PH3_PWM &OCR4AL
  1694. #undef PH4
  1695. #define PH4_PIN PINH4
  1696. #define PH4_RPORT PINH
  1697. #define PH4_WPORT PORTH
  1698. #define PH4_DDR DDRH
  1699. #define PH4_PWM &OCR4BL
  1700. #undef PH5
  1701. #define PH5_PIN PINH5
  1702. #define PH5_RPORT PINH
  1703. #define PH5_WPORT PORTH
  1704. #define PH5_DDR DDRH
  1705. #define PH5_PWM &OCR4CL
  1706. #undef PH6
  1707. #define PH6_PIN PINH6
  1708. #define PH6_RPORT PINH
  1709. #define PH6_WPORT PORTH
  1710. #define PH6_DDR DDRH
  1711. #define PH6_PWM &OCR2B
  1712. #undef PH7
  1713. #define PH7_PIN PINH7
  1714. #define PH7_RPORT PINH
  1715. #define PH7_WPORT PORTH
  1716. #define PH7_DDR DDRH
  1717. #define PH7_PWM NULL
  1718. #undef PJ0
  1719. #define PJ0_PIN PINJ0
  1720. #define PJ0_RPORT PINJ
  1721. #define PJ0_WPORT PORTJ
  1722. #define PJ0_DDR DDRJ
  1723. #define PJ0_PWM NULL
  1724. #undef PJ1
  1725. #define PJ1_PIN PINJ1
  1726. #define PJ1_RPORT PINJ
  1727. #define PJ1_WPORT PORTJ
  1728. #define PJ1_DDR DDRJ
  1729. #define PJ1_PWM NULL
  1730. #undef PJ2
  1731. #define PJ2_PIN PINJ2
  1732. #define PJ2_RPORT PINJ
  1733. #define PJ2_WPORT PORTJ
  1734. #define PJ2_DDR DDRJ
  1735. #define PJ2_PWM NULL
  1736. #undef PJ3
  1737. #define PJ3_PIN PINJ3
  1738. #define PJ3_RPORT PINJ
  1739. #define PJ3_WPORT PORTJ
  1740. #define PJ3_DDR DDRJ
  1741. #define PJ3_PWM NULL
  1742. #undef PJ4
  1743. #define PJ4_PIN PINJ4
  1744. #define PJ4_RPORT PINJ
  1745. #define PJ4_WPORT PORTJ
  1746. #define PJ4_DDR DDRJ
  1747. #define PJ4_PWM NULL
  1748. #undef PJ5
  1749. #define PJ5_PIN PINJ5
  1750. #define PJ5_RPORT PINJ
  1751. #define PJ5_WPORT PORTJ
  1752. #define PJ5_DDR DDRJ
  1753. #define PJ5_PWM NULL
  1754. #undef PJ6
  1755. #define PJ6_PIN PINJ6
  1756. #define PJ6_RPORT PINJ
  1757. #define PJ6_WPORT PORTJ
  1758. #define PJ6_DDR DDRJ
  1759. #define PJ6_PWM NULL
  1760. #undef PJ7
  1761. #define PJ7_PIN PINJ7
  1762. #define PJ7_RPORT PINJ
  1763. #define PJ7_WPORT PORTJ
  1764. #define PJ7_DDR DDRJ
  1765. #define PJ7_PWM NULL
  1766. #undef PK0
  1767. #define PK0_PIN PINK0
  1768. #define PK0_RPORT PINK
  1769. #define PK0_WPORT PORTK
  1770. #define PK0_DDR DDRK
  1771. #define PK0_PWM NULL
  1772. #undef PK1
  1773. #define PK1_PIN PINK1
  1774. #define PK1_RPORT PINK
  1775. #define PK1_WPORT PORTK
  1776. #define PK1_DDR DDRK
  1777. #define PK1_PWM NULL
  1778. #undef PK2
  1779. #define PK2_PIN PINK2
  1780. #define PK2_RPORT PINK
  1781. #define PK2_WPORT PORTK
  1782. #define PK2_DDR DDRK
  1783. #define PK2_PWM NULL
  1784. #undef PK3
  1785. #define PK3_PIN PINK3
  1786. #define PK3_RPORT PINK
  1787. #define PK3_WPORT PORTK
  1788. #define PK3_DDR DDRK
  1789. #define PK3_PWM NULL
  1790. #undef PK4
  1791. #define PK4_PIN PINK4
  1792. #define PK4_RPORT PINK
  1793. #define PK4_WPORT PORTK
  1794. #define PK4_DDR DDRK
  1795. #define PK4_PWM NULL
  1796. #undef PK5
  1797. #define PK5_PIN PINK5
  1798. #define PK5_RPORT PINK
  1799. #define PK5_WPORT PORTK
  1800. #define PK5_DDR DDRK
  1801. #define PK5_PWM NULL
  1802. #undef PK6
  1803. #define PK6_PIN PINK6
  1804. #define PK6_RPORT PINK
  1805. #define PK6_WPORT PORTK
  1806. #define PK6_DDR DDRK
  1807. #define PK6_PWM NULL
  1808. #undef PK7
  1809. #define PK7_PIN PINK7
  1810. #define PK7_RPORT PINK
  1811. #define PK7_WPORT PORTK
  1812. #define PK7_DDR DDRK
  1813. #define PK7_PWM NULL
  1814. #undef PL0
  1815. #define PL0_PIN PINL0
  1816. #define PL0_RPORT PINL
  1817. #define PL0_WPORT PORTL
  1818. #define PL0_DDR DDRL
  1819. #define PL0_PWM NULL
  1820. #undef PL1
  1821. #define PL1_PIN PINL1
  1822. #define PL1_RPORT PINL
  1823. #define PL1_WPORT PORTL
  1824. #define PL1_DDR DDRL
  1825. #define PL1_PWM NULL
  1826. #undef PL2
  1827. #define PL2_PIN PINL2
  1828. #define PL2_RPORT PINL
  1829. #define PL2_WPORT PORTL
  1830. #define PL2_DDR DDRL
  1831. #define PL2_PWM NULL
  1832. #undef PL3
  1833. #define PL3_PIN PINL3
  1834. #define PL3_RPORT PINL
  1835. #define PL3_WPORT PORTL
  1836. #define PL3_DDR DDRL
  1837. #define PL3_PWM &OCR5AL
  1838. #undef PL4
  1839. #define PL4_PIN PINL4
  1840. #define PL4_RPORT PINL
  1841. #define PL4_WPORT PORTL
  1842. #define PL4_DDR DDRL
  1843. #define PL4_PWM &OCR5BL
  1844. #undef PL5
  1845. #define PL5_PIN PINL5
  1846. #define PL5_RPORT PINL
  1847. #define PL5_WPORT PORTL
  1848. #define PL5_DDR DDRL
  1849. #define PL5_PWM &OCR5CL
  1850. #undef PL6
  1851. #define PL6_PIN PINL6
  1852. #define PL6_RPORT PINL
  1853. #define PL6_WPORT PORTL
  1854. #define PL6_DDR DDRL
  1855. #define PL6_PWM NULL
  1856. #undef PL7
  1857. #define PL7_PIN PINL7
  1858. #define PL7_RPORT PINL
  1859. #define PL7_WPORT PORTL
  1860. #define PL7_DDR DDRL
  1861. #define PL7_PWM NULL
  1862. #endif // __AVR_ATmega(1280|2560)__
  1863. #if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
  1864. // change for your board
  1865. #define DEBUG_LED DIO31 /* led D5 red */
  1866. /**
  1867. * Pins Info
  1868. */
  1869. //#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
  1870. #ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments
  1871. // SPI
  1872. #define SCK DIO9 // 21
  1873. #define MISO DIO11 // 23
  1874. #define MOSI DIO10 // 22
  1875. #define SS DIO8 // 20
  1876. #define DIO0_PIN PINA0
  1877. #define DIO0_RPORT PINA
  1878. #define DIO0_WPORT PORTA
  1879. #define DIO0_PWM NULL
  1880. #define DIO0_DDR DDRA
  1881. #define DIO1_PIN PINA1
  1882. #define DIO1_RPORT PINA
  1883. #define DIO1_WPORT PORTA
  1884. #define DIO1_PWM NULL
  1885. #define DIO1_DDR DDRA
  1886. #define DIO2_PIN PINA2
  1887. #define DIO2_RPORT PINA
  1888. #define DIO2_WPORT PORTA
  1889. #define DIO2_PWM NULL
  1890. #define DIO2_DDR DDRA
  1891. #define DIO3_PIN PINA3
  1892. #define DIO3_RPORT PINA
  1893. #define DIO3_WPORT PORTA
  1894. #define DIO3_PWM NULL
  1895. #define DIO3_DDR DDRA
  1896. #define DIO4_PIN PINA4
  1897. #define DIO4_RPORT PINA
  1898. #define DIO4_WPORT PORTA
  1899. #define DIO4_PWM NULL
  1900. #define DIO4_DDR DDRA
  1901. #define DIO5_PIN PINA5
  1902. #define DIO5_RPORT PINA
  1903. #define DIO5_WPORT PORTA
  1904. #define DIO5_PWM NULL
  1905. #define DIO5_DDR DDRA
  1906. #define DIO6_PIN PINA6
  1907. #define DIO6_RPORT PINA
  1908. #define DIO6_WPORT PORTA
  1909. #define DIO6_PWM NULL
  1910. #define DIO6_DDR DDRA
  1911. #define DIO7_PIN PINA7
  1912. #define DIO7_RPORT PINA
  1913. #define DIO7_WPORT PORTA
  1914. #define DIO7_PWM NULL
  1915. #define DIO7_DDR DDRA
  1916. #define DIO8_PIN PINB0
  1917. #define DIO8_RPORT PINB
  1918. #define DIO8_WPORT PORTB
  1919. #define DIO8_PWM NULL
  1920. #define DIO8_DDR DDRB
  1921. #define DIO9_PIN PINB1
  1922. #define DIO9_RPORT PINB
  1923. #define DIO9_WPORT PORTB
  1924. #define DIO9_PWM NULL
  1925. #define DIO9_DDR DDRB
  1926. #define DIO10_PIN PINB2
  1927. #define DIO10_RPORT PINB
  1928. #define DIO10_WPORT PORTB
  1929. #define DIO10_PWM NULL
  1930. #define DIO10_DDR DDRB
  1931. #define DIO11_PIN PINB3
  1932. #define DIO11_RPORT PINB
  1933. #define DIO11_WPORT PORTB
  1934. #define DIO11_PWM NULL
  1935. #define DIO11_DDR DDRB
  1936. #define DIO12_PIN PINB4
  1937. #define DIO12_RPORT PINB
  1938. #define DIO12_WPORT PORTB
  1939. #define DIO12_PWM NULL
  1940. #define DIO12_DDR DDRB
  1941. #define DIO13_PIN PINB5
  1942. #define DIO13_RPORT PINB
  1943. #define DIO13_WPORT PORTB
  1944. #define DIO13_PWM NULL
  1945. #define DIO13_DDR DDRB
  1946. #define DIO14_PIN PINB6
  1947. #define DIO14_RPORT PINB
  1948. #define DIO14_WPORT PORTB
  1949. #define DIO14_PWM NULL
  1950. #define DIO14_DDR DDRB
  1951. #define DIO15_PIN PINB7
  1952. #define DIO15_RPORT PINB
  1953. #define DIO15_WPORT PORTB
  1954. #define DIO15_PWM NULL
  1955. #define DIO15_DDR DDRB
  1956. #define DIO16_PIN PINC0
  1957. #define DIO16_RPORT PINC
  1958. #define DIO16_WPORT PORTC
  1959. #define DIO16_PWM NULL
  1960. #define DIO16_DDR DDRC
  1961. #define DIO17_PIN PINC1
  1962. #define DIO17_RPORT PINC
  1963. #define DIO17_WPORT PORTC
  1964. #define DIO17_PWM NULL
  1965. #define DIO17_DDR DDRC
  1966. #define DIO18_PIN PINC2
  1967. #define DIO18_RPORT PINC
  1968. #define DIO18_WPORT PORTC
  1969. #define DIO18_PWM NULL
  1970. #define DIO18_DDR DDRC
  1971. #define DIO19_PIN PINC3
  1972. #define DIO19_RPORT PINC
  1973. #define DIO19_WPORT PORTC
  1974. #define DIO19_PWM NULL
  1975. #define DIO19_DDR DDRC
  1976. #define DIO20_PIN PINC4
  1977. #define DIO20_RPORT PINC
  1978. #define DIO20_WPORT PORTC
  1979. #define DIO20_PWM NULL
  1980. #define DIO20_DDR DDRC
  1981. #define DIO21_PIN PINC5
  1982. #define DIO21_RPORT PINC
  1983. #define DIO21_WPORT PORTC
  1984. #define DIO21_PWM NULL
  1985. #define DIO21_DDR DDRC
  1986. #define DIO22_PIN PINC6
  1987. #define DIO22_RPORT PINC
  1988. #define DIO22_WPORT PORTC
  1989. #define DIO22_PWM NULL
  1990. #define DIO22_DDR DDRC
  1991. #define DIO23_PIN PINC7
  1992. #define DIO23_RPORT PINC
  1993. #define DIO23_WPORT PORTC
  1994. #define DIO23_PWM NULL
  1995. #define DIO23_DDR DDRC
  1996. #define DIO24_PIN PIND0
  1997. #define DIO24_RPORT PIND
  1998. #define DIO24_WPORT PORTD
  1999. #define DIO24_PWM NULL
  2000. #define DIO24_DDR DDRD
  2001. #define DIO25_PIN PIND1
  2002. #define DIO25_RPORT PIND
  2003. #define DIO25_WPORT PORTD
  2004. #define DIO25_PWM NULL
  2005. #define DIO25_DDR DDRD
  2006. #define DIO26_PIN PIND2
  2007. #define DIO26_RPORT PIND
  2008. #define DIO26_WPORT PORTD
  2009. #define DIO26_PWM NULL
  2010. #define DIO26_DDR DDRD
  2011. #define DIO27_PIN PIND3
  2012. #define DIO27_RPORT PIND
  2013. #define DIO27_WPORT PORTD
  2014. #define DIO27_PWM NULL
  2015. #define DIO27_DDR DDRD
  2016. #define DIO28_PIN PIND4
  2017. #define DIO28_RPORT PIND
  2018. #define DIO28_WPORT PORTD
  2019. #define DIO28_PWM NULL
  2020. #define DIO28_DDR DDRD
  2021. #define DIO29_PIN PIND5
  2022. #define DIO29_RPORT PIND
  2023. #define DIO29_WPORT PORTD
  2024. #define DIO29_PWM NULL
  2025. #define DIO29_DDR DDRD
  2026. #define DIO30_PIN PIND6
  2027. #define DIO30_RPORT PIND
  2028. #define DIO30_WPORT PORTD
  2029. #define DIO30_PWM NULL
  2030. #define DIO30_DDR DDRD
  2031. #define DIO31_PIN PIND7
  2032. #define DIO31_RPORT PIND
  2033. #define DIO31_WPORT PORTD
  2034. #define DIO31_PWM NULL
  2035. #define DIO31_DDR DDRD
  2036. #define DIO32_PIN PINE0
  2037. #define DIO32_RPORT PINE
  2038. #define DIO32_WPORT PORTE
  2039. #define DIO32_PWM NULL
  2040. #define DIO32_DDR DDRE
  2041. #define DIO33_PIN PINE1
  2042. #define DIO33_RPORT PINE
  2043. #define DIO33_WPORT PORTE
  2044. #define DIO33_PWM NULL
  2045. #define DIO33_DDR DDRE
  2046. #define DIO34_PIN PINE2
  2047. #define DIO34_RPORT PINE
  2048. #define DIO34_WPORT PORTE
  2049. #define DIO34_PWM NULL
  2050. #define DIO34_DDR DDRE
  2051. #define DIO35_PIN PINE3
  2052. #define DIO35_RPORT PINE
  2053. #define DIO35_WPORT PORTE
  2054. #define DIO35_PWM NULL
  2055. #define DIO35_DDR DDRE
  2056. #define DIO36_PIN PINE4
  2057. #define DIO36_RPORT PINE
  2058. #define DIO36_WPORT PORTE
  2059. #define DIO36_PWM NULL
  2060. #define DIO36_DDR DDRE
  2061. #define DIO37_PIN PINE5
  2062. #define DIO37_RPORT PINE
  2063. #define DIO37_WPORT PORTE
  2064. #define DIO37_PWM NULL
  2065. #define DIO37_DDR DDRE
  2066. #define DIO38_PIN PINE6
  2067. #define DIO38_RPORT PINE
  2068. #define DIO38_WPORT PORTE
  2069. #define DIO38_PWM NULL
  2070. #define DIO38_DDR DDRE
  2071. #define DIO39_PIN PINE7
  2072. #define DIO39_RPORT PINE
  2073. #define DIO39_WPORT PORTE
  2074. #define DIO39_PWM NULL
  2075. #define DIO39_DDR DDRE
  2076. #define AIO0_PIN PINF0
  2077. #define AIO0_RPORT PINF
  2078. #define AIO0_WPORT PORTF
  2079. #define AIO0_PWM NULL
  2080. #define AIO0_DDR DDRF
  2081. #define AIO1_PIN PINF1
  2082. #define AIO1_RPORT PINF
  2083. #define AIO1_WPORT PORTF
  2084. #define AIO1_PWM NULL
  2085. #define AIO1_DDR DDRF
  2086. #define AIO2_PIN PINF2
  2087. #define AIO2_RPORT PINF
  2088. #define AIO2_WPORT PORTF
  2089. #define AIO2_PWM NULL
  2090. #define AIO2_DDR DDRF
  2091. #define AIO3_PIN PINF3
  2092. #define AIO3_RPORT PINF
  2093. #define AIO3_WPORT PORTF
  2094. #define AIO3_PWM NULL
  2095. #define AIO3_DDR DDRF
  2096. #define AIO4_PIN PINF4
  2097. #define AIO4_RPORT PINF
  2098. #define AIO4_WPORT PORTF
  2099. #define AIO4_PWM NULL
  2100. #define AIO4_DDR DDRF
  2101. #define AIO5_PIN PINF5
  2102. #define AIO5_RPORT PINF
  2103. #define AIO5_WPORT PORTF
  2104. #define AIO5_PWM NULL
  2105. #define AIO5_DDR DDRF
  2106. #define AIO6_PIN PINF6
  2107. #define AIO6_RPORT PINF
  2108. #define AIO6_WPORT PORTF
  2109. #define AIO6_PWM NULL
  2110. #define AIO6_DDR DDRF
  2111. #define AIO7_PIN PINF7
  2112. #define AIO7_RPORT PINF
  2113. #define AIO7_WPORT PORTF
  2114. #define AIO7_PWM NULL
  2115. #define AIO7_DDR DDRF
  2116. #define DIO40_PIN PINF0
  2117. #define DIO40_RPORT PINF
  2118. #define DIO40_WPORT PORTF
  2119. #define DIO40_PWM NULL
  2120. #define DIO40_DDR DDRF
  2121. #define DIO41_PIN PINF1
  2122. #define DIO41_RPORT PINF
  2123. #define DIO41_WPORT PORTF
  2124. #define DIO41_PWM NULL
  2125. #define DIO41_DDR DDRF
  2126. #define DIO42_PIN PINF2
  2127. #define DIO42_RPORT PINF
  2128. #define DIO42_WPORT PORTF
  2129. #define DIO42_PWM NULL
  2130. #define DIO42_DDR DDRF
  2131. #define DIO43_PIN PINF3
  2132. #define DIO43_RPORT PINF
  2133. #define DIO43_WPORT PORTF
  2134. #define DIO43_PWM NULL
  2135. #define DIO43_DDR DDRF
  2136. #define DIO44_PIN PINF4
  2137. #define DIO44_RPORT PINF
  2138. #define DIO44_WPORT PORTF
  2139. #define DIO44_PWM NULL
  2140. #define DIO44_DDR DDRF
  2141. #define DIO45_PIN PINF5
  2142. #define DIO45_RPORT PINF
  2143. #define DIO45_WPORT PORTF
  2144. #define DIO45_PWM NULL
  2145. #define DIO45_DDR DDRF
  2146. #define DIO46_PIN PINF6
  2147. #define DIO46_RPORT PINF
  2148. #define DIO46_WPORT PORTF
  2149. #define DIO46_PWM NULL
  2150. #define DIO46_DDR DDRF
  2151. #define DIO47_PIN PINF7
  2152. #define DIO47_RPORT PINF
  2153. #define DIO47_WPORT PORTF
  2154. #define DIO47_PWM NULL
  2155. #define DIO47_DDR DDRF
  2156. #undef PA0
  2157. #define PA0_PIN PINA0
  2158. #define PA0_RPORT PINA
  2159. #define PA0_WPORT PORTA
  2160. #define PA0_PWM NULL
  2161. #define PA0_DDR DDRA
  2162. #undef PA1
  2163. #define PA1_PIN PINA1
  2164. #define PA1_RPORT PINA
  2165. #define PA1_WPORT PORTA
  2166. #define PA1_PWM NULL
  2167. #define PA1_DDR DDRA
  2168. #undef PA2
  2169. #define PA2_PIN PINA2
  2170. #define PA2_RPORT PINA
  2171. #define PA2_WPORT PORTA
  2172. #define PA2_PWM NULL
  2173. #define PA2_DDR DDRA
  2174. #undef PA3
  2175. #define PA3_PIN PINA3
  2176. #define PA3_RPORT PINA
  2177. #define PA3_WPORT PORTA
  2178. #define PA3_PWM NULL
  2179. #define PA3_DDR DDRA
  2180. #undef PA4
  2181. #define PA4_PIN PINA4
  2182. #define PA4_RPORT PINA
  2183. #define PA4_WPORT PORTA
  2184. #define PA4_PWM NULL
  2185. #define PA4_DDR DDRA
  2186. #undef PA5
  2187. #define PA5_PIN PINA5
  2188. #define PA5_RPORT PINA
  2189. #define PA5_WPORT PORTA
  2190. #define PA5_PWM NULL
  2191. #define PA5_DDR DDRA
  2192. #undef PA6
  2193. #define PA6_PIN PINA6
  2194. #define PA6_RPORT PINA
  2195. #define PA6_WPORT PORTA
  2196. #define PA6_PWM NULL
  2197. #define PA6_DDR DDRA
  2198. #undef PA7
  2199. #define PA7_PIN PINA7
  2200. #define PA7_RPORT PINA
  2201. #define PA7_WPORT PORTA
  2202. #define PA7_PWM NULL
  2203. #define PA7_DDR DDRA
  2204. #undef PB0
  2205. #define PB0_PIN PINB0
  2206. #define PB0_RPORT PINB
  2207. #define PB0_WPORT PORTB
  2208. #define PB0_PWM NULL
  2209. #define PB0_DDR DDRB
  2210. #undef PB1
  2211. #define PB1_PIN PINB1
  2212. #define PB1_RPORT PINB
  2213. #define PB1_WPORT PORTB
  2214. #define PB1_PWM NULL
  2215. #define PB1_DDR DDRB
  2216. #undef PB2
  2217. #define PB2_PIN PINB2
  2218. #define PB2_RPORT PINB
  2219. #define PB2_WPORT PORTB
  2220. #define PB2_PWM NULL
  2221. #define PB2_DDR DDRB
  2222. #undef PB3
  2223. #define PB3_PIN PINB3
  2224. #define PB3_RPORT PINB
  2225. #define PB3_WPORT PORTB
  2226. #define PB3_PWM NULL
  2227. #define PB3_DDR DDRB
  2228. #undef PB4
  2229. #define PB4_PIN PINB4
  2230. #define PB4_RPORT PINB
  2231. #define PB4_WPORT PORTB
  2232. #define PB4_PWM NULL
  2233. #define PB4_DDR DDRB
  2234. #undef PB5
  2235. #define PB5_PIN PINB5
  2236. #define PB5_RPORT PINB
  2237. #define PB5_WPORT PORTB
  2238. #define PB5_PWM NULL
  2239. #define PB5_DDR DDRB
  2240. #undef PB6
  2241. #define PB6_PIN PINB6
  2242. #define PB6_RPORT PINB
  2243. #define PB6_WPORT PORTB
  2244. #define PB6_PWM NULL
  2245. #define PB6_DDR DDRB
  2246. #undef PB7
  2247. #define PB7_PIN PINB7
  2248. #define PB7_RPORT PINB
  2249. #define PB7_WPORT PORTB
  2250. #define PB7_PWM NULL
  2251. #define PB7_DDR DDRB
  2252. #undef PC0
  2253. #define PC0_PIN PINC0
  2254. #define PC0_RPORT PINC
  2255. #define PC0_WPORT PORTC
  2256. #define PC0_PWM NULL
  2257. #define PC0_DDR DDRC
  2258. #undef PC1
  2259. #define PC1_PIN PINC1
  2260. #define PC1_RPORT PINC
  2261. #define PC1_WPORT PORTC
  2262. #define PC1_PWM NULL
  2263. #define PC1_DDR DDRC
  2264. #undef PC2
  2265. #define PC2_PIN PINC2
  2266. #define PC2_RPORT PINC
  2267. #define PC2_WPORT PORTC
  2268. #define PC2_PWM NULL
  2269. #define PC2_DDR DDRC
  2270. #undef PC3
  2271. #define PC3_PIN PINC3
  2272. #define PC3_RPORT PINC
  2273. #define PC3_WPORT PORTC
  2274. #define PC3_PWM NULL
  2275. #define PC3_DDR DDRC
  2276. #undef PC4
  2277. #define PC4_PIN PINC4
  2278. #define PC4_RPORT PINC
  2279. #define PC4_WPORT PORTC
  2280. #define PC4_PWM NULL
  2281. #define PC4_DDR DDRC
  2282. #undef PC5
  2283. #define PC5_PIN PINC5
  2284. #define PC5_RPORT PINC
  2285. #define PC5_WPORT PORTC
  2286. #define PC5_PWM NULL
  2287. #define PC5_DDR DDRC
  2288. #undef PC6
  2289. #define PC6_PIN PINC6
  2290. #define PC6_RPORT PINC
  2291. #define PC6_WPORT PORTC
  2292. #define PC6_PWM NULL
  2293. #define PC6_DDR DDRC
  2294. #undef PC7
  2295. #define PC7_PIN PINC7
  2296. #define PC7_RPORT PINC
  2297. #define PC7_WPORT PORTC
  2298. #define PC7_PWM NULL
  2299. #define PC7_DDR DDRC
  2300. #undef PD0
  2301. #define PD0_PIN PIND0
  2302. #define PD0_RPORT PIND
  2303. #define PD0_WPORT PORTD
  2304. #define PD0_PWM NULL
  2305. #define PD0_DDR DDRD
  2306. #undef PD1
  2307. #define PD1_PIN PIND1
  2308. #define PD1_RPORT PIND
  2309. #define PD1_WPORT PORTD
  2310. #define PD1_PWM NULL
  2311. #define PD1_DDR DDRD
  2312. #undef PD2
  2313. #define PD2_PIN PIND2
  2314. #define PD2_RPORT PIND
  2315. #define PD2_WPORT PORTD
  2316. #define PD2_PWM NULL
  2317. #define PD2_DDR DDRD
  2318. #undef PD3
  2319. #define PD3_PIN PIND3
  2320. #define PD3_RPORT PIND
  2321. #define PD3_WPORT PORTD
  2322. #define PD3_PWM NULL
  2323. #define PD3_DDR DDRD
  2324. #undef PD4
  2325. #define PD4_PIN PIND4
  2326. #define PD4_RPORT PIND
  2327. #define PD4_WPORT PORTD
  2328. #define PD4_PWM NULL
  2329. #define PD4_DDR DDRD
  2330. #undef PD5
  2331. #define PD5_PIN PIND5
  2332. #define PD5_RPORT PIND
  2333. #define PD5_WPORT PORTD
  2334. #define PD5_PWM NULL
  2335. #define PD5_DDR DDRD
  2336. #undef PD6
  2337. #define PD6_PIN PIND6
  2338. #define PD6_RPORT PIND
  2339. #define PD6_WPORT PORTD
  2340. #define PD6_PWM NULL
  2341. #define PD6_DDR DDRD
  2342. #undef PD7
  2343. #define PD7_PIN PIND7
  2344. #define PD7_RPORT PIND
  2345. #define PD7_WPORT PORTD
  2346. #define PD7_PWM NULL
  2347. #define PD7_DDR DDRD
  2348. #undef PE0
  2349. #define PE0_PIN PINE0
  2350. #define PE0_RPORT PINE
  2351. #define PE0_WPORT PORTE
  2352. #define PE0_PWM NULL
  2353. #define PE0_DDR DDRE
  2354. #undef PE1
  2355. #define PE1_PIN PINE1
  2356. #define PE1_RPORT PINE
  2357. #define PE1_WPORT PORTE
  2358. #define PE1_PWM NULL
  2359. #define PE1_DDR DDRE
  2360. #undef PE2
  2361. #define PE2_PIN PINE2
  2362. #define PE2_RPORT PINE
  2363. #define PE2_WPORT PORTE
  2364. #define PE2_PWM NULL
  2365. #define PE2_DDR DDRE
  2366. #undef PE3
  2367. #define PE3_PIN PINE3
  2368. #define PE3_RPORT PINE
  2369. #define PE3_WPORT PORTE
  2370. #define PE3_PWM NULL
  2371. #define PE3_DDR DDRE
  2372. #undef PE4
  2373. #define PE4_PIN PINE4
  2374. #define PE4_RPORT PINE
  2375. #define PE4_WPORT PORTE
  2376. #define PE4_PWM NULL
  2377. #define PE4_DDR DDRE
  2378. #undef PE5
  2379. #define PE5_PIN PINE5
  2380. #define PE5_RPORT PINE
  2381. #define PE5_WPORT PORTE
  2382. #define PE5_PWM NULL
  2383. #define PE5_DDR DDRE
  2384. #undef PE6
  2385. #define PE6_PIN PINE6
  2386. #define PE6_RPORT PINE
  2387. #define PE6_WPORT PORTE
  2388. #define PE6_PWM NULL
  2389. #define PE6_DDR DDRE
  2390. #undef PE7
  2391. #define PE7_PIN PINE7
  2392. #define PE7_RPORT PINE
  2393. #define PE7_WPORT PORTE
  2394. #define PE7_PWM NULL
  2395. #define PE7_DDR DDRE
  2396. #undef PF0
  2397. #define PF0_PIN PINF0
  2398. #define PF0_RPORT PINF
  2399. #define PF0_WPORT PORTF
  2400. #define PF0_PWM NULL
  2401. #define PF0_DDR DDRF
  2402. #undef PF1
  2403. #define PF1_PIN PINF1
  2404. #define PF1_RPORT PINF
  2405. #define PF1_WPORT PORTF
  2406. #define PF1_PWM NULL
  2407. #define PF1_DDR DDRF
  2408. #undef PF2
  2409. #define PF2_PIN PINF2
  2410. #define PF2_RPORT PINF
  2411. #define PF2_WPORT PORTF
  2412. #define PF2_PWM NULL
  2413. #define PF2_DDR DDRF
  2414. #undef PF3
  2415. #define PF3_PIN PINF3
  2416. #define PF3_RPORT PINF
  2417. #define PF3_WPORT PORTF
  2418. #define PF3_PWM NULL
  2419. #define PF3_DDR DDRF
  2420. #undef PF4
  2421. #define PF4_PIN PINF4
  2422. #define PF4_RPORT PINF
  2423. #define PF4_WPORT PORTF
  2424. #define PF4_PWM NULL
  2425. #define PF4_DDR DDRF
  2426. #undef PF5
  2427. #define PF5_PIN PINF5
  2428. #define PF5_RPORT PINF
  2429. #define PF5_WPORT PORTF
  2430. #define PF5_PWM NULL
  2431. #define PF5_DDR DDRF
  2432. #undef PF6
  2433. #define PF6_PIN PINF6
  2434. #define PF6_RPORT PINF
  2435. #define PF6_WPORT PORTF
  2436. #define PF6_PWM NULL
  2437. #define PF6_DDR DDRF
  2438. #undef PF7
  2439. #define PF7_PIN PINF7
  2440. #define PF7_RPORT PINF
  2441. #define PF7_WPORT PORTF
  2442. #define PF7_PWM NULL
  2443. #define PF7_DDR DDRF
  2444. #else // AT90USBxx_TEENSYPP_ASSIGNMENTS -- Use Teensyduino Teensy++2.0 assignments.
  2445. /**
  2446. AT90USB 51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
  2447. Port A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
  2448. Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
  2449. Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
  2450. The pins 46 and 47 are not supported by Teensyduino, but are supported below.
  2451. */
  2452. // SPI
  2453. #define SCK DIO21 // 9
  2454. #define MISO DIO23 // 11
  2455. #define MOSI DIO22 // 10
  2456. #define SS DIO20 // 8
  2457. #define DIO0_PIN PIND0
  2458. #define DIO0_RPORT PIND
  2459. #define DIO0_WPORT PORTD
  2460. #define DIO0_PWM NULL
  2461. #define DIO0_DDR DDRD
  2462. #define DIO1_PIN PIND1
  2463. #define DIO1_RPORT PIND
  2464. #define DIO1_WPORT PORTD
  2465. #define DIO1_PWM NULL
  2466. #define DIO1_DDR DDRD
  2467. #define DIO2_PIN PIND2
  2468. #define DIO2_RPORT PIND
  2469. #define DIO2_WPORT PORTD
  2470. #define DIO2_PWM NULL
  2471. #define DIO2_DDR DDRD
  2472. #define DIO3_PIN PIND3
  2473. #define DIO3_RPORT PIND
  2474. #define DIO3_WPORT PORTD
  2475. #define DIO3_PWM NULL
  2476. #define DIO3_DDR DDRD
  2477. #define DIO4_PIN PIND4
  2478. #define DIO4_RPORT PIND
  2479. #define DIO4_WPORT PORTD
  2480. #define DIO4_PWM NULL
  2481. #define DIO4_DDR DDRD
  2482. #define DIO5_PIN PIND5
  2483. #define DIO5_RPORT PIND
  2484. #define DIO5_WPORT PORTD
  2485. #define DIO5_PWM NULL
  2486. #define DIO5_DDR DDRD
  2487. #define DIO6_PIN PIND6
  2488. #define DIO6_RPORT PIND
  2489. #define DIO6_WPORT PORTD
  2490. #define DIO6_PWM NULL
  2491. #define DIO6_DDR DDRD
  2492. #define DIO7_PIN PIND7
  2493. #define DIO7_RPORT PIND
  2494. #define DIO7_WPORT PORTD
  2495. #define DIO7_PWM NULL
  2496. #define DIO7_DDR DDRD
  2497. #define DIO8_PIN PINE0
  2498. #define DIO8_RPORT PINE
  2499. #define DIO8_WPORT PORTE
  2500. #define DIO8_PWM NULL
  2501. #define DIO8_DDR DDRE
  2502. #define DIO9_PIN PINE1
  2503. #define DIO9_RPORT PINE
  2504. #define DIO9_WPORT PORTE
  2505. #define DIO9_PWM NULL
  2506. #define DIO9_DDR DDRE
  2507. #define DIO10_PIN PINC0
  2508. #define DIO10_RPORT PINC
  2509. #define DIO10_WPORT PORTC
  2510. #define DIO10_PWM NULL
  2511. #define DIO10_DDR DDRC
  2512. #define DIO11_PIN PINC1
  2513. #define DIO11_RPORT PINC
  2514. #define DIO11_WPORT PORTC
  2515. #define DIO11_PWM NULL
  2516. #define DIO11_DDR DDRC
  2517. #define DIO12_PIN PINC2
  2518. #define DIO12_RPORT PINC
  2519. #define DIO12_WPORT PORTC
  2520. #define DIO12_PWM NULL
  2521. #define DIO12_DDR DDRC
  2522. #define DIO13_PIN PINC3
  2523. #define DIO13_RPORT PINC
  2524. #define DIO13_WPORT PORTC
  2525. #define DIO13_PWM NULL
  2526. #define DIO13_DDR DDRC
  2527. #define DIO14_PIN PINC4
  2528. #define DIO14_RPORT PINC
  2529. #define DIO14_WPORT PORTC
  2530. #define DIO14_PWM NULL
  2531. #define DIO14_DDR DDRC
  2532. #define DIO15_PIN PINC5
  2533. #define DIO15_RPORT PINC
  2534. #define DIO15_WPORT PORTC
  2535. #define DIO15_PWM NULL
  2536. #define DIO15_DDR DDRC
  2537. #define DIO16_PIN PINC6
  2538. #define DIO16_RPORT PINC
  2539. #define DIO16_WPORT PORTC
  2540. #define DIO16_PWM NULL
  2541. #define DIO16_DDR DDRC
  2542. #define DIO17_PIN PINC7
  2543. #define DIO17_RPORT PINC
  2544. #define DIO17_WPORT PORTC
  2545. #define DIO17_PWM NULL
  2546. #define DIO17_DDR DDRC
  2547. #define DIO18_PIN PINE6
  2548. #define DIO18_RPORT PINE
  2549. #define DIO18_WPORT PORTE
  2550. #define DIO18_PWM NULL
  2551. #define DIO18_DDR DDRE
  2552. #define DIO19_PIN PINE7
  2553. #define DIO19_RPORT PINE
  2554. #define DIO19_WPORT PORTE
  2555. #define DIO19_PWM NULL
  2556. #define DIO19_DDR DDRE
  2557. #define DIO20_PIN PINB0
  2558. #define DIO20_RPORT PINB
  2559. #define DIO20_WPORT PORTB
  2560. #define DIO20_PWM NULL
  2561. #define DIO20_DDR DDRB
  2562. #define DIO21_PIN PINB1
  2563. #define DIO21_RPORT PINB
  2564. #define DIO21_WPORT PORTB
  2565. #define DIO21_PWM NULL
  2566. #define DIO21_DDR DDRB
  2567. #define DIO22_PIN PINB2
  2568. #define DIO22_RPORT PINB
  2569. #define DIO22_WPORT PORTB
  2570. #define DIO22_PWM NULL
  2571. #define DIO22_DDR DDRB
  2572. #define DIO23_PIN PINB3
  2573. #define DIO23_RPORT PINB
  2574. #define DIO23_WPORT PORTB
  2575. #define DIO23_PWM NULL
  2576. #define DIO23_DDR DDRB
  2577. #define DIO24_PIN PINB4
  2578. #define DIO24_RPORT PINB
  2579. #define DIO24_WPORT PORTB
  2580. #define DIO24_PWM NULL
  2581. #define DIO24_DDR DDRB
  2582. #define DIO25_PIN PINB5
  2583. #define DIO25_RPORT PINB
  2584. #define DIO25_WPORT PORTB
  2585. #define DIO25_PWM NULL
  2586. #define DIO25_DDR DDRB
  2587. #define DIO26_PIN PINB6
  2588. #define DIO26_RPORT PINB
  2589. #define DIO26_WPORT PORTB
  2590. #define DIO26_PWM NULL
  2591. #define DIO26_DDR DDRB
  2592. #define DIO27_PIN PINB7
  2593. #define DIO27_RPORT PINB
  2594. #define DIO27_WPORT PORTB
  2595. #define DIO27_PWM NULL
  2596. #define DIO27_DDR DDRB
  2597. #define DIO28_PIN PINA0
  2598. #define DIO28_RPORT PINA
  2599. #define DIO28_WPORT PORTA
  2600. #define DIO28_PWM NULL
  2601. #define DIO28_DDR DDRA
  2602. #define DIO29_PIN PINA1
  2603. #define DIO29_RPORT PINA
  2604. #define DIO29_WPORT PORTA
  2605. #define DIO29_PWM NULL
  2606. #define DIO29_DDR DDRA
  2607. #define DIO30_PIN PINA2
  2608. #define DIO30_RPORT PINA
  2609. #define DIO30_WPORT PORTA
  2610. #define DIO30_PWM NULL
  2611. #define DIO30_DDR DDRA
  2612. #define DIO31_PIN PINA3
  2613. #define DIO31_RPORT PINA
  2614. #define DIO31_WPORT PORTA
  2615. #define DIO31_PWM NULL
  2616. #define DIO31_DDR DDRA
  2617. #define DIO32_PIN PINA4
  2618. #define DIO32_RPORT PINA
  2619. #define DIO32_WPORT PORTA
  2620. #define DIO32_PWM NULL
  2621. #define DIO32_DDR DDRA
  2622. #define DIO33_PIN PINA5
  2623. #define DIO33_RPORT PINA
  2624. #define DIO33_WPORT PORTA
  2625. #define DIO33_PWM NULL
  2626. #define DIO33_DDR DDRA
  2627. #define DIO34_PIN PINA6
  2628. #define DIO34_RPORT PINA
  2629. #define DIO34_WPORT PORTA
  2630. #define DIO34_PWM NULL
  2631. #define DIO34_DDR DDRA
  2632. #define DIO35_PIN PINA7
  2633. #define DIO35_RPORT PINA
  2634. #define DIO35_WPORT PORTA
  2635. #define DIO35_PWM NULL
  2636. #define DIO35_DDR DDRA
  2637. #define DIO36_PIN PINE4
  2638. #define DIO36_RPORT PINE
  2639. #define DIO36_WPORT PORTE
  2640. #define DIO36_PWM NULL
  2641. #define DIO36_DDR DDRE
  2642. #define DIO37_PIN PINE5
  2643. #define DIO37_RPORT PINE
  2644. #define DIO37_WPORT PORTE
  2645. #define DIO37_PWM NULL
  2646. #define DIO37_DDR DDRE
  2647. #define DIO38_PIN PINF0
  2648. #define DIO38_RPORT PINF
  2649. #define DIO38_WPORT PORTF
  2650. #define DIO38_PWM NULL
  2651. #define DIO38_DDR DDRF
  2652. #define DIO39_PIN PINF1
  2653. #define DIO39_RPORT PINF
  2654. #define DIO39_WPORT PORTF
  2655. #define DIO39_PWM NULL
  2656. #define DIO39_DDR DDRF
  2657. #define DIO40_PIN PINF2
  2658. #define DIO40_RPORT PINF
  2659. #define DIO40_WPORT PORTF
  2660. #define DIO40_PWM NULL
  2661. #define DIO40_DDR DDRF
  2662. #define DIO41_PIN PINF3
  2663. #define DIO41_RPORT PINF
  2664. #define DIO41_WPORT PORTF
  2665. #define DIO41_PWM NULL
  2666. #define DIO41_DDR DDRF
  2667. #define DIO42_PIN PINF4
  2668. #define DIO42_RPORT PINF
  2669. #define DIO42_WPORT PORTF
  2670. #define DIO42_PWM NULL
  2671. #define DIO42_DDR DDRF
  2672. #define DIO43_PIN PINF5
  2673. #define DIO43_RPORT PINF
  2674. #define DIO43_WPORT PORTF
  2675. #define DIO43_PWM NULL
  2676. #define DIO43_DDR DDRF
  2677. #define DIO44_PIN PINF6
  2678. #define DIO44_RPORT PINF
  2679. #define DIO44_WPORT PORTF
  2680. #define DIO44_PWM NULL
  2681. #define DIO44_DDR DDRF
  2682. #define DIO45_PIN PINF7
  2683. #define DIO45_RPORT PINF
  2684. #define DIO45_WPORT PORTF
  2685. #define DIO45_PWM NULL
  2686. #define DIO45_DDR DDRF
  2687. #define AIO0_PIN PINF0
  2688. #define AIO0_RPORT PINF
  2689. #define AIO0_WPORT PORTF
  2690. #define AIO0_PWM NULL
  2691. #define AIO0_DDR DDRF
  2692. #define AIO1_PIN PINF1
  2693. #define AIO1_RPORT PINF
  2694. #define AIO1_WPORT PORTF
  2695. #define AIO1_PWM NULL
  2696. #define AIO1_DDR DDRF
  2697. #define AIO2_PIN PINF2
  2698. #define AIO2_RPORT PINF
  2699. #define AIO2_WPORT PORTF
  2700. #define AIO2_PWM NULL
  2701. #define AIO2_DDR DDRF
  2702. #define AIO3_PIN PINF3
  2703. #define AIO3_RPORT PINF
  2704. #define AIO3_WPORT PORTF
  2705. #define AIO3_PWM NULL
  2706. #define AIO3_DDR DDRF
  2707. #define AIO4_PIN PINF4
  2708. #define AIO4_RPORT PINF
  2709. #define AIO4_WPORT PORTF
  2710. #define AIO4_PWM NULL
  2711. #define AIO4_DDR DDRF
  2712. #define AIO5_PIN PINF5
  2713. #define AIO5_RPORT PINF
  2714. #define AIO5_WPORT PORTF
  2715. #define AIO5_PWM NULL
  2716. #define AIO5_DDR DDRF
  2717. #define AIO6_PIN PINF6
  2718. #define AIO6_RPORT PINF
  2719. #define AIO6_WPORT PORTF
  2720. #define AIO6_PWM NULL
  2721. #define AIO6_DDR DDRF
  2722. #define AIO7_PIN PINF7
  2723. #define AIO7_RPORT PINF
  2724. #define AIO7_WPORT PORTF
  2725. #define AIO7_PWM NULL
  2726. #define AIO7_DDR DDRF
  2727. //-- Begin not supported by Teensyduino
  2728. //-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
  2729. #define DIO46_PIN PINE2
  2730. #define DIO46_RPORT PINE
  2731. #define DIO46_WPORT PORTE
  2732. #define DIO46_PWM NULL
  2733. #define DIO46_DDR DDRE
  2734. #define DIO47_PIN PINE3
  2735. #define DIO47_RPORT PINE
  2736. #define DIO47_WPORT PORTE
  2737. #define DIO47_PWM NULL
  2738. #define DIO47_DDR DDRE
  2739. //-- end not supported by Teensyduino
  2740. #undef PA0
  2741. #define PA0_PIN PINA0
  2742. #define PA0_RPORT PINA
  2743. #define PA0_WPORT PORTA
  2744. #define PA0_PWM NULL
  2745. #define PA0_DDR DDRA
  2746. #undef PA1
  2747. #define PA1_PIN PINA1
  2748. #define PA1_RPORT PINA
  2749. #define PA1_WPORT PORTA
  2750. #define PA1_PWM NULL
  2751. #define PA1_DDR DDRA
  2752. #undef PA2
  2753. #define PA2_PIN PINA2
  2754. #define PA2_RPORT PINA
  2755. #define PA2_WPORT PORTA
  2756. #define PA2_PWM NULL
  2757. #define PA2_DDR DDRA
  2758. #undef PA3
  2759. #define PA3_PIN PINA3
  2760. #define PA3_RPORT PINA
  2761. #define PA3_WPORT PORTA
  2762. #define PA3_PWM NULL
  2763. #define PA3_DDR DDRA
  2764. #undef PA4
  2765. #define PA4_PIN PINA4
  2766. #define PA4_RPORT PINA
  2767. #define PA4_WPORT PORTA
  2768. #define PA4_PWM NULL
  2769. #define PA4_DDR DDRA
  2770. #undef PA5
  2771. #define PA5_PIN PINA5
  2772. #define PA5_RPORT PINA
  2773. #define PA5_WPORT PORTA
  2774. #define PA5_PWM NULL
  2775. #define PA5_DDR DDRA
  2776. #undef PA6
  2777. #define PA6_PIN PINA6
  2778. #define PA6_RPORT PINA
  2779. #define PA6_WPORT PORTA
  2780. #define PA6_PWM NULL
  2781. #define PA6_DDR DDRA
  2782. #undef PA7
  2783. #define PA7_PIN PINA7
  2784. #define PA7_RPORT PINA
  2785. #define PA7_WPORT PORTA
  2786. #define PA7_PWM NULL
  2787. #define PA7_DDR DDRA
  2788. #undef PB0
  2789. #define PB0_PIN PINB0
  2790. #define PB0_RPORT PINB
  2791. #define PB0_WPORT PORTB
  2792. #define PB0_PWM NULL
  2793. #define PB0_DDR DDRB
  2794. #undef PB1
  2795. #define PB1_PIN PINB1
  2796. #define PB1_RPORT PINB
  2797. #define PB1_WPORT PORTB
  2798. #define PB1_PWM NULL
  2799. #define PB1_DDR DDRB
  2800. #undef PB2
  2801. #define PB2_PIN PINB2
  2802. #define PB2_RPORT PINB
  2803. #define PB2_WPORT PORTB
  2804. #define PB2_PWM NULL
  2805. #define PB2_DDR DDRB
  2806. #undef PB3
  2807. #define PB3_PIN PINB3
  2808. #define PB3_RPORT PINB
  2809. #define PB3_WPORT PORTB
  2810. #define PB3_PWM NULL
  2811. #define PB3_DDR DDRB
  2812. #undef PB4
  2813. #define PB4_PIN PINB4
  2814. #define PB4_RPORT PINB
  2815. #define PB4_WPORT PORTB
  2816. #define PB4_PWM NULL
  2817. #define PB4_DDR DDRB
  2818. #undef PB5
  2819. #define PB5_PIN PINB5
  2820. #define PB5_RPORT PINB
  2821. #define PB5_WPORT PORTB
  2822. #define PB5_PWM NULL
  2823. #define PB5_DDR DDRB
  2824. #undef PB6
  2825. #define PB6_PIN PINB6
  2826. #define PB6_RPORT PINB
  2827. #define PB6_WPORT PORTB
  2828. #define PB6_PWM NULL
  2829. #define PB6_DDR DDRB
  2830. #undef PB7
  2831. #define PB7_PIN PINB7
  2832. #define PB7_RPORT PINB
  2833. #define PB7_WPORT PORTB
  2834. #define PB7_PWM NULL
  2835. #define PB7_DDR DDRB
  2836. #undef PC0
  2837. #define PC0_PIN PINC0
  2838. #define PC0_RPORT PINC
  2839. #define PC0_WPORT PORTC
  2840. #define PC0_PWM NULL
  2841. #define PC0_DDR DDRC
  2842. #undef PC1
  2843. #define PC1_PIN PINC1
  2844. #define PC1_RPORT PINC
  2845. #define PC1_WPORT PORTC
  2846. #define PC1_PWM NULL
  2847. #define PC1_DDR DDRC
  2848. #undef PC2
  2849. #define PC2_PIN PINC2
  2850. #define PC2_RPORT PINC
  2851. #define PC2_WPORT PORTC
  2852. #define PC2_PWM NULL
  2853. #define PC2_DDR DDRC
  2854. #undef PC3
  2855. #define PC3_PIN PINC3
  2856. #define PC3_RPORT PINC
  2857. #define PC3_WPORT PORTC
  2858. #define PC3_PWM NULL
  2859. #define PC3_DDR DDRC
  2860. #undef PC4
  2861. #define PC4_PIN PINC4
  2862. #define PC4_RPORT PINC
  2863. #define PC4_WPORT PORTC
  2864. #define PC4_PWM NULL
  2865. #define PC4_DDR DDRC
  2866. #undef PC5
  2867. #define PC5_PIN PINC5
  2868. #define PC5_RPORT PINC
  2869. #define PC5_WPORT PORTC
  2870. #define PC5_PWM NULL
  2871. #define PC5_DDR DDRC
  2872. #undef PC6
  2873. #define PC6_PIN PINC6
  2874. #define PC6_RPORT PINC
  2875. #define PC6_WPORT PORTC
  2876. #define PC6_PWM NULL
  2877. #define PC6_DDR DDRC
  2878. #undef PC7
  2879. #define PC7_PIN PINC7
  2880. #define PC7_RPORT PINC
  2881. #define PC7_WPORT PORTC
  2882. #define PC7_PWM NULL
  2883. #define PC7_DDR DDRC
  2884. #undef PD0
  2885. #define PD0_PIN PIND0
  2886. #define PD0_RPORT PIND
  2887. #define PD0_WPORT PORTD
  2888. #define PD0_PWM NULL
  2889. #define PD0_DDR DDRD
  2890. #undef PD1
  2891. #define PD1_PIN PIND1
  2892. #define PD1_RPORT PIND
  2893. #define PD1_WPORT PORTD
  2894. #define PD1_PWM NULL
  2895. #define PD1_DDR DDRD
  2896. #undef PD2
  2897. #define PD2_PIN PIND2
  2898. #define PD2_RPORT PIND
  2899. #define PD2_WPORT PORTD
  2900. #define PD2_PWM NULL
  2901. #define PD2_DDR DDRD
  2902. #undef PD3
  2903. #define PD3_PIN PIND3
  2904. #define PD3_RPORT PIND
  2905. #define PD3_WPORT PORTD
  2906. #define PD3_PWM NULL
  2907. #define PD3_DDR DDRD
  2908. #undef PD4
  2909. #define PD4_PIN PIND4
  2910. #define PD4_RPORT PIND
  2911. #define PD4_WPORT PORTD
  2912. #define PD4_PWM NULL
  2913. #define PD4_DDR DDRD
  2914. #undef PD5
  2915. #define PD5_PIN PIND5
  2916. #define PD5_RPORT PIND
  2917. #define PD5_WPORT PORTD
  2918. #define PD5_PWM NULL
  2919. #define PD5_DDR DDRD
  2920. #undef PD6
  2921. #define PD6_PIN PIND6
  2922. #define PD6_RPORT PIND
  2923. #define PD6_WPORT PORTD
  2924. #define PD6_PWM NULL
  2925. #define PD6_DDR DDRD
  2926. #undef PD7
  2927. #define PD7_PIN PIND7
  2928. #define PD7_RPORT PIND
  2929. #define PD7_WPORT PORTD
  2930. #define PD7_PWM NULL
  2931. #define PD7_DDR DDRD
  2932. #undef PE0
  2933. #define PE0_PIN PINE0
  2934. #define PE0_RPORT PINE
  2935. #define PE0_WPORT PORTE
  2936. #define PE0_PWM NULL
  2937. #define PE0_DDR DDRE
  2938. #undef PE1
  2939. #define PE1_PIN PINE1
  2940. #define PE1_RPORT PINE
  2941. #define PE1_WPORT PORTE
  2942. #define PE1_PWM NULL
  2943. #define PE1_DDR DDRE
  2944. #undef PE2
  2945. #define PE2_PIN PINE2
  2946. #define PE2_RPORT PINE
  2947. #define PE2_WPORT PORTE
  2948. #define PE2_PWM NULL
  2949. #define PE2_DDR DDRE
  2950. #undef PE3
  2951. #define PE3_PIN PINE3
  2952. #define PE3_RPORT PINE
  2953. #define PE3_WPORT PORTE
  2954. #define PE3_PWM NULL
  2955. #define PE3_DDR DDRE
  2956. #undef PE4
  2957. #define PE4_PIN PINE4
  2958. #define PE4_RPORT PINE
  2959. #define PE4_WPORT PORTE
  2960. #define PE4_PWM NULL
  2961. #define PE4_DDR DDRE
  2962. #undef PE5
  2963. #define PE5_PIN PINE5
  2964. #define PE5_RPORT PINE
  2965. #define PE5_WPORT PORTE
  2966. #define PE5_PWM NULL
  2967. #define PE5_DDR DDRE
  2968. #undef PE6
  2969. #define PE6_PIN PINE6
  2970. #define PE6_RPORT PINE
  2971. #define PE6_WPORT PORTE
  2972. #define PE6_PWM NULL
  2973. #define PE6_DDR DDRE
  2974. #undef PE7
  2975. #define PE7_PIN PINE7
  2976. #define PE7_RPORT PINE
  2977. #define PE7_WPORT PORTE
  2978. #define PE7_PWM NULL
  2979. #define PE7_DDR DDRE
  2980. #undef PF0
  2981. #define PF0_PIN PINF0
  2982. #define PF0_RPORT PINF
  2983. #define PF0_WPORT PORTF
  2984. #define PF0_PWM NULL
  2985. #define PF0_DDR DDRF
  2986. #undef PF1
  2987. #define PF1_PIN PINF1
  2988. #define PF1_RPORT PINF
  2989. #define PF1_WPORT PORTF
  2990. #define PF1_PWM NULL
  2991. #define PF1_DDR DDRF
  2992. #undef PF2
  2993. #define PF2_PIN PINF2
  2994. #define PF2_RPORT PINF
  2995. #define PF2_WPORT PORTF
  2996. #define PF2_PWM NULL
  2997. #define PF2_DDR DDRF
  2998. #undef PF3
  2999. #define PF3_PIN PINF3
  3000. #define PF3_RPORT PINF
  3001. #define PF3_WPORT PORTF
  3002. #define PF3_PWM NULL
  3003. #define PF3_DDR DDRF
  3004. #undef PF4
  3005. #define PF4_PIN PINF4
  3006. #define PF4_RPORT PINF
  3007. #define PF4_WPORT PORTF
  3008. #define PF4_PWM NULL
  3009. #define PF4_DDR DDRF
  3010. #undef PF5
  3011. #define PF5_PIN PINF5
  3012. #define PF5_RPORT PINF
  3013. #define PF5_WPORT PORTF
  3014. #define PF5_PWM NULL
  3015. #define PF5_DDR DDRF
  3016. #undef PF6
  3017. #define PF6_PIN PINF6
  3018. #define PF6_RPORT PINF
  3019. #define PF6_WPORT PORTF
  3020. #define PF6_PWM NULL
  3021. #define PF6_DDR DDRF
  3022. #undef PF7
  3023. #define PF7_PIN PINF7
  3024. #define PF7_RPORT PINF
  3025. #define PF7_WPORT PORTF
  3026. #define PF7_PWM NULL
  3027. #define PF7_DDR DDRF
  3028. #endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments
  3029. #endif // __AVR_AT90USB(1287|1286|646|647)__
  3030. #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
  3031. // UART
  3032. #define RXD DIO0
  3033. #define TXD DIO1
  3034. // SPI
  3035. #define SCK DIO10
  3036. #define MISO DIO12
  3037. #define MOSI DIO11
  3038. #define SS DIO16
  3039. // TWI (I2C)
  3040. #define SCL DIO17
  3041. #define SDA DIO18
  3042. // timers and PWM
  3043. #define OC0A DIO9
  3044. #define OC0B DIO4
  3045. #define OC1A DIO7
  3046. #define OC1B DIO8
  3047. #define OC2A DIO6
  3048. #define OC3A DIO5
  3049. #define OC3B DIO2
  3050. #define OC3C DIO3
  3051. // change for your board
  3052. #define DEBUG_LED DIO46
  3053. /**
  3054. * Pins Info
  3055. */
  3056. #define DIO0_PIN PINE0
  3057. #define DIO0_RPORT PINE
  3058. #define DIO0_WPORT PORTE
  3059. #define DIO0_DDR DDRE
  3060. #define DIO0_PWM NULL
  3061. #define DIO1_PIN PINE1
  3062. #define DIO1_RPORT PINE
  3063. #define DIO1_WPORT PORTE
  3064. #define DIO1_DDR DDRE
  3065. #define DIO1_PWM NULL
  3066. #define DIO2_PIN PINE4
  3067. #define DIO2_RPORT PINE
  3068. #define DIO2_WPORT PORTE
  3069. #define DIO2_DDR DDRE
  3070. #define DIO2_PWM &OCR3BL
  3071. #define DIO3_PIN PINE5
  3072. #define DIO3_RPORT PINE
  3073. #define DIO3_WPORT PORTE
  3074. #define DIO3_DDR DDRE
  3075. #define DIO3_PWM &OCR3CL
  3076. #define DIO4_PIN PING5
  3077. #define DIO4_RPORT PING
  3078. #define DIO4_WPORT PORTG
  3079. #define DIO4_DDR DDRG
  3080. #define DIO4_PWM &OCR0B
  3081. #define DIO5_PIN PINE3
  3082. #define DIO5_RPORT PINE
  3083. #define DIO5_WPORT PORTE
  3084. #define DIO5_DDR DDRE
  3085. #define DIO5_PWM &OCR3AL
  3086. #define DIO6_PIN PINB4
  3087. #define DIO6_RPORT PINB
  3088. #define DIO6_WPORT PORTB
  3089. #define DIO6_DDR DDRB
  3090. #define DIO6_PWM &OCR2AL
  3091. #define DIO7_PIN PINB5
  3092. #define DIO7_RPORT PINB
  3093. #define DIO7_WPORT PORTB
  3094. #define DIO7_DDR DDRB
  3095. #define DIO7_PWM &OCR1AL
  3096. #define DIO8_PIN PINB6
  3097. #define DIO8_RPORT PINB
  3098. #define DIO8_WPORT PORTB
  3099. #define DIO8_DDR DDRB
  3100. #define DIO8_PWM &OCR1BL
  3101. #define DIO9_PIN PINB7
  3102. #define DIO9_RPORT PINB
  3103. #define DIO9_WPORT PORTB
  3104. #define DIO9_DDR DDRB
  3105. #define DIO9_PWM &OCR0AL
  3106. #define DIO10_PIN PINB1
  3107. #define DIO10_RPORT PINB
  3108. #define DIO10_WPORT PORTB
  3109. #define DIO10_DDR DDRB
  3110. #define DIO10_PWM NULL
  3111. #define DIO11_PIN PINB2
  3112. #define DIO11_RPORT PINB
  3113. #define DIO11_WPORT PORTB
  3114. #define DIO11_DDR DDRB
  3115. #define DIO11_PWM NULL
  3116. #define DIO12_PIN PINB3
  3117. #define DIO12_RPORT PINB
  3118. #define DIO12_WPORT PORTB
  3119. #define DIO12_DDR DDRB
  3120. #define DIO12_PWM NULL
  3121. #define DIO13_PIN PINE2
  3122. #define DIO13_RPORT PINE
  3123. #define DIO13_WPORT PORTE
  3124. #define DIO13_DDR DDRE
  3125. #define DIO13_PWM NULL
  3126. #define DIO14_PIN PINE6
  3127. #define DIO14_RPORT PINE
  3128. #define DIO14_WPORT PORTE
  3129. #define DIO14_DDR DDRE
  3130. #define DIO14_PWM NULL
  3131. #define DIO15_PIN PINE7
  3132. #define DIO15_RPORT PINE
  3133. #define DIO15_WPORT PORTE
  3134. #define DIO15_DDR DDRE
  3135. #define DIO15_PWM NULL
  3136. #define DIO16_PIN PINB0
  3137. #define DIO16_RPORT PINB
  3138. #define DIO16_WPORT PORTB
  3139. #define DIO16_DDR DDRB
  3140. #define DIO16_PWM NULL
  3141. #define DIO17_PIN PIND0
  3142. #define DIO17_RPORT PIND
  3143. #define DIO17_WPORT PORTD
  3144. #define DIO17_DDR DDRD
  3145. #define DIO17_PWM NULL
  3146. #define DIO18_PIN PIND1
  3147. #define DIO18_RPORT PIND
  3148. #define DIO18_WPORT PORTD
  3149. #define DIO18_DDR DDRD
  3150. #define DIO18_PWM NULL
  3151. #define DIO19_PIN PIND2
  3152. #define DIO19_RPORT PIND
  3153. #define DIO19_WPORT PORTD
  3154. #define DIO19_DDR DDRD
  3155. #define DIO19_PWM NULL
  3156. #define DIO20_PIN PIND3
  3157. #define DIO20_RPORT PIND
  3158. #define DIO20_WPORT PORTD
  3159. #define DIO20_DDR DDRD
  3160. #define DIO20_PWM NULL
  3161. #define DIO21_PIN PIND4
  3162. #define DIO21_RPORT PIND
  3163. #define DIO21_WPORT PORTD
  3164. #define DIO21_DDR DDRD
  3165. #define DIO21_PWM NULL
  3166. #define DIO22_PIN PIND5
  3167. #define DIO22_RPORT PIND
  3168. #define DIO22_WPORT PORTD
  3169. #define DIO22_DDR DDRD
  3170. #define DIO22_PWM NULL
  3171. #define DIO23_PIN PIND6
  3172. #define DIO23_RPORT PIND
  3173. #define DIO23_WPORT PORTD
  3174. #define DIO23_DDR DDRD
  3175. #define DIO23_PWM NULL
  3176. #define DIO24_PIN PIND7
  3177. #define DIO24_RPORT PIND
  3178. #define DIO24_WPORT PORTD
  3179. #define DIO24_DDR DDRD
  3180. #define DIO24_PWM NULL
  3181. #define DIO25_PIN PING0
  3182. #define DIO25_RPORT PING
  3183. #define DIO25_WPORT PORTG
  3184. #define DIO25_DDR DDRG
  3185. #define DIO25_PWM NULL
  3186. #define DIO26_PIN PING1
  3187. #define DIO26_RPORT PING
  3188. #define DIO26_WPORT PORTG
  3189. #define DIO26_DDR DDRG
  3190. #define DIO26_PWM NULL
  3191. #define DIO27_PIN PING2
  3192. #define DIO27_RPORT PING
  3193. #define DIO27_WPORT PORTG
  3194. #define DIO27_DDR DDRG
  3195. #define DIO27_PWM NULL
  3196. #define DIO28_PIN PING3
  3197. #define DIO28_RPORT PING
  3198. #define DIO28_WPORT PORTG
  3199. #define DIO28_DDR DDRG
  3200. #define DIO28_PWM NULL
  3201. #define DIO29_PIN PING4
  3202. #define DIO29_RPORT PING
  3203. #define DIO29_WPORT PORTG
  3204. #define DIO29_DDR DDRG
  3205. #define DIO29_PWM NULL
  3206. #define DIO30_PIN PINC0
  3207. #define DIO30_RPORT PINC
  3208. #define DIO30_WPORT PORTC
  3209. #define DIO30_DDR DDRC
  3210. #define DIO30_PWM NULL
  3211. #define DIO31_PIN PINC1
  3212. #define DIO31_RPORT PINC
  3213. #define DIO31_WPORT PORTC
  3214. #define DIO31_DDR DDRC
  3215. #define DIO31_PWM NULL
  3216. #define DIO32_PIN PINC2
  3217. #define DIO32_RPORT PINC
  3218. #define DIO32_WPORT PORTC
  3219. #define DIO32_DDR DDRC
  3220. #define DIO32_PWM NULL
  3221. #define DIO33_PIN PINC3
  3222. #define DIO33_RPORT PINC
  3223. #define DIO33_WPORT PORTC
  3224. #define DIO33_DDR DDRC
  3225. #define DIO33_PWM NULL
  3226. #define DIO34_PIN PINC4
  3227. #define DIO34_RPORT PINC
  3228. #define DIO34_WPORT PORTC
  3229. #define DIO34_DDR DDRC
  3230. #define DIO34_PWM NULL
  3231. #define DIO35_PIN PINC5
  3232. #define DIO35_RPORT PINC
  3233. #define DIO35_WPORT PORTC
  3234. #define DIO35_DDR DDRC
  3235. #define DIO35_PWM NULL
  3236. #define DIO36_PIN PINC6
  3237. #define DIO36_RPORT PINC
  3238. #define DIO36_WPORT PORTC
  3239. #define DIO36_DDR DDRC
  3240. #define DIO36_PWM NULL
  3241. #define DIO37_PIN PINC7
  3242. #define DIO37_RPORT PINC
  3243. #define DIO37_WPORT PORTC
  3244. #define DIO37_DDR DDRC
  3245. #define DIO37_PWM NULL
  3246. #define DIO38_PIN PINA0
  3247. #define DIO38_RPORT PINA
  3248. #define DIO38_WPORT PORTA
  3249. #define DIO38_DDR DDRA
  3250. #define DIO38_PWM NULL
  3251. #define DIO39_PIN PINA1
  3252. #define DIO39_RPORT PINA
  3253. #define DIO39_WPORT PORTA
  3254. #define DIO39_DDR DDRA
  3255. #define DIO39_PWM NULL
  3256. #define DIO40_PIN PINA2
  3257. #define DIO40_RPORT PINA
  3258. #define DIO40_WPORT PORTA
  3259. #define DIO40_DDR DDRA
  3260. #define DIO40_PWM NULL
  3261. #define DIO41_PIN PINA3
  3262. #define DIO41_RPORT PINA
  3263. #define DIO41_WPORT PORTA
  3264. #define DIO41_DDR DDRA
  3265. #define DIO41_PWM NULL
  3266. #define DIO42_PIN PINA4
  3267. #define DIO42_RPORT PINA
  3268. #define DIO42_WPORT PORTA
  3269. #define DIO42_DDR DDRA
  3270. #define DIO42_PWM NULL
  3271. #define DIO43_PIN PINA5
  3272. #define DIO43_RPORT PINA
  3273. #define DIO43_WPORT PORTA
  3274. #define DIO43_DDR DDRA
  3275. #define DIO43_PWM NULL
  3276. #define DIO44_PIN PINA6
  3277. #define DIO44_RPORT PINA
  3278. #define DIO44_WPORT PORTA
  3279. #define DIO44_DDR DDRA
  3280. #define DIO44_PWM NULL
  3281. #define DIO45_PIN PINA7
  3282. #define DIO45_RPORT PINA
  3283. #define DIO45_WPORT PORTA
  3284. #define DIO45_DDR DDRA
  3285. #define DIO45_PWM NULL
  3286. #define DIO46_PIN PINF0
  3287. #define DIO46_RPORT PINF
  3288. #define DIO46_WPORT PORTF
  3289. #define DIO46_DDR DDRF
  3290. #define DIO46_PWM NULL
  3291. #define DIO47_PIN PINF1
  3292. #define DIO47_RPORT PINF
  3293. #define DIO47_WPORT PORTF
  3294. #define DIO47_DDR DDRF
  3295. #define DIO47_PWM NULL
  3296. #define DIO48_PIN PINF2
  3297. #define DIO48_RPORT PINF
  3298. #define DIO48_WPORT PORTF
  3299. #define DIO48_DDR DDRF
  3300. #define DIO48_PWM NULL
  3301. #define DIO49_PIN PINF3
  3302. #define DIO49_RPORT PINF
  3303. #define DIO49_WPORT PORTF
  3304. #define DIO49_DDR DDRF
  3305. #define DIO49_PWM NULL
  3306. #define DIO50_PIN PINF4
  3307. #define DIO50_RPORT PINF
  3308. #define DIO50_WPORT PORTF
  3309. #define DIO50_DDR DDRF
  3310. #define DIO50_PWM NULL
  3311. #define DIO51_PIN PINF5
  3312. #define DIO51_RPORT PINF
  3313. #define DIO51_WPORT PORTF
  3314. #define DIO51_DDR DDRF
  3315. #define DIO51_PWM NULL
  3316. #define DIO52_PIN PINF6
  3317. #define DIO52_RPORT PINF
  3318. #define DIO52_WPORT PORTF
  3319. #define DIO52_DDR DDRF
  3320. #define DIO52_PWM NULL
  3321. #define DIO53_PIN PINF7
  3322. #define DIO53_RPORT PINF
  3323. #define DIO53_WPORT PORTF
  3324. #define DIO53_DDR DDRF
  3325. #define DIO53_PWM NULL
  3326. #undef PA0
  3327. #define PA0_PIN PINA0
  3328. #define PA0_RPORT PINA
  3329. #define PA0_WPORT PORTA
  3330. #define PA0_DDR DDRA
  3331. #define PA0_PWM NULL
  3332. #undef PA1
  3333. #define PA1_PIN PINA1
  3334. #define PA1_RPORT PINA
  3335. #define PA1_WPORT PORTA
  3336. #define PA1_DDR DDRA
  3337. #define PA1_PWM NULL
  3338. #undef PA2
  3339. #define PA2_PIN PINA2
  3340. #define PA2_RPORT PINA
  3341. #define PA2_WPORT PORTA
  3342. #define PA2_DDR DDRA
  3343. #define PA2_PWM NULL
  3344. #undef PA3
  3345. #define PA3_PIN PINA3
  3346. #define PA3_RPORT PINA
  3347. #define PA3_WPORT PORTA
  3348. #define PA3_DDR DDRA
  3349. #define PA3_PWM NULL
  3350. #undef PA4
  3351. #define PA4_PIN PINA4
  3352. #define PA4_RPORT PINA
  3353. #define PA4_WPORT PORTA
  3354. #define PA4_DDR DDRA
  3355. #define PA4_PWM NULL
  3356. #undef PA5
  3357. #define PA5_PIN PINA5
  3358. #define PA5_RPORT PINA
  3359. #define PA5_WPORT PORTA
  3360. #define PA5_DDR DDRA
  3361. #define PA5_PWM NULL
  3362. #undef PA6
  3363. #define PA6_PIN PINA6
  3364. #define PA6_RPORT PINA
  3365. #define PA6_WPORT PORTA
  3366. #define PA6_DDR DDRA
  3367. #define PA6_PWM NULL
  3368. #undef PA7
  3369. #define PA7_PIN PINA7
  3370. #define PA7_RPORT PINA
  3371. #define PA7_WPORT PORTA
  3372. #define PA7_DDR DDRA
  3373. #define PA7_PWM NULL
  3374. #undef PB0
  3375. #define PB0_PIN PINB0
  3376. #define PB0_RPORT PINB
  3377. #define PB0_WPORT PORTB
  3378. #define PB0_DDR DDRB
  3379. #define PB0_PWM NULL
  3380. #undef PB1
  3381. #define PB1_PIN PINB1
  3382. #define PB1_RPORT PINB
  3383. #define PB1_WPORT PORTB
  3384. #define PB1_DDR DDRB
  3385. #define PB1_PWM NULL
  3386. #undef PB2
  3387. #define PB2_PIN PINB2
  3388. #define PB2_RPORT PINB
  3389. #define PB2_WPORT PORTB
  3390. #define PB2_DDR DDRB
  3391. #define PB2_PWM NULL
  3392. #undef PB3
  3393. #define PB3_PIN PINB3
  3394. #define PB3_RPORT PINB
  3395. #define PB3_WPORT PORTB
  3396. #define PB3_DDR DDRB
  3397. #define PB3_PWM NULL
  3398. #undef PB4
  3399. #define PB4_PIN PINB4
  3400. #define PB4_RPORT PINB
  3401. #define PB4_WPORT PORTB
  3402. #define PB4_DDR DDRB
  3403. #define PB4_PWM &OCR2A
  3404. #undef PB5
  3405. #define PB5_PIN PINB5
  3406. #define PB5_RPORT PINB
  3407. #define PB5_WPORT PORTB
  3408. #define PB5_DDR DDRB
  3409. #define PB5_PWM NULL
  3410. #undef PB6
  3411. #define PB6_PIN PINB6
  3412. #define PB6_RPORT PINB
  3413. #define PB6_WPORT PORTB
  3414. #define PB6_DDR DDRB
  3415. #define PB6_PWM NULL
  3416. #undef PB7
  3417. #define PB7_PIN PINB7
  3418. #define PB7_RPORT PINB
  3419. #define PB7_WPORT PORTB
  3420. #define PB7_DDR DDRB
  3421. #define PB7_PWM &OCR0A
  3422. #undef PC0
  3423. #define PC0_PIN PINC0
  3424. #define PC0_RPORT PINC
  3425. #define PC0_WPORT PORTC
  3426. #define PC0_DDR DDRC
  3427. #define PC0_PWM NULL
  3428. #undef PC1
  3429. #define PC1_PIN PINC1
  3430. #define PC1_RPORT PINC
  3431. #define PC1_WPORT PORTC
  3432. #define PC1_DDR DDRC
  3433. #define PC1_PWM NULL
  3434. #undef PC2
  3435. #define PC2_PIN PINC2
  3436. #define PC2_RPORT PINC
  3437. #define PC2_WPORT PORTC
  3438. #define PC2_DDR DDRC
  3439. #define PC2_PWM NULL
  3440. #undef PC3
  3441. #define PC3_PIN PINC3
  3442. #define PC3_RPORT PINC
  3443. #define PC3_WPORT PORTC
  3444. #define PC3_DDR DDRC
  3445. #define PC3_PWM NULL
  3446. #undef PC4
  3447. #define PC4_PIN PINC4
  3448. #define PC4_RPORT PINC
  3449. #define PC4_WPORT PORTC
  3450. #define PC4_DDR DDRC
  3451. #define PC4_PWM NULL
  3452. #undef PC5
  3453. #define PC5_PIN PINC5
  3454. #define PC5_RPORT PINC
  3455. #define PC5_WPORT PORTC
  3456. #define PC5_DDR DDRC
  3457. #define PC5_PWM NULL
  3458. #undef PC6
  3459. #define PC6_PIN PINC6
  3460. #define PC6_RPORT PINC
  3461. #define PC6_WPORT PORTC
  3462. #define PC6_DDR DDRC
  3463. #define PC6_PWM NULL
  3464. #undef PC7
  3465. #define PC7_PIN PINC7
  3466. #define PC7_RPORT PINC
  3467. #define PC7_WPORT PORTC
  3468. #define PC7_DDR DDRC
  3469. #define PC7_PWM NULL
  3470. #undef PD0
  3471. #define PD0_PIN PIND0
  3472. #define PD0_RPORT PIND
  3473. #define PD0_WPORT PORTD
  3474. #define PD0_DDR DDRD
  3475. #define PD0_PWM NULL
  3476. #undef PD1
  3477. #define PD1_PIN PIND1
  3478. #define PD1_RPORT PIND
  3479. #define PD1_WPORT PORTD
  3480. #define PD1_DDR DDRD
  3481. #define PD1_PWM NULL
  3482. #undef PD2
  3483. #define PD2_PIN PIND2
  3484. #define PD2_RPORT PIND
  3485. #define PD2_WPORT PORTD
  3486. #define PD2_DDR DDRD
  3487. #define PD2_PWM NULL
  3488. #undef PD3
  3489. #define PD3_PIN PIND3
  3490. #define PD3_RPORT PIND
  3491. #define PD3_WPORT PORTD
  3492. #define PD3_DDR DDRD
  3493. #define PD3_PWM NULL
  3494. #undef PD4
  3495. #define PD4_PIN PIND4
  3496. #define PD4_RPORT PIND
  3497. #define PD4_WPORT PORTD
  3498. #define PD4_DDR DDRD
  3499. #define PD4_PWM NULL
  3500. #undef PD5
  3501. #define PD5_PIN PIND5
  3502. #define PD5_RPORT PIND
  3503. #define PD5_WPORT PORTD
  3504. #define PD5_DDR DDRD
  3505. #define PD5_PWM NULL
  3506. #undef PD6
  3507. #define PD6_PIN PIND6
  3508. #define PD6_RPORT PIND
  3509. #define PD6_WPORT PORTD
  3510. #define PD6_DDR DDRD
  3511. #define PD6_PWM NULL
  3512. #undef PD7
  3513. #define PD7_PIN PIND7
  3514. #define PD7_RPORT PIND
  3515. #define PD7_WPORT PORTD
  3516. #define PD7_DDR DDRD
  3517. #define PD7_PWM NULL
  3518. #undef PE0
  3519. #define PE0_PIN PINE0
  3520. #define PE0_RPORT PINE
  3521. #define PE0_WPORT PORTE
  3522. #define PE0_DDR DDRE
  3523. #define PE0_PWM NULL
  3524. #undef PE1
  3525. #define PE1_PIN PINE1
  3526. #define PE1_RPORT PINE
  3527. #define PE1_WPORT PORTE
  3528. #define PE1_DDR DDRE
  3529. #define PE1_PWM NULL
  3530. #undef PE2
  3531. #define PE2_PIN PINE2
  3532. #define PE2_RPORT PINE
  3533. #define PE2_WPORT PORTE
  3534. #define PE2_DDR DDRE
  3535. #define PE2_PWM NULL
  3536. #undef PE3
  3537. #define PE3_PIN PINE3
  3538. #define PE3_RPORT PINE
  3539. #define PE3_WPORT PORTE
  3540. #define PE3_DDR DDRE
  3541. #define PE3_PWM &OCR3AL
  3542. #undef PE4
  3543. #define PE4_PIN PINE4
  3544. #define PE4_RPORT PINE
  3545. #define PE4_WPORT PORTE
  3546. #define PE4_DDR DDRE
  3547. #define PE4_PWM &OCR3BL
  3548. #undef PE5
  3549. #define PE5_PIN PINE5
  3550. #define PE5_RPORT PINE
  3551. #define PE5_WPORT PORTE
  3552. #define PE5_DDR DDRE
  3553. #define PE5_PWM &OCR3CL
  3554. #undef PE6
  3555. #define PE6_PIN PINE6
  3556. #define PE6_RPORT PINE
  3557. #define PE6_WPORT PORTE
  3558. #define PE6_DDR DDRE
  3559. #define PE6_PWM NULL
  3560. #undef PE7
  3561. #define PE7_PIN PINE7
  3562. #define PE7_RPORT PINE
  3563. #define PE7_WPORT PORTE
  3564. #define PE7_DDR DDRE
  3565. #define PE7_PWM NULL
  3566. #undef PF0
  3567. #define PF0_PIN PINF0
  3568. #define PF0_RPORT PINF
  3569. #define PF0_WPORT PORTF
  3570. #define PF0_DDR DDRF
  3571. #define PF0_PWM NULL
  3572. #undef PF1
  3573. #define PF1_PIN PINF1
  3574. #define PF1_RPORT PINF
  3575. #define PF1_WPORT PORTF
  3576. #define PF1_DDR DDRF
  3577. #define PF1_PWM NULL
  3578. #undef PF2
  3579. #define PF2_PIN PINF2
  3580. #define PF2_RPORT PINF
  3581. #define PF2_WPORT PORTF
  3582. #define PF2_DDR DDRF
  3583. #define PF2_PWM NULL
  3584. #undef PF3
  3585. #define PF3_PIN PINF3
  3586. #define PF3_RPORT PINF
  3587. #define PF3_WPORT PORTF
  3588. #define PF3_DDR DDRF
  3589. #define PF3_PWM NULL
  3590. #undef PF4
  3591. #define PF4_PIN PINF4
  3592. #define PF4_RPORT PINF
  3593. #define PF4_WPORT PORTF
  3594. #define PF4_DDR DDRF
  3595. #define PF4_PWM NULL
  3596. #undef PF5
  3597. #define PF5_PIN PINF5
  3598. #define PF5_RPORT PINF
  3599. #define PF5_WPORT PORTF
  3600. #define PF5_DDR DDRF
  3601. #define PF5_PWM NULL
  3602. #undef PF6
  3603. #define PF6_PIN PINF6
  3604. #define PF6_RPORT PINF
  3605. #define PF6_WPORT PORTF
  3606. #define PF6_DDR DDRF
  3607. #define PF6_PWM NULL
  3608. #undef PF7
  3609. #define PF7_PIN PINF7
  3610. #define PF7_RPORT PINF
  3611. #define PF7_WPORT PORTF
  3612. #define PF7_DDR DDRF
  3613. #define PF7_PWM NULL
  3614. #undef PG0
  3615. #define PG0_PIN PING0
  3616. #define PG0_RPORT PING
  3617. #define PG0_WPORT PORTG
  3618. #define PG0_DDR DDRG
  3619. #define PG0_PWM NULL
  3620. #undef PG1
  3621. #define PG1_PIN PING1
  3622. #define PG1_RPORT PING
  3623. #define PG1_WPORT PORTG
  3624. #define PG1_DDR DDRG
  3625. #define PG1_PWM NULL
  3626. #undef PG2
  3627. #define PG2_PIN PING2
  3628. #define PG2_RPORT PING
  3629. #define PG2_WPORT PORTG
  3630. #define PG2_DDR DDRG
  3631. #define PG2_PWM NULL
  3632. #undef PG3
  3633. #define PG3_PIN PING3
  3634. #define PG3_RPORT PING
  3635. #define PG3_WPORT PORTG
  3636. #define PG3_DDR DDRG
  3637. #define PG3_PWM NULL
  3638. #undef PG4
  3639. #define PG4_PIN PING4
  3640. #define PG4_RPORT PING
  3641. #define PG4_WPORT PORTG
  3642. #define PG4_DDR DDRG
  3643. #define PG4_PWM NULL
  3644. #undef PG5
  3645. #define PG5_PIN PING5
  3646. #define PG5_RPORT PING
  3647. #define PG5_WPORT PORTG
  3648. #define PG5_DDR DDRG
  3649. #define PG5_PWM &OCR0B
  3650. #endif // __AVR_ATmega(1281|2561)__
  3651. #ifndef DIO0_PIN
  3652. #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"
  3653. #endif
  3654. #endif // _FASTIO_ARDUINO_H