Browse Source

Fix compiler warning for HAL_ANALOG_SELECT

pull/1/head
Scott Lahteine 7 years ago
parent
commit
b858c638ad
  1. 2
      Marlin/src/HAL/HAL_AVR/HAL_AVR.h

2
Marlin/src/HAL/HAL_AVR/HAL_AVR.h

@ -164,7 +164,7 @@ extern "C" {
// ADC // ADC
#ifdef DIDR2 #ifdef DIDR2
#define HAL_ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin - 8); }while(0) #define HAL_ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin & 0x07); }while(0)
#else #else
#define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0) #define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
#endif #endif

Loading…
Cancel
Save