Browse Source

fix pinsDebug.h error, add capability to display more than 70 pins.

Bob-the-Kuhn 7 years ago
parent
commit
11e28f389e
3 changed files with 414 additions and 53 deletions
  1. 69
    53
      Marlin/pinsDebug.h
  2. 3
    0
      Marlin/pinsDebug_list.h
  3. 342
    0
      Marlin/pinsDebug_plus_70.h

+ 69
- 53
Marlin/pinsDebug.h View File

@@ -98,16 +98,31 @@ const char* const pin_array[][3] PROGMEM = {
98 98
 
99 99
 #define n_array (sizeof(pin_array) / sizeof(char*)) / 3
100 100
 
101
+#define AVR_ATmega2560_FAMILY_PLUS_70 (MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D \
102
+|| MOTHERBOARD == BOARD_MIGHTYBOARD_REVE \
103
+|| MOTHERBOARD == BOARD_MINIRAMBO \
104
+|| MOTHERBOARD == BOARD_SCOOVO_X9H)
105
+
101 106
 #if AVR_AT90USB1286_FAMILY
102 107
   // Working with Teensyduino extension so need to re-define some things
103 108
   #include "pinsDebug_Teensyduino.h"
104 109
   // Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
105 110
   // portModeRegister takes a different argument
106
- #define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
107
- #define get_pinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask(pin))
111
+  #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
112
+  #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
113
+  #define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
114
+  #define get_pinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
115
+#elif AVR_ATmega2560_FAMILY_PLUS_70   // So we can access/display all the pins on boards using more than 70
116
+  #include "pinsDebug_plus_70.h"
117
+  #define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
118
+  #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
119
+  #define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
120
+  bool get_pinMode(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
108 121
 #else
109
- #define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
110
- bool get_pinMode(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask(pin); }
122
+  #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
123
+  #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
124
+  #define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
125
+  bool get_pinMode(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
111 126
 #endif
112 127
 
113 128
 #define PWM_PRINT(V) do{ sprintf_P(buffer, PSTR("PWM:  %4d"), V); SERIAL_ECHO(buffer); }while(0)
@@ -125,7 +140,7 @@ const char* const pin_array[][3] PROGMEM = {
125 140
 static bool pwm_status(uint8_t pin) {
126 141
   char buffer[20];   // for the sprintf statements
127 142
 
128
-  switch (digitalPinToTimer(pin)) {
143
+  switch (digitalPinToTimer_DEBUG(pin)) {
129 144
 
130 145
     #if defined(TCCR0A) && defined(COM0A1)
131 146
       #ifdef TIMER0A
@@ -312,7 +327,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) {  // T - timer    L - pwm  N -
312 327
 }
313 328
 
314 329
 static void pwm_details(uint8_t pin) {
315
-  switch (digitalPinToTimer(pin)) {
330
+  switch (digitalPinToTimer_DEBUG(pin)) {
316 331
 
317 332
     #if defined(TCCR0A) && defined(COM0A1)
318 333
       #ifdef TIMER0A
@@ -364,7 +379,7 @@ static void pwm_details(uint8_t pin) {
364 379
   // on pins that have two PWMs, print info on second PWM
365 380
   #if AVR_ATmega2560_FAMILY || AVR_AT90USB1286_FAMILY
366 381
     // looking for port B7 - PWMs 0A and 1C
367
-    if (digitalPinToPort_DEBUG(pin) == 'B' - 64 && 0x80 == digitalPinToBitMask(pin)) {
382
+    if (digitalPinToPort_DEBUG(pin) == 'B' - 64 && 0x80 == digitalPinToBitMask_DEBUG(pin)) {
368 383
       #if !AVR_AT90USB1286_FAMILY
369 384
         SERIAL_PROTOCOLPGM("\n .");
370 385
         SERIAL_PROTOCOL_SP(18);
@@ -385,7 +400,7 @@ static void pwm_details(uint8_t pin) {
385 400
 #ifndef digitalRead_mod                   // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
386 401
   int digitalRead_mod(const int8_t pin) { // same as digitalRead except the PWM stop section has been removed
387 402
     const uint8_t port = digitalPinToPort_DEBUG(pin);
388
-    return (port != NOT_A_PIN) && (*portInputRegister(port) & digitalPinToBitMask(pin)) ? HIGH : LOW;
403
+    return (port != NOT_A_PIN) && (*portInputRegister(port) & digitalPinToBitMask_DEBUG(pin)) ? HIGH : LOW;
389 404
   }
390 405
 #endif
391 406
 
@@ -406,11 +421,11 @@ void print_port(int8_t pin) {   // print port number
406 421
       else if (pin == 47)
407 422
         x = '3';
408 423
       else {
409
-        uint8_t temp = digitalPinToBitMask(pin);
424
+        uint8_t temp = digitalPinToBitMask_DEBUG(pin);
410 425
         for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
411 426
       }
412 427
     #else
413
-      uint8_t temp = digitalPinToBitMask(pin);
428
+      uint8_t temp = digitalPinToBitMask_DEBUG(pin);
414 429
       for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
415 430
     #endif
416 431
     SERIAL_CHAR(x);
@@ -460,14 +475,16 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f
460 475
         if (pin_is_protected(pin) && !ignore)
461 476
           SERIAL_ECHOPGM("protected ");
462 477
         else {
463
-          #ifdef AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
464
-            if (pin == 46) {
465
-              print_input_or_output(GET_OUTPUT(46));
466
-              SERIAL_PROTOCOL(READ(46));
467
-            }
468
-            else if (pin == 47)
469
-              print_input_or_output(GET_OUTPUT(47));
470
-              SERIAL_PROTOCOL(READ(47));
478
+          #ifdef AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
479
+            if (pin == 46 || pin == 47) {
480
+              if (pin == 46) {
481
+                print_input_or_output(GET_OUTPUT(46));
482
+                SERIAL_PROTOCOL(READ(46));
483
+              }
484
+              else if (pin == 47) {
485
+                print_input_or_output(GET_OUTPUT(47));
486
+                SERIAL_PROTOCOL(READ(47));
487
+              }
471 488
             }
472 489
             else
473 490
           #endif
@@ -509,47 +526,46 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f
509 526
       sprintf_P(buffer, PSTR(" (A%2d)  "), int(pin - analogInputToDigitalPin(0)));    // analog pin number
510 527
       SERIAL_ECHO(buffer);
511 528
     }
512
-    else {
529
+    else
513 530
       SERIAL_ECHO_SP(8);   // add padding if not an analog pin
514
-      SERIAL_ECHOPGM("<unused/unknown>");
515
-      if (extended) {
516
-        #ifdef AVR_AT90USB1286_FAMILY  // Teensy IDEs don't know about these pins so must use FASTIO
517
-          if (pin == 46 || pin == 47) {
518
-            SERIAL_PROTOCOL_SP(12);
519
-            if (pin == 46) {
520
-              print_input_or_output(GET_OUTPUT(46));
521
-              SERIAL_PROTOCOL(READ(46));
522
-            }
523
-            else {
524
-              print_input_or_output(GET_OUTPUT(47));
525
-              SERIAL_PROTOCOL(READ(47));
526
-            }
527
-          }
528
-          else
529
-        #endif
530
-        {
531
-          if (get_pinMode(pin)) {
532
-            SERIAL_PROTOCOL_SP(12);
533
-            print_input_or_output(true);
534
-            SERIAL_PROTOCOL(digitalRead_mod(pin));
531
+    SERIAL_ECHOPGM("<unused/unknown>");
532
+    if (extended) {
533
+      #ifdef AVR_AT90USB1286_FAMILY  //Teensy IDEs don't know about these pins so must use FASTIO
534
+        if (pin == 46 || pin == 47) {
535
+          SERIAL_PROTOCOL_SP(12);
536
+          if (pin == 46) {
537
+            print_input_or_output(GET_OUTPUT(46));
538
+            SERIAL_PROTOCOL(READ(46));
535 539
           }
536 540
           else {
537
-            if (IS_ANALOG(pin)) {
538
-              sprintf_P(buffer, PSTR("   Analog in = %5d"), analogRead(pin - analogInputToDigitalPin(0)));
539
-              SERIAL_ECHO(buffer);
540
-              SERIAL_ECHOPGM("   ");
541
-            }
542
-            else
543
-              SERIAL_ECHO_SP(12);   // add padding if not an analog pin
544
-
545
-            print_input_or_output(false);
546
-            SERIAL_PROTOCOL(digitalRead_mod(pin));
541
+            print_input_or_output(GET_OUTPUT(47));
542
+            SERIAL_PROTOCOL(READ(47));
547 543
           }
548
-          //if (!pwm_status(pin)) SERIAL_CHAR(' ');    // add padding if it's not a PWM pin
549
-          if (extended) pwm_details(pin);  // report PWM capabilities only if doing an extended report
550 544
         }
545
+        else
546
+      #endif
547
+      {
548
+        if (get_pinMode(pin)) {
549
+          SERIAL_PROTOCOL_SP(12);
550
+          print_input_or_output(true);
551
+          SERIAL_PROTOCOL(digitalRead_mod(pin));
552
+        }
553
+        else {
554
+          if (IS_ANALOG(pin)) {
555
+            sprintf_P(buffer, PSTR("   Analog in = %5d"), analogRead(pin - analogInputToDigitalPin(0)));
556
+            SERIAL_ECHO(buffer);
557
+            SERIAL_ECHOPGM("   ");
558
+          }
559
+          else
560
+          SERIAL_ECHO_SP(12);   // add padding if not an analog pin
561
+
562
+          print_input_or_output(false);
563
+          SERIAL_PROTOCOL(digitalRead_mod(pin));
564
+        }
565
+        //if (!pwm_status(pin)) SERIAL_CHAR(' ');    // add padding if it's not a PWM pin
566
+        if (extended) pwm_details(pin);  // report PWM capabilities only if doing an extended report
551 567
       }
552
-      SERIAL_EOL();
553 568
     }
569
+    SERIAL_EOL();
554 570
   }
555 571
 }

+ 3
- 0
Marlin/pinsDebug_list.h View File

@@ -41,6 +41,9 @@
41 41
 #if defined(__GS) && __GS >= 0
42 42
   REPORT_NAME_DIGITAL(__GS, __LINE__ )
43 43
 #endif
44
+#if PIN_EXISTS(ADC_KEYPAD)
45
+  REPORT_NAME_ANALOG(ADC_KEYPAD_PIN, __LINE__ )
46
+#endif
44 47
 #if PIN_EXISTS(AVR_MISO)
45 48
   REPORT_NAME_DIGITAL(AVR_MISO_PIN, __LINE__ )
46 49
 #endif

+ 342
- 0
Marlin/pinsDebug_plus_70.h View File

@@ -0,0 +1,342 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
+ *
6
+ * Based on Sprinter and grbl.
7
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
8
+ *
9
+ * This program is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
+ *
22
+ */
23
+
24
+/**
25
+ *  structurs for 2560 family boards that use morre than 70 pins
26
+ */
27
+
28
+#ifndef Plus_70_h
29
+  #define Plus_70_h
30
+  
31
+#undef NUM_DIGITAL_PINS
32
+#if MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D
33
+  #define NUM_DIGITAL_PINS            85
34
+#elif MOTHERBOARD == BOARD_MIGHTYBOARD_REVE
35
+  #define NUM_DIGITAL_PINS            80
36
+#elif MOTHERBOARD == BOARD_MINIRAMBO
37
+  #define NUM_DIGITAL_PINS            85
38
+#elif MOTHERBOARD == BOARD_SCOOVO_X9H
39
+  #define NUM_DIGITAL_PINS            85
40
+#endif
41
+
42
+#define PA 1
43
+#define PB 2
44
+#define PC 3
45
+#define PD 4
46
+#define PE 5
47
+#define PF 6
48
+#define PG 7
49
+#define PH 8
50
+#define PJ 10
51
+#define PK 11
52
+#define PL 12
53
+
54
+const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
55
+  // PORTLIST
56
+  // -------------------------------------------
57
+  PE  , // PE 0 ** 0 ** USART0_RX
58
+  PE  , // PE 1 ** 1 ** USART0_TX
59
+  PE  , // PE 4 ** 2 ** PWM2
60
+  PE  , // PE 5 ** 3 ** PWM3
61
+  PG  , // PG 5 ** 4 ** PWM4
62
+  PE  , // PE 3 ** 5 ** PWM5
63
+  PH  , // PH 3 ** 6 ** PWM6
64
+  PH  , // PH 4 ** 7 ** PWM7
65
+  PH  , // PH 5 ** 8 ** PWM8
66
+  PH  , // PH 6 ** 9 ** PWM9
67
+  PB  , // PB 4 ** 10 ** PWM10
68
+  PB  , // PB 5 ** 11 ** PWM11
69
+  PB  , // PB 6 ** 12 ** PWM12
70
+  PB  , // PB 7 ** 13 ** PWM13
71
+  PJ  , // PJ 1 ** 14 ** USART3_TX
72
+  PJ  , // PJ 0 ** 15 ** USART3_RX
73
+  PH  , // PH 1 ** 16 ** USART2_TX
74
+  PH  , // PH 0 ** 17 ** USART2_RX
75
+  PD  , // PD 3 ** 18 ** USART1_TX
76
+  PD  , // PD 2 ** 19 ** USART1_RX
77
+  PD  , // PD 1 ** 20 ** I2C_SDA
78
+  PD  , // PD 0 ** 21 ** I2C_SCL
79
+  PA  , // PA 0 ** 22 ** D22
80
+  PA  , // PA 1 ** 23 ** D23
81
+  PA  , // PA 2 ** 24 ** D24
82
+  PA  , // PA 3 ** 25 ** D25
83
+  PA  , // PA 4 ** 26 ** D26
84
+  PA  , // PA 5 ** 27 ** D27
85
+  PA  , // PA 6 ** 28 ** D28
86
+  PA  , // PA 7 ** 29 ** D29
87
+  PC  , // PC 7 ** 30 ** D30
88
+  PC  , // PC 6 ** 31 ** D31
89
+  PC  , // PC 5 ** 32 ** D32
90
+  PC  , // PC 4 ** 33 ** D33
91
+  PC  , // PC 3 ** 34 ** D34
92
+  PC  , // PC 2 ** 35 ** D35
93
+  PC  , // PC 1 ** 36 ** D36
94
+  PC  , // PC 0 ** 37 ** D37
95
+  PD  , // PD 7 ** 38 ** D38
96
+  PG  , // PG 2 ** 39 ** D39
97
+  PG  , // PG 1 ** 40 ** D40
98
+  PG  , // PG 0 ** 41 ** D41
99
+  PL  , // PL 7 ** 42 ** D42
100
+  PL  , // PL 6 ** 43 ** D43
101
+  PL  , // PL 5 ** 44 ** D44
102
+  PL  , // PL 4 ** 45 ** D45
103
+  PL  , // PL 3 ** 46 ** D46
104
+  PL  , // PL 2 ** 47 ** D47
105
+  PL  , // PL 1 ** 48 ** D48
106
+  PL  , // PL 0 ** 49 ** D49
107
+  PB  , // PB 3 ** 50 ** SPI_MISO
108
+  PB  , // PB 2 ** 51 ** SPI_MOSI
109
+  PB  , // PB 1 ** 52 ** SPI_SCK
110
+  PB  , // PB 0 ** 53 ** SPI_SS
111
+  PF  , // PF 0 ** 54 ** A0
112
+  PF  , // PF 1 ** 55 ** A1
113
+  PF  , // PF 2 ** 56 ** A2
114
+  PF  , // PF 3 ** 57 ** A3
115
+  PF  , // PF 4 ** 58 ** A4
116
+  PF  , // PF 5 ** 59 ** A5
117
+  PF  , // PF 6 ** 60 ** A6
118
+  PF  , // PF 7 ** 61 ** A7
119
+  PK  , // PK 0 ** 62 ** A8
120
+  PK  , // PK 1 ** 63 ** A9
121
+  PK  , // PK 2 ** 64 ** A10
122
+  PK  , // PK 3 ** 65 ** A11
123
+  PK  , // PK 4 ** 66 ** A12
124
+  PK  , // PK 5 ** 67 ** A13
125
+  PK  , // PK 6 ** 68 ** A14
126
+  PK  , // PK 7 ** 69 ** A15
127
+  PG  , // PG 4 ** 70 ** 
128
+  PG  , // PG 3 ** 71 ** 
129
+  PJ  , // PJ 2 ** 72 ** 
130
+  PJ  , // PJ 3 ** 73 ** 
131
+  PJ  , // PJ 7 ** 74 ** 
132
+  PJ  , // PJ 4 ** 75 ** 
133
+  PJ  , // PJ 5 ** 76 ** 
134
+  PJ  , // PJ 6 ** 77 ** 
135
+  PE  , // PE 2 ** 78 ** 
136
+  PE  , // PE 6 ** 79 ** 
137
+  PE  , // PE 7 ** 80 ** 
138
+  PD  , // PD 4 ** 81 ** 
139
+  PD  , // PD 5 ** 82 ** 
140
+  PD  , // PD 6 ** 83 ** 
141
+  PH  , // PH 2 ** 84 ** 
142
+  PH  , // PH 7 ** 85 ** 
143
+};
144
+
145
+#define digitalPinToPort_plus_70(P) ( pgm_read_byte( digital_pin_to_port_PGM_plus_70 + (P) ) )
146
+
147
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
148
+  // PIN IN PORT
149
+  // -------------------------------------------
150
+  _BV( 0 )  , // PE 0 ** 0 ** USART0_RX
151
+  _BV( 1 )  , // PE 1 ** 1 ** USART0_TX
152
+  _BV( 4 )  , // PE 4 ** 2 ** PWM2
153
+  _BV( 5 )  , // PE 5 ** 3 ** PWM3
154
+  _BV( 5 )  , // PG 5 ** 4 ** PWM4
155
+  _BV( 3 )  , // PE 3 ** 5 ** PWM5
156
+  _BV( 3 )  , // PH 3 ** 6 ** PWM6
157
+  _BV( 4 )  , // PH 4 ** 7 ** PWM7
158
+  _BV( 5 )  , // PH 5 ** 8 ** PWM8
159
+  _BV( 6 )  , // PH 6 ** 9 ** PWM9
160
+  _BV( 4 )  , // PB 4 ** 10 ** PWM10
161
+  _BV( 5 )  , // PB 5 ** 11 ** PWM11
162
+  _BV( 6 )  , // PB 6 ** 12 ** PWM12
163
+  _BV( 7 )  , // PB 7 ** 13 ** PWM13
164
+  _BV( 1 )  , // PJ 1 ** 14 ** USART3_TX
165
+  _BV( 0 )  , // PJ 0 ** 15 ** USART3_RX
166
+  _BV( 1 )  , // PH 1 ** 16 ** USART2_TX
167
+  _BV( 0 )  , // PH 0 ** 17 ** USART2_RX
168
+  _BV( 3 )  , // PD 3 ** 18 ** USART1_TX
169
+  _BV( 2 )  , // PD 2 ** 19 ** USART1_RX
170
+  _BV( 1 )  , // PD 1 ** 20 ** I2C_SDA
171
+  _BV( 0 )  , // PD 0 ** 21 ** I2C_SCL
172
+  _BV( 0 )  , // PA 0 ** 22 ** D22
173
+  _BV( 1 )  , // PA 1 ** 23 ** D23
174
+  _BV( 2 )  , // PA 2 ** 24 ** D24
175
+  _BV( 3 )  , // PA 3 ** 25 ** D25
176
+  _BV( 4 )  , // PA 4 ** 26 ** D26
177
+  _BV( 5 )  , // PA 5 ** 27 ** D27
178
+  _BV( 6 )  , // PA 6 ** 28 ** D28
179
+  _BV( 7 )  , // PA 7 ** 29 ** D29
180
+  _BV( 7 )  , // PC 7 ** 30 ** D30
181
+  _BV( 6 )  , // PC 6 ** 31 ** D31
182
+  _BV( 5 )  , // PC 5 ** 32 ** D32
183
+  _BV( 4 )  , // PC 4 ** 33 ** D33
184
+  _BV( 3 )  , // PC 3 ** 34 ** D34
185
+  _BV( 2 )  , // PC 2 ** 35 ** D35
186
+  _BV( 1 )  , // PC 1 ** 36 ** D36
187
+  _BV( 0 )  , // PC 0 ** 37 ** D37
188
+  _BV( 7 )  , // PD 7 ** 38 ** D38
189
+  _BV( 2 )  , // PG 2 ** 39 ** D39
190
+  _BV( 1 )  , // PG 1 ** 40 ** D40
191
+  _BV( 0 )  , // PG 0 ** 41 ** D41
192
+  _BV( 7 )  , // PL 7 ** 42 ** D42
193
+  _BV( 6 )  , // PL 6 ** 43 ** D43
194
+  _BV( 5 )  , // PL 5 ** 44 ** D44
195
+  _BV( 4 )  , // PL 4 ** 45 ** D45
196
+  _BV( 3 )  , // PL 3 ** 46 ** D46
197
+  _BV( 2 )  , // PL 2 ** 47 ** D47
198
+  _BV( 1 )  , // PL 1 ** 48 ** D48
199
+  _BV( 0 )  , // PL 0 ** 49 ** D49
200
+  _BV( 3 )  , // PB 3 ** 50 ** SPI_MISO
201
+  _BV( 2 )  , // PB 2 ** 51 ** SPI_MOSI
202
+  _BV( 1 )  , // PB 1 ** 52 ** SPI_SCK
203
+  _BV( 0 )  , // PB 0 ** 53 ** SPI_SS
204
+  _BV( 0 )  , // PF 0 ** 54 ** A0
205
+  _BV( 1 )  , // PF 1 ** 55 ** A1
206
+  _BV( 2 )  , // PF 2 ** 56 ** A2
207
+  _BV( 3 )  , // PF 3 ** 57 ** A3
208
+  _BV( 4 )  , // PF 4 ** 58 ** A4
209
+  _BV( 5 )  , // PF 5 ** 59 ** A5
210
+  _BV( 6 )  , // PF 6 ** 60 ** A6
211
+  _BV( 7 )  , // PF 7 ** 61 ** A7
212
+  _BV( 0 )  , // PK 0 ** 62 ** A8
213
+  _BV( 1 )  , // PK 1 ** 63 ** A9
214
+  _BV( 2 )  , // PK 2 ** 64 ** A10
215
+  _BV( 3 )  , // PK 3 ** 65 ** A11
216
+  _BV( 4 )  , // PK 4 ** 66 ** A12
217
+  _BV( 5 )  , // PK 5 ** 67 ** A13
218
+  _BV( 6 )  , // PK 6 ** 68 ** A14
219
+  _BV( 7 )  , // PK 7 ** 69 ** A15
220
+  _BV( 4 )  , // PG 4 ** 70 ** 
221
+  _BV( 3 )  , // PG 3 ** 71 ** 
222
+  _BV( 2 )  , // PJ 2 ** 72 ** 
223
+  _BV( 3 )  , // PJ 3 ** 73 ** 
224
+  _BV( 7 )  , // PJ 7 ** 74 ** 
225
+  _BV( 4 )  , // PJ 4 ** 75 ** 
226
+  _BV( 5 )  , // PJ 5 ** 76 ** 
227
+  _BV( 6 )  , // PJ 6 ** 77 ** 
228
+  _BV( 2 )  , // PE 2 ** 78 ** 
229
+  _BV( 6 )  , // PE 6 ** 79 ** 
230
+  _BV( 7 )  , // PE 7 ** 80 ** 
231
+  _BV( 4 )  , // PD 4 ** 81 ** 
232
+  _BV( 5 )  , // PD 5 ** 82 ** 
233
+  _BV( 6 )  , // PD 6 ** 83 ** 
234
+  _BV( 2 )  , // PH 2 ** 84 ** 
235
+  _BV( 7 )  , // PH 7 ** 85 ** 
236
+};
237
+
238
+#define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) )
239
+
240
+
241
+const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
242
+  // TIMERS
243
+  // -------------------------------------------
244
+  NOT_ON_TIMER  , // PE 0 ** 0 ** USART0_RX
245
+  NOT_ON_TIMER  , // PE 1 ** 1 ** USART0_TX
246
+  TIMER3B , // PE 4 ** 2 ** PWM2
247
+  TIMER3C , // PE 5 ** 3 ** PWM3
248
+  TIMER0B , // PG 5 ** 4 ** PWM4
249
+  TIMER3A , // PE 3 ** 5 ** PWM5
250
+  TIMER4A , // PH 3 ** 6 ** PWM6
251
+  TIMER4B , // PH 4 ** 7 ** PWM7
252
+  TIMER4C , // PH 5 ** 8 ** PWM8
253
+  TIMER2B , // PH 6 ** 9 ** PWM9
254
+  TIMER2A , // PB 4 ** 10 ** PWM10
255
+  TIMER1A , // PB 5 ** 11 ** PWM11
256
+  TIMER1B , // PB 6 ** 12 ** PWM12
257
+  TIMER0A , // PB 7 ** 13 ** PWM13
258
+  NOT_ON_TIMER  , // PJ 1 ** 14 ** USART3_TX
259
+  NOT_ON_TIMER  , // PJ 0 ** 15 ** USART3_RX
260
+  NOT_ON_TIMER  , // PH 1 ** 16 ** USART2_TX
261
+  NOT_ON_TIMER  , // PH 0 ** 17 ** USART2_RX
262
+  NOT_ON_TIMER  , // PD 3 ** 18 ** USART1_TX
263
+  NOT_ON_TIMER  , // PD 2 ** 19 ** USART1_RX
264
+  NOT_ON_TIMER  , // PD 1 ** 20 ** I2C_SDA
265
+  NOT_ON_TIMER  , // PD 0 ** 21 ** I2C_SCL
266
+  NOT_ON_TIMER  , // PA 0 ** 22 ** D22
267
+  NOT_ON_TIMER  , // PA 1 ** 23 ** D23
268
+  NOT_ON_TIMER  , // PA 2 ** 24 ** D24
269
+  NOT_ON_TIMER  , // PA 3 ** 25 ** D25
270
+  NOT_ON_TIMER  , // PA 4 ** 26 ** D26
271
+  NOT_ON_TIMER  , // PA 5 ** 27 ** D27
272
+  NOT_ON_TIMER  , // PA 6 ** 28 ** D28
273
+  NOT_ON_TIMER  , // PA 7 ** 29 ** D29
274
+  NOT_ON_TIMER  , // PC 7 ** 30 ** D30
275
+  NOT_ON_TIMER  , // PC 6 ** 31 ** D31
276
+  NOT_ON_TIMER  , // PC 5 ** 32 ** D32
277
+  NOT_ON_TIMER  , // PC 4 ** 33 ** D33
278
+  NOT_ON_TIMER  , // PC 3 ** 34 ** D34
279
+  NOT_ON_TIMER  , // PC 2 ** 35 ** D35
280
+  NOT_ON_TIMER  , // PC 1 ** 36 ** D36
281
+  NOT_ON_TIMER  , // PC 0 ** 37 ** D37
282
+  NOT_ON_TIMER  , // PD 7 ** 38 ** D38
283
+  NOT_ON_TIMER  , // PG 2 ** 39 ** D39
284
+  NOT_ON_TIMER  , // PG 1 ** 40 ** D40
285
+  NOT_ON_TIMER  , // PG 0 ** 41 ** D41
286
+  NOT_ON_TIMER  , // PL 7 ** 42 ** D42
287
+  NOT_ON_TIMER  , // PL 6 ** 43 ** D43
288
+  TIMER5C , // PL 5 ** 44 ** D44
289
+  TIMER5B , // PL 4 ** 45 ** D45
290
+  TIMER5A , // PL 3 ** 46 ** D46
291
+  NOT_ON_TIMER  , // PL 2 ** 47 ** D47
292
+  NOT_ON_TIMER  , // PL 1 ** 48 ** D48
293
+  NOT_ON_TIMER  , // PL 0 ** 49 ** D49
294
+  NOT_ON_TIMER  , // PB 3 ** 50 ** SPI_MISO
295
+  NOT_ON_TIMER  , // PB 2 ** 51 ** SPI_MOSI
296
+  NOT_ON_TIMER  , // PB 1 ** 52 ** SPI_SCK
297
+  NOT_ON_TIMER  , // PB 0 ** 53 ** SPI_SS
298
+  NOT_ON_TIMER  , // PF 0 ** 54 ** A0
299
+  NOT_ON_TIMER  , // PF 1 ** 55 ** A1
300
+  NOT_ON_TIMER  , // PF 2 ** 56 ** A2
301
+  NOT_ON_TIMER  , // PF 3 ** 57 ** A3
302
+  NOT_ON_TIMER  , // PF 4 ** 58 ** A4
303
+  NOT_ON_TIMER  , // PF 5 ** 59 ** A5
304
+  NOT_ON_TIMER  , // PF 6 ** 60 ** A6
305
+  NOT_ON_TIMER  , // PF 7 ** 61 ** A7
306
+  NOT_ON_TIMER  , // PK 0 ** 62 ** A8
307
+  NOT_ON_TIMER  , // PK 1 ** 63 ** A9
308
+  NOT_ON_TIMER  , // PK 2 ** 64 ** A10
309
+  NOT_ON_TIMER  , // PK 3 ** 65 ** A11
310
+  NOT_ON_TIMER  , // PK 4 ** 66 ** A12
311
+  NOT_ON_TIMER  , // PK 5 ** 67 ** A13
312
+  NOT_ON_TIMER  , // PK 6 ** 68 ** A14
313
+  NOT_ON_TIMER  , // PK 7 ** 69 ** A15
314
+  NOT_ON_TIMER  , // PG 4 ** 70 **
315
+  NOT_ON_TIMER  , // PG 3 ** 71 **
316
+  NOT_ON_TIMER  , // PJ 2 ** 72 **
317
+  NOT_ON_TIMER  , // PJ 3 ** 73 **
318
+  NOT_ON_TIMER  , // PJ 7 ** 74 **
319
+  NOT_ON_TIMER  , // PJ 4 ** 75 **
320
+  NOT_ON_TIMER  , // PJ 5 ** 76 **
321
+  NOT_ON_TIMER  , // PJ 6 ** 77 **
322
+  NOT_ON_TIMER  , // PE 2 ** 78 **
323
+  NOT_ON_TIMER  , // PE 6 ** 79 **
324
+};
325
+
326
+#define digitalPinToTimer_plus_70(P) ( pgm_read_byte( digital_pin_to_timer_PGM_plus_70 + (P) ) )
327
+
328
+/**
329
+ *  Interrupts that are not implemented
330
+ *
331
+ *  INT6    E6 79
332
+ *  INT7    E7 80
333
+ *  PCINT11 J2 72
334
+ *  PCINT12 J3 73
335
+ *  PCINT13 J4 75
336
+ *  PCINT14 J5 76
337
+ *  PCINT15 J6 77
338
+ */
339
+
340
+
341
+#endif
342
+

Loading…
Cancel
Save