12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130 |
- /**
- * Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- *
- * Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
- /**
- * Contributed by Triffid_Hunter, modified by Kliment, extended by the Marlin team
- * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
- */
-
- #ifndef _FASTIO_ARDUINO_H
- #define _FASTIO_ARDUINO_H
-
- #include <avr/io.h>
-
- #ifndef _BV
- #define _BV(PIN) (1 << PIN)
- #endif
-
- /**
- * Magic I/O routines
- *
- * Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
- */
-
- #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))
-
- // On some boards pins > 0x100 are used. These are not converted to atomic actions. A critical section is needed.
-
- #define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)
-
- #define _WRITE_C(IO, v) do { if (v) { \
- CRITICAL_SECTION_START; \
- {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } \
- CRITICAL_SECTION_END; \
- } \
- else { \
- CRITICAL_SECTION_START; \
- {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } \
- CRITICAL_SECTION_END; \
- } \
- } \
- while (0)
-
- #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)
-
- #define _TOGGLE(IO) do {DIO ## IO ## _RPORT ^= _BV(DIO ## IO ## _PIN); } while (0)
-
- #define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0)
- #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)
-
- #define _GET_INPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) == 0)
- #define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) != 0)
- #define _GET_TIMER(IO) (DIO ## IO ## _PWM)
-
- #define READ(IO) _READ(IO)
- #define WRITE(IO,V) _WRITE(IO,V)
- #define TOGGLE(IO) _TOGGLE(IO)
-
- #define SET_INPUT(IO) _SET_INPUT(IO)
- #define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
- #define SET_OUTPUT(IO) _SET_OUTPUT(IO)
-
- #define GET_INPUT(IO) _GET_INPUT(IO)
- #define GET_OUTPUT(IO) _GET_OUTPUT(IO)
- #define GET_TIMER(IO) _GET_TIMER(IO)
-
- #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)
-
- /**
- * Timer and Interrupt Control
- */
-
- // Waveform Generation Modes
- typedef enum {
- WGM_NORMAL, // 0
- WGM_PWM_PC_8, // 1
- WGM_PWM_PC_9, // 2
- WGM_PWM_PC_10, // 3
- WGM_CTC_OCRnA, // 4 COM OCnx
- WGM_FAST_PWM_8, // 5
- WGM_FAST_PWM_9, // 6
- WGM_FAST_PWM_10, // 7
- WGM_PWM_PC_FC_ICRn, // 8
- WGM_PWM_PC_FC_OCRnA, // 9 COM OCnA
- WGM_PWM_PC_ICRn, // 10
- WGM_PWM_PC_OCRnA, // 11 COM OCnA
- WGM_CTC_ICRn, // 12 COM OCnx
- WGM_reserved, // 13
- WGM_FAST_PWM_ICRn, // 14 COM OCnA
- WGM_FAST_PWM_OCRnA // 15 COM OCnA
- } WaveGenMode;
-
- // Compare Modes
- typedef enum {
- COM_NORMAL, // 0
- COM_TOGGLE, // 1 Non-PWM: OCnx ... Both PWM (WGM 9,11,14,15): OCnA only ... else NORMAL
- COM_CLEAR_SET, // 2 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
- COM_SET_CLEAR // 3 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
- } CompareMode;
-
- // Clock Sources
- typedef enum {
- CS_NONE, // 0
- CS_PRESCALER_1, // 1
- CS_PRESCALER_8, // 2
- CS_PRESCALER_64, // 3
- CS_PRESCALER_256, // 4
- CS_PRESCALER_1024, // 5
- CS_EXT_FALLING, // 6
- CS_EXT_RISING // 7
- } ClockSource;
-
- // Clock Sources (Timer 2 only)
- typedef enum {
- CS2_NONE, // 0
- CS2_PRESCALER_1, // 1
- CS2_PRESCALER_8, // 2
- CS2_PRESCALER_32, // 3
- CS2_PRESCALER_64, // 4
- CS2_PRESCALER_128, // 5
- CS2_PRESCALER_256, // 6
- CS2_PRESCALER_1024 // 7
- } ClockSource2;
-
- // Get interrupt bits in an orderly way
- #define GET_WGM(T) (((TCCR##T##A >> WGM##T##0) & 0x3) | ((TCCR##T##B >> WGM##T##2 << 2) & 0xC))
- #define GET_CS(T) ((TCCR##T##B >> CS##T##0) & 0x7)
- #define GET_COM(T,Q) ((TCCR##T##Q >> COM##T##Q##0) & 0x3)
- #define GET_COMA(T) GET_COM(T,A)
- #define GET_COMB(T) GET_COM(T,B)
- #define GET_COMC(T) GET_COM(T,C)
- #define GET_ICNC(T) (!!(TCCR##T##B & _BV(ICNC##T)))
- #define GET_ICES(T) (!!(TCCR##T##B & _BV(ICES##T)))
- #define GET_FOC(T,Q) (!!(TCCR##T##C & _BV(FOC##T##Q)))
- #define GET_FOCA(T) GET_FOC(T,A)
- #define GET_FOCB(T) GET_FOC(T,B)
- #define GET_FOCC(T) GET_FOC(T,C)
-
- // Set Wave Generation Mode bits
- #define _SET_WGM(T,V) do{ \
- TCCR##T##A = (TCCR##T##A & ~(0x3 << WGM##T##0)) | (( int(V) & 0x3) << WGM##T##0); \
- TCCR##T##B = (TCCR##T##B & ~(0x3 << WGM##T##2)) | (((int(V) >> 2) & 0x3) << WGM##T##2); \
- }while(0)
- #define SET_WGM(T,V) _SET_WGM(T,WGM_##V)
-
- // Set Clock Select bits
- #define _SET_CS(T,V) (TCCR##T##B = (TCCR##T##B & ~(0x7 << CS##T##0)) | ((int(V) & 0x7) << CS##T##0))
- #define _SET_CS0(V) _SET_CS(0,V)
- #define _SET_CS1(V) _SET_CS(1,V)
- #ifdef TCCR2
- #define _SET_CS2(V) (TCCR2 = (TCCR2 & ~(0x7 << CS20)) | (int(V) << CS20))
- #else
- #define _SET_CS2(V) _SET_CS(2,V)
- #endif
- #define _SET_CS3(V) _SET_CS(3,V)
- #define _SET_CS4(V) _SET_CS(4,V)
- #define _SET_CS5(V) _SET_CS(5,V)
- #define SET_CS0(V) _SET_CS0(CS_##V)
- #define SET_CS1(V) _SET_CS1(CS_##V)
- #ifdef TCCR2
- #define SET_CS2(V) _SET_CS2(CS2_##V)
- #else
- #define SET_CS2(V) _SET_CS2(CS_##V)
- #endif
- #define SET_CS3(V) _SET_CS3(CS_##V)
- #define SET_CS4(V) _SET_CS4(CS_##V)
- #define SET_CS5(V) _SET_CS5(CS_##V)
- #define SET_CS(T,V) SET_CS##T(V)
-
- // Set Compare Mode bits
- #define _SET_COM(T,Q,V) (TCCR##T##Q = (TCCR##T##Q & ~(0x3 << COM##T##Q##0)) | (int(V) << COM##T##Q##0))
- #define _SET_COMA(T,V) _SET_COM(T,A,V)
- #define _SET_COMB(T,V) _SET_COM(T,B,V)
- #define _SET_COMC(T,V) _SET_COM(T,C,V)
- #define _SET_COMS(T,V1,V2,V3) do{ _SET_COMA(T,V1); _SET_COMB(T,V2); _SET_COMC(T,V3); }while(0)
- #define SET_COM(T,Q,V) _SET_COM(T,Q,COM_##V)
- #define SET_COMA(T,V) SET_COM(T,A,V)
- #define SET_COMB(T,V) SET_COM(T,B,V)
- #define SET_COMC(T,V) SET_COM(T,C,V)
- #define SET_COMS(T,V1,V2,V3) do{ SET_COMA(T,V1); SET_COMB(T,V2); SET_COMC(T,V3); }while(0)
-
- // Set Noise Canceler bit
- #define SET_ICNC(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICNC##T) : TCCR##T##B & ~_BV(ICNC##T))
-
- // Set Input Capture Edge Select bit
- #define SET_ICES(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICES##T) : TCCR##T##B & ~_BV(ICES##T))
-
- // Set Force Output Compare bit
- #define SET_FOC(T,Q,V) (TCCR##T##C = (V) ? TCCR##T##C | _BV(FOC##T##Q) : TCCR##T##C & ~_BV(FOC##T##Q))
- #define SET_FOCA(T,V) SET_FOC(T,A,V)
- #define SET_FOCB(T,V) SET_FOC(T,B,V)
- #define SET_FOCC(T,V) SET_FOC(T,C,V)
-
- /**
- * Ports and Functions
- */
-
- #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
- // UART
- #define RXD DIO0
- #define TXD DIO1
-
- // SPI
- #define SCK DIO13
- #define MISO DIO12
- #define MOSI DIO11
- #define SS DIO10
-
- // TWI (I2C)
- #define SCL AIO5
- #define SDA AIO4
-
- // timers and PWM
- #define OC0A DIO6
- #define OC0B DIO5
- #define OC1A DIO9
- #define OC1B DIO10
- #define OC2A DIO11
- #define OC2B DIO3
-
- #define DEBUG_LED AIO5
-
- /**
- * Pins Info
- */
-
- #define DIO0_PIN PIND0
- #define DIO0_RPORT PIND
- #define DIO0_WPORT PORTD
- #define DIO0_DDR DDRD
- #define DIO0_PWM NULL
-
- #define DIO1_PIN PIND1
- #define DIO1_RPORT PIND
- #define DIO1_WPORT PORTD
- #define DIO1_DDR DDRD
- #define DIO1_PWM NULL
-
- #define DIO2_PIN PIND2
- #define DIO2_RPORT PIND
- #define DIO2_WPORT PORTD
- #define DIO2_DDR DDRD
- #define DIO2_PWM NULL
-
- #define DIO3_PIN PIND3
- #define DIO3_RPORT PIND
- #define DIO3_WPORT PORTD
- #define DIO3_DDR DDRD
- #define DIO3_PWM &OCR2B
-
- #define DIO4_PIN PIND4
- #define DIO4_RPORT PIND
- #define DIO4_WPORT PORTD
- #define DIO4_DDR DDRD
- #define DIO4_PWM NULL
-
- #define DIO5_PIN PIND5
- #define DIO5_RPORT PIND
- #define DIO5_WPORT PORTD
- #define DIO5_DDR DDRD
- #define DIO5_PWM &OCR0B
-
- #define DIO6_PIN PIND6
- #define DIO6_RPORT PIND
- #define DIO6_WPORT PORTD
- #define DIO6_DDR DDRD
- #define DIO6_PWM &OCR0A
-
- #define DIO7_PIN PIND7
- #define DIO7_RPORT PIND
- #define DIO7_WPORT PORTD
- #define DIO7_DDR DDRD
- #define DIO7_PWM NULL
-
- #define DIO8_PIN PINB0
- #define DIO8_RPORT PINB
- #define DIO8_WPORT PORTB
- #define DIO8_DDR DDRB
- #define DIO8_PWM NULL
-
- #define DIO9_PIN PINB1
- #define DIO9_RPORT PINB
- #define DIO9_WPORT PORTB
- #define DIO9_DDR DDRB
- #define DIO9_PWM NULL
-
- #define DIO10_PIN PINB2
- #define DIO10_RPORT PINB
- #define DIO10_WPORT PORTB
- #define DIO10_DDR DDRB
- #define DIO10_PWM NULL
-
- #define DIO11_PIN PINB3
- #define DIO11_RPORT PINB
- #define DIO11_WPORT PORTB
- #define DIO11_DDR DDRB
- #define DIO11_PWM &OCR2A
-
- #define DIO12_PIN PINB4
- #define DIO12_RPORT PINB
- #define DIO12_WPORT PORTB
- #define DIO12_DDR DDRB
- #define DIO12_PWM NULL
-
- #define DIO13_PIN PINB5
- #define DIO13_RPORT PINB
- #define DIO13_WPORT PORTB
- #define DIO13_DDR DDRB
- #define DIO13_PWM NULL
-
-
- #define DIO14_PIN PINC0
- #define DIO14_RPORT PINC
- #define DIO14_WPORT PORTC
- #define DIO14_DDR DDRC
- #define DIO14_PWM NULL
-
- #define DIO15_PIN PINC1
- #define DIO15_RPORT PINC
- #define DIO15_WPORT PORTC
- #define DIO15_DDR DDRC
- #define DIO15_PWM NULL
-
- #define DIO16_PIN PINC2
- #define DIO16_RPORT PINC
- #define DIO16_WPORT PORTC
- #define DIO16_DDR DDRC
- #define DIO16_PWM NULL
-
- #define DIO17_PIN PINC3
- #define DIO17_RPORT PINC
- #define DIO17_WPORT PORTC
- #define DIO17_DDR DDRC
- #define DIO17_PWM NULL
-
- #define DIO18_PIN PINC4
- #define DIO18_RPORT PINC
- #define DIO18_WPORT PORTC
- #define DIO18_DDR DDRC
- #define DIO18_PWM NULL
-
- #define DIO19_PIN PINC5
- #define DIO19_RPORT PINC
- #define DIO19_WPORT PORTC
- #define DIO19_DDR DDRC
- #define DIO19_PWM NULL
-
- #define DIO20_PIN PINC6
- #define DIO20_RPORT PINC
- #define DIO20_WPORT PORTC
- #define DIO20_DDR DDRC
- #define DIO20_PWM NULL
-
- #define DIO21_PIN PINC7
- #define DIO21_RPORT PINC
- #define DIO21_WPORT PORTC
- #define DIO21_DDR DDRC
- #define DIO21_PWM NULL
-
- #undef PB0
- #define PB0_PIN PINB0
- #define PB0_RPORT PINB
- #define PB0_WPORT PORTB
- #define PB0_DDR DDRB
- #define PB0_PWM NULL
-
- #undef PB1
- #define PB1_PIN PINB1
- #define PB1_RPORT PINB
- #define PB1_WPORT PORTB
- #define PB1_DDR DDRB
- #define PB1_PWM NULL
-
- #undef PB2
- #define PB2_PIN PINB2
- #define PB2_RPORT PINB
- #define PB2_WPORT PORTB
- #define PB2_DDR DDRB
- #define PB2_PWM NULL
-
- #undef PB3
- #define PB3_PIN PINB3
- #define PB3_RPORT PINB
- #define PB3_WPORT PORTB
- #define PB3_DDR DDRB
- #define PB3_PWM &OCR2A
-
- #undef PB4
- #define PB4_PIN PINB4
- #define PB4_RPORT PINB
- #define PB4_WPORT PORTB
- #define PB4_DDR DDRB
- #define PB4_PWM NULL
-
- #undef PB5
- #define PB5_PIN PINB5
- #define PB5_RPORT PINB
- #define PB5_WPORT PORTB
- #define PB5_DDR DDRB
- #define PB5_PWM NULL
-
- #undef PB6
- #define PB6_PIN PINB6
- #define PB6_RPORT PINB
- #define PB6_WPORT PORTB
- #define PB6_DDR DDRB
- #define PB6_PWM NULL
-
- #undef PB7
- #define PB7_PIN PINB7
- #define PB7_RPORT PINB
- #define PB7_WPORT PORTB
- #define PB7_DDR DDRB
- #define PB7_PWM NULL
-
-
- #undef PC0
- #define PC0_PIN PINC0
- #define PC0_RPORT PINC
- #define PC0_WPORT PORTC
- #define PC0_DDR DDRC
- #define PC0_PWM NULL
-
- #undef PC1
- #define PC1_PIN PINC1
- #define PC1_RPORT PINC
- #define PC1_WPORT PORTC
- #define PC1_DDR DDRC
- #define PC1_PWM NULL
-
- #undef PC2
- #define PC2_PIN PINC2
- #define PC2_RPORT PINC
- #define PC2_WPORT PORTC
- #define PC2_DDR DDRC
- #define PC2_PWM NULL
-
- #undef PC3
- #define PC3_PIN PINC3
- #define PC3_RPORT PINC
- #define PC3_WPORT PORTC
- #define PC3_DDR DDRC
- #define PC3_PWM NULL
-
- #undef PC4
- #define PC4_PIN PINC4
- #define PC4_RPORT PINC
- #define PC4_WPORT PORTC
- #define PC4_DDR DDRC
- #define PC4_PWM NULL
-
- #undef PC5
- #define PC5_PIN PINC5
- #define PC5_RPORT PINC
- #define PC5_WPORT PORTC
- #define PC5_DDR DDRC
- #define PC5_PWM NULL
-
- #undef PC6
- #define PC6_PIN PINC6
- #define PC6_RPORT PINC
- #define PC6_WPORT PORTC
- #define PC6_DDR DDRC
- #define PC6_PWM NULL
-
- #undef PC7
- #define PC7_PIN PINC7
- #define PC7_RPORT PINC
- #define PC7_WPORT PORTC
- #define PC7_DDR DDRC
- #define PC7_PWM NULL
-
-
- #undef PD0
- #define PD0_PIN PIND0
- #define PD0_RPORT PIND
- #define PD0_WPORT PORTD
- #define PD0_DDR DDRD
- #define PD0_PWM NULL
-
- #undef PD1
- #define PD1_PIN PIND1
- #define PD1_RPORT PIND
- #define PD1_WPORT PORTD
- #define PD1_DDR DDRD
- #define PD1_PWM NULL
-
- #undef PD2
- #define PD2_PIN PIND2
- #define PD2_RPORT PIND
- #define PD2_WPORT PORTD
- #define PD2_DDR DDRD
- #define PD2_PWM NULL
-
- #undef PD3
- #define PD3_PIN PIND3
- #define PD3_RPORT PIND
- #define PD3_WPORT PORTD
- #define PD3_DDR DDRD
- #define PD3_PWM &OCR2B
-
- #undef PD4
- #define PD4_PIN PIND4
- #define PD4_RPORT PIND
- #define PD4_WPORT PORTD
- #define PD4_DDR DDRD
- #define PD4_PWM NULL
-
- #undef PD5
- #define PD5_PIN PIND5
- #define PD5_RPORT PIND
- #define PD5_WPORT PORTD
- #define PD5_DDR DDRD
- #define PD5_PWM &OCR0B
-
- #undef PD6
- #define PD6_PIN PIND6
- #define PD6_RPORT PIND
- #define PD6_WPORT PORTD
- #define PD6_DDR DDRD
- #define PD6_PWM &OCR0A
-
- #undef PD7
- #define PD7_PIN PIND7
- #define PD7_RPORT PIND
- #define PD7_WPORT PORTD
- #define PD7_DDR DDRD
- #define PD7_PWM NULL
- #endif // __AVR_ATmega(168|328|328P)__
-
- #if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
- // UART
- #define RXD DIO8
- #define TXD DIO9
- #define RXD0 DIO8
- #define TXD0 DIO9
-
- #define RXD1 DIO10
- #define TXD1 DIO11
-
- // SPI
- #define SCK DIO7
- #define MISO DIO6
- #define MOSI DIO5
- #define SS DIO4
-
- // TWI (I2C)
- #define SCL DIO16
- #define SDA DIO17
-
- // timers and PWM
- #define OC0A DIO3
- #define OC0B DIO4
- #define OC1A DIO13
- #define OC1B DIO12
- #define OC2A DIO15
- #define OC2B DIO14
-
- #define DEBUG_LED DIO0
-
- /**
- * Pins Info
- */
-
- #define DIO0_PIN PINB0
- #define DIO0_RPORT PINB
- #define DIO0_WPORT PORTB
- #define DIO0_DDR DDRB
- #define DIO0_PWM NULL
-
- #define DIO1_PIN PINB1
- #define DIO1_RPORT PINB
- #define DIO1_WPORT PORTB
- #define DIO1_DDR DDRB
- #define DIO1_PWM NULL
-
- #define DIO2_PIN PINB2
- #define DIO2_RPORT PINB
- #define DIO2_WPORT PORTB
- #define DIO2_DDR DDRB
- #define DIO2_PWM NULL
-
- #define DIO3_PIN PINB3
- #define DIO3_RPORT PINB
- #define DIO3_WPORT PORTB
- #define DIO3_DDR DDRB
- #define DIO3_PWM OCR0A
-
- #define DIO4_PIN PINB4
- #define DIO4_RPORT PINB
- #define DIO4_WPORT PORTB
- #define DIO4_DDR DDRB
- #define DIO4_PWM OCR0B
-
- #define DIO5_PIN PINB5
- #define DIO5_RPORT PINB
- #define DIO5_WPORT PORTB
- #define DIO5_DDR DDRB
- #define DIO5_PWM NULL
-
- #define DIO6_PIN PINB6
- #define DIO6_RPORT PINB
- #define DIO6_WPORT PORTB
- #define DIO6_DDR DDRB
- #define DIO6_PWM NULL
-
- #define DIO7_PIN PINB7
- #define DIO7_RPORT PINB
- #define DIO7_WPORT PORTB
- #define DIO7_DDR DDRB
- #define DIO7_PWM NULL
-
- #define DIO8_PIN PIND0
- #define DIO8_RPORT PIND
- #define DIO8_WPORT PORTD
- #define DIO8_DDR DDRD
- #define DIO8_PWM NULL
-
- #define DIO9_PIN PIND1
- #define DIO9_RPORT PIND
- #define DIO9_WPORT PORTD
- #define DIO9_DDR DDRD
- #define DIO9_PWM NULL
-
- #define DIO10_PIN PIND2
- #define DIO10_RPORT PIND
- #define DIO10_WPORT PORTD
- #define DIO10_DDR DDRD
- #define DIO10_PWM NULL
-
- #define DIO11_PIN PIND3
- #define DIO11_RPORT PIND
- #define DIO11_WPORT PORTD
- #define DIO11_DDR DDRD
- #define DIO11_PWM NULL
-
- #define DIO12_PIN PIND4
- #define DIO12_RPORT PIND
- #define DIO12_WPORT PORTD
- #define DIO12_DDR DDRD
- #define DIO12_PWM OCR1B
-
- #define DIO13_PIN PIND5
- #define DIO13_RPORT PIND
- #define DIO13_WPORT PORTD
- #define DIO13_DDR DDRD
- #define DIO13_PWM OCR1A
-
- #define DIO14_PIN PIND6
- #define DIO14_RPORT PIND
- #define DIO14_WPORT PORTD
- #define DIO14_DDR DDRD
- #define DIO14_PWM OCR2B
-
- #define DIO15_PIN PIND7
- #define DIO15_RPORT PIND
- #define DIO15_WPORT PORTD
- #define DIO15_DDR DDRD
- #define DIO15_PWM OCR2A
-
- #define DIO16_PIN PINC0
- #define DIO16_RPORT PINC
- #define DIO16_WPORT PORTC
- #define DIO16_DDR DDRC
- #define DIO16_PWM NULL
-
- #define DIO17_PIN PINC1
- #define DIO17_RPORT PINC
- #define DIO17_WPORT PORTC
- #define DIO17_DDR DDRC
- #define DIO17_PWM NULL
-
- #define DIO18_PIN PINC2
- #define DIO18_RPORT PINC
- #define DIO18_WPORT PORTC
- #define DIO18_DDR DDRC
- #define DIO18_PWM NULL
-
- #define DIO19_PIN PINC3
- #define DIO19_RPORT PINC
- #define DIO19_WPORT PORTC
- #define DIO19_DDR DDRC
- #define DIO19_PWM NULL
-
- #define DIO20_PIN PINC4
- #define DIO20_RPORT PINC
- #define DIO20_WPORT PORTC
- #define DIO20_DDR DDRC
- #define DIO20_PWM NULL
-
- #define DIO21_PIN PINC5
- #define DIO21_RPORT PINC
- #define DIO21_WPORT PORTC
- #define DIO21_DDR DDRC
- #define DIO21_PWM NULL
-
- #define DIO22_PIN PINC6
- #define DIO22_RPORT PINC
- #define DIO22_WPORT PORTC
- #define DIO22_DDR DDRC
- #define DIO22_PWM NULL
-
- #define DIO23_PIN PINC7
- #define DIO23_RPORT PINC
- #define DIO23_WPORT PORTC
- #define DIO23_DDR DDRC
- #define DIO23_PWM NULL
-
- #define DIO24_PIN PINA7
- #define DIO24_RPORT PINA
- #define DIO24_WPORT PORTA
- #define DIO24_DDR DDRA
- #define DIO24_PWM NULL
-
- #define DIO25_PIN PINA6
- #define DIO25_RPORT PINA
- #define DIO25_WPORT PORTA
- #define DIO25_DDR DDRA
- #define DIO25_PWM NULL
-
- #define DIO26_PIN PINA5
- #define DIO26_RPORT PINA
- #define DIO26_WPORT PORTA
- #define DIO26_DDR DDRA
- #define DIO26_PWM NULL
-
- #define DIO27_PIN PINA4
- #define DIO27_RPORT PINA
- #define DIO27_WPORT PORTA
- #define DIO27_DDR DDRA
- #define DIO27_PWM NULL
-
- #define DIO28_PIN PINA3
- #define DIO28_RPORT PINA
- #define DIO28_WPORT PORTA
- #define DIO28_DDR DDRA
- #define DIO28_PWM NULL
-
- #define DIO29_PIN PINA2
- #define DIO29_RPORT PINA
- #define DIO29_WPORT PORTA
- #define DIO29_DDR DDRA
- #define DIO29_PWM NULL
-
- #define DIO30_PIN PINA1
- #define DIO30_RPORT PINA
- #define DIO30_WPORT PORTA
- #define DIO30_DDR DDRA
- #define DIO30_PWM NULL
-
- #define DIO31_PIN PINA0
- #define DIO31_RPORT PINA
- #define DIO31_WPORT PORTA
- #define DIO31_DDR DDRA
- #define DIO31_PWM NULL
-
- #define AIO0_PIN PINA0
- #define AIO0_RPORT PINA
- #define AIO0_WPORT PORTA
- #define AIO0_DDR DDRA
- #define AIO0_PWM NULL
-
- #define AIO1_PIN PINA1
- #define AIO1_RPORT PINA
- #define AIO1_WPORT PORTA
- #define AIO1_DDR DDRA
- #define AIO1_PWM NULL
-
- #define AIO2_PIN PINA2
- #define AIO2_RPORT PINA
- #define AIO2_WPORT PORTA
- #define AIO2_DDR DDRA
- #define AIO2_PWM NULL
-
- #define AIO3_PIN PINA3
- #define AIO3_RPORT PINA
- #define AIO3_WPORT PORTA
- #define AIO3_DDR DDRA
- #define AIO3_PWM NULL
-
- #define AIO4_PIN PINA4
- #define AIO4_RPORT PINA
- #define AIO4_WPORT PORTA
- #define AIO4_DDR DDRA
- #define AIO4_PWM NULL
-
- #define AIO5_PIN PINA5
- #define AIO5_RPORT PINA
- #define AIO5_WPORT PORTA
- #define AIO5_DDR DDRA
- #define AIO5_PWM NULL
-
- #define AIO6_PIN PINA6
- #define AIO6_RPORT PINA
- #define AIO6_WPORT PORTA
- #define AIO6_DDR DDRA
- #define AIO6_PWM NULL
-
- #define AIO7_PIN PINA7
- #define AIO7_RPORT PINA
- #define AIO7_WPORT PORTA
- #define AIO7_DDR DDRA
- #define AIO7_PWM NULL
-
- #undef PA0
- #define PA0_PIN PINA0
- #define PA0_RPORT PINA
- #define PA0_WPORT PORTA
- #define PA0_DDR DDRA
- #define PA0_PWM NULL
-
- #undef PA1
- #define PA1_PIN PINA1
- #define PA1_RPORT PINA
- #define PA1_WPORT PORTA
- #define PA1_DDR DDRA
- #define PA1_PWM NULL
-
- #undef PA2
- #define PA2_PIN PINA2
- #define PA2_RPORT PINA
- #define PA2_WPORT PORTA
- #define PA2_DDR DDRA
- #define PA2_PWM NULL
-
- #undef PA3
- #define PA3_PIN PINA3
- #define PA3_RPORT PINA
- #define PA3_WPORT PORTA
- #define PA3_DDR DDRA
- #define PA3_PWM NULL
-
- #undef PA4
- #define PA4_PIN PINA4
- #define PA4_RPORT PINA
- #define PA4_WPORT PORTA
- #define PA4_DDR DDRA
- #define PA4_PWM NULL
-
- #undef PA5
- #define PA5_PIN PINA5
- #define PA5_RPORT PINA
- #define PA5_WPORT PORTA
- #define PA5_DDR DDRA
- #define PA5_PWM NULL
-
- #undef PA6
- #define PA6_PIN PINA6
- #define PA6_RPORT PINA
- #define PA6_WPORT PORTA
- #define PA6_DDR DDRA
- #define PA6_PWM NULL
-
- #undef PA7
- #define PA7_PIN PINA7
- #define PA7_RPORT PINA
- #define PA7_WPORT PORTA
- #define PA7_DDR DDRA
- #define PA7_PWM NULL
-
-
- #undef PB0
- #define PB0_PIN PINB0
- #define PB0_RPORT PINB
- #define PB0_WPORT PORTB
- #define PB0_DDR DDRB
- #define PB0_PWM NULL
-
- #undef PB1
- #define PB1_PIN PINB1
- #define PB1_RPORT PINB
- #define PB1_WPORT PORTB
- #define PB1_DDR DDRB
- #define PB1_PWM NULL
-
- #undef PB2
- #define PB2_PIN PINB2
- #define PB2_RPORT PINB
- #define PB2_WPORT PORTB
- #define PB2_DDR DDRB
- #define PB2_PWM NULL
-
- #undef PB3
- #define PB3_PIN PINB3
- #define PB3_RPORT PINB
- #define PB3_WPORT PORTB
- #define PB3_DDR DDRB
- #define PB3_PWM OCR0A
-
- #undef PB4
- #define PB4_PIN PINB4
- #define PB4_RPORT PINB
- #define PB4_WPORT PORTB
- #define PB4_DDR DDRB
- #define PB4_PWM OCR0B
-
- #undef PB5
- #define PB5_PIN PINB5
- #define PB5_RPORT PINB
- #define PB5_WPORT PORTB
- #define PB5_DDR DDRB
- #define PB5_PWM NULL
-
- #undef PB6
- #define PB6_PIN PINB6
- #define PB6_RPORT PINB
- #define PB6_WPORT PORTB
- #define PB6_DDR DDRB
- #define PB6_PWM NULL
-
- #undef PB7
- #define PB7_PIN PINB7
- #define PB7_RPORT PINB
- #define PB7_WPORT PORTB
- #define PB7_DDR DDRB
- #define PB7_PWM NULL
-
-
- #undef PC0
- #define PC0_PIN PINC0
- #define PC0_RPORT PINC
- #define PC0_WPORT PORTC
- #define PC0_DDR DDRC
- #define PC0_PWM NULL
-
- #undef PC1
- #define PC1_PIN PINC1
- #define PC1_RPORT PINC
- #define PC1_WPORT PORTC
- #define PC1_DDR DDRC
- #define PC1_PWM NULL
-
- #undef PC2
- #define PC2_PIN PINC2
- #define PC2_RPORT PINC
- #define PC2_WPORT PORTC
- #define PC2_DDR DDRC
- #define PC2_PWM NULL
-
- #undef PC3
- #define PC3_PIN PINC3
- #define PC3_RPORT PINC
- #define PC3_WPORT PORTC
- #define PC3_DDR DDRC
- #define PC3_PWM NULL
-
- #undef PC4
- #define PC4_PIN PINC4
- #define PC4_RPORT PINC
- #define PC4_WPORT PORTC
- #define PC4_DDR DDRC
- #define PC4_PWM NULL
-
- #undef PC5
- #define PC5_PIN PINC5
- #define PC5_RPORT PINC
- #define PC5_WPORT PORTC
- #define PC5_DDR DDRC
- #define PC5_PWM NULL
-
- #undef PC6
- #define PC6_PIN PINC6
- #define PC6_RPORT PINC
- #define PC6_WPORT PORTC
- #define PC6_DDR DDRC
- #define PC6_PWM NULL
-
- #undef PC7
- #define PC7_PIN PINC7
- #define PC7_RPORT PINC
- #define PC7_WPORT PORTC
- #define PC7_DDR DDRC
- #define PC7_PWM NULL
-
-
- #undef PD0
- #define PD0_PIN PIND0
- #define PD0_RPORT PIND
- #define PD0_WPORT PORTD
- #define PD0_DDR DDRD
- #define PD0_PWM NULL
-
- #undef PD1
- #define PD1_PIN PIND1
- #define PD1_RPORT PIND
- #define PD1_WPORT PORTD
- #define PD1_DDR DDRD
- #define PD1_PWM NULL
-
- #undef PD2
- #define PD2_PIN PIND2
- #define PD2_RPORT PIND
- #define PD2_WPORT PORTD
- #define PD2_DDR DDRD
- #define PD2_PWM NULL
-
- #undef PD3
- #define PD3_PIN PIND3
- #define PD3_RPORT PIND
- #define PD3_WPORT PORTD
- #define PD3_DDR DDRD
- #define PD3_PWM NULL
-
- #undef PD4
- #define PD4_PIN PIND4
- #define PD4_RPORT PIND
- #define PD4_WPORT PORTD
- #define PD4_DDR DDRD
- #define PD4_PWM NULL
-
- #undef PD5
- #define PD5_PIN PIND5
- #define PD5_RPORT PIND
- #define PD5_WPORT PORTD
- #define PD5_DDR DDRD
- #define PD5_PWM NULL
-
- #undef PD6
- #define PD6_PIN PIND6
- #define PD6_RPORT PIND
- #define PD6_WPORT PORTD
- #define PD6_DDR DDRD
- #define PD6_PWM OCR2B
-
- #undef PD7
- #define PD7_PIN PIND7
- #define PD7_RPORT PIND
- #define PD7_WPORT PORTD
- #define PD7_DDR DDRD
- #define PD7_PWM OCR2A
- #endif // __AVR_ATmega(644|644P|644PA)__
-
- #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
- // UART
- #define RXD DIO0
- #define TXD DIO1
-
- // SPI
- #define SCK DIO52
- #define MISO DIO50
- #define MOSI DIO51
- #define SS DIO53
-
- // TWI (I2C)
- #define SCL DIO21
- #define SDA DIO20
-
- // timers and PWM
- #define OC0A DIO13
- #define OC0B DIO4
- #define OC1A DIO11
- #define OC1B DIO12
- #define OC2A DIO10
- #define OC2B DIO9
- #define OC3A DIO5
- #define OC3B DIO2
- #define OC3C DIO3
- #define OC4A DIO6
- #define OC4B DIO7
- #define OC4C DIO8
- #define OC5A DIO46
- #define OC5B DIO45
- #define OC5C DIO44
-
- // change for your board
- #define DEBUG_LED DIO21
-
- /**
- * Pins Info
- */
-
- #define DIO0_PIN PINE0
- #define DIO0_RPORT PINE
- #define DIO0_WPORT PORTE
- #define DIO0_DDR DDRE
- #define DIO0_PWM NULL
-
- #define DIO1_PIN PINE1
- #define DIO1_RPORT PINE
- #define DIO1_WPORT PORTE
- #define DIO1_DDR DDRE
- #define DIO1_PWM NULL
-
- #define DIO2_PIN PINE4
- #define DIO2_RPORT PINE
- #define DIO2_WPORT PORTE
- #define DIO2_DDR DDRE
- #define DIO2_PWM &OCR3BL
-
- #define DIO3_PIN PINE5
- #define DIO3_RPORT PINE
- #define DIO3_WPORT PORTE
- #define DIO3_DDR DDRE
- #define DIO3_PWM &OCR3CL
-
- #define DIO4_PIN PING5
- #define DIO4_RPORT PING
- #define DIO4_WPORT PORTG
- #define DIO4_DDR DDRG
- #define DIO4_PWM &OCR0B
-
- #define DIO5_PIN PINE3
- #define DIO5_RPORT PINE
- #define DIO5_WPORT PORTE
- #define DIO5_DDR DDRE
- #define DIO5_PWM &OCR3AL
-
- #define DIO6_PIN PINH3
- #define DIO6_RPORT PINH
- #define DIO6_WPORT PORTH
- #define DIO6_DDR DDRH
- #define DIO6_PWM &OCR4AL
-
- #define DIO7_PIN PINH4
- #define DIO7_RPORT PINH
- #define DIO7_WPORT PORTH
- #define DIO7_DDR DDRH
- #define DIO7_PWM &OCR4BL
-
- #define DIO8_PIN PINH5
- #define DIO8_RPORT PINH
- #define DIO8_WPORT PORTH
- #define DIO8_DDR DDRH
- #define DIO8_PWM &OCR4CL
-
- #define DIO9_PIN PINH6
- #define DIO9_RPORT PINH
- #define DIO9_WPORT PORTH
- #define DIO9_DDR DDRH
- #define DIO9_PWM &OCR2B
-
- #define DIO10_PIN PINB4
- #define DIO10_RPORT PINB
- #define DIO10_WPORT PORTB
- #define DIO10_DDR DDRB
- #define DIO10_PWM &OCR2A
-
- #define DIO11_PIN PINB5
- #define DIO11_RPORT PINB
- #define DIO11_WPORT PORTB
- #define DIO11_DDR DDRB
- #define DIO11_PWM NULL
-
- #define DIO12_PIN PINB6
- #define DIO12_RPORT PINB
- #define DIO12_WPORT PORTB
- #define DIO12_DDR DDRB
- #define DIO12_PWM NULL
-
- #define DIO13_PIN PINB7
- #define DIO13_RPORT PINB
- #define DIO13_WPORT PORTB
- #define DIO13_DDR DDRB
- #define DIO13_PWM &OCR0A
-
- #define DIO14_PIN PINJ1
- #define DIO14_RPORT PINJ
- #define DIO14_WPORT PORTJ
- #define DIO14_DDR DDRJ
- #define DIO14_PWM NULL
-
- #define DIO15_PIN PINJ0
- #define DIO15_RPORT PINJ
- #define DIO15_WPORT PORTJ
- #define DIO15_DDR DDRJ
- #define DIO15_PWM NULL
-
- #define DIO16_PIN PINH1
- #define DIO16_RPORT PINH
- #define DIO16_WPORT PORTH
- #define DIO16_DDR DDRH
- #define DIO16_PWM NULL
-
- #define DIO17_PIN PINH0
- #define DIO17_RPORT PINH
- #define DIO17_WPORT PORTH
- #define DIO17_DDR DDRH
- #define DIO17_PWM NULL
-
- #define DIO18_PIN PIND3
- #define DIO18_RPORT PIND
- #define DIO18_WPORT PORTD
- #define DIO18_DDR DDRD
- #define DIO18_PWM NULL
-
- #define DIO19_PIN PIND2
- #define DIO19_RPORT PIND
- #define DIO19_WPORT PORTD
- #define DIO19_DDR DDRD
- #define DIO19_PWM NULL
-
- #define DIO20_PIN PIND1
- #define DIO20_RPORT PIND
- #define DIO20_WPORT PORTD
- #define DIO20_DDR DDRD
- #define DIO20_PWM NULL
-
- #define DIO21_PIN PIND0
- #define DIO21_RPORT PIND
- #define DIO21_WPORT PORTD
- #define DIO21_DDR DDRD
- #define DIO21_PWM NULL
-
- #define DIO22_PIN PINA0
- #define DIO22_RPORT PINA
- #define DIO22_WPORT PORTA
- #define DIO22_DDR DDRA
- #define DIO22_PWM NULL
-
- #define DIO23_PIN PINA1
- #define DIO23_RPORT PINA
- #define DIO23_WPORT PORTA
- #define DIO23_DDR DDRA
- #define DIO23_PWM NULL
-
- #define DIO24_PIN PINA2
- #define DIO24_RPORT PINA
- #define DIO24_WPORT PORTA
- #define DIO24_DDR DDRA
- #define DIO24_PWM NULL
-
- #define DIO25_PIN PINA3
- #define DIO25_RPORT PINA
- #define DIO25_WPORT PORTA
- #define DIO25_DDR DDRA
- #define DIO25_PWM NULL
-
- #define DIO26_PIN PINA4
- #define DIO26_RPORT PINA
- #define DIO26_WPORT PORTA
- #define DIO26_DDR DDRA
- #define DIO26_PWM NULL
-
- #define DIO27_PIN PINA5
- #define DIO27_RPORT PINA
- #define DIO27_WPORT PORTA
- #define DIO27_DDR DDRA
- #define DIO27_PWM NULL
-
- #define DIO28_PIN PINA6
- #define DIO28_RPORT PINA
- #define DIO28_WPORT PORTA
- #define DIO28_DDR DDRA
- #define DIO28_PWM NULL
-
- #define DIO29_PIN PINA7
- #define DIO29_RPORT PINA
- #define DIO29_WPORT PORTA
- #define DIO29_DDR DDRA
- #define DIO29_PWM NULL
-
- #define DIO30_PIN PINC7
- #define DIO30_RPORT PINC
- #define DIO30_WPORT PORTC
- #define DIO30_DDR DDRC
- #define DIO30_PWM NULL
-
- #define DIO31_PIN PINC6
- #define DIO31_RPORT PINC
- #define DIO31_WPORT PORTC
- #define DIO31_DDR DDRC
- #define DIO31_PWM NULL
-
- #define DIO32_PIN PINC5
- #define DIO32_RPORT PINC
- #define DIO32_WPORT PORTC
- #define DIO32_DDR DDRC
- #define DIO32_PWM NULL
-
- #define DIO33_PIN PINC4
- #define DIO33_RPORT PINC
- #define DIO33_WPORT PORTC
- #define DIO33_DDR DDRC
- #define DIO33_PWM NULL
-
- #define DIO34_PIN PINC3
- #define DIO34_RPORT PINC
- #define DIO34_WPORT PORTC
- #define DIO34_DDR DDRC
- #define DIO34_PWM NULL
-
- #define DIO35_PIN PINC2
- #define DIO35_RPORT PINC
- #define DIO35_WPORT PORTC
- #define DIO35_DDR DDRC
- #define DIO35_PWM NULL
-
- #define DIO36_PIN PINC1
- #define DIO36_RPORT PINC
- #define DIO36_WPORT PORTC
- #define DIO36_DDR DDRC
- #define DIO36_PWM NULL
-
- #define DIO37_PIN PINC0
- #define DIO37_RPORT PINC
- #define DIO37_WPORT PORTC
- #define DIO37_DDR DDRC
- #define DIO37_PWM NULL
-
- #define DIO38_PIN PIND7
- #define DIO38_RPORT PIND
- #define DIO38_WPORT PORTD
- #define DIO38_DDR DDRD
- #define DIO38_PWM NULL
-
- #define DIO39_PIN PING2
- #define DIO39_RPORT PING
- #define DIO39_WPORT PORTG
- #define DIO39_DDR DDRG
- #define DIO39_PWM NULL
-
- #define DIO40_PIN PING1
- #define DIO40_RPORT PING
- #define DIO40_WPORT PORTG
- #define DIO40_DDR DDRG
- #define DIO40_PWM NULL
-
- #define DIO41_PIN PING0
- #define DIO41_RPORT PING
- #define DIO41_WPORT PORTG
- #define DIO41_DDR DDRG
- #define DIO41_PWM NULL
-
- #define DIO42_PIN PINL7
- #define DIO42_RPORT PINL
- #define DIO42_WPORT PORTL
- #define DIO42_DDR DDRL
- #define DIO42_PWM NULL
-
- #define DIO43_PIN PINL6
- #define DIO43_RPORT PINL
- #define DIO43_WPORT PORTL
- #define DIO43_DDR DDRL
- #define DIO43_PWM NULL
-
- #define DIO44_PIN PINL5
- #define DIO44_RPORT PINL
- #define DIO44_WPORT PORTL
- #define DIO44_DDR DDRL
- #define DIO44_PWM &OCR5CL
-
- #define DIO45_PIN PINL4
- #define DIO45_RPORT PINL
- #define DIO45_WPORT PORTL
- #define DIO45_DDR DDRL
- #define DIO45_PWM &OCR5BL
-
- #define DIO46_PIN PINL3
- #define DIO46_RPORT PINL
- #define DIO46_WPORT PORTL
- #define DIO46_DDR DDRL
- #define DIO46_PWM &OCR5AL
-
- #define DIO47_PIN PINL2
- #define DIO47_RPORT PINL
- #define DIO47_WPORT PORTL
- #define DIO47_DDR DDRL
- #define DIO47_PWM NULL
-
- #define DIO48_PIN PINL1
- #define DIO48_RPORT PINL
- #define DIO48_WPORT PORTL
- #define DIO48_DDR DDRL
- #define DIO48_PWM NULL
-
- #define DIO49_PIN PINL0
- #define DIO49_RPORT PINL
- #define DIO49_WPORT PORTL
- #define DIO49_DDR DDRL
- #define DIO49_PWM NULL
-
- #define DIO50_PIN PINB3
- #define DIO50_RPORT PINB
- #define DIO50_WPORT PORTB
- #define DIO50_DDR DDRB
- #define DIO50_PWM NULL
-
- #define DIO51_PIN PINB2
- #define DIO51_RPORT PINB
- #define DIO51_WPORT PORTB
- #define DIO51_DDR DDRB
- #define DIO51_PWM NULL
-
- #define DIO52_PIN PINB1
- #define DIO52_RPORT PINB
- #define DIO52_WPORT PORTB
- #define DIO52_DDR DDRB
- #define DIO52_PWM NULL
-
- #define DIO53_PIN PINB0
- #define DIO53_RPORT PINB
- #define DIO53_WPORT PORTB
- #define DIO53_DDR DDRB
- #define DIO53_PWM NULL
-
- #define DIO54_PIN PINF0
- #define DIO54_RPORT PINF
- #define DIO54_WPORT PORTF
- #define DIO54_DDR DDRF
- #define DIO54_PWM NULL
-
- #define DIO55_PIN PINF1
- #define DIO55_RPORT PINF
- #define DIO55_WPORT PORTF
- #define DIO55_DDR DDRF
- #define DIO55_PWM NULL
-
- #define DIO56_PIN PINF2
- #define DIO56_RPORT PINF
- #define DIO56_WPORT PORTF
- #define DIO56_DDR DDRF
- #define DIO56_PWM NULL
-
- #define DIO57_PIN PINF3
- #define DIO57_RPORT PINF
- #define DIO57_WPORT PORTF
- #define DIO57_DDR DDRF
- #define DIO57_PWM NULL
-
- #define DIO58_PIN PINF4
- #define DIO58_RPORT PINF
- #define DIO58_WPORT PORTF
- #define DIO58_DDR DDRF
- #define DIO58_PWM NULL
-
- #define DIO59_PIN PINF5
- #define DIO59_RPORT PINF
- #define DIO59_WPORT PORTF
- #define DIO59_DDR DDRF
- #define DIO59_PWM NULL
-
- #define DIO60_PIN PINF6
- #define DIO60_RPORT PINF
- #define DIO60_WPORT PORTF
- #define DIO60_DDR DDRF
- #define DIO60_PWM NULL
-
- #define DIO61_PIN PINF7
- #define DIO61_RPORT PINF
- #define DIO61_WPORT PORTF
- #define DIO61_DDR DDRF
- #define DIO61_PWM NULL
-
- #define DIO62_PIN PINK0
- #define DIO62_RPORT PINK
- #define DIO62_WPORT PORTK
- #define DIO62_DDR DDRK
- #define DIO62_PWM NULL
-
- #define DIO63_PIN PINK1
- #define DIO63_RPORT PINK
- #define DIO63_WPORT PORTK
- #define DIO63_DDR DDRK
- #define DIO63_PWM NULL
-
- #define DIO64_PIN PINK2
- #define DIO64_RPORT PINK
- #define DIO64_WPORT PORTK
- #define DIO64_DDR DDRK
- #define DIO64_PWM NULL
-
- #define DIO65_PIN PINK3
- #define DIO65_RPORT PINK
- #define DIO65_WPORT PORTK
- #define DIO65_DDR DDRK
- #define DIO65_PWM NULL
-
- #define DIO66_PIN PINK4
- #define DIO66_RPORT PINK
- #define DIO66_WPORT PORTK
- #define DIO66_DDR DDRK
- #define DIO66_PWM NULL
-
- #define DIO67_PIN PINK5
- #define DIO67_RPORT PINK
- #define DIO67_WPORT PORTK
- #define DIO67_DDR DDRK
- #define DIO67_PWM NULL
-
- #define DIO68_PIN PINK6
- #define DIO68_RPORT PINK
- #define DIO68_WPORT PORTK
- #define DIO68_DDR DDRK
- #define DIO68_PWM NULL
-
- #define DIO69_PIN PINK7
- #define DIO69_RPORT PINK
- #define DIO69_WPORT PORTK
- #define DIO69_DDR DDRK
- #define DIO69_PWM NULL
-
- #define DIO70_PIN PING4
- #define DIO70_RPORT PING
- #define DIO70_WPORT PORTG
- #define DIO70_DDR DDRG
- #define DIO70_PWM NULL
-
- #define DIO71_PIN PING3
- #define DIO71_RPORT PING
- #define DIO71_WPORT PORTG
- #define DIO71_DDR DDRG
- #define DIO71_PWM NULL
-
- #define DIO72_PIN PINJ2
- #define DIO72_RPORT PINJ
- #define DIO72_WPORT PORTJ
- #define DIO72_DDR DDRJ
- #define DIO72_PWM NULL
-
- #define DIO73_PIN PINJ3
- #define DIO73_RPORT PINJ
- #define DIO73_WPORT PORTJ
- #define DIO73_DDR DDRJ
- #define DIO73_PWM NULL
-
- #define DIO74_PIN PINJ7
- #define DIO74_RPORT PINJ
- #define DIO74_WPORT PORTJ
- #define DIO74_DDR DDRJ
- #define DIO74_PWM NULL
-
- #define DIO75_PIN PINJ4
- #define DIO75_RPORT PINJ
- #define DIO75_WPORT PORTJ
- #define DIO75_DDR DDRJ
- #define DIO75_PWM NULL
-
- #define DIO76_PIN PINJ5
- #define DIO76_RPORT PINJ
- #define DIO76_WPORT PORTJ
- #define DIO76_DDR DDRJ
- #define DIO76_PWM NULL
-
- #define DIO77_PIN PINJ6
- #define DIO77_RPORT PINJ
- #define DIO77_WPORT PORTJ
- #define DIO77_DDR DDRJ
- #define DIO77_PWM NULL
-
- #define DIO78_PIN PINE2
- #define DIO78_RPORT PINE
- #define DIO78_WPORT PORTE
- #define DIO78_DDR DDRE
- #define DIO78_PWM NULL
-
- #define DIO79_PIN PINE6
- #define DIO79_RPORT PINE
- #define DIO79_WPORT PORTE
- #define DIO79_DDR DDRE
- #define DIO79_PWM NULL
-
- #define DIO80_PIN PINE7
- #define DIO80_RPORT PINE
- #define DIO80_WPORT PORTE
- #define DIO80_DDR DDRE
- #define DIO80_PWM NULL
-
- #define DIO81_PIN PIND4
- #define DIO81_RPORT PIND
- #define DIO81_WPORT PORTD
- #define DIO81_DDR DDRD
- #define DIO81_PWM NULL
-
- #define DIO82_PIN PIND5
- #define DIO82_RPORT PIND
- #define DIO82_WPORT PORTD
- #define DIO82_DDR DDRD
- #define DIO82_PWM NULL
-
- #define DIO83_PIN PIND6
- #define DIO83_RPORT PIND
- #define DIO83_WPORT PORTD
- #define DIO83_DDR DDRD
- #define DIO83_PWM NULL
-
- #define DIO84_PIN PINH2
- #define DIO84_RPORT PINH
- #define DIO84_WPORT PORTH
- #define DIO84_DDR DDRH
- #define DIO84_PWM NULL
-
- #define DIO85_PIN PINH7
- #define DIO85_RPORT PINH
- #define DIO85_WPORT PORTH
- #define DIO85_DDR DDRH
- #define DIO85_PWM NULL
-
- #undef PA0
- #define PA0_PIN PINA0
- #define PA0_RPORT PINA
- #define PA0_WPORT PORTA
- #define PA0_DDR DDRA
- #define PA0_PWM NULL
- #undef PA1
- #define PA1_PIN PINA1
- #define PA1_RPORT PINA
- #define PA1_WPORT PORTA
- #define PA1_DDR DDRA
- #define PA1_PWM NULL
- #undef PA2
- #define PA2_PIN PINA2
- #define PA2_RPORT PINA
- #define PA2_WPORT PORTA
- #define PA2_DDR DDRA
- #define PA2_PWM NULL
- #undef PA3
- #define PA3_PIN PINA3
- #define PA3_RPORT PINA
- #define PA3_WPORT PORTA
- #define PA3_DDR DDRA
- #define PA3_PWM NULL
- #undef PA4
- #define PA4_PIN PINA4
- #define PA4_RPORT PINA
- #define PA4_WPORT PORTA
- #define PA4_DDR DDRA
- #define PA4_PWM NULL
- #undef PA5
- #define PA5_PIN PINA5
- #define PA5_RPORT PINA
- #define PA5_WPORT PORTA
- #define PA5_DDR DDRA
- #define PA5_PWM NULL
- #undef PA6
- #define PA6_PIN PINA6
- #define PA6_RPORT PINA
- #define PA6_WPORT PORTA
- #define PA6_DDR DDRA
- #define PA6_PWM NULL
- #undef PA7
- #define PA7_PIN PINA7
- #define PA7_RPORT PINA
- #define PA7_WPORT PORTA
- #define PA7_DDR DDRA
- #define PA7_PWM NULL
-
- #undef PB0
- #define PB0_PIN PINB0
- #define PB0_RPORT PINB
- #define PB0_WPORT PORTB
- #define PB0_DDR DDRB
- #define PB0_PWM NULL
- #undef PB1
- #define PB1_PIN PINB1
- #define PB1_RPORT PINB
- #define PB1_WPORT PORTB
- #define PB1_DDR DDRB
- #define PB1_PWM NULL
- #undef PB2
- #define PB2_PIN PINB2
- #define PB2_RPORT PINB
- #define PB2_WPORT PORTB
- #define PB2_DDR DDRB
- #define PB2_PWM NULL
- #undef PB3
- #define PB3_PIN PINB3
- #define PB3_RPORT PINB
- #define PB3_WPORT PORTB
- #define PB3_DDR DDRB
- #define PB3_PWM NULL
- #undef PB4
- #define PB4_PIN PINB4
- #define PB4_RPORT PINB
- #define PB4_WPORT PORTB
- #define PB4_DDR DDRB
- #define PB4_PWM &OCR2A
- #undef PB5
- #define PB5_PIN PINB5
- #define PB5_RPORT PINB
- #define PB5_WPORT PORTB
- #define PB5_DDR DDRB
- #define PB5_PWM NULL
- #undef PB6
- #define PB6_PIN PINB6
- #define PB6_RPORT PINB
- #define PB6_WPORT PORTB
- #define PB6_DDR DDRB
- #define PB6_PWM NULL
- #undef PB7
- #define PB7_PIN PINB7
- #define PB7_RPORT PINB
- #define PB7_WPORT PORTB
- #define PB7_DDR DDRB
- #define PB7_PWM &OCR0A
-
- #undef PC0
- #define PC0_PIN PINC0
- #define PC0_RPORT PINC
- #define PC0_WPORT PORTC
- #define PC0_DDR DDRC
- #define PC0_PWM NULL
- #undef PC1
- #define PC1_PIN PINC1
- #define PC1_RPORT PINC
- #define PC1_WPORT PORTC
- #define PC1_DDR DDRC
- #define PC1_PWM NULL
- #undef PC2
- #define PC2_PIN PINC2
- #define PC2_RPORT PINC
- #define PC2_WPORT PORTC
- #define PC2_DDR DDRC
- #define PC2_PWM NULL
- #undef PC3
- #define PC3_PIN PINC3
- #define PC3_RPORT PINC
- #define PC3_WPORT PORTC
- #define PC3_DDR DDRC
- #define PC3_PWM NULL
- #undef PC4
- #define PC4_PIN PINC4
- #define PC4_RPORT PINC
- #define PC4_WPORT PORTC
- #define PC4_DDR DDRC
- #define PC4_PWM NULL
- #undef PC5
- #define PC5_PIN PINC5
- #define PC5_RPORT PINC
- #define PC5_WPORT PORTC
- #define PC5_DDR DDRC
- #define PC5_PWM NULL
- #undef PC6
- #define PC6_PIN PINC6
- #define PC6_RPORT PINC
- #define PC6_WPORT PORTC
- #define PC6_DDR DDRC
- #define PC6_PWM NULL
- #undef PC7
- #define PC7_PIN PINC7
- #define PC7_RPORT PINC
- #define PC7_WPORT PORTC
- #define PC7_DDR DDRC
- #define PC7_PWM NULL
-
- #undef PD0
- #define PD0_PIN PIND0
- #define PD0_RPORT PIND
- #define PD0_WPORT PORTD
- #define PD0_DDR DDRD
- #define PD0_PWM NULL
- #undef PD1
- #define PD1_PIN PIND1
- #define PD1_RPORT PIND
- #define PD1_WPORT PORTD
- #define PD1_DDR DDRD
- #define PD1_PWM NULL
- #undef PD2
- #define PD2_PIN PIND2
- #define PD2_RPORT PIND
- #define PD2_WPORT PORTD
- #define PD2_DDR DDRD
- #define PD2_PWM NULL
- #undef PD3
- #define PD3_PIN PIND3
- #define PD3_RPORT PIND
- #define PD3_WPORT PORTD
- #define PD3_DDR DDRD
- #define PD3_PWM NULL
- #undef PD4
- #define PD4_PIN PIND4
- #define PD4_RPORT PIND
- #define PD4_WPORT PORTD
- #define PD4_DDR DDRD
- #define PD4_PWM NULL
- #undef PD5
- #define PD5_PIN PIND5
- #define PD5_RPORT PIND
- #define PD5_WPORT PORTD
- #define PD5_DDR DDRD
- #define PD5_PWM NULL
- #undef PD6
- #define PD6_PIN PIND6
- #define PD6_RPORT PIND
- #define PD6_WPORT PORTD
- #define PD6_DDR DDRD
- #define PD6_PWM NULL
- #undef PD7
- #define PD7_PIN PIND7
- #define PD7_RPORT PIND
- #define PD7_WPORT PORTD
- #define PD7_DDR DDRD
- #define PD7_PWM NULL
-
- #undef PE0
- #define PE0_PIN PINE0
- #define PE0_RPORT PINE
- #define PE0_WPORT PORTE
- #define PE0_DDR DDRE
- #define PE0_PWM NULL
- #undef PE1
- #define PE1_PIN PINE1
- #define PE1_RPORT PINE
- #define PE1_WPORT PORTE
- #define PE1_DDR DDRE
- #define PE1_PWM NULL
- #undef PE2
- #define PE2_PIN PINE2
- #define PE2_RPORT PINE
- #define PE2_WPORT PORTE
- #define PE2_DDR DDRE
- #define PE2_PWM NULL
- #undef PE3
- #define PE3_PIN PINE3
- #define PE3_RPORT PINE
- #define PE3_WPORT PORTE
- #define PE3_DDR DDRE
- #define PE3_PWM &OCR3AL
- #undef PE4
- #define PE4_PIN PINE4
- #define PE4_RPORT PINE
- #define PE4_WPORT PORTE
- #define PE4_DDR DDRE
- #define PE4_PWM &OCR3BL
- #undef PE5
- #define PE5_PIN PINE5
- #define PE5_RPORT PINE
- #define PE5_WPORT PORTE
- #define PE5_DDR DDRE
- #define PE5_PWM &OCR3CL
- #undef PE6
- #define PE6_PIN PINE6
- #define PE6_RPORT PINE
- #define PE6_WPORT PORTE
- #define PE6_DDR DDRE
- #define PE6_PWM NULL
- #undef PE7
- #define PE7_PIN PINE7
- #define PE7_RPORT PINE
- #define PE7_WPORT PORTE
- #define PE7_DDR DDRE
- #define PE7_PWM NULL
-
- #undef PF0
- #define PF0_PIN PINF0
- #define PF0_RPORT PINF
- #define PF0_WPORT PORTF
- #define PF0_DDR DDRF
- #define PF0_PWM NULL
- #undef PF1
- #define PF1_PIN PINF1
- #define PF1_RPORT PINF
- #define PF1_WPORT PORTF
- #define PF1_DDR DDRF
- #define PF1_PWM NULL
- #undef PF2
- #define PF2_PIN PINF2
- #define PF2_RPORT PINF
- #define PF2_WPORT PORTF
- #define PF2_DDR DDRF
- #define PF2_PWM NULL
- #undef PF3
- #define PF3_PIN PINF3
- #define PF3_RPORT PINF
- #define PF3_WPORT PORTF
- #define PF3_DDR DDRF
- #define PF3_PWM NULL
- #undef PF4
- #define PF4_PIN PINF4
- #define PF4_RPORT PINF
- #define PF4_WPORT PORTF
- #define PF4_DDR DDRF
- #define PF4_PWM NULL
- #undef PF5
- #define PF5_PIN PINF5
- #define PF5_RPORT PINF
- #define PF5_WPORT PORTF
- #define PF5_DDR DDRF
- #define PF5_PWM NULL
- #undef PF6
- #define PF6_PIN PINF6
- #define PF6_RPORT PINF
- #define PF6_WPORT PORTF
- #define PF6_DDR DDRF
- #define PF6_PWM NULL
- #undef PF7
- #define PF7_PIN PINF7
- #define PF7_RPORT PINF
- #define PF7_WPORT PORTF
- #define PF7_DDR DDRF
- #define PF7_PWM NULL
-
- #undef PG0
- #define PG0_PIN PING0
- #define PG0_RPORT PING
- #define PG0_WPORT PORTG
- #define PG0_DDR DDRG
- #define PG0_PWM NULL
- #undef PG1
- #define PG1_PIN PING1
- #define PG1_RPORT PING
- #define PG1_WPORT PORTG
- #define PG1_DDR DDRG
- #define PG1_PWM NULL
- #undef PG2
- #define PG2_PIN PING2
- #define PG2_RPORT PING
- #define PG2_WPORT PORTG
- #define PG2_DDR DDRG
- #define PG2_PWM NULL
- #undef PG3
- #define PG3_PIN PING3
- #define PG3_RPORT PING
- #define PG3_WPORT PORTG
- #define PG3_DDR DDRG
- #define PG3_PWM NULL
- #undef PG4
- #define PG4_PIN PING4
- #define PG4_RPORT PING
- #define PG4_WPORT PORTG
- #define PG4_DDR DDRG
- #define PG4_PWM NULL
- #undef PG5
- #define PG5_PIN PING5
- #define PG5_RPORT PING
- #define PG5_WPORT PORTG
- #define PG5_DDR DDRG
- #define PG5_PWM &OCR0B
-
- #undef PH0
- #define PH0_PIN PINH0
- #define PH0_RPORT PINH
- #define PH0_WPORT PORTH
- #define PH0_DDR DDRH
- #define PH0_PWM NULL
- #undef PH1
- #define PH1_PIN PINH1
- #define PH1_RPORT PINH
- #define PH1_WPORT PORTH
- #define PH1_DDR DDRH
- #define PH1_PWM NULL
- #undef PH2
- #define PH2_PIN PINH2
- #define PH2_RPORT PINH
- #define PH2_WPORT PORTH
- #define PH2_DDR DDRH
- #define PH2_PWM NULL
- #undef PH3
- #define PH3_PIN PINH3
- #define PH3_RPORT PINH
- #define PH3_WPORT PORTH
- #define PH3_DDR DDRH
- #define PH3_PWM &OCR4AL
- #undef PH4
- #define PH4_PIN PINH4
- #define PH4_RPORT PINH
- #define PH4_WPORT PORTH
- #define PH4_DDR DDRH
- #define PH4_PWM &OCR4BL
- #undef PH5
- #define PH5_PIN PINH5
- #define PH5_RPORT PINH
- #define PH5_WPORT PORTH
- #define PH5_DDR DDRH
- #define PH5_PWM &OCR4CL
- #undef PH6
- #define PH6_PIN PINH6
- #define PH6_RPORT PINH
- #define PH6_WPORT PORTH
- #define PH6_DDR DDRH
- #define PH6_PWM &OCR2B
- #undef PH7
- #define PH7_PIN PINH7
- #define PH7_RPORT PINH
- #define PH7_WPORT PORTH
- #define PH7_DDR DDRH
- #define PH7_PWM NULL
-
- #undef PJ0
- #define PJ0_PIN PINJ0
- #define PJ0_RPORT PINJ
- #define PJ0_WPORT PORTJ
- #define PJ0_DDR DDRJ
- #define PJ0_PWM NULL
- #undef PJ1
- #define PJ1_PIN PINJ1
- #define PJ1_RPORT PINJ
- #define PJ1_WPORT PORTJ
- #define PJ1_DDR DDRJ
- #define PJ1_PWM NULL
- #undef PJ2
- #define PJ2_PIN PINJ2
- #define PJ2_RPORT PINJ
- #define PJ2_WPORT PORTJ
- #define PJ2_DDR DDRJ
- #define PJ2_PWM NULL
- #undef PJ3
- #define PJ3_PIN PINJ3
- #define PJ3_RPORT PINJ
- #define PJ3_WPORT PORTJ
- #define PJ3_DDR DDRJ
- #define PJ3_PWM NULL
- #undef PJ4
- #define PJ4_PIN PINJ4
- #define PJ4_RPORT PINJ
- #define PJ4_WPORT PORTJ
- #define PJ4_DDR DDRJ
- #define PJ4_PWM NULL
- #undef PJ5
- #define PJ5_PIN PINJ5
- #define PJ5_RPORT PINJ
- #define PJ5_WPORT PORTJ
- #define PJ5_DDR DDRJ
- #define PJ5_PWM NULL
- #undef PJ6
- #define PJ6_PIN PINJ6
- #define PJ6_RPORT PINJ
- #define PJ6_WPORT PORTJ
- #define PJ6_DDR DDRJ
- #define PJ6_PWM NULL
- #undef PJ7
- #define PJ7_PIN PINJ7
- #define PJ7_RPORT PINJ
- #define PJ7_WPORT PORTJ
- #define PJ7_DDR DDRJ
- #define PJ7_PWM NULL
-
- #undef PK0
- #define PK0_PIN PINK0
- #define PK0_RPORT PINK
- #define PK0_WPORT PORTK
- #define PK0_DDR DDRK
- #define PK0_PWM NULL
- #undef PK1
- #define PK1_PIN PINK1
- #define PK1_RPORT PINK
- #define PK1_WPORT PORTK
- #define PK1_DDR DDRK
- #define PK1_PWM NULL
- #undef PK2
- #define PK2_PIN PINK2
- #define PK2_RPORT PINK
- #define PK2_WPORT PORTK
- #define PK2_DDR DDRK
- #define PK2_PWM NULL
- #undef PK3
- #define PK3_PIN PINK3
- #define PK3_RPORT PINK
- #define PK3_WPORT PORTK
- #define PK3_DDR DDRK
- #define PK3_PWM NULL
- #undef PK4
- #define PK4_PIN PINK4
- #define PK4_RPORT PINK
- #define PK4_WPORT PORTK
- #define PK4_DDR DDRK
- #define PK4_PWM NULL
- #undef PK5
- #define PK5_PIN PINK5
- #define PK5_RPORT PINK
- #define PK5_WPORT PORTK
- #define PK5_DDR DDRK
- #define PK5_PWM NULL
- #undef PK6
- #define PK6_PIN PINK6
- #define PK6_RPORT PINK
- #define PK6_WPORT PORTK
- #define PK6_DDR DDRK
- #define PK6_PWM NULL
- #undef PK7
- #define PK7_PIN PINK7
- #define PK7_RPORT PINK
- #define PK7_WPORT PORTK
- #define PK7_DDR DDRK
- #define PK7_PWM NULL
-
- #undef PL0
- #define PL0_PIN PINL0
- #define PL0_RPORT PINL
- #define PL0_WPORT PORTL
- #define PL0_DDR DDRL
- #define PL0_PWM NULL
- #undef PL1
- #define PL1_PIN PINL1
- #define PL1_RPORT PINL
- #define PL1_WPORT PORTL
- #define PL1_DDR DDRL
- #define PL1_PWM NULL
- #undef PL2
- #define PL2_PIN PINL2
- #define PL2_RPORT PINL
- #define PL2_WPORT PORTL
- #define PL2_DDR DDRL
- #define PL2_PWM NULL
- #undef PL3
- #define PL3_PIN PINL3
- #define PL3_RPORT PINL
- #define PL3_WPORT PORTL
- #define PL3_DDR DDRL
- #define PL3_PWM &OCR5AL
- #undef PL4
- #define PL4_PIN PINL4
- #define PL4_RPORT PINL
- #define PL4_WPORT PORTL
- #define PL4_DDR DDRL
- #define PL4_PWM &OCR5BL
- #undef PL5
- #define PL5_PIN PINL5
- #define PL5_RPORT PINL
- #define PL5_WPORT PORTL
- #define PL5_DDR DDRL
- #define PL5_PWM &OCR5CL
- #undef PL6
- #define PL6_PIN PINL6
- #define PL6_RPORT PINL
- #define PL6_WPORT PORTL
- #define PL6_DDR DDRL
- #define PL6_PWM NULL
- #undef PL7
- #define PL7_PIN PINL7
- #define PL7_RPORT PINL
- #define PL7_WPORT PORTL
- #define PL7_DDR DDRL
- #define PL7_PWM NULL
- #endif // __AVR_ATmega(1280|2560)__
-
- #if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
-
- // change for your board
- #define DEBUG_LED DIO31 /* led D5 red */
-
- /**
- * Pins Info
- */
-
- //#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
- #ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments
-
- // SPI
- #define SCK DIO9 // 21
- #define MISO DIO11 // 23
- #define MOSI DIO10 // 22
- #define SS DIO8 // 20
-
- #define DIO0_PIN PINA0
- #define DIO0_RPORT PINA
- #define DIO0_WPORT PORTA
- #define DIO0_PWM NULL
- #define DIO0_DDR DDRA
-
- #define DIO1_PIN PINA1
- #define DIO1_RPORT PINA
- #define DIO1_WPORT PORTA
- #define DIO1_PWM NULL
- #define DIO1_DDR DDRA
-
- #define DIO2_PIN PINA2
- #define DIO2_RPORT PINA
- #define DIO2_WPORT PORTA
- #define DIO2_PWM NULL
- #define DIO2_DDR DDRA
-
- #define DIO3_PIN PINA3
- #define DIO3_RPORT PINA
- #define DIO3_WPORT PORTA
- #define DIO3_PWM NULL
- #define DIO3_DDR DDRA
-
- #define DIO4_PIN PINA4
- #define DIO4_RPORT PINA
- #define DIO4_WPORT PORTA
- #define DIO4_PWM NULL
- #define DIO4_DDR DDRA
-
- #define DIO5_PIN PINA5
- #define DIO5_RPORT PINA
- #define DIO5_WPORT PORTA
- #define DIO5_PWM NULL
- #define DIO5_DDR DDRA
-
- #define DIO6_PIN PINA6
- #define DIO6_RPORT PINA
- #define DIO6_WPORT PORTA
- #define DIO6_PWM NULL
- #define DIO6_DDR DDRA
-
- #define DIO7_PIN PINA7
- #define DIO7_RPORT PINA
- #define DIO7_WPORT PORTA
- #define DIO7_PWM NULL
- #define DIO7_DDR DDRA
-
- #define DIO8_PIN PINB0
- #define DIO8_RPORT PINB
- #define DIO8_WPORT PORTB
- #define DIO8_PWM NULL
- #define DIO8_DDR DDRB
-
- #define DIO9_PIN PINB1
- #define DIO9_RPORT PINB
- #define DIO9_WPORT PORTB
- #define DIO9_PWM NULL
- #define DIO9_DDR DDRB
-
- #define DIO10_PIN PINB2
- #define DIO10_RPORT PINB
- #define DIO10_WPORT PORTB
- #define DIO10_PWM NULL
- #define DIO10_DDR DDRB
-
- #define DIO11_PIN PINB3
- #define DIO11_RPORT PINB
- #define DIO11_WPORT PORTB
- #define DIO11_PWM NULL
- #define DIO11_DDR DDRB
-
- #define DIO12_PIN PINB4
- #define DIO12_RPORT PINB
- #define DIO12_WPORT PORTB
- #define DIO12_PWM NULL
- #define DIO12_DDR DDRB
-
- #define DIO13_PIN PINB5
- #define DIO13_RPORT PINB
- #define DIO13_WPORT PORTB
- #define DIO13_PWM NULL
- #define DIO13_DDR DDRB
-
- #define DIO14_PIN PINB6
- #define DIO14_RPORT PINB
- #define DIO14_WPORT PORTB
- #define DIO14_PWM NULL
- #define DIO14_DDR DDRB
-
- #define DIO15_PIN PINB7
- #define DIO15_RPORT PINB
- #define DIO15_WPORT PORTB
- #define DIO15_PWM NULL
- #define DIO15_DDR DDRB
-
- #define DIO16_PIN PINC0
- #define DIO16_RPORT PINC
- #define DIO16_WPORT PORTC
- #define DIO16_PWM NULL
- #define DIO16_DDR DDRC
-
- #define DIO17_PIN PINC1
- #define DIO17_RPORT PINC
- #define DIO17_WPORT PORTC
- #define DIO17_PWM NULL
- #define DIO17_DDR DDRC
-
- #define DIO18_PIN PINC2
- #define DIO18_RPORT PINC
- #define DIO18_WPORT PORTC
- #define DIO18_PWM NULL
- #define DIO18_DDR DDRC
-
- #define DIO19_PIN PINC3
- #define DIO19_RPORT PINC
- #define DIO19_WPORT PORTC
- #define DIO19_PWM NULL
- #define DIO19_DDR DDRC
-
- #define DIO20_PIN PINC4
- #define DIO20_RPORT PINC
- #define DIO20_WPORT PORTC
- #define DIO20_PWM NULL
- #define DIO20_DDR DDRC
-
- #define DIO21_PIN PINC5
- #define DIO21_RPORT PINC
- #define DIO21_WPORT PORTC
- #define DIO21_PWM NULL
- #define DIO21_DDR DDRC
-
- #define DIO22_PIN PINC6
- #define DIO22_RPORT PINC
- #define DIO22_WPORT PORTC
- #define DIO22_PWM NULL
- #define DIO22_DDR DDRC
-
- #define DIO23_PIN PINC7
- #define DIO23_RPORT PINC
- #define DIO23_WPORT PORTC
- #define DIO23_PWM NULL
- #define DIO23_DDR DDRC
-
- #define DIO24_PIN PIND0
- #define DIO24_RPORT PIND
- #define DIO24_WPORT PORTD
- #define DIO24_PWM NULL
- #define DIO24_DDR DDRD
-
- #define DIO25_PIN PIND1
- #define DIO25_RPORT PIND
- #define DIO25_WPORT PORTD
- #define DIO25_PWM NULL
- #define DIO25_DDR DDRD
-
- #define DIO26_PIN PIND2
- #define DIO26_RPORT PIND
- #define DIO26_WPORT PORTD
- #define DIO26_PWM NULL
- #define DIO26_DDR DDRD
-
- #define DIO27_PIN PIND3
- #define DIO27_RPORT PIND
- #define DIO27_WPORT PORTD
- #define DIO27_PWM NULL
- #define DIO27_DDR DDRD
-
- #define DIO28_PIN PIND4
- #define DIO28_RPORT PIND
- #define DIO28_WPORT PORTD
- #define DIO28_PWM NULL
- #define DIO28_DDR DDRD
-
- #define DIO29_PIN PIND5
- #define DIO29_RPORT PIND
- #define DIO29_WPORT PORTD
- #define DIO29_PWM NULL
- #define DIO29_DDR DDRD
-
- #define DIO30_PIN PIND6
- #define DIO30_RPORT PIND
- #define DIO30_WPORT PORTD
- #define DIO30_PWM NULL
- #define DIO30_DDR DDRD
-
- #define DIO31_PIN PIND7
- #define DIO31_RPORT PIND
- #define DIO31_WPORT PORTD
- #define DIO31_PWM NULL
- #define DIO31_DDR DDRD
-
-
- #define DIO32_PIN PINE0
- #define DIO32_RPORT PINE
- #define DIO32_WPORT PORTE
- #define DIO32_PWM NULL
- #define DIO32_DDR DDRE
-
- #define DIO33_PIN PINE1
- #define DIO33_RPORT PINE
- #define DIO33_WPORT PORTE
- #define DIO33_PWM NULL
- #define DIO33_DDR DDRE
-
- #define DIO34_PIN PINE2
- #define DIO34_RPORT PINE
- #define DIO34_WPORT PORTE
- #define DIO34_PWM NULL
- #define DIO34_DDR DDRE
-
- #define DIO35_PIN PINE3
- #define DIO35_RPORT PINE
- #define DIO35_WPORT PORTE
- #define DIO35_PWM NULL
- #define DIO35_DDR DDRE
-
- #define DIO36_PIN PINE4
- #define DIO36_RPORT PINE
- #define DIO36_WPORT PORTE
- #define DIO36_PWM NULL
- #define DIO36_DDR DDRE
-
- #define DIO37_PIN PINE5
- #define DIO37_RPORT PINE
- #define DIO37_WPORT PORTE
- #define DIO37_PWM NULL
- #define DIO37_DDR DDRE
-
- #define DIO38_PIN PINE6
- #define DIO38_RPORT PINE
- #define DIO38_WPORT PORTE
- #define DIO38_PWM NULL
- #define DIO38_DDR DDRE
-
- #define DIO39_PIN PINE7
- #define DIO39_RPORT PINE
- #define DIO39_WPORT PORTE
- #define DIO39_PWM NULL
- #define DIO39_DDR DDRE
-
- #define AIO0_PIN PINF0
- #define AIO0_RPORT PINF
- #define AIO0_WPORT PORTF
- #define AIO0_PWM NULL
- #define AIO0_DDR DDRF
-
- #define AIO1_PIN PINF1
- #define AIO1_RPORT PINF
- #define AIO1_WPORT PORTF
- #define AIO1_PWM NULL
- #define AIO1_DDR DDRF
-
- #define AIO2_PIN PINF2
- #define AIO2_RPORT PINF
- #define AIO2_WPORT PORTF
- #define AIO2_PWM NULL
- #define AIO2_DDR DDRF
-
- #define AIO3_PIN PINF3
- #define AIO3_RPORT PINF
- #define AIO3_WPORT PORTF
- #define AIO3_PWM NULL
- #define AIO3_DDR DDRF
-
- #define AIO4_PIN PINF4
- #define AIO4_RPORT PINF
- #define AIO4_WPORT PORTF
- #define AIO4_PWM NULL
- #define AIO4_DDR DDRF
-
- #define AIO5_PIN PINF5
- #define AIO5_RPORT PINF
- #define AIO5_WPORT PORTF
- #define AIO5_PWM NULL
- #define AIO5_DDR DDRF
-
- #define AIO6_PIN PINF6
- #define AIO6_RPORT PINF
- #define AIO6_WPORT PORTF
- #define AIO6_PWM NULL
- #define AIO6_DDR DDRF
-
- #define AIO7_PIN PINF7
- #define AIO7_RPORT PINF
- #define AIO7_WPORT PORTF
- #define AIO7_PWM NULL
- #define AIO7_DDR DDRF
-
- #define DIO40_PIN PINF0
- #define DIO40_RPORT PINF
- #define DIO40_WPORT PORTF
- #define DIO40_PWM NULL
- #define DIO40_DDR DDRF
-
- #define DIO41_PIN PINF1
- #define DIO41_RPORT PINF
- #define DIO41_WPORT PORTF
- #define DIO41_PWM NULL
- #define DIO41_DDR DDRF
-
- #define DIO42_PIN PINF2
- #define DIO42_RPORT PINF
- #define DIO42_WPORT PORTF
- #define DIO42_PWM NULL
- #define DIO42_DDR DDRF
-
- #define DIO43_PIN PINF3
- #define DIO43_RPORT PINF
- #define DIO43_WPORT PORTF
- #define DIO43_PWM NULL
- #define DIO43_DDR DDRF
-
- #define DIO44_PIN PINF4
- #define DIO44_RPORT PINF
- #define DIO44_WPORT PORTF
- #define DIO44_PWM NULL
- #define DIO44_DDR DDRF
-
- #define DIO45_PIN PINF5
- #define DIO45_RPORT PINF
- #define DIO45_WPORT PORTF
- #define DIO45_PWM NULL
- #define DIO45_DDR DDRF
-
- #define DIO46_PIN PINF6
- #define DIO46_RPORT PINF
- #define DIO46_WPORT PORTF
- #define DIO46_PWM NULL
- #define DIO46_DDR DDRF
-
- #define DIO47_PIN PINF7
- #define DIO47_RPORT PINF
- #define DIO47_WPORT PORTF
- #define DIO47_PWM NULL
- #define DIO47_DDR DDRF
-
-
- #undef PA0
- #define PA0_PIN PINA0
- #define PA0_RPORT PINA
- #define PA0_WPORT PORTA
- #define PA0_PWM NULL
- #define PA0_DDR DDRA
- #undef PA1
- #define PA1_PIN PINA1
- #define PA1_RPORT PINA
- #define PA1_WPORT PORTA
- #define PA1_PWM NULL
- #define PA1_DDR DDRA
- #undef PA2
- #define PA2_PIN PINA2
- #define PA2_RPORT PINA
- #define PA2_WPORT PORTA
- #define PA2_PWM NULL
- #define PA2_DDR DDRA
- #undef PA3
- #define PA3_PIN PINA3
- #define PA3_RPORT PINA
- #define PA3_WPORT PORTA
- #define PA3_PWM NULL
- #define PA3_DDR DDRA
- #undef PA4
- #define PA4_PIN PINA4
- #define PA4_RPORT PINA
- #define PA4_WPORT PORTA
- #define PA4_PWM NULL
- #define PA4_DDR DDRA
- #undef PA5
- #define PA5_PIN PINA5
- #define PA5_RPORT PINA
- #define PA5_WPORT PORTA
- #define PA5_PWM NULL
- #define PA5_DDR DDRA
- #undef PA6
- #define PA6_PIN PINA6
- #define PA6_RPORT PINA
- #define PA6_WPORT PORTA
- #define PA6_PWM NULL
- #define PA6_DDR DDRA
- #undef PA7
- #define PA7_PIN PINA7
- #define PA7_RPORT PINA
- #define PA7_WPORT PORTA
- #define PA7_PWM NULL
- #define PA7_DDR DDRA
-
- #undef PB0
- #define PB0_PIN PINB0
- #define PB0_RPORT PINB
- #define PB0_WPORT PORTB
- #define PB0_PWM NULL
- #define PB0_DDR DDRB
- #undef PB1
- #define PB1_PIN PINB1
- #define PB1_RPORT PINB
- #define PB1_WPORT PORTB
- #define PB1_PWM NULL
- #define PB1_DDR DDRB
- #undef PB2
- #define PB2_PIN PINB2
- #define PB2_RPORT PINB
- #define PB2_WPORT PORTB
- #define PB2_PWM NULL
- #define PB2_DDR DDRB
- #undef PB3
- #define PB3_PIN PINB3
- #define PB3_RPORT PINB
- #define PB3_WPORT PORTB
- #define PB3_PWM NULL
- #define PB3_DDR DDRB
- #undef PB4
- #define PB4_PIN PINB4
- #define PB4_RPORT PINB
- #define PB4_WPORT PORTB
- #define PB4_PWM NULL
- #define PB4_DDR DDRB
- #undef PB5
- #define PB5_PIN PINB5
- #define PB5_RPORT PINB
- #define PB5_WPORT PORTB
- #define PB5_PWM NULL
- #define PB5_DDR DDRB
- #undef PB6
- #define PB6_PIN PINB6
- #define PB6_RPORT PINB
- #define PB6_WPORT PORTB
- #define PB6_PWM NULL
- #define PB6_DDR DDRB
- #undef PB7
- #define PB7_PIN PINB7
- #define PB7_RPORT PINB
- #define PB7_WPORT PORTB
- #define PB7_PWM NULL
- #define PB7_DDR DDRB
-
- #undef PC0
- #define PC0_PIN PINC0
- #define PC0_RPORT PINC
- #define PC0_WPORT PORTC
- #define PC0_PWM NULL
- #define PC0_DDR DDRC
- #undef PC1
- #define PC1_PIN PINC1
- #define PC1_RPORT PINC
- #define PC1_WPORT PORTC
- #define PC1_PWM NULL
- #define PC1_DDR DDRC
- #undef PC2
- #define PC2_PIN PINC2
- #define PC2_RPORT PINC
- #define PC2_WPORT PORTC
- #define PC2_PWM NULL
- #define PC2_DDR DDRC
- #undef PC3
- #define PC3_PIN PINC3
- #define PC3_RPORT PINC
- #define PC3_WPORT PORTC
- #define PC3_PWM NULL
- #define PC3_DDR DDRC
- #undef PC4
- #define PC4_PIN PINC4
- #define PC4_RPORT PINC
- #define PC4_WPORT PORTC
- #define PC4_PWM NULL
- #define PC4_DDR DDRC
- #undef PC5
- #define PC5_PIN PINC5
- #define PC5_RPORT PINC
- #define PC5_WPORT PORTC
- #define PC5_PWM NULL
- #define PC5_DDR DDRC
- #undef PC6
- #define PC6_PIN PINC6
- #define PC6_RPORT PINC
- #define PC6_WPORT PORTC
- #define PC6_PWM NULL
- #define PC6_DDR DDRC
- #undef PC7
- #define PC7_PIN PINC7
- #define PC7_RPORT PINC
- #define PC7_WPORT PORTC
- #define PC7_PWM NULL
- #define PC7_DDR DDRC
-
- #undef PD0
- #define PD0_PIN PIND0
- #define PD0_RPORT PIND
- #define PD0_WPORT PORTD
- #define PD0_PWM NULL
- #define PD0_DDR DDRD
- #undef PD1
- #define PD1_PIN PIND1
- #define PD1_RPORT PIND
- #define PD1_WPORT PORTD
- #define PD1_PWM NULL
- #define PD1_DDR DDRD
- #undef PD2
- #define PD2_PIN PIND2
- #define PD2_RPORT PIND
- #define PD2_WPORT PORTD
- #define PD2_PWM NULL
- #define PD2_DDR DDRD
- #undef PD3
- #define PD3_PIN PIND3
- #define PD3_RPORT PIND
- #define PD3_WPORT PORTD
- #define PD3_PWM NULL
- #define PD3_DDR DDRD
- #undef PD4
- #define PD4_PIN PIND4
- #define PD4_RPORT PIND
- #define PD4_WPORT PORTD
- #define PD4_PWM NULL
- #define PD4_DDR DDRD
- #undef PD5
- #define PD5_PIN PIND5
- #define PD5_RPORT PIND
- #define PD5_WPORT PORTD
- #define PD5_PWM NULL
- #define PD5_DDR DDRD
- #undef PD6
- #define PD6_PIN PIND6
- #define PD6_RPORT PIND
- #define PD6_WPORT PORTD
- #define PD6_PWM NULL
- #define PD6_DDR DDRD
- #undef PD7
- #define PD7_PIN PIND7
- #define PD7_RPORT PIND
- #define PD7_WPORT PORTD
- #define PD7_PWM NULL
- #define PD7_DDR DDRD
-
- #undef PE0
- #define PE0_PIN PINE0
- #define PE0_RPORT PINE
- #define PE0_WPORT PORTE
- #define PE0_PWM NULL
- #define PE0_DDR DDRE
- #undef PE1
- #define PE1_PIN PINE1
- #define PE1_RPORT PINE
- #define PE1_WPORT PORTE
- #define PE1_PWM NULL
- #define PE1_DDR DDRE
- #undef PE2
- #define PE2_PIN PINE2
- #define PE2_RPORT PINE
- #define PE2_WPORT PORTE
- #define PE2_PWM NULL
- #define PE2_DDR DDRE
- #undef PE3
- #define PE3_PIN PINE3
- #define PE3_RPORT PINE
- #define PE3_WPORT PORTE
- #define PE3_PWM NULL
- #define PE3_DDR DDRE
- #undef PE4
- #define PE4_PIN PINE4
- #define PE4_RPORT PINE
- #define PE4_WPORT PORTE
- #define PE4_PWM NULL
- #define PE4_DDR DDRE
- #undef PE5
- #define PE5_PIN PINE5
- #define PE5_RPORT PINE
- #define PE5_WPORT PORTE
- #define PE5_PWM NULL
- #define PE5_DDR DDRE
- #undef PE6
- #define PE6_PIN PINE6
- #define PE6_RPORT PINE
- #define PE6_WPORT PORTE
- #define PE6_PWM NULL
- #define PE6_DDR DDRE
- #undef PE7
- #define PE7_PIN PINE7
- #define PE7_RPORT PINE
- #define PE7_WPORT PORTE
- #define PE7_PWM NULL
- #define PE7_DDR DDRE
-
- #undef PF0
- #define PF0_PIN PINF0
- #define PF0_RPORT PINF
- #define PF0_WPORT PORTF
- #define PF0_PWM NULL
- #define PF0_DDR DDRF
- #undef PF1
- #define PF1_PIN PINF1
- #define PF1_RPORT PINF
- #define PF1_WPORT PORTF
- #define PF1_PWM NULL
- #define PF1_DDR DDRF
- #undef PF2
- #define PF2_PIN PINF2
- #define PF2_RPORT PINF
- #define PF2_WPORT PORTF
- #define PF2_PWM NULL
- #define PF2_DDR DDRF
- #undef PF3
- #define PF3_PIN PINF3
- #define PF3_RPORT PINF
- #define PF3_WPORT PORTF
- #define PF3_PWM NULL
- #define PF3_DDR DDRF
- #undef PF4
- #define PF4_PIN PINF4
- #define PF4_RPORT PINF
- #define PF4_WPORT PORTF
- #define PF4_PWM NULL
- #define PF4_DDR DDRF
- #undef PF5
- #define PF5_PIN PINF5
- #define PF5_RPORT PINF
- #define PF5_WPORT PORTF
- #define PF5_PWM NULL
- #define PF5_DDR DDRF
- #undef PF6
- #define PF6_PIN PINF6
- #define PF6_RPORT PINF
- #define PF6_WPORT PORTF
- #define PF6_PWM NULL
- #define PF6_DDR DDRF
- #undef PF7
- #define PF7_PIN PINF7
- #define PF7_RPORT PINF
- #define PF7_WPORT PORTF
- #define PF7_PWM NULL
- #define PF7_DDR DDRF
-
- #else // AT90USBxx_TEENSYPP_ASSIGNMENTS -- Use Teensyduino Teensy++2.0 assignments.
-
- /**
-
- 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
- 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
- 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
- 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
- The pins 46 and 47 are not supported by Teensyduino, but are supported below.
- */
-
- // SPI
- #define SCK DIO21 // 9
- #define MISO DIO23 // 11
- #define MOSI DIO22 // 10
- #define SS DIO20 // 8
-
- #define DIO0_PIN PIND0
- #define DIO0_RPORT PIND
- #define DIO0_WPORT PORTD
- #define DIO0_PWM NULL
- #define DIO0_DDR DDRD
-
- #define DIO1_PIN PIND1
- #define DIO1_RPORT PIND
- #define DIO1_WPORT PORTD
- #define DIO1_PWM NULL
- #define DIO1_DDR DDRD
-
- #define DIO2_PIN PIND2
- #define DIO2_RPORT PIND
- #define DIO2_WPORT PORTD
- #define DIO2_PWM NULL
- #define DIO2_DDR DDRD
-
- #define DIO3_PIN PIND3
- #define DIO3_RPORT PIND
- #define DIO3_WPORT PORTD
- #define DIO3_PWM NULL
- #define DIO3_DDR DDRD
-
- #define DIO4_PIN PIND4
- #define DIO4_RPORT PIND
- #define DIO4_WPORT PORTD
- #define DIO4_PWM NULL
- #define DIO4_DDR DDRD
-
- #define DIO5_PIN PIND5
- #define DIO5_RPORT PIND
- #define DIO5_WPORT PORTD
- #define DIO5_PWM NULL
- #define DIO5_DDR DDRD
-
- #define DIO6_PIN PIND6
- #define DIO6_RPORT PIND
- #define DIO6_WPORT PORTD
- #define DIO6_PWM NULL
- #define DIO6_DDR DDRD
-
- #define DIO7_PIN PIND7
- #define DIO7_RPORT PIND
- #define DIO7_WPORT PORTD
- #define DIO7_PWM NULL
- #define DIO7_DDR DDRD
-
- #define DIO8_PIN PINE0
- #define DIO8_RPORT PINE
- #define DIO8_WPORT PORTE
- #define DIO8_PWM NULL
- #define DIO8_DDR DDRE
-
- #define DIO9_PIN PINE1
- #define DIO9_RPORT PINE
- #define DIO9_WPORT PORTE
- #define DIO9_PWM NULL
- #define DIO9_DDR DDRE
-
- #define DIO10_PIN PINC0
- #define DIO10_RPORT PINC
- #define DIO10_WPORT PORTC
- #define DIO10_PWM NULL
- #define DIO10_DDR DDRC
-
- #define DIO11_PIN PINC1
- #define DIO11_RPORT PINC
- #define DIO11_WPORT PORTC
- #define DIO11_PWM NULL
- #define DIO11_DDR DDRC
-
- #define DIO12_PIN PINC2
- #define DIO12_RPORT PINC
- #define DIO12_WPORT PORTC
- #define DIO12_PWM NULL
- #define DIO12_DDR DDRC
-
- #define DIO13_PIN PINC3
- #define DIO13_RPORT PINC
- #define DIO13_WPORT PORTC
- #define DIO13_PWM NULL
- #define DIO13_DDR DDRC
-
- #define DIO14_PIN PINC4
- #define DIO14_RPORT PINC
- #define DIO14_WPORT PORTC
- #define DIO14_PWM NULL
- #define DIO14_DDR DDRC
-
- #define DIO15_PIN PINC5
- #define DIO15_RPORT PINC
- #define DIO15_WPORT PORTC
- #define DIO15_PWM NULL
- #define DIO15_DDR DDRC
-
- #define DIO16_PIN PINC6
- #define DIO16_RPORT PINC
- #define DIO16_WPORT PORTC
- #define DIO16_PWM NULL
- #define DIO16_DDR DDRC
-
- #define DIO17_PIN PINC7
- #define DIO17_RPORT PINC
- #define DIO17_WPORT PORTC
- #define DIO17_PWM NULL
- #define DIO17_DDR DDRC
-
- #define DIO18_PIN PINE6
- #define DIO18_RPORT PINE
- #define DIO18_WPORT PORTE
- #define DIO18_PWM NULL
- #define DIO18_DDR DDRE
-
- #define DIO19_PIN PINE7
- #define DIO19_RPORT PINE
- #define DIO19_WPORT PORTE
- #define DIO19_PWM NULL
- #define DIO19_DDR DDRE
-
- #define DIO20_PIN PINB0
- #define DIO20_RPORT PINB
- #define DIO20_WPORT PORTB
- #define DIO20_PWM NULL
- #define DIO20_DDR DDRB
-
- #define DIO21_PIN PINB1
- #define DIO21_RPORT PINB
- #define DIO21_WPORT PORTB
- #define DIO21_PWM NULL
- #define DIO21_DDR DDRB
-
- #define DIO22_PIN PINB2
- #define DIO22_RPORT PINB
- #define DIO22_WPORT PORTB
- #define DIO22_PWM NULL
- #define DIO22_DDR DDRB
-
- #define DIO23_PIN PINB3
- #define DIO23_RPORT PINB
- #define DIO23_WPORT PORTB
- #define DIO23_PWM NULL
- #define DIO23_DDR DDRB
-
- #define DIO24_PIN PINB4
- #define DIO24_RPORT PINB
- #define DIO24_WPORT PORTB
- #define DIO24_PWM NULL
- #define DIO24_DDR DDRB
-
- #define DIO25_PIN PINB5
- #define DIO25_RPORT PINB
- #define DIO25_WPORT PORTB
- #define DIO25_PWM NULL
- #define DIO25_DDR DDRB
-
- #define DIO26_PIN PINB6
- #define DIO26_RPORT PINB
- #define DIO26_WPORT PORTB
- #define DIO26_PWM NULL
- #define DIO26_DDR DDRB
-
- #define DIO27_PIN PINB7
- #define DIO27_RPORT PINB
- #define DIO27_WPORT PORTB
- #define DIO27_PWM NULL
- #define DIO27_DDR DDRB
-
- #define DIO28_PIN PINA0
- #define DIO28_RPORT PINA
- #define DIO28_WPORT PORTA
- #define DIO28_PWM NULL
- #define DIO28_DDR DDRA
-
- #define DIO29_PIN PINA1
- #define DIO29_RPORT PINA
- #define DIO29_WPORT PORTA
- #define DIO29_PWM NULL
- #define DIO29_DDR DDRA
-
- #define DIO30_PIN PINA2
- #define DIO30_RPORT PINA
- #define DIO30_WPORT PORTA
- #define DIO30_PWM NULL
- #define DIO30_DDR DDRA
-
- #define DIO31_PIN PINA3
- #define DIO31_RPORT PINA
- #define DIO31_WPORT PORTA
- #define DIO31_PWM NULL
- #define DIO31_DDR DDRA
-
- #define DIO32_PIN PINA4
- #define DIO32_RPORT PINA
- #define DIO32_WPORT PORTA
- #define DIO32_PWM NULL
- #define DIO32_DDR DDRA
-
- #define DIO33_PIN PINA5
- #define DIO33_RPORT PINA
- #define DIO33_WPORT PORTA
- #define DIO33_PWM NULL
- #define DIO33_DDR DDRA
-
- #define DIO34_PIN PINA6
- #define DIO34_RPORT PINA
- #define DIO34_WPORT PORTA
- #define DIO34_PWM NULL
- #define DIO34_DDR DDRA
-
- #define DIO35_PIN PINA7
- #define DIO35_RPORT PINA
- #define DIO35_WPORT PORTA
- #define DIO35_PWM NULL
- #define DIO35_DDR DDRA
-
- #define DIO36_PIN PINE4
- #define DIO36_RPORT PINE
- #define DIO36_WPORT PORTE
- #define DIO36_PWM NULL
- #define DIO36_DDR DDRE
-
- #define DIO37_PIN PINE5
- #define DIO37_RPORT PINE
- #define DIO37_WPORT PORTE
- #define DIO37_PWM NULL
- #define DIO37_DDR DDRE
-
- #define DIO38_PIN PINF0
- #define DIO38_RPORT PINF
- #define DIO38_WPORT PORTF
- #define DIO38_PWM NULL
- #define DIO38_DDR DDRF
-
- #define DIO39_PIN PINF1
- #define DIO39_RPORT PINF
- #define DIO39_WPORT PORTF
- #define DIO39_PWM NULL
- #define DIO39_DDR DDRF
-
- #define DIO40_PIN PINF2
- #define DIO40_RPORT PINF
- #define DIO40_WPORT PORTF
- #define DIO40_PWM NULL
- #define DIO40_DDR DDRF
-
- #define DIO41_PIN PINF3
- #define DIO41_RPORT PINF
- #define DIO41_WPORT PORTF
- #define DIO41_PWM NULL
- #define DIO41_DDR DDRF
-
- #define DIO42_PIN PINF4
- #define DIO42_RPORT PINF
- #define DIO42_WPORT PORTF
- #define DIO42_PWM NULL
- #define DIO42_DDR DDRF
-
- #define DIO43_PIN PINF5
- #define DIO43_RPORT PINF
- #define DIO43_WPORT PORTF
- #define DIO43_PWM NULL
- #define DIO43_DDR DDRF
-
- #define DIO44_PIN PINF6
- #define DIO44_RPORT PINF
- #define DIO44_WPORT PORTF
- #define DIO44_PWM NULL
- #define DIO44_DDR DDRF
-
- #define DIO45_PIN PINF7
- #define DIO45_RPORT PINF
- #define DIO45_WPORT PORTF
- #define DIO45_PWM NULL
- #define DIO45_DDR DDRF
-
- #define AIO0_PIN PINF0
- #define AIO0_RPORT PINF
- #define AIO0_WPORT PORTF
- #define AIO0_PWM NULL
- #define AIO0_DDR DDRF
-
- #define AIO1_PIN PINF1
- #define AIO1_RPORT PINF
- #define AIO1_WPORT PORTF
- #define AIO1_PWM NULL
- #define AIO1_DDR DDRF
-
- #define AIO2_PIN PINF2
- #define AIO2_RPORT PINF
- #define AIO2_WPORT PORTF
- #define AIO2_PWM NULL
- #define AIO2_DDR DDRF
-
- #define AIO3_PIN PINF3
- #define AIO3_RPORT PINF
- #define AIO3_WPORT PORTF
- #define AIO3_PWM NULL
- #define AIO3_DDR DDRF
-
- #define AIO4_PIN PINF4
- #define AIO4_RPORT PINF
- #define AIO4_WPORT PORTF
- #define AIO4_PWM NULL
- #define AIO4_DDR DDRF
-
- #define AIO5_PIN PINF5
- #define AIO5_RPORT PINF
- #define AIO5_WPORT PORTF
- #define AIO5_PWM NULL
- #define AIO5_DDR DDRF
-
- #define AIO6_PIN PINF6
- #define AIO6_RPORT PINF
- #define AIO6_WPORT PORTF
- #define AIO6_PWM NULL
- #define AIO6_DDR DDRF
-
- #define AIO7_PIN PINF7
- #define AIO7_RPORT PINF
- #define AIO7_WPORT PORTF
- #define AIO7_PWM NULL
- #define AIO7_DDR DDRF
-
- //-- Begin not supported by Teensyduino
- //-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
- #define DIO46_PIN PINE2
- #define DIO46_RPORT PINE
- #define DIO46_WPORT PORTE
- #define DIO46_PWM NULL
- #define DIO46_DDR DDRE
-
- #define DIO47_PIN PINE3
- #define DIO47_RPORT PINE
- #define DIO47_WPORT PORTE
- #define DIO47_PWM NULL
- #define DIO47_DDR DDRE
- //-- end not supported by Teensyduino
-
- #undef PA0
- #define PA0_PIN PINA0
- #define PA0_RPORT PINA
- #define PA0_WPORT PORTA
- #define PA0_PWM NULL
- #define PA0_DDR DDRA
- #undef PA1
- #define PA1_PIN PINA1
- #define PA1_RPORT PINA
- #define PA1_WPORT PORTA
- #define PA1_PWM NULL
- #define PA1_DDR DDRA
- #undef PA2
- #define PA2_PIN PINA2
- #define PA2_RPORT PINA
- #define PA2_WPORT PORTA
- #define PA2_PWM NULL
- #define PA2_DDR DDRA
- #undef PA3
- #define PA3_PIN PINA3
- #define PA3_RPORT PINA
- #define PA3_WPORT PORTA
- #define PA3_PWM NULL
- #define PA3_DDR DDRA
- #undef PA4
- #define PA4_PIN PINA4
- #define PA4_RPORT PINA
- #define PA4_WPORT PORTA
- #define PA4_PWM NULL
- #define PA4_DDR DDRA
- #undef PA5
- #define PA5_PIN PINA5
- #define PA5_RPORT PINA
- #define PA5_WPORT PORTA
- #define PA5_PWM NULL
- #define PA5_DDR DDRA
- #undef PA6
- #define PA6_PIN PINA6
- #define PA6_RPORT PINA
- #define PA6_WPORT PORTA
- #define PA6_PWM NULL
- #define PA6_DDR DDRA
- #undef PA7
- #define PA7_PIN PINA7
- #define PA7_RPORT PINA
- #define PA7_WPORT PORTA
- #define PA7_PWM NULL
- #define PA7_DDR DDRA
-
- #undef PB0
- #define PB0_PIN PINB0
- #define PB0_RPORT PINB
- #define PB0_WPORT PORTB
- #define PB0_PWM NULL
- #define PB0_DDR DDRB
- #undef PB1
- #define PB1_PIN PINB1
- #define PB1_RPORT PINB
- #define PB1_WPORT PORTB
- #define PB1_PWM NULL
- #define PB1_DDR DDRB
- #undef PB2
- #define PB2_PIN PINB2
- #define PB2_RPORT PINB
- #define PB2_WPORT PORTB
- #define PB2_PWM NULL
- #define PB2_DDR DDRB
- #undef PB3
- #define PB3_PIN PINB3
- #define PB3_RPORT PINB
- #define PB3_WPORT PORTB
- #define PB3_PWM NULL
- #define PB3_DDR DDRB
- #undef PB4
- #define PB4_PIN PINB4
- #define PB4_RPORT PINB
- #define PB4_WPORT PORTB
- #define PB4_PWM NULL
- #define PB4_DDR DDRB
- #undef PB5
- #define PB5_PIN PINB5
- #define PB5_RPORT PINB
- #define PB5_WPORT PORTB
- #define PB5_PWM NULL
- #define PB5_DDR DDRB
- #undef PB6
- #define PB6_PIN PINB6
- #define PB6_RPORT PINB
- #define PB6_WPORT PORTB
- #define PB6_PWM NULL
- #define PB6_DDR DDRB
- #undef PB7
- #define PB7_PIN PINB7
- #define PB7_RPORT PINB
- #define PB7_WPORT PORTB
- #define PB7_PWM NULL
- #define PB7_DDR DDRB
-
- #undef PC0
- #define PC0_PIN PINC0
- #define PC0_RPORT PINC
- #define PC0_WPORT PORTC
- #define PC0_PWM NULL
- #define PC0_DDR DDRC
- #undef PC1
- #define PC1_PIN PINC1
- #define PC1_RPORT PINC
- #define PC1_WPORT PORTC
- #define PC1_PWM NULL
- #define PC1_DDR DDRC
- #undef PC2
- #define PC2_PIN PINC2
- #define PC2_RPORT PINC
- #define PC2_WPORT PORTC
- #define PC2_PWM NULL
- #define PC2_DDR DDRC
- #undef PC3
- #define PC3_PIN PINC3
- #define PC3_RPORT PINC
- #define PC3_WPORT PORTC
- #define PC3_PWM NULL
- #define PC3_DDR DDRC
- #undef PC4
- #define PC4_PIN PINC4
- #define PC4_RPORT PINC
- #define PC4_WPORT PORTC
- #define PC4_PWM NULL
- #define PC4_DDR DDRC
- #undef PC5
- #define PC5_PIN PINC5
- #define PC5_RPORT PINC
- #define PC5_WPORT PORTC
- #define PC5_PWM NULL
- #define PC5_DDR DDRC
- #undef PC6
- #define PC6_PIN PINC6
- #define PC6_RPORT PINC
- #define PC6_WPORT PORTC
- #define PC6_PWM NULL
- #define PC6_DDR DDRC
- #undef PC7
- #define PC7_PIN PINC7
- #define PC7_RPORT PINC
- #define PC7_WPORT PORTC
- #define PC7_PWM NULL
- #define PC7_DDR DDRC
-
- #undef PD0
- #define PD0_PIN PIND0
- #define PD0_RPORT PIND
- #define PD0_WPORT PORTD
- #define PD0_PWM NULL
- #define PD0_DDR DDRD
- #undef PD1
- #define PD1_PIN PIND1
- #define PD1_RPORT PIND
- #define PD1_WPORT PORTD
- #define PD1_PWM NULL
- #define PD1_DDR DDRD
- #undef PD2
- #define PD2_PIN PIND2
- #define PD2_RPORT PIND
- #define PD2_WPORT PORTD
- #define PD2_PWM NULL
- #define PD2_DDR DDRD
- #undef PD3
- #define PD3_PIN PIND3
- #define PD3_RPORT PIND
- #define PD3_WPORT PORTD
- #define PD3_PWM NULL
- #define PD3_DDR DDRD
- #undef PD4
- #define PD4_PIN PIND4
- #define PD4_RPORT PIND
- #define PD4_WPORT PORTD
- #define PD4_PWM NULL
- #define PD4_DDR DDRD
- #undef PD5
- #define PD5_PIN PIND5
- #define PD5_RPORT PIND
- #define PD5_WPORT PORTD
- #define PD5_PWM NULL
- #define PD5_DDR DDRD
- #undef PD6
- #define PD6_PIN PIND6
- #define PD6_RPORT PIND
- #define PD6_WPORT PORTD
- #define PD6_PWM NULL
- #define PD6_DDR DDRD
- #undef PD7
- #define PD7_PIN PIND7
- #define PD7_RPORT PIND
- #define PD7_WPORT PORTD
- #define PD7_PWM NULL
- #define PD7_DDR DDRD
-
- #undef PE0
- #define PE0_PIN PINE0
- #define PE0_RPORT PINE
- #define PE0_WPORT PORTE
- #define PE0_PWM NULL
- #define PE0_DDR DDRE
- #undef PE1
- #define PE1_PIN PINE1
- #define PE1_RPORT PINE
- #define PE1_WPORT PORTE
- #define PE1_PWM NULL
- #define PE1_DDR DDRE
- #undef PE2
- #define PE2_PIN PINE2
- #define PE2_RPORT PINE
- #define PE2_WPORT PORTE
- #define PE2_PWM NULL
- #define PE2_DDR DDRE
- #undef PE3
- #define PE3_PIN PINE3
- #define PE3_RPORT PINE
- #define PE3_WPORT PORTE
- #define PE3_PWM NULL
- #define PE3_DDR DDRE
- #undef PE4
- #define PE4_PIN PINE4
- #define PE4_RPORT PINE
- #define PE4_WPORT PORTE
- #define PE4_PWM NULL
- #define PE4_DDR DDRE
- #undef PE5
- #define PE5_PIN PINE5
- #define PE5_RPORT PINE
- #define PE5_WPORT PORTE
- #define PE5_PWM NULL
- #define PE5_DDR DDRE
- #undef PE6
- #define PE6_PIN PINE6
- #define PE6_RPORT PINE
- #define PE6_WPORT PORTE
- #define PE6_PWM NULL
- #define PE6_DDR DDRE
- #undef PE7
- #define PE7_PIN PINE7
- #define PE7_RPORT PINE
- #define PE7_WPORT PORTE
- #define PE7_PWM NULL
- #define PE7_DDR DDRE
-
- #undef PF0
- #define PF0_PIN PINF0
- #define PF0_RPORT PINF
- #define PF0_WPORT PORTF
- #define PF0_PWM NULL
- #define PF0_DDR DDRF
- #undef PF1
- #define PF1_PIN PINF1
- #define PF1_RPORT PINF
- #define PF1_WPORT PORTF
- #define PF1_PWM NULL
- #define PF1_DDR DDRF
- #undef PF2
- #define PF2_PIN PINF2
- #define PF2_RPORT PINF
- #define PF2_WPORT PORTF
- #define PF2_PWM NULL
- #define PF2_DDR DDRF
- #undef PF3
- #define PF3_PIN PINF3
- #define PF3_RPORT PINF
- #define PF3_WPORT PORTF
- #define PF3_PWM NULL
- #define PF3_DDR DDRF
- #undef PF4
- #define PF4_PIN PINF4
- #define PF4_RPORT PINF
- #define PF4_WPORT PORTF
- #define PF4_PWM NULL
- #define PF4_DDR DDRF
- #undef PF5
- #define PF5_PIN PINF5
- #define PF5_RPORT PINF
- #define PF5_WPORT PORTF
- #define PF5_PWM NULL
- #define PF5_DDR DDRF
- #undef PF6
- #define PF6_PIN PINF6
- #define PF6_RPORT PINF
- #define PF6_WPORT PORTF
- #define PF6_PWM NULL
- #define PF6_DDR DDRF
- #undef PF7
- #define PF7_PIN PINF7
- #define PF7_RPORT PINF
- #define PF7_WPORT PORTF
- #define PF7_PWM NULL
- #define PF7_DDR DDRF
-
- #endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments
- #endif // __AVR_AT90USB(1287|1286|646|647)__
-
- #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
- // UART
- #define RXD DIO0
- #define TXD DIO1
-
- // SPI
- #define SCK DIO10
- #define MISO DIO12
- #define MOSI DIO11
- #define SS DIO16
-
- // TWI (I2C)
- #define SCL DIO17
- #define SDA DIO18
-
- // timers and PWM
- #define OC0A DIO9
- #define OC0B DIO4
- #define OC1A DIO7
- #define OC1B DIO8
- #define OC2A DIO6
- #define OC3A DIO5
- #define OC3B DIO2
- #define OC3C DIO3
-
-
- // change for your board
- #define DEBUG_LED DIO46
-
- /**
- * Pins Info
- */
-
- #define DIO0_PIN PINE0
- #define DIO0_RPORT PINE
- #define DIO0_WPORT PORTE
- #define DIO0_DDR DDRE
- #define DIO0_PWM NULL
-
- #define DIO1_PIN PINE1
- #define DIO1_RPORT PINE
- #define DIO1_WPORT PORTE
- #define DIO1_DDR DDRE
- #define DIO1_PWM NULL
-
- #define DIO2_PIN PINE4
- #define DIO2_RPORT PINE
- #define DIO2_WPORT PORTE
- #define DIO2_DDR DDRE
- #define DIO2_PWM &OCR3BL
-
- #define DIO3_PIN PINE5
- #define DIO3_RPORT PINE
- #define DIO3_WPORT PORTE
- #define DIO3_DDR DDRE
- #define DIO3_PWM &OCR3CL
-
- #define DIO4_PIN PING5
- #define DIO4_RPORT PING
- #define DIO4_WPORT PORTG
- #define DIO4_DDR DDRG
- #define DIO4_PWM &OCR0B
-
- #define DIO5_PIN PINE3
- #define DIO5_RPORT PINE
- #define DIO5_WPORT PORTE
- #define DIO5_DDR DDRE
- #define DIO5_PWM &OCR3AL
-
- #define DIO6_PIN PINB4
- #define DIO6_RPORT PINB
- #define DIO6_WPORT PORTB
- #define DIO6_DDR DDRB
- #define DIO6_PWM &OCR2AL
-
- #define DIO7_PIN PINB5
- #define DIO7_RPORT PINB
- #define DIO7_WPORT PORTB
- #define DIO7_DDR DDRB
- #define DIO7_PWM &OCR1AL
-
- #define DIO8_PIN PINB6
- #define DIO8_RPORT PINB
- #define DIO8_WPORT PORTB
- #define DIO8_DDR DDRB
- #define DIO8_PWM &OCR1BL
-
- #define DIO9_PIN PINB7
- #define DIO9_RPORT PINB
- #define DIO9_WPORT PORTB
- #define DIO9_DDR DDRB
- #define DIO9_PWM &OCR0AL
-
- #define DIO10_PIN PINB1
- #define DIO10_RPORT PINB
- #define DIO10_WPORT PORTB
- #define DIO10_DDR DDRB
- #define DIO10_PWM NULL
-
- #define DIO11_PIN PINB2
- #define DIO11_RPORT PINB
- #define DIO11_WPORT PORTB
- #define DIO11_DDR DDRB
- #define DIO11_PWM NULL
-
- #define DIO12_PIN PINB3
- #define DIO12_RPORT PINB
- #define DIO12_WPORT PORTB
- #define DIO12_DDR DDRB
- #define DIO12_PWM NULL
-
- #define DIO13_PIN PINE2
- #define DIO13_RPORT PINE
- #define DIO13_WPORT PORTE
- #define DIO13_DDR DDRE
- #define DIO13_PWM NULL
-
- #define DIO14_PIN PINE6
- #define DIO14_RPORT PINE
- #define DIO14_WPORT PORTE
- #define DIO14_DDR DDRE
- #define DIO14_PWM NULL
-
- #define DIO15_PIN PINE7
- #define DIO15_RPORT PINE
- #define DIO15_WPORT PORTE
- #define DIO15_DDR DDRE
- #define DIO15_PWM NULL
-
- #define DIO16_PIN PINB0
- #define DIO16_RPORT PINB
- #define DIO16_WPORT PORTB
- #define DIO16_DDR DDRB
- #define DIO16_PWM NULL
-
- #define DIO17_PIN PIND0
- #define DIO17_RPORT PIND
- #define DIO17_WPORT PORTD
- #define DIO17_DDR DDRD
- #define DIO17_PWM NULL
-
- #define DIO18_PIN PIND1
- #define DIO18_RPORT PIND
- #define DIO18_WPORT PORTD
- #define DIO18_DDR DDRD
- #define DIO18_PWM NULL
-
- #define DIO19_PIN PIND2
- #define DIO19_RPORT PIND
- #define DIO19_WPORT PORTD
- #define DIO19_DDR DDRD
- #define DIO19_PWM NULL
-
- #define DIO20_PIN PIND3
- #define DIO20_RPORT PIND
- #define DIO20_WPORT PORTD
- #define DIO20_DDR DDRD
- #define DIO20_PWM NULL
-
- #define DIO21_PIN PIND4
- #define DIO21_RPORT PIND
- #define DIO21_WPORT PORTD
- #define DIO21_DDR DDRD
- #define DIO21_PWM NULL
-
- #define DIO22_PIN PIND5
- #define DIO22_RPORT PIND
- #define DIO22_WPORT PORTD
- #define DIO22_DDR DDRD
- #define DIO22_PWM NULL
-
- #define DIO23_PIN PIND6
- #define DIO23_RPORT PIND
- #define DIO23_WPORT PORTD
- #define DIO23_DDR DDRD
- #define DIO23_PWM NULL
-
- #define DIO24_PIN PIND7
- #define DIO24_RPORT PIND
- #define DIO24_WPORT PORTD
- #define DIO24_DDR DDRD
- #define DIO24_PWM NULL
-
- #define DIO25_PIN PING0
- #define DIO25_RPORT PING
- #define DIO25_WPORT PORTG
- #define DIO25_DDR DDRG
- #define DIO25_PWM NULL
-
- #define DIO26_PIN PING1
- #define DIO26_RPORT PING
- #define DIO26_WPORT PORTG
- #define DIO26_DDR DDRG
- #define DIO26_PWM NULL
-
- #define DIO27_PIN PING2
- #define DIO27_RPORT PING
- #define DIO27_WPORT PORTG
- #define DIO27_DDR DDRG
- #define DIO27_PWM NULL
-
- #define DIO28_PIN PING3
- #define DIO28_RPORT PING
- #define DIO28_WPORT PORTG
- #define DIO28_DDR DDRG
- #define DIO28_PWM NULL
-
- #define DIO29_PIN PING4
- #define DIO29_RPORT PING
- #define DIO29_WPORT PORTG
- #define DIO29_DDR DDRG
- #define DIO29_PWM NULL
-
- #define DIO30_PIN PINC0
- #define DIO30_RPORT PINC
- #define DIO30_WPORT PORTC
- #define DIO30_DDR DDRC
- #define DIO30_PWM NULL
-
- #define DIO31_PIN PINC1
- #define DIO31_RPORT PINC
- #define DIO31_WPORT PORTC
- #define DIO31_DDR DDRC
- #define DIO31_PWM NULL
-
- #define DIO32_PIN PINC2
- #define DIO32_RPORT PINC
- #define DIO32_WPORT PORTC
- #define DIO32_DDR DDRC
- #define DIO32_PWM NULL
-
- #define DIO33_PIN PINC3
- #define DIO33_RPORT PINC
- #define DIO33_WPORT PORTC
- #define DIO33_DDR DDRC
- #define DIO33_PWM NULL
-
- #define DIO34_PIN PINC4
- #define DIO34_RPORT PINC
- #define DIO34_WPORT PORTC
- #define DIO34_DDR DDRC
- #define DIO34_PWM NULL
-
- #define DIO35_PIN PINC5
- #define DIO35_RPORT PINC
- #define DIO35_WPORT PORTC
- #define DIO35_DDR DDRC
- #define DIO35_PWM NULL
-
- #define DIO36_PIN PINC6
- #define DIO36_RPORT PINC
- #define DIO36_WPORT PORTC
- #define DIO36_DDR DDRC
- #define DIO36_PWM NULL
-
- #define DIO37_PIN PINC7
- #define DIO37_RPORT PINC
- #define DIO37_WPORT PORTC
- #define DIO37_DDR DDRC
- #define DIO37_PWM NULL
-
- #define DIO38_PIN PINA0
- #define DIO38_RPORT PINA
- #define DIO38_WPORT PORTA
- #define DIO38_DDR DDRA
- #define DIO38_PWM NULL
-
- #define DIO39_PIN PINA1
- #define DIO39_RPORT PINA
- #define DIO39_WPORT PORTA
- #define DIO39_DDR DDRA
- #define DIO39_PWM NULL
-
- #define DIO40_PIN PINA2
- #define DIO40_RPORT PINA
- #define DIO40_WPORT PORTA
- #define DIO40_DDR DDRA
- #define DIO40_PWM NULL
-
- #define DIO41_PIN PINA3
- #define DIO41_RPORT PINA
- #define DIO41_WPORT PORTA
- #define DIO41_DDR DDRA
- #define DIO41_PWM NULL
-
- #define DIO42_PIN PINA4
- #define DIO42_RPORT PINA
- #define DIO42_WPORT PORTA
- #define DIO42_DDR DDRA
- #define DIO42_PWM NULL
-
- #define DIO43_PIN PINA5
- #define DIO43_RPORT PINA
- #define DIO43_WPORT PORTA
- #define DIO43_DDR DDRA
- #define DIO43_PWM NULL
-
- #define DIO44_PIN PINA6
- #define DIO44_RPORT PINA
- #define DIO44_WPORT PORTA
- #define DIO44_DDR DDRA
- #define DIO44_PWM NULL
-
- #define DIO45_PIN PINA7
- #define DIO45_RPORT PINA
- #define DIO45_WPORT PORTA
- #define DIO45_DDR DDRA
- #define DIO45_PWM NULL
-
- #define DIO46_PIN PINF0
- #define DIO46_RPORT PINF
- #define DIO46_WPORT PORTF
- #define DIO46_DDR DDRF
- #define DIO46_PWM NULL
-
- #define DIO47_PIN PINF1
- #define DIO47_RPORT PINF
- #define DIO47_WPORT PORTF
- #define DIO47_DDR DDRF
- #define DIO47_PWM NULL
-
- #define DIO48_PIN PINF2
- #define DIO48_RPORT PINF
- #define DIO48_WPORT PORTF
- #define DIO48_DDR DDRF
- #define DIO48_PWM NULL
-
- #define DIO49_PIN PINF3
- #define DIO49_RPORT PINF
- #define DIO49_WPORT PORTF
- #define DIO49_DDR DDRF
- #define DIO49_PWM NULL
-
- #define DIO50_PIN PINF4
- #define DIO50_RPORT PINF
- #define DIO50_WPORT PORTF
- #define DIO50_DDR DDRF
- #define DIO50_PWM NULL
-
- #define DIO51_PIN PINF5
- #define DIO51_RPORT PINF
- #define DIO51_WPORT PORTF
- #define DIO51_DDR DDRF
- #define DIO51_PWM NULL
-
- #define DIO52_PIN PINF6
- #define DIO52_RPORT PINF
- #define DIO52_WPORT PORTF
- #define DIO52_DDR DDRF
- #define DIO52_PWM NULL
-
- #define DIO53_PIN PINF7
- #define DIO53_RPORT PINF
- #define DIO53_WPORT PORTF
- #define DIO53_DDR DDRF
- #define DIO53_PWM NULL
-
- #undef PA0
- #define PA0_PIN PINA0
- #define PA0_RPORT PINA
- #define PA0_WPORT PORTA
- #define PA0_DDR DDRA
- #define PA0_PWM NULL
- #undef PA1
- #define PA1_PIN PINA1
- #define PA1_RPORT PINA
- #define PA1_WPORT PORTA
- #define PA1_DDR DDRA
- #define PA1_PWM NULL
- #undef PA2
- #define PA2_PIN PINA2
- #define PA2_RPORT PINA
- #define PA2_WPORT PORTA
- #define PA2_DDR DDRA
- #define PA2_PWM NULL
- #undef PA3
- #define PA3_PIN PINA3
- #define PA3_RPORT PINA
- #define PA3_WPORT PORTA
- #define PA3_DDR DDRA
- #define PA3_PWM NULL
- #undef PA4
- #define PA4_PIN PINA4
- #define PA4_RPORT PINA
- #define PA4_WPORT PORTA
- #define PA4_DDR DDRA
- #define PA4_PWM NULL
- #undef PA5
- #define PA5_PIN PINA5
- #define PA5_RPORT PINA
- #define PA5_WPORT PORTA
- #define PA5_DDR DDRA
- #define PA5_PWM NULL
- #undef PA6
- #define PA6_PIN PINA6
- #define PA6_RPORT PINA
- #define PA6_WPORT PORTA
- #define PA6_DDR DDRA
- #define PA6_PWM NULL
- #undef PA7
- #define PA7_PIN PINA7
- #define PA7_RPORT PINA
- #define PA7_WPORT PORTA
- #define PA7_DDR DDRA
- #define PA7_PWM NULL
-
- #undef PB0
- #define PB0_PIN PINB0
- #define PB0_RPORT PINB
- #define PB0_WPORT PORTB
- #define PB0_DDR DDRB
- #define PB0_PWM NULL
- #undef PB1
- #define PB1_PIN PINB1
- #define PB1_RPORT PINB
- #define PB1_WPORT PORTB
- #define PB1_DDR DDRB
- #define PB1_PWM NULL
- #undef PB2
- #define PB2_PIN PINB2
- #define PB2_RPORT PINB
- #define PB2_WPORT PORTB
- #define PB2_DDR DDRB
- #define PB2_PWM NULL
- #undef PB3
- #define PB3_PIN PINB3
- #define PB3_RPORT PINB
- #define PB3_WPORT PORTB
- #define PB3_DDR DDRB
- #define PB3_PWM NULL
- #undef PB4
- #define PB4_PIN PINB4
- #define PB4_RPORT PINB
- #define PB4_WPORT PORTB
- #define PB4_DDR DDRB
- #define PB4_PWM &OCR2A
- #undef PB5
- #define PB5_PIN PINB5
- #define PB5_RPORT PINB
- #define PB5_WPORT PORTB
- #define PB5_DDR DDRB
- #define PB5_PWM NULL
- #undef PB6
- #define PB6_PIN PINB6
- #define PB6_RPORT PINB
- #define PB6_WPORT PORTB
- #define PB6_DDR DDRB
- #define PB6_PWM NULL
- #undef PB7
- #define PB7_PIN PINB7
- #define PB7_RPORT PINB
- #define PB7_WPORT PORTB
- #define PB7_DDR DDRB
- #define PB7_PWM &OCR0A
-
- #undef PC0
- #define PC0_PIN PINC0
- #define PC0_RPORT PINC
- #define PC0_WPORT PORTC
- #define PC0_DDR DDRC
- #define PC0_PWM NULL
- #undef PC1
- #define PC1_PIN PINC1
- #define PC1_RPORT PINC
- #define PC1_WPORT PORTC
- #define PC1_DDR DDRC
- #define PC1_PWM NULL
- #undef PC2
- #define PC2_PIN PINC2
- #define PC2_RPORT PINC
- #define PC2_WPORT PORTC
- #define PC2_DDR DDRC
- #define PC2_PWM NULL
- #undef PC3
- #define PC3_PIN PINC3
- #define PC3_RPORT PINC
- #define PC3_WPORT PORTC
- #define PC3_DDR DDRC
- #define PC3_PWM NULL
- #undef PC4
- #define PC4_PIN PINC4
- #define PC4_RPORT PINC
- #define PC4_WPORT PORTC
- #define PC4_DDR DDRC
- #define PC4_PWM NULL
- #undef PC5
- #define PC5_PIN PINC5
- #define PC5_RPORT PINC
- #define PC5_WPORT PORTC
- #define PC5_DDR DDRC
- #define PC5_PWM NULL
- #undef PC6
- #define PC6_PIN PINC6
- #define PC6_RPORT PINC
- #define PC6_WPORT PORTC
- #define PC6_DDR DDRC
- #define PC6_PWM NULL
- #undef PC7
- #define PC7_PIN PINC7
- #define PC7_RPORT PINC
- #define PC7_WPORT PORTC
- #define PC7_DDR DDRC
- #define PC7_PWM NULL
-
- #undef PD0
- #define PD0_PIN PIND0
- #define PD0_RPORT PIND
- #define PD0_WPORT PORTD
- #define PD0_DDR DDRD
- #define PD0_PWM NULL
- #undef PD1
- #define PD1_PIN PIND1
- #define PD1_RPORT PIND
- #define PD1_WPORT PORTD
- #define PD1_DDR DDRD
- #define PD1_PWM NULL
- #undef PD2
- #define PD2_PIN PIND2
- #define PD2_RPORT PIND
- #define PD2_WPORT PORTD
- #define PD2_DDR DDRD
- #define PD2_PWM NULL
- #undef PD3
- #define PD3_PIN PIND3
- #define PD3_RPORT PIND
- #define PD3_WPORT PORTD
- #define PD3_DDR DDRD
- #define PD3_PWM NULL
- #undef PD4
- #define PD4_PIN PIND4
- #define PD4_RPORT PIND
- #define PD4_WPORT PORTD
- #define PD4_DDR DDRD
- #define PD4_PWM NULL
- #undef PD5
- #define PD5_PIN PIND5
- #define PD5_RPORT PIND
- #define PD5_WPORT PORTD
- #define PD5_DDR DDRD
- #define PD5_PWM NULL
- #undef PD6
- #define PD6_PIN PIND6
- #define PD6_RPORT PIND
- #define PD6_WPORT PORTD
- #define PD6_DDR DDRD
- #define PD6_PWM NULL
- #undef PD7
- #define PD7_PIN PIND7
- #define PD7_RPORT PIND
- #define PD7_WPORT PORTD
- #define PD7_DDR DDRD
- #define PD7_PWM NULL
-
- #undef PE0
- #define PE0_PIN PINE0
- #define PE0_RPORT PINE
- #define PE0_WPORT PORTE
- #define PE0_DDR DDRE
- #define PE0_PWM NULL
- #undef PE1
- #define PE1_PIN PINE1
- #define PE1_RPORT PINE
- #define PE1_WPORT PORTE
- #define PE1_DDR DDRE
- #define PE1_PWM NULL
- #undef PE2
- #define PE2_PIN PINE2
- #define PE2_RPORT PINE
- #define PE2_WPORT PORTE
- #define PE2_DDR DDRE
- #define PE2_PWM NULL
- #undef PE3
- #define PE3_PIN PINE3
- #define PE3_RPORT PINE
- #define PE3_WPORT PORTE
- #define PE3_DDR DDRE
- #define PE3_PWM &OCR3AL
- #undef PE4
- #define PE4_PIN PINE4
- #define PE4_RPORT PINE
- #define PE4_WPORT PORTE
- #define PE4_DDR DDRE
- #define PE4_PWM &OCR3BL
- #undef PE5
- #define PE5_PIN PINE5
- #define PE5_RPORT PINE
- #define PE5_WPORT PORTE
- #define PE5_DDR DDRE
- #define PE5_PWM &OCR3CL
- #undef PE6
- #define PE6_PIN PINE6
- #define PE6_RPORT PINE
- #define PE6_WPORT PORTE
- #define PE6_DDR DDRE
- #define PE6_PWM NULL
- #undef PE7
- #define PE7_PIN PINE7
- #define PE7_RPORT PINE
- #define PE7_WPORT PORTE
- #define PE7_DDR DDRE
- #define PE7_PWM NULL
-
- #undef PF0
- #define PF0_PIN PINF0
- #define PF0_RPORT PINF
- #define PF0_WPORT PORTF
- #define PF0_DDR DDRF
- #define PF0_PWM NULL
- #undef PF1
- #define PF1_PIN PINF1
- #define PF1_RPORT PINF
- #define PF1_WPORT PORTF
- #define PF1_DDR DDRF
- #define PF1_PWM NULL
- #undef PF2
- #define PF2_PIN PINF2
- #define PF2_RPORT PINF
- #define PF2_WPORT PORTF
- #define PF2_DDR DDRF
- #define PF2_PWM NULL
- #undef PF3
- #define PF3_PIN PINF3
- #define PF3_RPORT PINF
- #define PF3_WPORT PORTF
- #define PF3_DDR DDRF
- #define PF3_PWM NULL
- #undef PF4
- #define PF4_PIN PINF4
- #define PF4_RPORT PINF
- #define PF4_WPORT PORTF
- #define PF4_DDR DDRF
- #define PF4_PWM NULL
- #undef PF5
- #define PF5_PIN PINF5
- #define PF5_RPORT PINF
- #define PF5_WPORT PORTF
- #define PF5_DDR DDRF
- #define PF5_PWM NULL
- #undef PF6
- #define PF6_PIN PINF6
- #define PF6_RPORT PINF
- #define PF6_WPORT PORTF
- #define PF6_DDR DDRF
- #define PF6_PWM NULL
- #undef PF7
- #define PF7_PIN PINF7
- #define PF7_RPORT PINF
- #define PF7_WPORT PORTF
- #define PF7_DDR DDRF
- #define PF7_PWM NULL
-
- #undef PG0
- #define PG0_PIN PING0
- #define PG0_RPORT PING
- #define PG0_WPORT PORTG
- #define PG0_DDR DDRG
- #define PG0_PWM NULL
- #undef PG1
- #define PG1_PIN PING1
- #define PG1_RPORT PING
- #define PG1_WPORT PORTG
- #define PG1_DDR DDRG
- #define PG1_PWM NULL
- #undef PG2
- #define PG2_PIN PING2
- #define PG2_RPORT PING
- #define PG2_WPORT PORTG
- #define PG2_DDR DDRG
- #define PG2_PWM NULL
- #undef PG3
- #define PG3_PIN PING3
- #define PG3_RPORT PING
- #define PG3_WPORT PORTG
- #define PG3_DDR DDRG
- #define PG3_PWM NULL
- #undef PG4
- #define PG4_PIN PING4
- #define PG4_RPORT PING
- #define PG4_WPORT PORTG
- #define PG4_DDR DDRG
- #define PG4_PWM NULL
- #undef PG5
- #define PG5_PIN PING5
- #define PG5_RPORT PING
- #define PG5_WPORT PORTG
- #define PG5_DDR DDRG
- #define PG5_PWM &OCR0B
- #endif // __AVR_ATmega(1281|2561)__
-
- #ifndef DIO0_PIN
- #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"
- #endif
-
- #endif // _FASTIO_ARDUINO_H
|