Rename LCD conditionals (#19533)

This commit is contained in:
Scott Lahteine
2020-09-28 01:13:27 -05:00
committed by GitHub
parent 1c372df449
commit c2c6a679ea
138 changed files with 353 additions and 333 deletions

View File

@ -120,7 +120,7 @@
//
// LCD Pins
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
@ -282,4 +282,4 @@
#endif
#endif // NEWPANEL
#endif // HAS_SPI_LCD
#endif // HAS_WIRED_LCD

View File

@ -187,21 +187,22 @@
#define SDSS PA4
/**
* -------------------------------------BTT002 V1.0-----------------------------------------------
* _____ _____ |
* -------------------------------------BTT002 V1.0--------------------------------------------
* ----- ----- |
* PA3 | · · | GND 5V | · · | GND |
* NRESET | · · | PC4(SD_DET) (LCD_D7) PE13 | · · | PE12 (LCD_D6) |
* (MOSI)PA7 | · · | PB0(BTN_EN2) (LCD_D5) PE11 | · · | PE10 (LCD_D4) |
* (SD_SS)PA4 | · · | PC5(BTN_EN1) (LCD_RS) PE8 | · · | PE9 (LCD_EN) |
* (SCK)PA5 | · · | PA6(MISO) (BTN_ENC) PB1 | · · | PE7 (BEEPER) |
*  ̄ ̄  ̄ ̄ |
* ----- ----- |
* EXP2 EXP1 |
* ---------------------------------------------------------------------------------------------
* --------------------------------------------------------------------------------------------
*/
//
// LCDs and Controllers
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#define BEEPER_PIN PE7
#define BTN_ENC PB1
@ -236,7 +237,7 @@
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
@ -248,7 +249,7 @@
#endif
#endif
#endif // HAS_SPI_LCD
#endif // HAS_WIRED_LCD
//
// RGB LEDs

View File

@ -290,9 +290,12 @@
// overriding pins to access.
//
#if SD_CONNECTION_IS(LCD)
#define SD_DETECT_PIN PB10
#define SDSS PB12
#elif SD_CONNECTION_IS(ONBOARD)
// Instruct the STM32 HAL to override the default SPI pins from the variant.h file
#define CUSTOM_SPI_PINS
#define SDSS PA4
@ -301,25 +304,26 @@
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SD_DETECT_PIN PC4
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#define "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
#endif
/**
* _____ _____
* ----- -----
* NC | · · | GND 5V | · · | GND
* RESET | · · | PB10(SD_DETECT) (LCD_D7) PG5 | · · | PG6 (LCD_D6)
* (MOSI)PB15 | · · | PH10(BTN_EN2) (LCD_D5) PG7 | · · | PG8 (LCD_D4)
* (SD_SS)PB12 | · · | PD10(BTN_EN1) (LCD_RS) PA8 | · · | PC10 (LCD_EN)
* (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA15 | · · | PC11 (BEEPER)
*  ̄ ̄  ̄ ̄
* ----- -----
* EXP2 EXP1
*/
//
// LCDs and Controllers
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#define BEEPER_PIN PC11
#define BTN_ENC PA15
@ -390,7 +394,7 @@
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
@ -402,6 +406,6 @@
#endif
#endif
#endif // HAS_SPI_LCD
#endif // HAS_WIRED_LCD
#undef TP

View File

@ -251,9 +251,12 @@
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
//
#if SD_CONNECTION_IS(LCD)
#define SD_DETECT_PIN PF12
#define SDSS PB12
#elif SD_CONNECTION_IS(ONBOARD)
// The SKR Pro's ONBOARD SD interface is on SPI1.
// Due to a pull resistor on the clock line, it needs to use SPI Data Mode 3 to
// function with Hardware SPI. This is not currently configurable in the HAL,
@ -264,29 +267,31 @@
#define MISO_PIN PA6
#define MOSI_PIN PB5
#define SD_DETECT_PIN PB11
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#define "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
#endif
/**
* _____ _____
* ----- -----
* NC | · · | GND 5V | · · | GND
* RESET | · · | PF12(SD_DETECT) (LCD_D7) PG7 | · · | PG6 (LCD_D6)
* (MOSI)PB15 | · · | PF11(BTN_EN2) (LCD_D5) PG3 | · · | PG2 (LCD_D4)
* (SD_SS)PB12 | · · | PG10(BTN_EN1) (LCD_RS) PD10 | · · | PD11 (LCD_EN)
* (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA8 | · · | PG4 (BEEPER)
*  ̄ ̄  ̄ ̄
* ----- -----
* EXP2 EXP1
*/
//
// LCDs and Controllers
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#define BEEPER_PIN PG4
#define BTN_ENC PA8
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PG6
#define BTN_EN1 PD11
@ -301,10 +306,12 @@
#undef BOARD_ST7920_DELAY_3
#elif ENABLED(MKS_MINI_12864)
#define DOGLCD_A0 PG6
#define DOGLCD_CS PG3
#define BTN_EN1 PG10
#define BTN_EN2 PF11
#else
#define LCD_PINS_RS PD10
@ -343,32 +350,32 @@
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif
#endif // HAS_WIRED_LCD
#endif // HAS_SPI_LCD
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif
//
// WIFI
//
/**
* _____
* -----
* TX | 1 2 | GND Enable PG1 // Must be high for module to run
* Enable | 3 4 | GPIO2 Reset PG0 // active low, probably OK to leave floating
* Reset | 5 6 | GPIO0 GPIO2 PF15 // must be high (ESP3D software configures this with a pullup so OK to leave as floating)
* 3.3V| 7 8 | RX GPIO0 PF14 // Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
*  ̄ ̄
* 3.3V | 7 8 | RX GPIO0 PF14 // Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
* -----
* W1
*/
#define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this

View File

@ -199,7 +199,7 @@
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#define BEEPER_PIN PC9
#define BTN_ENC PA8
@ -261,7 +261,7 @@
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
@ -273,7 +273,7 @@
#endif
#endif
#endif // HAS_SPI_LCD
#endif // HAS_WIRED_LCD
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB6

View File

@ -184,7 +184,7 @@
//
// ST7920 Delays
//
#if HAS_GRAPHICAL_LCD
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif

View File

@ -147,7 +147,7 @@
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#define BTN_EN1 PB2
#define BTN_EN2 PB1
@ -169,7 +169,7 @@
#endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif

View File

@ -165,7 +165,7 @@
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if HAS_WIRED_LCD
#if ENABLED(SDSUPPORT)
#define SDSS PB6 // CS for SD card in LCD
#endif