forked from Traumflug/Teacup_Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arduino_1280.h
1463 lines (1358 loc) · 33 KB
/
arduino_1280.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#define NO_PWM_PIN (uint8_t *)0
#define NO_TCCR_PIN *(uint8_t *)0
// UART
#define RXD DIO0
#define TXD DIO1
// SPI
#define SCK DIO52
#define MISO DIO50
#define MOSI DIO51
#define SS DIO53
// TWI (I2C)
#define SCL DIO21
#define SDA DIO20
// timers and PWM
#define OC0A DIO13
#define OC0B DIO4
#define OC1A DIO11
#define OC1B DIO12
#define OC2A DIO10
#define OC2B DIO9
#define OC3A DIO5
#define OC3B DIO2
#define OC3C DIO3
#define OC4A DIO6
#define OC4B DIO7
#define OC4C DIO8
#define OC5A DIO46
#define OC5B DIO45
#define OC5C DIO44
// digital pins
#define DIO0_PIN PINE0
#define DIO0_RPORT PINE
#define DIO0_WPORT PORTE
#define DIO0_DDR DDRE
#define DIO0_PWM NO_PWM_PIN
#define DIO0_TCCR NO_TCCR_PIN
#define DIO0_COM 0
#define DIO1_PIN PINE1
#define DIO1_RPORT PINE
#define DIO1_WPORT PORTE
#define DIO1_DDR DDRE
#define DIO1_PWM NO_PWM_PIN
#define DIO1_TCCR NO_TCCR_PIN
#define DIO1_COM 0
#define DIO2_PIN PINE4
#define DIO2_RPORT PINE
#define DIO2_WPORT PORTE
#define DIO2_DDR DDRE
#define DIO2_PWM &OCR3BL
#define DIO2_TCCR TCCR3A
#define DIO2_COM COM3B1
#define DIO3_PIN PINE5
#define DIO3_RPORT PINE
#define DIO3_WPORT PORTE
#define DIO3_DDR DDRE
#define DIO3_PWM &OCR3CL
#define DIO3_TCCR TCCR3A
#define DIO3_COM COM3C1
#define DIO4_PIN PING5
#define DIO4_RPORT PING
#define DIO4_WPORT PORTG
#define DIO4_DDR DDRG
#define DIO4_PWM &OCR0B
#define DIO4_TCCR TCCR0A
#define DIO4_COM COM0B1
#define DIO5_PIN PINE3
#define DIO5_RPORT PINE
#define DIO5_WPORT PORTE
#define DIO5_DDR DDRE
#define DIO5_PWM &OCR3AL
#define DIO5_TCCR TCCR3A
#define DIO5_COM COM3A1
#define DIO6_PIN PINH3
#define DIO6_RPORT PINH
#define DIO6_WPORT PORTH
#define DIO6_DDR DDRH
#define DIO6_PWM &OCR4AL
#define DIO6_TCCR TCCR4A
#define DIO6_COM COM4A1
#define DIO7_PIN PINH4
#define DIO7_RPORT PINH
#define DIO7_WPORT PORTH
#define DIO7_DDR DDRH
#define DIO7_PWM &OCR4BL
#define DIO7_TCCR TCCR4A
#define DIO7_COM COM4B1
#define DIO8_PIN PINH5
#define DIO8_RPORT PINH
#define DIO8_WPORT PORTH
#define DIO8_DDR DDRH
#define DIO8_PWM &OCR4CL
#define DIO8_TCCR TCCR4A
#define DIO8_COM COM4C1
#define DIO9_PIN PINH6
#define DIO9_RPORT PINH
#define DIO9_WPORT PORTH
#define DIO9_DDR DDRH
#define DIO9_PWM &OCR2B
#define DIO9_TCCR TCCR2A
#define DIO9_COM COM2B1
#define DIO10_PIN PINB4
#define DIO10_RPORT PINB
#define DIO10_WPORT PORTB
#define DIO10_DDR DDRB
#define DIO10_PWM &OCR2A
#define DIO10_TCCR TCCR2A
#define DIO10_COM COM2A1
#define DIO11_PIN PINB5
#define DIO11_RPORT PINB
#define DIO11_WPORT PORTB
#define DIO11_DDR DDRB
#define DIO11_PWM NO_PWM_PIN
#define DIO11_TCCR NO_TCCR_PIN
#define DIO11_COM 0
#define DIO12_PIN PINB6
#define DIO12_RPORT PINB
#define DIO12_WPORT PORTB
#define DIO12_DDR DDRB
#define DIO12_PWM NO_PWM_PIN
#define DIO12_TCCR NO_TCCR_PIN
#define DIO12_COM 0
#define DIO13_PIN PINB7
#define DIO13_RPORT PINB
#define DIO13_WPORT PORTB
#define DIO13_DDR DDRB
#define DIO13_PWM &OCR0A
#define DIO13_TCCR TCCR0A
#define DIO13_COM COM0A1
#define DIO14_PIN PINJ1
#define DIO14_RPORT PINJ
#define DIO14_WPORT PORTJ
#define DIO14_DDR DDRJ
#define DIO14_PWM NO_PWM_PIN
#define DIO14_TCCR NO_TCCR_PIN
#define DIO14_COM 0
#define DIO15_PIN PINJ0
#define DIO15_RPORT PINJ
#define DIO15_WPORT PORTJ
#define DIO15_DDR DDRJ
#define DIO15_PWM NO_PWM_PIN
#define DIO15_TCCR NO_TCCR_PIN
#define DIO15_COM 0
#define DIO16_PIN PINH1
#define DIO16_RPORT PINH
#define DIO16_WPORT PORTH
#define DIO16_DDR DDRH
#define DIO16_PWM NO_PWM_PIN
#define DIO16_TCCR NO_TCCR_PIN
#define DIO16_COM 0
#define DIO17_PIN PINH0
#define DIO17_RPORT PINH
#define DIO17_WPORT PORTH
#define DIO17_DDR DDRH
#define DIO17_PWM NO_PWM_PIN
#define DIO17_TCCR NO_TCCR_PIN
#define DIO17_COM 0
#define DIO18_PIN PIND3
#define DIO18_RPORT PIND
#define DIO18_WPORT PORTD
#define DIO18_DDR DDRD
#define DIO18_PWM NO_PWM_PIN
#define DIO18_TCCR NO_TCCR_PIN
#define DIO18_COM 0
#define DIO19_PIN PIND2
#define DIO19_RPORT PIND
#define DIO19_WPORT PORTD
#define DIO19_DDR DDRD
#define DIO19_PWM NO_PWM_PIN
#define DIO19_TCCR NO_TCCR_PIN
#define DIO19_COM 0
#define DIO20_PIN PIND1
#define DIO20_RPORT PIND
#define DIO20_WPORT PORTD
#define DIO20_DDR DDRD
#define DIO20_PWM NO_PWM_PIN
#define DIO20_TCCR NO_TCCR_PIN
#define DIO20_COM 0
#define DIO21_PIN PIND0
#define DIO21_RPORT PIND
#define DIO21_WPORT PORTD
#define DIO21_DDR DDRD
#define DIO21_PWM NO_PWM_PIN
#define DIO21_TCCR NO_TCCR_PIN
#define DIO21_COM 0
#define DIO22_PIN PINA0
#define DIO22_RPORT PINA
#define DIO22_WPORT PORTA
#define DIO22_DDR DDRA
#define DIO22_PWM NO_PWM_PIN
#define DIO22_TCCR NO_TCCR_PIN
#define DIO22_COM 0
#define DIO23_PIN PINA1
#define DIO23_RPORT PINA
#define DIO23_WPORT PORTA
#define DIO23_DDR DDRA
#define DIO23_PWM NO_PWM_PIN
#define DIO23_TCCR NO_TCCR_PIN
#define DIO23_COM 0
#define DIO24_PIN PINA2
#define DIO24_RPORT PINA
#define DIO24_WPORT PORTA
#define DIO24_DDR DDRA
#define DIO24_PWM NO_PWM_PIN
#define DIO24_TCCR NO_TCCR_PIN
#define DIO24_COM 0
#define DIO25_PIN PINA3
#define DIO25_RPORT PINA
#define DIO25_WPORT PORTA
#define DIO25_DDR DDRA
#define DIO25_PWM NO_PWM_PIN
#define DIO25_TCCR NO_TCCR_PIN
#define DIO25_COM 0
#define DIO26_PIN PINA4
#define DIO26_RPORT PINA
#define DIO26_WPORT PORTA
#define DIO26_DDR DDRA
#define DIO26_PWM NO_PWM_PIN
#define DIO26_TCCR NO_TCCR_PIN
#define DIO26_COM 0
#define DIO27_PIN PINA5
#define DIO27_RPORT PINA
#define DIO27_WPORT PORTA
#define DIO27_DDR DDRA
#define DIO27_PWM NO_PWM_PIN
#define DIO27_TCCR NO_TCCR_PIN
#define DIO27_COM 0
#define DIO28_PIN PINA6
#define DIO28_RPORT PINA
#define DIO28_WPORT PORTA
#define DIO28_DDR DDRA
#define DIO28_PWM NO_PWM_PIN
#define DIO28_TCCR NO_TCCR_PIN
#define DIO28_COM 0
#define DIO29_PIN PINA7
#define DIO29_RPORT PINA
#define DIO29_WPORT PORTA
#define DIO29_DDR DDRA
#define DIO29_PWM NO_PWM_PIN
#define DIO29_TCCR NO_TCCR_PIN
#define DIO29_COM 0
#define DIO30_PIN PINC7
#define DIO30_RPORT PINC
#define DIO30_WPORT PORTC
#define DIO30_DDR DDRC
#define DIO30_PWM NO_PWM_PIN
#define DIO30_TCCR NO_TCCR_PIN
#define DIO30_COM 0
#define DIO31_PIN PINC6
#define DIO31_RPORT PINC
#define DIO31_WPORT PORTC
#define DIO31_DDR DDRC
#define DIO31_PWM NO_PWM_PIN
#define DIO31_TCCR NO_TCCR_PIN
#define DIO31_COM 0
#define DIO32_PIN PINC5
#define DIO32_RPORT PINC
#define DIO32_WPORT PORTC
#define DIO32_DDR DDRC
#define DIO32_PWM NO_PWM_PIN
#define DIO32_TCCR NO_TCCR_PIN
#define DIO32_COM 0
#define DIO33_PIN PINC4
#define DIO33_RPORT PINC
#define DIO33_WPORT PORTC
#define DIO33_DDR DDRC
#define DIO33_PWM NO_PWM_PIN
#define DIO33_TCCR NO_TCCR_PIN
#define DIO33_COM 0
#define DIO34_PIN PINC3
#define DIO34_RPORT PINC
#define DIO34_WPORT PORTC
#define DIO34_DDR DDRC
#define DIO34_PWM NO_PWM_PIN
#define DIO34_TCCR NO_TCCR_PIN
#define DIO34_COM 0
#define DIO35_PIN PINC2
#define DIO35_RPORT PINC
#define DIO35_WPORT PORTC
#define DIO35_DDR DDRC
#define DIO35_PWM NO_PWM_PIN
#define DIO35_TCCR NO_TCCR_PIN
#define DIO35_COM 0
#define DIO36_PIN PINC1
#define DIO36_RPORT PINC
#define DIO36_WPORT PORTC
#define DIO36_DDR DDRC
#define DIO36_PWM NO_PWM_PIN
#define DIO36_TCCR NO_TCCR_PIN
#define DIO36_COM 0
#define DIO37_PIN PINC0
#define DIO37_RPORT PINC
#define DIO37_WPORT PORTC
#define DIO37_DDR DDRC
#define DIO37_PWM NO_PWM_PIN
#define DIO37_TCCR NO_TCCR_PIN
#define DIO37_COM 0
#define DIO38_PIN PIND7
#define DIO38_RPORT PIND
#define DIO38_WPORT PORTD
#define DIO38_DDR DDRD
#define DIO38_PWM NO_PWM_PIN
#define DIO38_TCCR NO_TCCR_PIN
#define DIO38_COM 0
#define DIO39_PIN PING2
#define DIO39_RPORT PING
#define DIO39_WPORT PORTG
#define DIO39_DDR DDRG
#define DIO39_PWM NO_PWM_PIN
#define DIO39_TCCR NO_TCCR_PIN
#define DIO39_COM 0
#define DIO40_PIN PING1
#define DIO40_RPORT PING
#define DIO40_WPORT PORTG
#define DIO40_DDR DDRG
#define DIO40_PWM NO_PWM_PIN
#define DIO40_TCCR NO_TCCR_PIN
#define DIO40_COM 0
#define DIO41_PIN PING0
#define DIO41_RPORT PING
#define DIO41_WPORT PORTG
#define DIO41_DDR DDRG
#define DIO41_PWM NO_PWM_PIN
#define DIO41_TCCR NO_TCCR_PIN
#define DIO41_COM 0
#define DIO42_PIN PINL7
#define DIO42_RPORT PINL
#define DIO42_WPORT PORTL
#define DIO42_DDR DDRL
#define DIO42_PWM NO_PWM_PIN
#define DIO42_TCCR NO_TCCR_PIN
#define DIO42_COM 0
#define DIO43_PIN PINL6
#define DIO43_RPORT PINL
#define DIO43_WPORT PORTL
#define DIO43_DDR DDRL
#define DIO43_PWM NO_PWM_PIN
#define DIO43_TCCR NO_TCCR_PIN
#define DIO43_COM 0
#define DIO44_PIN PINL5
#define DIO44_RPORT PINL
#define DIO44_WPORT PORTL
#define DIO44_DDR DDRL
#define DIO44_PWM &OCR5CL
#define DIO44_TCCR TCCR5A
#define DIO44_COM COM5C1
#define DIO45_PIN PINL4
#define DIO45_RPORT PINL
#define DIO45_WPORT PORTL
#define DIO45_DDR DDRL
#define DIO45_PWM &OCR5BL
#define DIO45_TCCR TCCR5A
#define DIO45_COM COM5B1
#define DIO46_PIN PINL3
#define DIO46_RPORT PINL
#define DIO46_WPORT PORTL
#define DIO46_DDR DDRL
#define DIO46_PWM &OCR5AL
#define DIO46_TCCR TCCR5A
#define DIO46_COM COM5A1
#define DIO47_PIN PINL2
#define DIO47_RPORT PINL
#define DIO47_WPORT PORTL
#define DIO47_DDR DDRL
#define DIO47_PWM NO_PWM_PIN
#define DIO47_TCCR NO_TCCR_PIN
#define DIO47_COM 0
#define DIO48_PIN PINL1
#define DIO48_RPORT PINL
#define DIO48_WPORT PORTL
#define DIO48_DDR DDRL
#define DIO48_PWM NO_PWM_PIN
#define DIO48_TCCR NO_TCCR_PIN
#define DIO48_COM 0
#define DIO49_PIN PINL0
#define DIO49_RPORT PINL
#define DIO49_WPORT PORTL
#define DIO49_DDR DDRL
#define DIO49_PWM NO_PWM_PIN
#define DIO49_TCCR NO_TCCR_PIN
#define DIO49_COM 0
#define DIO50_PIN PINB3
#define DIO50_RPORT PINB
#define DIO50_WPORT PORTB
#define DIO50_DDR DDRB
#define DIO50_PWM NO_PWM_PIN
#define DIO50_TCCR NO_TCCR_PIN
#define DIO50_COM 0
#define DIO51_PIN PINB2
#define DIO51_RPORT PINB
#define DIO51_WPORT PORTB
#define DIO51_DDR DDRB
#define DIO51_PWM NO_PWM_PIN
#define DIO51_TCCR NO_TCCR_PIN
#define DIO51_COM 0
#define DIO52_PIN PINB1
#define DIO52_RPORT PINB
#define DIO52_WPORT PORTB
#define DIO52_DDR DDRB
#define DIO52_PWM NO_PWM_PIN
#define DIO52_TCCR NO_TCCR_PIN
#define DIO52_COM 0
#define DIO53_PIN PINB0
#define DIO53_RPORT PINB
#define DIO53_WPORT PORTB
#define DIO53_DDR DDRB
#define DIO53_PWM NO_PWM_PIN
#define DIO53_TCCR NO_TCCR_PIN
#define DIO53_COM 0
/**
DIO54 ... DIO69 are added for compatibility with other
firmwares and duplicate names for AIO0 ... AIO15,
so DIO54 == AIO0, DIO55 == AIO1, DIO56 == AIO2, ...
*/
#define DIO54_PIN PINF0
#define DIO54_RPORT PINF
#define DIO54_WPORT PORTF
#define DIO54_DDR DDRF
#define DIO54_PWM NO_PWM_PIN
#define DIO54_TCCR NO_TCCR_PIN
#define DIO54_COM 0
#define DIO55_PIN PINF1
#define DIO55_RPORT PINF
#define DIO55_WPORT PORTF
#define DIO55_DDR DDRF
#define DIO55_PWM NO_PWM_PIN
#define DIO55_TCCR NO_TCCR_PIN
#define DIO55_COM 0
#define DIO56_PIN PINF2
#define DIO56_RPORT PINF
#define DIO56_WPORT PORTF
#define DIO56_DDR DDRF
#define DIO56_PWM NO_PWM_PIN
#define DIO56_TCCR NO_TCCR_PIN
#define DIO56_COM 0
#define DIO57_PIN PINF3
#define DIO57_RPORT PINF
#define DIO57_WPORT PORTF
#define DIO57_DDR DDRF
#define DIO57_PWM NO_PWM_PIN
#define DIO57_TCCR NO_TCCR_PIN
#define DIO57_COM 0
#define DIO58_PIN PINF4
#define DIO58_RPORT PINF
#define DIO58_WPORT PORTF
#define DIO58_DDR DDRF
#define DIO58_PWM NO_PWM_PIN
#define DIO58_TCCR NO_TCCR_PIN
#define DIO58_COM 0
#define DIO59_PIN PINF5
#define DIO59_RPORT PINF
#define DIO59_WPORT PORTF
#define DIO59_DDR DDRF
#define DIO59_PWM NO_PWM_PIN
#define DIO59_TCCR NO_TCCR_PIN
#define DIO59_COM 0
#define DIO60_PIN PINF6
#define DIO60_RPORT PINF
#define DIO60_WPORT PORTF
#define DIO60_DDR DDRF
#define DIO60_PWM NO_PWM_PIN
#define DIO60_TCCR NO_TCCR_PIN
#define DIO60_COM 0
#define DIO61_PIN PINF7
#define DIO61_RPORT PINF
#define DIO61_WPORT PORTF
#define DIO61_DDR DDRF
#define DIO61_PWM NO_PWM_PIN
#define DIO61_TCCR NO_TCCR_PIN
#define DIO61_COM 0
#define DIO62_PIN PINK0
#define DIO62_RPORT PINK
#define DIO62_WPORT PORTK
#define DIO62_DDR DDRK
#define DIO62_PWM NO_PWM_PIN
#define DIO62_TCCR NO_TCCR_PIN
#define DIO62_COM 0
#define DIO63_PIN PINK1
#define DIO63_RPORT PINK
#define DIO63_WPORT PORTK
#define DIO63_DDR DDRK
#define DIO63_PWM NO_PWM_PIN
#define DIO63_TCCR NO_TCCR_PIN
#define DIO63_COM 0
#define DIO64_PIN PINK2
#define DIO64_RPORT PINK
#define DIO64_WPORT PORTK
#define DIO64_DDR DDRK
#define DIO64_PWM NO_PWM_PIN
#define DIO64_TCCR NO_TCCR_PIN
#define DIO64_COM 0
#define DIO65_PIN PINK3
#define DIO65_RPORT PINK
#define DIO65_WPORT PORTK
#define DIO65_DDR DDRK
#define DIO65_PWM NO_PWM_PIN
#define DIO65_TCCR NO_TCCR_PIN
#define DIO65_COM 0
#define DIO66_PIN PINK4
#define DIO66_RPORT PINK
#define DIO66_WPORT PORTK
#define DIO66_DDR DDRK
#define DIO66_PWM NO_PWM_PIN
#define DIO66_TCCR NO_TCCR_PIN
#define DIO66_COM 0
#define DIO67_PIN PINK5
#define DIO67_RPORT PINK
#define DIO67_WPORT PORTK
#define DIO67_DDR DDRK
#define DIO67_PWM NO_PWM_PIN
#define DIO67_TCCR NO_TCCR_PIN
#define DIO67_COM 0
#define DIO68_PIN PINK6
#define DIO68_RPORT PINK
#define DIO68_WPORT PORTK
#define DIO68_DDR DDRK
#define DIO68_PWM NO_PWM_PIN
#define DIO68_TCCR NO_TCCR_PIN
#define DIO68_COM 0
#define DIO69_PIN PINK7
#define DIO69_RPORT PINK
#define DIO69_WPORT PORTK
#define DIO69_DDR DDRK
#define DIO69_PWM NO_PWM_PIN
#define DIO69_TCCR NO_TCCR_PIN
#define DIO69_COM 0
// analog pins
#define AIO0_PIN PINF0
#define AIO0_RPORT PINF
#define AIO0_WPORT PORTF
#define AIO0_DDR DDRF
#define AIO0_PWM NO_PWM_PIN
#define AIO0_TCCR NO_TCCR_PIN
#define AIO0_COM 0
#define AIO0_ADC 0
#define AIO1_PIN PINF1
#define AIO1_RPORT PINF
#define AIO1_WPORT PORTF
#define AIO1_DDR DDRF
#define AIO1_PWM NO_PWM_PIN
#define AIO1_TCCR NO_TCCR_PIN
#define AIO1_COM 0
#define AIO1_ADC 1
#define AIO2_PIN PINF2
#define AIO2_RPORT PINF
#define AIO2_WPORT PORTF
#define AIO2_DDR DDRF
#define AIO2_PWM NO_PWM_PIN
#define AIO2_TCCR NO_TCCR_PIN
#define AIO2_COM 0
#define AIO2_ADC 2
#define AIO3_PIN PINF3
#define AIO3_RPORT PINF
#define AIO3_WPORT PORTF
#define AIO3_DDR DDRF
#define AIO3_PWM NO_PWM_PIN
#define AIO3_TCCR NO_TCCR_PIN
#define AIO3_COM 0
#define AIO3_ADC 3
#define AIO4_PIN PINF4
#define AIO4_RPORT PINF
#define AIO4_WPORT PORTF
#define AIO4_DDR DDRF
#define AIO4_PWM NO_PWM_PIN
#define AIO4_TCCR NO_TCCR_PIN
#define AIO4_COM 0
#define AIO4_ADC 4
#define AIO5_PIN PINF5
#define AIO5_RPORT PINF
#define AIO5_WPORT PORTF
#define AIO5_DDR DDRF
#define AIO5_PWM NO_PWM_PIN
#define AIO5_TCCR NO_TCCR_PIN
#define AIO5_COM 0
#define AIO5_ADC 5
#define AIO6_PIN PINF6
#define AIO6_RPORT PINF
#define AIO6_WPORT PORTF
#define AIO6_DDR DDRF
#define AIO6_PWM NO_PWM_PIN
#define AIO6_TCCR NO_TCCR_PIN
#define AIO6_COM 0
#define AIO6_ADC 6
#define AIO7_PIN PINF7
#define AIO7_RPORT PINF
#define AIO7_WPORT PORTF
#define AIO7_DDR DDRF
#define AIO7_PWM NO_PWM_PIN
#define AIO7_TCCR NO_TCCR_PIN
#define AIO7_COM 0
#define AIO7_ADC 7
#define AIO8_PIN PINK0
#define AIO8_RPORT PINK
#define AIO8_WPORT PORTK
#define AIO8_DDR DDRK
#define AIO8_PWM NO_PWM_PIN
#define AIO8_TCCR NO_TCCR_PIN
#define AIO8_COM 0
#define AIO8_ADC 8
#define AIO9_PIN PINK1
#define AIO9_RPORT PINK
#define AIO9_WPORT PORTK
#define AIO9_DDR DDRK
#define AIO9_PWM NO_PWM_PIN
#define AIO9_TCCR NO_TCCR_PIN
#define AIO9_COM 0
#define AIO9_ADC 9
#define AIO10_PIN PINK2
#define AIO10_RPORT PINK
#define AIO10_WPORT PORTK
#define AIO10_DDR DDRK
#define AIO10_PWM NO_PWM_PIN
#define AIO10_TCCR NO_TCCR_PIN
#define AIO10_COM 0
#define AIO10_ADC 10
#define AIO11_PIN PINK3
#define AIO11_RPORT PINK
#define AIO11_WPORT PORTK
#define AIO11_DDR DDRK
#define AIO11_PWM NO_PWM_PIN
#define AIO11_TCCR NO_TCCR_PIN
#define AIO11_COM 0
#define AIO11_ADC 11
#define AIO12_PIN PINK4
#define AIO12_RPORT PINK
#define AIO12_WPORT PORTK
#define AIO12_DDR DDRK
#define AIO12_PWM NO_PWM_PIN
#define AIO12_TCCR NO_TCCR_PIN
#define AIO12_COM 0
#define AIO12_ADC 12
#define AIO13_PIN PINK5
#define AIO13_RPORT PINK
#define AIO13_WPORT PORTK
#define AIO13_DDR DDRK
#define AIO13_PWM NO_PWM_PIN
#define AIO13_TCCR NO_TCCR_PIN
#define AIO13_COM 0
#define AIO13_ADC 13
#define AIO14_PIN PINK6
#define AIO14_RPORT PINK
#define AIO14_WPORT PORTK
#define AIO14_DDR DDRK
#define AIO14_PWM NO_PWM_PIN
#define AIO14_TCCR NO_TCCR_PIN
#define AIO14_COM 0
#define AIO14_ADC 14
#define AIO15_PIN PINK7
#define AIO15_RPORT PINK
#define AIO15_WPORT PORTK
#define AIO15_DDR DDRK
#define AIO15_PWM NO_PWM_PIN
#define AIO15_TCCR NO_TCCR_PIN
#define AIO15_COM 0
#define AIO15_ADC 15
#undef PA0
#define PA0_PIN PINA0
#define PA0_RPORT PINA
#define PA0_WPORT PORTA
#define PA0_DDR DDRA
#define PA0_PWM NO_PWM_PIN
#define PA0_TCCR NO_TCCR_PIN
#define PA0_COM 0
#undef PA1
#define PA1_PIN PINA1
#define PA1_RPORT PINA
#define PA1_WPORT PORTA
#define PA1_DDR DDRA
#define PA1_PWM NO_PWM_PIN
#define PA1_TCCR NO_TCCR_PIN
#define PA1_COM 0
#undef PA2
#define PA2_PIN PINA2
#define PA2_RPORT PINA
#define PA2_WPORT PORTA
#define PA2_DDR DDRA
#define PA2_PWM NO_PWM_PIN
#define PA2_TCCR NO_TCCR_PIN
#define PA2_COM 0
#undef PA3
#define PA3_PIN PINA3
#define PA3_RPORT PINA
#define PA3_WPORT PORTA
#define PA3_DDR DDRA
#define PA3_PWM NO_PWM_PIN
#define PA3_TCCR NO_TCCR_PIN
#define PA3_COM 0
#undef PA4
#define PA4_PIN PINA4
#define PA4_RPORT PINA
#define PA4_WPORT PORTA
#define PA4_DDR DDRA
#define PA4_PWM NO_PWM_PIN
#define PA4_TCCR NO_TCCR_PIN
#define PA4_COM 0
#undef PA5
#define PA5_PIN PINA5
#define PA5_RPORT PINA
#define PA5_WPORT PORTA
#define PA5_DDR DDRA
#define PA5_PWM NO_PWM_PIN
#define PA5_TCCR NO_TCCR_PIN
#define PA5_COM 0
#undef PA6
#define PA6_PIN PINA6
#define PA6_RPORT PINA
#define PA6_WPORT PORTA
#define PA6_DDR DDRA
#define PA6_PWM NO_PWM_PIN
#define PA6_TCCR NO_TCCR_PIN
#define PA6_COM 0
#undef PA7
#define PA7_PIN PINA7
#define PA7_RPORT PINA
#define PA7_WPORT PORTA
#define PA7_DDR DDRA
#define PA7_PWM NO_PWM_PIN
#define PA7_TCCR NO_TCCR_PIN
#define PA7_COM 0
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_DDR DDRB
#define PB0_PWM NO_PWM_PIN
#define PB0_TCCR NO_TCCR_PIN
#define PB0_COM 0
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_DDR DDRB
#define PB1_PWM NO_PWM_PIN
#define PB1_TCCR NO_TCCR_PIN
#define PB1_COM 0
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_DDR DDRB
#define PB2_PWM NO_PWM_PIN
#define PB2_TCCR NO_TCCR_PIN
#define PB2_COM 0
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_DDR DDRB
#define PB3_PWM NO_PWM_PIN
#define PB3_TCCR NO_TCCR_PIN
#define PB3_COM 0
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_DDR DDRB
#define PB4_PWM &OCR2A
#define PB4_TCCR TCCR2A
#define PB4_COM COM2A1
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_DDR DDRB
#define PB5_PWM NO_PWM_PIN
#define PB5_TCCR NO_TCCR_PIN
#define PB5_COM 0
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_DDR DDRB
#define PB6_PWM NO_PWM_PIN
#define PB6_TCCR NO_TCCR_PIN
#define PB6_COM 0
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_DDR DDRB
#define PB7_PWM &OCR0A
#define PB7_TCCR TCCR0A
#define PB7_COM COM0A1
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_DDR DDRC
#define PC0_PWM NO_PWM_PIN
#define PC0_TCCR NO_TCCR_PIN
#define PC0_COM 0
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_DDR DDRC
#define PC1_PWM NO_PWM_PIN
#define PC1_TCCR NO_TCCR_PIN
#define PC1_COM 0
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_DDR DDRC
#define PC2_PWM NO_PWM_PIN
#define PC2_TCCR NO_TCCR_PIN
#define PC2_COM 0
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_DDR DDRC
#define PC3_PWM NO_PWM_PIN
#define PC3_TCCR NO_TCCR_PIN
#define PC3_COM 0
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_DDR DDRC
#define PC4_PWM NO_PWM_PIN
#define PC4_TCCR NO_TCCR_PIN
#define PC4_COM 0
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_DDR DDRC
#define PC5_PWM NO_PWM_PIN
#define PC5_TCCR NO_TCCR_PIN
#define PC5_COM 0
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_DDR DDRC
#define PC6_PWM NO_PWM_PIN
#define PC6_TCCR NO_TCCR_PIN
#define PC6_COM 0
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_DDR DDRC
#define PC7_PWM NO_PWM_PIN
#define PC7_TCCR NO_TCCR_PIN
#define PC7_COM 0
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_DDR DDRD
#define PD0_PWM NO_PWM_PIN
#define PD0_TCCR NO_TCCR_PIN
#define PD0_COM 0
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_DDR DDRD
#define PD1_PWM NO_PWM_PIN
#define PD1_TCCR NO_TCCR_PIN
#define PD1_COM 0
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_DDR DDRD
#define PD2_PWM NO_PWM_PIN
#define PD2_TCCR NO_TCCR_PIN
#define PD2_COM 0
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_DDR DDRD
#define PD3_PWM NO_PWM_PIN
#define PD3_TCCR NO_TCCR_PIN
#define PD3_COM 0
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_DDR DDRD
#define PD4_PWM NO_PWM_PIN
#define PD4_TCCR NO_TCCR_PIN
#define PD4_COM 0
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_DDR DDRD
#define PD5_PWM NO_PWM_PIN
#define PD5_TCCR NO_TCCR_PIN
#define PD5_COM 0
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_DDR DDRD
#define PD6_PWM NO_PWM_PIN
#define PD6_TCCR NO_TCCR_PIN
#define PD6_COM 0