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
|
// "-" left justify, "28" minimum width of name, pad with blanks
|
||||||
|
|
||||||
#if AVR_ATmega1284_FAMILY
|
#if AVR_ATmega1284_FAMILY
|
||||||
|
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(analogInputToDigitalPin(0) - (P))
|
||||||
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0))
|
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0))
|
||||||
#else
|
#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)))
|
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This routine minimizes RAM usage by creating a FLASH resident array to
|
* This routine minimizes RAM usage by creating a FLASH resident array to
|
||||||
* store the pin names, pin numbers and analog/digital flag.
|
* store the pin names, pin numbers and analog/digital flag.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user