Browse Source

Use NUM_DIGITAL_PINS instead of custom DIO_COUNT

Scott Lahteine 8 years ago
parent
commit
ff3a8ca0d1
2 changed files with 2 additions and 19 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp
  2. 0
    17
      Marlin/pinsDebug.h

+ 2
- 2
Marlin/Marlin_main.cpp View File

4700
     }
4700
     }
4701
 
4701
 
4702
     // Get the range of pins to test or watch
4702
     // Get the range of pins to test or watch
4703
-    int first_pin = 0, last_pin = DIO_COUNT - 1;
4703
+    int first_pin = 0, last_pin = NUM_DIGITAL_PINS - 1;
4704
     if (code_seen('P')) {
4704
     if (code_seen('P')) {
4705
       first_pin = last_pin = code_value_byte();
4705
       first_pin = last_pin = code_value_byte();
4706
-      if (first_pin > DIO_COUNT - 1) return;
4706
+      if (first_pin > NUM_DIGITAL_PINS - 1) return;
4707
     }
4707
     }
4708
 
4708
 
4709
     bool ignore_protection = code_seen('I') ? code_value_bool() : false;
4709
     bool ignore_protection = code_seen('I') ? code_value_bool() : false;

+ 0
- 17
Marlin/pinsDebug.h View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
-// How many DIO pins are defined?
24
-#ifdef DIO85_PIN
25
-//  #define DIO_COUNT 86
26
-  #define DIO_COUNT 70  // digitalRead and other Arduino IDE routines only know about pins 0 through 69
27
-#elif defined(DIO53_PIN)
28
-  #define DIO_COUNT 54
29
-#elif defined(DIO47_PIN)
30
-  #define DIO_COUNT 48
31
-#elif defined(DIO31_PIN)
32
-  #define DIO_COUNT 32
33
-#elif defined(DIO21_PIN)
34
-  #define DIO_COUNT 22
35
-#endif
36
-
37
 bool endstop_monitor_flag = false;
23
 bool endstop_monitor_flag = false;
38
 
24
 
39
 #define  NAME_FORMAT "%-28s"   // one place to specify the format of all the sources of names
25
 #define  NAME_FORMAT "%-28s"   // one place to specify the format of all the sources of names
157
   #if PIN_EXISTS(DIGIPOTSS)
143
   #if PIN_EXISTS(DIGIPOTSS)
158
     PIN_SAY(DIGIPOTSS_PIN);
144
     PIN_SAY(DIGIPOTSS_PIN);
159
   #endif
145
   #endif
160
-  #if defined(DIO_COUNT) && DIO_COUNT >= 0
161
-    PIN_SAY(DIO_COUNT);
162
-  #endif
163
   #if defined(DOGLCD_A0) && DOGLCD_A0 >= 0
146
   #if defined(DOGLCD_A0) && DOGLCD_A0 >= 0
164
     PIN_SAY(DOGLCD_A0);
147
     PIN_SAY(DOGLCD_A0);
165
   #endif
148
   #endif

Loading…
Cancel
Save