From ca7d36d9ed3667c91fa97a9b8ab53a4625ba66ee Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 4 Nov 2017 21:22:53 -0500 Subject: [PATCH] RAMPS pins for ANET_KEYPAD_LCD --- Marlin/src/inc/Conditionals_LCD.h | 1 + Marlin/src/lcd/ultralcd.cpp | 3 +-- Marlin/src/pins/pins_ANET_10.h | 1 - Marlin/src/pins/pins_RAMPS.h | 14 ++++++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index a25d45cecc..f5125fb6a1 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -53,6 +53,7 @@ // this helps to implement ADC_KEYPAD menus #define ENCODER_PULSES_PER_STEP 1 #define ENCODER_STEPS_PER_MENU_ITEM 1 + #define ENCODER_FEEDRATE_DEADZONE 2 #define REVERSE_MENU_DIRECTION #elif ENABLED(ANET_FULL_GRAPHICS_LCD) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index d5e058489e..043380def3 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -4449,14 +4449,13 @@ void lcd_init() { ); #if ENABLED(NEWPANEL) + #if BUTTON_EXISTS(EN1) SET_INPUT_PULLUP(BTN_EN1); #endif - #if BUTTON_EXISTS(EN2) SET_INPUT_PULLUP(BTN_EN2); #endif - #if BUTTON_EXISTS(ENC) SET_INPUT_PULLUP(BTN_ENC); #endif diff --git a/Marlin/src/pins/pins_ANET_10.h b/Marlin/src/pins/pins_ANET_10.h index 4e77f86ace..4628a3b239 100644 --- a/Marlin/src/pins/pins_ANET_10.h +++ b/Marlin/src/pins/pins_ANET_10.h @@ -166,7 +166,6 @@ #define BTN_EN2 -1 #define BTN_ENC -1 #define ADC_KEYPAD_PIN 1 - #define ENCODER_FEEDRATE_DEADZONE 2 #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(ANET_FULL_GRAPHICS_LCD) // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 168dcbd8cb..b4740ea6e1 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -489,3 +489,17 @@ #endif // NEWPANEL #endif // ULTRA_LCD + +#if ENABLED(ANET_KEYPAD_LCD) + #define LCD_PINS_RS 64 + #define LCD_PINS_ENABLE 44 + #define LCD_PINS_D4 63 + #define LCD_PINS_D5 40 + #define LCD_PINS_D6 42 + #define LCD_PINS_D7 65 + #define ADC_KEYPAD_PIN 12 + #define BTN_EN1 -1 + #define BTN_EN2 -1 + #define BTN_ENC -1 + // pin 29 N/C +#endif // ANET_KEYPAD_LCD