Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify BTT Octopus Max EZ LCD Pins #26019

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 36 additions & 100 deletions Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
#endif // HAS_TMC_UART

/**
* 18-pin FPC Connector
* ----
* (MISO) PE13 | 1 |
* (SCK) PE12 | 2 |
Expand Down Expand Up @@ -398,100 +399,37 @@
//
// LCDs and Controllers
//
#if IS_TFTGLCD_PANEL

#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif

#elif HAS_WIRED_LCD
#if ENABLED(BTT_MINI_12864_V1) // BTT Mini 12864 V2.0 connected via 18-pin FCP cable

#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_PINS_RS EXP1_04_PIN

#if ENABLED(CR10_STOCKDISPLAY)

#define LCD_PINS_RS EXP1_07_PIN

#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN

#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN

#else

#define LCD_PINS_RS EXP1_04_PIN

#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN

#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN

#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN

#define SOFTWARE_SPI
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
//#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN EXP1_06_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN EXP1_07_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN EXP1_08_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN EXP1_06_PIN
#endif
#endif // !FYSETC_MINI_12864

#if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN

#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif

#endif
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN

#endif
#endif // HAS_WIRED_LCD
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN

// Alter timing for graphical display
#if IS_U8GLIB_ST7920
#define BOARD_ST7920_DELAY_1 120
#define BOARD_ST7920_DELAY_2 80
#define BOARD_ST7920_DELAY_3 580
#endif
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN

#if HAS_SPI_TFT
#define TFT_CS_PIN EXP2_04_PIN
#define TFT_A0_PIN EXP2_07_PIN
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define SOFTWARE_SPI
#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems.
// Results in LCD Software SPI mode 3, SD Software SPI mode 0.

#define TOUCH_INT_PIN EXP1_07_PIN
#define TOUCH_MISO_PIN EXP1_06_PIN
#define TOUCH_MOSI_PIN EXP1_03_PIN
#define TOUCH_SCK_PIN EXP1_05_PIN
#define TOUCH_CS_PIN EXP1_04_PIN
//#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#define NEOPIXEL_PIN EXP1_06_PIN

#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN
#elif HAS_WIRED_LCD
#error "Only BTT_MINI_12864_V1 is currently supported on the BIGTREE_OCTOPUS_MAX_EZ."
#endif

//
Expand All @@ -500,28 +438,26 @@
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PE10
#endif

#ifndef NEOPIXEL2_PIN
#define NEOPIXEL2_PIN PE9
#endif

//
// WIFI
//
#if ENABLED(WIFISUPPORT)
//
// WIFI
//

/**
* -------
* GND | 9 | | 8 | 3.3V
* (ESP-CS) PG1 | 10 | | 7 | PB15 (ESP-MOSI)
* 3.3V | 11 | | 6 | PB14 (ESP-MISO)
* (ESP-IO0) PG0 | 12 | | 5 | PB13 (ESP-CLK)
* (ESP-IO4) PF15 | 13 | | 4 | --
* -- | 14 | | 3 | 3.3V (ESP-EN)
* (ESP-RX) PE7 | 15 | | 2 | --
* (ESP-TX) PE8 | 16 | | 1 | PB2 (ESP-RST)
* -------
* WIFI
* --------
* GND | 9 8 | 3.3V
* (ESP-CS) PG1 | 10 7 | PB15 (ESP-MOSI)
* 3.3V | 11 6 | PB14 (ESP-MISO)
* (ESP-IO0) PG0 | 12 5 | PB13 (ESP-CLK)
* (ESP-IO4) PF15 | 13 4 | --
* -- | 14 3 | 3.3V (ESP-EN)
* (ESP-RX) PE7 | 15 2 | --
* (ESP-TX) PE8 | 16 1 | PB2 (ESP-RST)
* --------
* WIFI
*/
#define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
Expand Down
Loading