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