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

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