mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 05:48:43 +00:00
Fix DIGITAL_PIN_TO_ANALOG_PIN macro for Atmega1284p (#9883)
This commit is contained in:
parent
a6326d25fb
commit
432b72e7a8
@ -26,12 +26,13 @@ bool endstop_monitor_flag = false;
|
||||
// "-" left justify, "28" minimum width of name, pad with blanks
|
||||
|
||||
#if AVR_ATmega1284_FAMILY
|
||||
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0))
|
||||
#else
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(analogInputToDigitalPin(0) - (P))
|
||||
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0))
|
||||
#else
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int((P) - analogInputToDigitalPin(0))
|
||||
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7)))
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* This routine minimizes RAM usage by creating a FLASH resident array to
|
||||
* store the pin names, pin numbers and analog/digital flag.
|
||||
|
Loading…
Reference in New Issue
Block a user