From 9559bdb4d574039efba87520f15bdfcae6862637 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Dec 2021 19:55:47 -0600 Subject: [PATCH] Try NUM_DIGITAL_PINS 112 --- Marlin/src/HAL/STM32/pinsDebug.h | 6 +++--- .../variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h | 4 ++-- .../PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/HAL/STM32/pinsDebug.h b/Marlin/src/HAL/STM32/pinsDebug.h index a52aa753ba04..cc4681a978e2 100644 --- a/Marlin/src/HAL/STM32/pinsDebug.h +++ b/Marlin/src/HAL/STM32/pinsDebug.h @@ -112,7 +112,7 @@ const XrefInfo pin_xref[] PROGMEM = { #if PA0 > NUM_DIGITAL_PINS #define HAS_HIGH_ANALOG_PINS 1 #endif -#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS + TERN0(HAS_HIGH_ANALOG_PINS,NUM_ANALOG_INPUTS) +#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS) #define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL) #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads #define PRINT_PIN(Q) @@ -176,8 +176,8 @@ bool IS_ANALOG(const pin_t Ard_num) { return get_pin_mode(Ard_num) == MODE_PIN_ANALOG; } -bool is_digital(const pin_t x) { - const uint8_t pin_mode = get_pin_mode(pin_array[x].pin); +bool is_digital(const pin_t Ard_num) { + const uint8_t pin_mode = get_pin_mode(pin_array[Ard_num].pin); return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT; } diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h index 0147ece0ab20..081c6ddba029 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h @@ -141,10 +141,10 @@ extern "C" { #define PG15 111 //D79 // This must be a literal with the same value as PEND -#define NUM_DIGITAL_PINS 125 +#define NUM_DIGITAL_PINS 112 // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS #define NUM_ANALOG_INPUTS 13 -#define NUM_ANALOG_FIRST 112 +#define NUM_ANALOG_FIRST NUM_DIGITAL_PINS //#define ADC_RESOLUTION 12 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h index f512a311e32c..8bd95027cfcb 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h @@ -141,10 +141,10 @@ extern "C" { #define PG15 111 //D79 // This must be a literal with the same value as PEND -#define NUM_DIGITAL_PINS 125 +#define NUM_DIGITAL_PINS 112 // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS #define NUM_ANALOG_INPUTS 13 -#define NUM_ANALOG_FIRST 112 +#define NUM_ANALOG_FIRST NUM_DIGITAL_PINS //#define ADC_RESOLUTION 12