MarlinUI for SPI/I2C TFT-GLCD character-based display bridge (#19375)
This commit is contained in:
@ -217,6 +217,28 @@
|
||||
#define LCD_WIDTH 16
|
||||
#define LCD_HEIGHT 2
|
||||
|
||||
#elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)
|
||||
|
||||
#define IS_TFTGLCD_PANEL 1
|
||||
#define IS_ULTIPANEL // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
|
||||
|
||||
#if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR)
|
||||
#define LCD_PROGRESS_BAR
|
||||
#endif
|
||||
#if ENABLED(TFTGLCD_PANEL_I2C)
|
||||
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD for I2C and SPI buses (LiquidTWI2 not required)
|
||||
#define LCD_I2C_ADDRESS 0x27 // Must be equal to panel's I2C slave addres
|
||||
#endif
|
||||
#define STD_ENCODER_PULSES_PER_STEP 2
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#define LCD_WIDTH 20 // 20 or 24 chars in line
|
||||
#define LCD_HEIGHT 10 // Character lines
|
||||
#define LCD_CONTRAST_MIN 127
|
||||
#define LCD_CONTRAST_MAX 255
|
||||
#define DEFAULT_LCD_CONTRAST 250
|
||||
#define CONVERT_TO_EXT_ASCII // Use extended 128-255 symbols from ASCII table.
|
||||
// At this time present conversion only for cyrillic - bg, ru and uk languages.
|
||||
// First 7 ASCII symbols in panel font must be replaced with Marlin's special symbols.
|
||||
#endif
|
||||
|
||||
#if ENABLED(IS_RRD_FG_SC)
|
||||
@ -459,6 +481,8 @@
|
||||
#define HAS_WIRED_LCD 1
|
||||
#if ENABLED(DOGLCD)
|
||||
#define HAS_MARLINUI_U8GLIB 1
|
||||
#elif IS_TFTGLCD_PANEL
|
||||
// Neither DOGM nor HD44780. Fully customized interface.
|
||||
#elif DISABLED(HAS_GRAPHICAL_TFT)
|
||||
#define HAS_MARLINUI_HD44780 1
|
||||
#endif
|
||||
|
@ -318,6 +318,10 @@
|
||||
#define _LCD_CONTRAST_MIN 64
|
||||
#define _LCD_CONTRAST_INIT 128
|
||||
#define _LCD_CONTRAST_MAX 255
|
||||
#elif IS_TFTGLCD_PANEL
|
||||
#define _LCD_CONTRAST_MIN 0
|
||||
#define _LCD_CONTRAST_INIT 250
|
||||
#define _LCD_CONTRAST_MAX 255
|
||||
#endif
|
||||
|
||||
#ifdef _LCD_CONTRAST_INIT
|
||||
@ -2453,7 +2457,7 @@
|
||||
/**
|
||||
* Buzzer/Speaker
|
||||
*/
|
||||
#if PIN_EXISTS(BEEPER) || EITHER(LCD_USE_I2C_BUZZER, PCA9632_BUZZER)
|
||||
#if PIN_EXISTS(BEEPER) || ANY(LCD_USE_I2C_BUZZER, PCA9632_BUZZER, IS_TFTGLCD_PANEL)
|
||||
#define HAS_BUZZER 1
|
||||
#if PIN_EXISTS(BEEPER)
|
||||
#define USE_BEEPER 1
|
||||
|
@ -693,8 +693,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
#if NONE(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
|
||||
#error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
|
||||
#elif !HAS_MARLINUI_HD44780
|
||||
#error "LCD_PROGRESS_BAR requires a character LCD."
|
||||
#elif NONE(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
|
||||
#error "LCD_PROGRESS_BAR only applies to HD44780 character LCD and TFTGLCD_PANEL_(SPI|I2C)."
|
||||
#elif HAS_MARLINUI_U8GLIB
|
||||
#error "LCD_PROGRESS_BAR does not apply to graphical displays."
|
||||
#elif ENABLED(FILAMENT_LCD_DISPLAY)
|
||||
@ -2274,7 +2274,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
||||
+ ENABLED(TFT_LVGL_UI_FSMC) \
|
||||
+ ENABLED(TFT_LVGL_UI_SPI) \
|
||||
+ ENABLED(ANYCUBIC_LCD_I3MEGA) \
|
||||
+ ENABLED(ANYCUBIC_LCD_CHIRON)
|
||||
+ ENABLED(ANYCUBIC_LCD_CHIRON) \
|
||||
+ ENABLED(TFTGLCD_PANEL_SPI) \
|
||||
+ ENABLED(TFTGLCD_PANEL_I2C)
|
||||
#error "Please select only one LCD controller option."
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user