Allow LCD_PIXEL_WIDTH/HEIGHT override

2.0.x
Scott Lahteine 5 years ago
parent 29ec868c4b
commit b2328d089a

@ -532,7 +532,7 @@ void GCodeQueue::get_serial_commands() {
// Reset stream state, terminate the buffer, and commit a non-empty command
if (!process_line_done(sd_input_state, command_buffer[index_w], sd_count)) {
_commit_command(false); // The file was not terminated with a newline
_commit_command(false); // Can handle last line missing a newline terminator
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.cmd_sdpos = card.getIndex(); // Prime for the next _commit_command
#endif

@ -361,6 +361,15 @@
#define HAS_ADC_BUTTONS ENABLED(ADC_KEYPAD)
#define HAS_DGUS_LCD ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
#if HAS_GRAPHICAL_LCD
#ifndef LCD_PIXEL_WIDTH
#define LCD_PIXEL_WIDTH 128
#endif
#ifndef LCD_PIXEL_HEIGHT
#define LCD_PIXEL_HEIGHT 64
#endif
#endif
/**
* Extruders have some combination of stepper motors and hotends
* so we separate these concepts into the defines:

@ -25,7 +25,7 @@
#include <U8glib.h>
#ifndef U8G_HAL_LINKS
#ifndef U8G_HAL_LINKS // Defined by LPC1768/9 environments in platform.ini
#ifdef __SAM3X8E__
@ -75,6 +75,7 @@
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
#endif
// This can't be invoked from the current platformio.ini
#ifdef TARGET_LPC1768
uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#endif

@ -59,8 +59,6 @@
#include "HAL_LCD_com_defines.h"
#define LCD_PIXEL_WIDTH 128
#define LCD_PIXEL_HEIGHT 64
#define PAGE_HEIGHT 8
/* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */

@ -196,13 +196,6 @@
#endif
#endif
#ifndef LCD_PIXEL_WIDTH
#define LCD_PIXEL_WIDTH 128
#endif
#ifndef LCD_PIXEL_HEIGHT
#define LCD_PIXEL_HEIGHT 64
#endif
// LCD_FULL_PIXEL_WIDTH =
// LCD_PIXEL_OFFSET_X + (LCD_PIXEL_WIDTH * 2) + LCD_PIXEL_OFFSET_X
#if ENABLED(FSMC_GRAPHICAL_TFT)

@ -154,4 +154,4 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_rrd_st7920_128x64_fn, &u8
#endif
#endif // U8GLIB_ST7920
#endif // __AVR__ && !U8G_HAL_LINKS
#endif // !U8G_HAL_LINKS && (__AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32)

@ -31,12 +31,9 @@
#define ST7920_DAT_PIN LCD_PINS_ENABLE
#define ST7920_CS_PIN LCD_PINS_RS
//#define PAGE_HEIGHT 8 //128 byte framebuffer
#define PAGE_HEIGHT 16 //256 byte framebuffer
//#define PAGE_HEIGHT 32 //512 byte framebuffer
#define LCD_PIXEL_WIDTH 128
#define LCD_PIXEL_HEIGHT 64
//#define PAGE_HEIGHT 8 // 128 byte framebuffer
#define PAGE_HEIGHT 16 // 256 byte framebuffer
//#define PAGE_HEIGHT 32 // 512 byte framebuffer
#include <U8glib.h>

Loading…
Cancel
Save