Skip to content

Commit

Permalink
Try NUM_DIGITAL_PINS 112
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 12, 2021
1 parent 185bfd2 commit 2e6ebe3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/HAL/STM32/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -178,8 +178,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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2e6ebe3

Please sign in to comment.