diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 705036c1f8347503e53d680db3b62fd156e92b6c..599a1bf24bea244396953800304d11d5d751176a 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -74,13 +74,13 @@ #define ENCODER_STEPS_PER_MENU_ITEM 1 #endif - // Generic support for SSD1306 OLED based LCDs. - #if ENABLED(U8GLIB_SSD1306) + // Generic support for SSD1306 / SH1106 OLED based LCDs. + #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family) + #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) #endif - #if ENABLED(PANEL_ONE) + #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) #define ULTIMAKERCONTROLLER #endif @@ -245,16 +245,10 @@ * Default LCD contrast for dogm-like LCD displays */ #if ENABLED(DOGLCD) - #if !defined(DEFAULT_LCD_CONTRAST) + #define HAS_LCD_CONTRAST (DISABLED(U8GLIB_ST7920) && DISABLED(U8GLIB_SSD1306) && DISABLED(U8GLIB_SH1106)) + #if HAS_LCD_CONTRAST && !defined(DEFAULT_LCD_CONTRAST) #define DEFAULT_LCD_CONTRAST 32 #endif - #define HAS_LCD_CONTRAST - #if ENABLED(U8GLIB_ST7920) - #undef HAS_LCD_CONTRAST - #endif - #if ENABLED(U8GLIB_SSD1306) - #undef HAS_LCD_CONTRAST - #endif #endif #else // CONFIGURATION_LCD diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index ae141a642f0ac0efea95b8f62e664eb166431c83..b67d0a02fc9d1c36abb01cdba858a8cb702d044d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1063,6 +1063,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 88a25fe3322ab0bc488e3887beb9e8f86d25987e..b730b5852f88aa37f07ad4bd8ff000a2b171f6c8 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5628,7 +5628,7 @@ inline void gcode_M226() { #endif // CHDK || PHOTOGRAPH_PIN -#if ENABLED(HAS_LCD_CONTRAST) +#if HAS_LCD_CONTRAST /** * M250: Read and optionally set the LCD contrast @@ -6979,7 +6979,7 @@ void process_next_command() { break; #endif // CHDK || PHOTOGRAPH_PIN - #if ENABLED(HAS_LCD_CONTRAST) + #if HAS_LCD_CONTRAST case 250: // M250 Set LCD contrast value: C<value> (value 0..63) gcode_M250(); break; diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 05a24acfe9c7a22e15a40ddabd059845aac39d99..001955f6ed575e338cc6bc52b120bbd9f4e198a1 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -282,7 +282,7 @@ void Config_StoreSettings() { EEPROM_WRITE_VAR(i, thermalManager.bedKd); #endif - #if DISABLED(HAS_LCD_CONTRAST) + #if !HAS_LCD_CONTRAST const int lcd_contrast = 32; #endif EEPROM_WRITE_VAR(i, lcd_contrast); @@ -462,7 +462,7 @@ void Config_RetrieveSettings() { for (uint8_t q=3; q--;) EEPROM_READ_VAR(i, dummy); // bedKp, bedKi, bedKd #endif - #if DISABLED(HAS_LCD_CONTRAST) + #if !HAS_LCD_CONTRAST int lcd_contrast; #endif EEPROM_READ_VAR(i, lcd_contrast); @@ -579,7 +579,7 @@ void Config_ResetDefault() { absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED; #endif - #if ENABLED(HAS_LCD_CONTRAST) + #if HAS_LCD_CONTRAST lcd_contrast = DEFAULT_LCD_CONTRAST; #endif @@ -842,7 +842,7 @@ void Config_PrintSettings(bool forReplay) { #endif // PIDTEMP || PIDTEMPBED - #if ENABLED(HAS_LCD_CONTRAST) + #if HAS_LCD_CONTRAST CONFIG_ECHO_START; if (!forReplay) { SERIAL_ECHOLNPGM("LCD Contrast:"); diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 89094bb00d0e3c06b2bb84ef4efacb4f3936d493..b0cd312b0e69979866b179375546d89fb2115253 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -150,7 +150,10 @@ U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); #elif ENABLED(U8GLIB_SSD1306) // Generic support for SSD1306 OLED I2C LCDs - U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); + U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); +#elif ENABLED(U8GLIB_SH1106) + // Generic support for SH1106 OLED I2C LCDs + U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); #elif ENABLED(MINIPANEL) // The MINIPanel display U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 3bacb22eac03a2fdf236ff3d4d1a4ee9b8b194c1..39e5ce4e36efee9fb650f65fb54fe8717a5f7d94 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1046,6 +1046,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 67b15001864eae5c4f187fcb5085c76f097e5d3a..107f8386c2029860a88dbf28c3ff3c8102170153 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1044,6 +1044,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index fd6051945f21b77482915633a955856f06236fd8..5b41fb397c2441bbb7af56446c5d372edc14887f 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1055,6 +1055,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 3a9e23ce9155a0e4d98708784b89b2aaa93770c3..3f6f4b644631b52e67e2b399d77fdd53f2689659 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1057,6 +1057,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 95338bd367716cbc471aff042a8f4393a6392c17..4b74fe505f3cfdf8c8893f7f115c5e73a51b19f2 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1080,6 +1080,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 740e0cbb2bf80357b87c5f2668eb1c9341da2f3a..d9c8b9be44a44e8e45f26f1976b582628847904a 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1063,6 +1063,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index a532d702b3d69b56048fff03025d255d29a0f55d..967927d8648beb36dbba69702427c843c5c0997f 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1060,6 +1060,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 127fc5f87f94d123a2e995aa6069f1bdf1d0a47e..a801823ee7313800c6cd6135785e6cf288d780ed 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1071,6 +1071,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 6da5d80c16b1432039eee59753792b6c2a93adc3..b2bd2ce8a80fb16411cae00368fddfb9f314805a 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1084,6 +1084,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 55d2136c123674e7323bb2be99052bddc13d2d4e..f32e071d1d46dd7e590d4f9156cc57c18e657ece 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1055,6 +1055,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 670bc634602ee05e2f4543ad19d1a76c4e8b178a..151e16bc82ae99f1d33f332f0439bb4d832f0ae6 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1063,6 +1063,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 3c4d589a656ad2fb09883f620e6185efc4907978..0eb146e02350a69dff470c7b8168c2ed2c38b222 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -1192,6 +1192,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 12e195c5e095eca9cf68b65410048177971ddab2..b0ffebf814ff1c2b9fa7623ffb128baefb374670 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1192,6 +1192,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 67a02053dedaec23382dcba124a0c74b03c748a5..b58d89793c6b39666e836caf1f661a7ad4f0302b 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1196,6 +1196,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index c03fd2fc614d4e5e9196df22541244d4255a9a83..73018034de88a238de888295d042129ff2116543 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1189,6 +1189,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 31aab5a882e7408f123d1afaba4ee0b4360674f3..f8374a8134c519ad3bd8e36cd69cc1cb5f3f989d 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1197,6 +1197,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 9abfe8db6fb027cb5725721057efcea30220c2b3..1991ee6205a50dd0270b1eb3270c8beb16c8e490 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1066,6 +1066,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 01b6a064108b208ca2022f69244fbbfbcbed1015..c380ee2a0a9659dc27219e3b1afdae2b6e052e33 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1057,6 +1057,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define U8GLIB_SSD1306 +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // // CONTROLLER TYPE: Shift register panels // diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 0f7746d296ed6d3c792e3d1d9771a35764ff4b49..98b5fa665b87476480f2a8227d72ffbd36e296a5 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -97,7 +97,7 @@ static void lcd_status_screen(); static void lcd_control_motion_menu(); static void lcd_control_volumetric_menu(); - #if ENABLED(HAS_LCD_CONTRAST) + #if HAS_LCD_CONTRAST static void lcd_set_contrast(); #endif @@ -1352,7 +1352,7 @@ static void lcd_control_menu() { MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); - #if ENABLED(HAS_LCD_CONTRAST) + #if HAS_LCD_CONTRAST //MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast); #endif @@ -1712,7 +1712,7 @@ static void lcd_control_volumetric_menu() { * "Control" > "Contrast" submenu * */ -#if ENABLED(HAS_LCD_CONTRAST) +#if HAS_LCD_CONTRAST static void lcd_set_contrast() { ENCODER_DIRECTION_NORMAL(); if (encoderPosition) { @@ -2383,7 +2383,7 @@ void lcd_setalertstatuspgm(const char* message) { void lcd_reset_alert_level() { lcd_status_message_level = 0; } -#if ENABLED(HAS_LCD_CONTRAST) +#if HAS_LCD_CONTRAST void lcd_setcontrast(uint8_t value) { lcd_contrast = value & 0x3F; u8g.setContrast(lcd_contrast);