Merge pull request #8553 from Bob-the-Kuhn/2.0.x-U8Glib-follow-up
[2.0.X] U8Glib follow up
This commit is contained in:
commit
8c69adba8b
@ -51,7 +51,7 @@ class U8GLIB_ST7920_128X64_4X_HAL : public U8GLIB
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// AVR version uses ultralcd_st7920_u8glib_rrd_AVR.cpp, HAL version uses u8g_dev_st7920_128x64_HAL.cpp
|
||||||
extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi;
|
extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi;
|
||||||
class U8GLIB_ST7920_128X64_RRD : public U8GLIB
|
class U8GLIB_ST7920_128X64_RRD : public U8GLIB
|
||||||
{
|
{
|
||||||
|
@ -25,24 +25,13 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(DOGLCD)
|
#if ENABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
#ifndef U8G_HAL_LINKS
|
#ifndef U8G_HAL_LINKS
|
||||||
|
|
||||||
//#include "../../Marlin.h"
|
|
||||||
|
|
||||||
//#if ENABLED(U8GLIB_ST7920)
|
|
||||||
//#if ( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0) && (defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0))
|
|
||||||
|
|
||||||
#define ST7920_CLK_PIN 23
|
|
||||||
#define ST7920_DAT_PIN 17
|
|
||||||
#define ST7920_CS_PIN 16
|
|
||||||
|
|
||||||
/*
|
|
||||||
#define ST7920_CLK_PIN LCD_PINS_D4
|
#define ST7920_CLK_PIN LCD_PINS_D4
|
||||||
#define ST7920_DAT_PIN LCD_PINS_ENABLE
|
#define ST7920_DAT_PIN LCD_PINS_ENABLE
|
||||||
#define ST7920_CS_PIN LCD_PINS_RS
|
#define ST7920_CS_PIN LCD_PINS_RS
|
||||||
*/
|
|
||||||
|
|
||||||
//#define PAGE_HEIGHT 8 //128 byte framebuffer
|
//#define PAGE_HEIGHT 8 //128 byte framebuffer
|
||||||
#define PAGE_HEIGHT 16 //256 byte framebuffer
|
#define PAGE_HEIGHT 16 //256 byte framebuffer
|
||||||
@ -192,9 +181,6 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
|
|||||||
|
|
||||||
#pragma GCC reset_options
|
#pragma GCC reset_options
|
||||||
|
|
||||||
//#endif //( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0) && (defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0))
|
|
||||||
//#endif // U8GLIB_ST7920
|
|
||||||
|
|
||||||
#endif // U8G_HAL_LINKS
|
#endif // U8G_HAL_LINKS
|
||||||
|
|
||||||
#endif // DOGLCD
|
#endif // U8GLIB_ST7920
|
||||||
|
@ -164,14 +164,14 @@
|
|||||||
|
|
||||||
// LCD selection
|
// LCD selection
|
||||||
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||||
#ifdef CPU_32_BIT // SPI too fast with 32bit?
|
#ifdef CPU_32_BIT
|
||||||
U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
|
U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
|
||||||
#else
|
#else
|
||||||
U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
|
U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI (shared with SD card)
|
||||||
#endif
|
#endif
|
||||||
#elif ENABLED(U8GLIB_ST7920)
|
#elif ENABLED(U8GLIB_ST7920)
|
||||||
// RepRap Discount Full Graphics Smart Controller
|
// RepRap Discount Full Graphics Smart Controller
|
||||||
//U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
|
//U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI (shared with SD card, on AVR does not use standard LCD adapter)
|
||||||
//U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
|
//U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
|
||||||
U8GLIB_ST7920_128X64_RRD u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
|
U8GLIB_ST7920_128X64_RRD u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
|
||||||
// AVR version ignores these pin settings
|
// AVR version ignores these pin settings
|
||||||
@ -192,9 +192,8 @@
|
|||||||
|
|
||||||
#elif ENABLED(U8GLIB_SSD1306)
|
#elif ENABLED(U8GLIB_SSD1306)
|
||||||
// Generic support for SSD1306 OLED I2C LCDs
|
// Generic support for SSD1306 OLED I2C LCDs
|
||||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes
|
//U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
||||||
U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
||||||
//U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
|
||||||
|
|
||||||
#elif ENABLED(MKS_12864OLED)
|
#elif ENABLED(MKS_12864OLED)
|
||||||
// MKS 128x64 (SH1106) OLED I2C LCD
|
// MKS 128x64 (SH1106) OLED I2C LCD
|
||||||
@ -202,9 +201,8 @@
|
|||||||
//U8GLIB_SH1106_128X64_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
|
//U8GLIB_SH1106_128X64_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
|
||||||
#elif ENABLED(U8GLIB_SH1106)
|
#elif ENABLED(U8GLIB_SH1106)
|
||||||
// Generic support for SH1106 OLED I2C LCDs
|
// Generic support for SH1106 OLED I2C LCDs
|
||||||
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes
|
//U8GLIB_SH1106_128X64_2X_I2C_2_WIRE u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
||||||
U8GLIB_SH1106_128X64_2X_I2C_2_WIRE u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
||||||
//U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
|
|
||||||
#elif ENABLED(MINIPANEL)
|
#elif ENABLED(MINIPANEL)
|
||||||
// The MINIPanel display
|
// The MINIPanel display
|
||||||
//U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
|
//U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
|
||||||
|
Loading…
Reference in New Issue
Block a user