Clean up LCD conditionals, DWIN

This commit is contained in:
Scott Lahteine
2020-09-06 21:40:58 -05:00
parent b709baba7a
commit a445746a8b
35 changed files with 253 additions and 169 deletions

View File

@ -289,20 +289,21 @@
#define E0_CS_PIN P2_11
#define E1_CS_PIN P4_28
// Hardware SPI is on EXP2. See if you can make it work:
// https://github.com/makerbase-mks/MKS-SBASE/issues/25
#define TMC_USE_SW_SPI
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P0_03 // AUX1
// Hardware SPI is on EXP2. See if you can make it work:
// https://github.com/makerbase-mks/MKS-SBASE/issues/25
#define TMC_USE_SW_SPI
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P0_03 // AUX1
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_02 // AUX1
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_26 // TH4
#endif
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_02 // AUX1
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_26 // TH4
#endif
#endif
#endif
#if MB(MKS_SBASE) && HAS_TMC_UART

View File

@ -125,16 +125,16 @@
// EXP1 Pins
#define BEEPER_PIN P1_31 // EXP1 Pin 1
#define BTN_ENC P1_30 // EXP1 Pin 2
#define LCD_PINS_ENABLE P0_18 // EXP1 Pin 3 (MOSI)
#define LCD_PINS_RS P0_16 // EXP1 Pin 4 (CS)
#define LCD_PINS_ENABLE P0_18 // EXP1 Pin 3 (MOSI)
#define LCD_PINS_RS P0_16 // EXP1 Pin 4 (CS)
#define LCD_PINS_D4 P0_15 // EXP1 Pin 5 (SCK)
// EXP2 Pins
// EXP2 Pins
#define BTN_EN2 P3_26 // EXP2 Pin 3
#define BTN_EN1 P3_25 // EXP2 Pin 5
/*
SD Support
For the RRD GLCD it CANNOT share the same SPI as the LCD so it must be
hooked up to the onboard SDCard SPI and use a spare pin for the SDCS.
Also note that an external SDCard sharing the SPI port with the
@ -145,11 +145,11 @@
*/
#define MISO_PIN P0_08 // EXP2 Pin 1 (PB3, SD_MISO)
#define SCK_PIN P0_07 // EXP2 Pin 2 (SD_SCK)
#define SCK_PIN P0_07 // EXP2 Pin 2 (SD_SCK)
#define SS_PIN P0_28 // EXP2 Pin 4 (SD_CSEL, SD_CS)
#define MOSI_PIN P0_09 // EXP2 Pin 6 (PB2, SD_MOSI)
#define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET)
#else
#error "Marlin's Smoothieboard support cannot drive your LCD."
#endif

View File

@ -124,7 +124,7 @@
#define SD_DETECT_PIN -1 // RAMPS doesn't use this
#endif // HAS_SPI_LCD && NEWPANEL
#endif // ULTRA_LCD && NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control

View File

@ -166,11 +166,11 @@
//
// LCD / Controller
//
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL || ENABLED(TOUCH_UI_FTDI_EVE)
#if ANY(HAS_SPI_LCD, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
#define KILL_PIN 32
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL || ENABLED(TOUCH_UI_FTDI_EVE)
#if ANY(ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS 85
@ -194,5 +194,6 @@
#define SD_DETECT_PIN 15
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
#endif // HAS_SPI_LCD
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
#endif // HAS_SPI_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE

View File

@ -189,4 +189,4 @@
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
#endif // HAS_SPI_LCD
#endif // HAS_SPI_LCD || TOUCH_UI_ULTIPANEL

View File

@ -144,17 +144,16 @@
// LCD / Controller
//
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define LCD_PINS_RS 18
#define LCD_PINS_ENABLE 15
#define LCD_PINS_D4 19
#define BEEPER_PIN 64
#undef UI_VOLTAGE_LEVEL
#define UI_VOLTAGE_LEVEL 1
#endif
#if ENABLED(NEWPANEL)
#define BTN_EN1 14
#define BTN_EN2 16
#define BTN_ENC 17
#undef UI_VOLTAGE_LEVEL
#define UI_VOLTAGE_LEVEL 1
#endif // REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#endif

View File

@ -237,7 +237,7 @@
//
// LCD / Controller
//
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL || ENABLED(TOUCH_UI_FTDI_EVE)
#if ANY(HAS_SPI_LCD, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
#define BEEPER_PIN 23 // D24 PA15_CTS1
#define LCD_PINS_RS 17 // D17 PA12_RXD1
#define LCD_PINS_ENABLE 24 // D23 PA14_RTS1
@ -248,10 +248,10 @@
#define SD_DETECT_PIN 2 // D2 PB25_TIOA0
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL || ENABLED(TOUCH_UI_FTDI_EVE)
#if ANY(ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
// Buttons on AUX-2
#define BTN_EN1 60 // D60 PA3_TIOB1
#define BTN_EN2 13 // D13 PB27_TIOB0
#define BTN_ENC 16 // D16 PA13_TXD1 // the click
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
#endif // HAS_SPI_LCD
#endif
#endif

View File

@ -147,7 +147,7 @@
#define SDSS 4
#define SD_DETECT_PIN 14
#elif HAS_SSD1306_OLED_I2C
#elif HAS_U8GLIB_I2C_OLED
#define BTN_EN1 50
#define BTN_EN2 52

View File

@ -139,7 +139,7 @@
#define SDSS 4
#define SD_DETECT_PIN 14
#elif HAS_SSD1306_OLED_I2C
#elif HAS_U8GLIB_I2C_OLED
#define BTN_EN1 50
#define BTN_EN2 52

View File

@ -266,7 +266,7 @@
#define SDSS 10
#define SD_DETECT_PIN 14
#elif HAS_SSD1306_OLED_I2C
#elif HAS_U8GLIB_I2C_OLED
#define BTN_EN1 50
#define BTN_EN2 52

View File

@ -221,7 +221,7 @@
#define LCD_PINS_RS 52
#define LCD_PINS_ENABLE 53
#elif HAS_SSD1306_OLED_I2C
#elif HAS_U8GLIB_I2C_OLED
#define BEEPER_PIN 62
#define LCD_SDSS 10

View File

@ -207,7 +207,7 @@
#define LCD_PINS_RS 52
#define LCD_PINS_ENABLE 53
#elif HAS_SSD1306_OLED_I2C
#elif HAS_U8GLIB_I2C_OLED
#define BEEPER_PIN 62
#define LCD_SDSS 10

View File

@ -163,7 +163,7 @@
#define LCD_PINS_D6 16
#define LCD_PINS_D7 17
#define ADC_KEYPAD_PIN 1
#elif EITHER(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD)
#elif EITHER(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
// 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
// See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748

View File

@ -166,4 +166,4 @@
#endif
#endif // HAS_SPI_LCD && NEWPANEL
#endif // ULTRA_LCD && NEWPANEL

View File

@ -155,7 +155,7 @@
#define SD_DETECT_PIN -1
#endif // HAS_SPI_LCD && NEWPANEL
#endif // ULTRA_LCD && NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control