My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

fastio.h 55KB

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