From dc98ee553f9a7462da05506378988a1af914979c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 13 Mar 2018 22:31:51 -0500 Subject: [PATCH] Fix compiler warning for ANALOG_SELECT --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 212f445f2..bfa3081f9 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1100,7 +1100,7 @@ void Temperature::init() { #endif // HEATER_0_USES_MAX6675 #ifdef DIDR2 - #define ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin - 8); }while(0) + #define ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin & 0x07); }while(0) #else #define ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0) #endif