Use NUM_DIGITAL_PINS instead of custom DIO_COUNT

master
Scott Lahteine 8 years ago
parent 04a1fac029
commit ff3a8ca0d1

@ -4700,10 +4700,10 @@ inline void gcode_M42() {
}
// Get the range of pins to test or watch
int first_pin = 0, last_pin = DIO_COUNT - 1;
int first_pin = 0, last_pin = NUM_DIGITAL_PINS - 1;
if (code_seen('P')) {
first_pin = last_pin = code_value_byte();
if (first_pin > DIO_COUNT - 1) return;
if (first_pin > NUM_DIGITAL_PINS - 1) return;
}
bool ignore_protection = code_seen('I') ? code_value_bool() : false;

@ -20,20 +20,6 @@
*
*/
// How many DIO pins are defined?
#ifdef DIO85_PIN
// #define DIO_COUNT 86
#define DIO_COUNT 70 // digitalRead and other Arduino IDE routines only know about pins 0 through 69
#elif defined(DIO53_PIN)
#define DIO_COUNT 54
#elif defined(DIO47_PIN)
#define DIO_COUNT 48
#elif defined(DIO31_PIN)
#define DIO_COUNT 32
#elif defined(DIO21_PIN)
#define DIO_COUNT 22
#endif
bool endstop_monitor_flag = false;
#define NAME_FORMAT "%-28s" // one place to specify the format of all the sources of names
@ -157,9 +143,6 @@ static bool report_pin_name(int8_t pin, bool &pin_is_analog) {
#if PIN_EXISTS(DIGIPOTSS)
PIN_SAY(DIGIPOTSS_PIN);
#endif
#if defined(DIO_COUNT) && DIO_COUNT >= 0
PIN_SAY(DIO_COUNT);
#endif
#if defined(DOGLCD_A0) && DOGLCD_A0 >= 0
PIN_SAY(DOGLCD_A0);
#endif

Loading…
Cancel
Save