LCD updates
This commit is contained in:
parent
7dd0a46732
commit
0fcec02db5
@ -23,21 +23,20 @@
|
||||
#ifndef ULCDST7565_H
|
||||
#define ULCDST7565_H
|
||||
|
||||
#include "Marlin.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7565_64128N)
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if !( defined(DOGLCD_SCK) && DOGLCD_SCK >= 0 \
|
||||
&& defined(DOGLCD_MOSI) && DOGLCD_MOSI >= 0 \
|
||||
&& defined(DOGLCD_CS) && DOGLCD_CS >= 0 \
|
||||
&& defined(DOGLCD_A0) && DOGLCD_A0 >= 0 )
|
||||
#error "DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, and DOGLCD_A0 are required for VIKI."
|
||||
#endif
|
||||
|
||||
#define ST7565_CLK_PIN DOGLCD_SCK
|
||||
#define ST7565_DAT_PIN DOGLCD_MOSI
|
||||
#define ST7565_CS_PIN DOGLCD_CS
|
||||
#define ST7565_A0_PIN DOGLCD_A0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
#define WIDTH 128
|
||||
@ -116,119 +115,116 @@ static void ST7565_SWSPI_SND_8BIT(uint8_t val) {
|
||||
#define U8G_DELAY u8g_10MicroDelay()
|
||||
#endif
|
||||
|
||||
#define ST7565_CS() { WRITE(ST7565_CS_PIN,1); U8G_DELAY; }
|
||||
#define ST7565_NCS() { WRITE(ST7565_CS_PIN,0); }
|
||||
#define ST7565_A0() { WRITE(ST7565_A0_PIN,1); U8G_DELAY; }
|
||||
#define ST7565_NA0() { WRITE(ST7565_A0_PIN,0); }
|
||||
#define ST7565_WRITE_BYTE(a) { ST7565_SWSPI_SND_8BIT((uint8_t)a); U8G_DELAY; }
|
||||
#define ST7560_WriteSequence(count, pointer) { uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; i++) {ST7565_SWSPI_SND_8BIT( *ptr++);} DELAY_10US; }
|
||||
#define ST7565_CS() do{ WRITE(ST7565_CS_PIN, HIGH); U8G_DELAY; }while(0)
|
||||
#define ST7565_NCS() WRITE(ST7565_CS_PIN, LOW)
|
||||
#define ST7565_A0() do{ WRITE(ST7565_A0_PIN, HIGH); U8G_DELAY; }while(0)
|
||||
#define ST7565_NA0() WRITE(ST7565_A0_PIN, LOW)
|
||||
#define ST7565_WRITE_BYTE(a) do{ ST7565_SWSPI_SND_8BIT((uint8_t)a); U8G_DELAY; }while(0)
|
||||
#define ST7560_WriteSequence(count, pointer) do{ uint8_t *ptr = pointer; for (uint8_t i = 0; i < count; ++i) { ST7565_SWSPI_SND_8BIT(*ptr++); } DELAY_10US; }while(0)
|
||||
|
||||
|
||||
uint8_t u8g_dev_st7565_64128n_2x_VIKI_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
|
||||
switch (msg) {
|
||||
case U8G_DEV_MSG_INIT:
|
||||
{ OUT_WRITE(ST7565_CS_PIN, LOW);
|
||||
case U8G_DEV_MSG_INIT: {
|
||||
OUT_WRITE(ST7565_CS_PIN, LOW);
|
||||
OUT_WRITE(ST7565_DAT_PIN, LOW);
|
||||
OUT_WRITE(ST7565_CLK_PIN, LOW);
|
||||
OUT_WRITE(ST7565_A0_PIN, LOW);
|
||||
|
||||
ST7565_CS(); /* disable chip */
|
||||
ST7565_NA0(); /* instruction mode */
|
||||
ST7565_NCS(); /* enable chip */
|
||||
ST7565_CS(); // disable chip
|
||||
ST7565_NA0(); // instruction mode
|
||||
ST7565_NCS(); // enable chip
|
||||
|
||||
ST7565_WRITE_BYTE(0xA2); // 0xA2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
|
||||
ST7565_WRITE_BYTE(0xA0); // Normal ADC Select (according to Displaytech 64128N datasheet)
|
||||
|
||||
ST7565_WRITE_BYTE(0x0A2); /* 0x0a2: LCD bias 1/9 (according to Displaytech 64128N datasheet) */
|
||||
ST7565_WRITE_BYTE(0x0A0); /* Normal ADC Select (according to Displaytech 64128N datasheet) */
|
||||
ST7565_WRITE_BYTE(0xC8); // common output mode: set scan direction normal operation/SHL Select; 0xC0 --> SHL = 0; normal; 0xC8 --> SHL = 1
|
||||
ST7565_WRITE_BYTE(0x40); // Display start line for Displaytech 64128N
|
||||
|
||||
ST7565_WRITE_BYTE(0x0c8); /* common output mode: set scan direction normal operation/SHL Select; 0x0c0 --> SHL = 0; normal; 0x0c8 --> SHL = 1 */
|
||||
ST7565_WRITE_BYTE(0x040); /* Display start line for Displaytech 64128N */
|
||||
ST7565_WRITE_BYTE(0x28 | 0x04); // power control: turn on voltage converter
|
||||
//U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used
|
||||
|
||||
ST7565_WRITE_BYTE(0x028 | 0x04); /* power control: turn on voltage converter */
|
||||
// U8G_ESC_DLY(50); /* delay 50 ms - hangs after a reset if used */
|
||||
ST7565_WRITE_BYTE(0x28 | 0x06); // power control: turn on voltage regulator
|
||||
//U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used
|
||||
|
||||
ST7565_WRITE_BYTE(0x028 | 0x06); /* power control: turn on voltage regulator */
|
||||
// U8G_ESC_DLY(50); /* delay 50 ms - hangs after a reset if used */
|
||||
ST7565_WRITE_BYTE(0x28 | 0x07); // power control: turn on voltage follower
|
||||
//U8G_ESC_DLY(50); // delay 50 ms - hangs after a reset if used
|
||||
|
||||
ST7565_WRITE_BYTE(0x028 | 0x07); /* power control: turn on voltage follower */
|
||||
// U8G_ESC_DLY(50); /* delay 50 ms - hangs after a reset if used */
|
||||
ST7565_WRITE_BYTE(0x10); // Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N
|
||||
|
||||
ST7565_WRITE_BYTE(0x010); /* Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N */
|
||||
ST7565_WRITE_BYTE(0xA6); // display normal, bit val 0: LCD pixel off.
|
||||
|
||||
ST7565_WRITE_BYTE(0x0a6); /* display normal, bit val 0: LCD pixel off. */
|
||||
ST7565_WRITE_BYTE(0x81); // set contrast
|
||||
ST7565_WRITE_BYTE(0x1E); // Contrast value. Setting for controlling brightness of Displaytech 64128N
|
||||
|
||||
ST7565_WRITE_BYTE(0x081); /* set contrast */
|
||||
ST7565_WRITE_BYTE(0x01e); /* Contrast value. Setting for controlling brightness of Displaytech 64128N */
|
||||
ST7565_WRITE_BYTE(0xAF); // display on
|
||||
|
||||
|
||||
ST7565_WRITE_BYTE(0x0af); /* display on */
|
||||
|
||||
U8G_ESC_DLY(100); /* delay 100 ms */
|
||||
ST7565_WRITE_BYTE(0x0a5); /* display all points; ST7565 */
|
||||
U8G_ESC_DLY(100); /* delay 100 ms */
|
||||
U8G_ESC_DLY(100); /* delay 100 ms */
|
||||
ST7565_WRITE_BYTE(0x0a4); /* normal display */
|
||||
ST7565_CS(); /* disable chip */
|
||||
} /* end of sequence */
|
||||
U8G_ESC_DLY(100); // delay 100 ms
|
||||
ST7565_WRITE_BYTE(0xA5); // display all points; ST7565
|
||||
U8G_ESC_DLY(100); // delay 100 ms
|
||||
U8G_ESC_DLY(100); // delay 100 ms
|
||||
ST7565_WRITE_BYTE(0xA4); // normal display
|
||||
ST7565_CS(); // disable chip
|
||||
} // end of sequence
|
||||
break;
|
||||
case U8G_DEV_MSG_STOP:
|
||||
break;
|
||||
case U8G_DEV_MSG_PAGE_NEXT:
|
||||
{ u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
ST7565_CS(); /* disable chip */
|
||||
ST7565_NA0(); /* instruction mode */
|
||||
ST7565_NCS(); /* enable chip */
|
||||
ST7565_WRITE_BYTE(0x010); /* set upper 4 bit of the col adr to 0x10 */
|
||||
ST7565_WRITE_BYTE(0x000); /* set lower 4 bit of the col adr to 0x00. Changed for DisplayTech 64128N */
|
||||
/* end of sequence */
|
||||
ST7565_WRITE_BYTE(0x0b0 | (2*pb->p.page));; /* select current page (ST7565R) */
|
||||
ST7565_A0(); /* data mode */
|
||||
ST7560_WriteSequence( (uint8_t) pb->width, (uint8_t *)pb->buf);
|
||||
ST7565_CS(); /* disable chip */
|
||||
ST7565_NA0(); /* instruction mode */
|
||||
ST7565_NCS(); /* enable chip */
|
||||
ST7565_WRITE_BYTE(0x010); /* set upper 4 bit of the col adr to 0x10 */
|
||||
ST7565_WRITE_BYTE(0x000); /* set lower 4 bit of the col adr to 0x00. Changed for DisplayTech 64128N */
|
||||
/* end of sequence */
|
||||
ST7565_WRITE_BYTE(0x0b0 | (2*pb->p.page+1)); /* select current page (ST7565R) */
|
||||
ST7565_A0(); /* data mode */
|
||||
ST7560_WriteSequence( (uint8_t) pb->width, (uint8_t *)(pb->buf)+pb->width);
|
||||
ST7565_CS(); /* disable chip */
|
||||
case U8G_DEV_MSG_PAGE_NEXT: {
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
ST7565_CS(); // disable chip
|
||||
ST7565_NA0(); // instruction mode
|
||||
ST7565_NCS(); // enable chip
|
||||
ST7565_WRITE_BYTE(0x10); // set upper 4 bit of the col adr to 0x10
|
||||
ST7565_WRITE_BYTE(0x00); // set lower 4 bit of the col adr to 0x00. Changed for DisplayTech 64128N
|
||||
// end of sequence
|
||||
ST7565_WRITE_BYTE(0xB0 | (2 * pb->p.page)); // select current page (ST7565R)
|
||||
ST7565_A0(); // data mode
|
||||
ST7560_WriteSequence((uint8_t)pb->width, (uint8_t*)pb->buf);
|
||||
ST7565_CS(); // disable chip
|
||||
ST7565_NA0(); // instruction mode
|
||||
ST7565_NCS(); // enable chip
|
||||
ST7565_WRITE_BYTE(0x10); // set upper 4 bit of the col adr to 0x10
|
||||
ST7565_WRITE_BYTE(0x00); // set lower 4 bit of the col adr to 0x00. Changed for DisplayTech 64128N
|
||||
// end of sequence
|
||||
ST7565_WRITE_BYTE(0xB0 | (2 * pb->p.page + 1)); // select current page (ST7565R)
|
||||
ST7565_A0(); // data mode
|
||||
ST7560_WriteSequence((uint8_t)pb->width, (uint8_t*)(pb->buf)+pb->width);
|
||||
ST7565_CS(); // disable chip
|
||||
}
|
||||
break;
|
||||
case U8G_DEV_MSG_CONTRAST:
|
||||
ST7565_NCS();
|
||||
ST7565_NA0(); /* instruction mode */
|
||||
ST7565_WRITE_BYTE(0x081);
|
||||
ST7565_NA0(); // instruction mode
|
||||
ST7565_WRITE_BYTE(0x81);
|
||||
ST7565_WRITE_BYTE((*(uint8_t *)arg) >> 2);
|
||||
ST7565_CS(); /* disable chip */
|
||||
ST7565_CS(); // disable chip
|
||||
return 1;
|
||||
case U8G_DEV_MSG_SLEEP_ON:
|
||||
ST7565_NA0(); /* instruction mode */
|
||||
ST7565_NCS(); /* enable chip */
|
||||
ST7565_WRITE_BYTE(0x0ac); /* static indicator off */
|
||||
ST7565_WRITE_BYTE(0x000); /* indicator register set (not sure if this is required) */
|
||||
ST7565_WRITE_BYTE(0x0ae); /* display off */
|
||||
ST7565_WRITE_BYTE(0x0a5); /* all points on */
|
||||
ST7565_CS(); /* disable chip , bugfix 12 nov 2014 */
|
||||
/* end of sequence */
|
||||
ST7565_NA0(); // instruction mode
|
||||
ST7565_NCS(); // enable chip
|
||||
ST7565_WRITE_BYTE(0xAC); // static indicator off
|
||||
ST7565_WRITE_BYTE(0x00); // indicator register set (not sure if this is required)
|
||||
ST7565_WRITE_BYTE(0xAE); // display off
|
||||
ST7565_WRITE_BYTE(0xA5); // all points on
|
||||
ST7565_CS(); // disable chip , bugfix 12 nov 2014
|
||||
// end of sequence
|
||||
return 1;
|
||||
case U8G_DEV_MSG_SLEEP_OFF:
|
||||
ST7565_NA0(); /* instruction mode */
|
||||
ST7565_NCS(); /* enable chip */
|
||||
ST7565_WRITE_BYTE(0x0a4); /* all points off */
|
||||
ST7565_WRITE_BYTE(0x0af); /* display on */
|
||||
U8G_ESC_DLY(50); /* delay 50 ms */
|
||||
ST7565_CS(); /* disable chip , bugfix 12 nov 2014 */
|
||||
/* end of sequence */
|
||||
ST7565_NA0(); // instruction mode
|
||||
ST7565_NCS(); // enable chip
|
||||
ST7565_WRITE_BYTE(0xA4); // all points off
|
||||
ST7565_WRITE_BYTE(0xAF); // display on
|
||||
U8G_ESC_DLY(50); // delay 50 ms
|
||||
ST7565_CS(); // disable chip , bugfix 12 nov 2014
|
||||
// end of sequence
|
||||
return 1;
|
||||
}
|
||||
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
|
||||
}
|
||||
|
||||
uint8_t u8g_dev_st7565_64128n_2x_VIKI_buf[WIDTH*2] U8G_NOCOMMON ;
|
||||
u8g_pb_t u8g_dev_st7565_64128n_2x_VIKI_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_st7565_64128n_2x_VIKI_buf};
|
||||
u8g_dev_t u8g_dev_st7565_64128n_2x_VIKI_sw_spi = { u8g_dev_st7565_64128n_2x_VIKI_fn, &u8g_dev_st7565_64128n_2x_VIKI_pb, &u8g_com_null_fn};
|
||||
|
||||
uint8_t u8g_dev_st7565_64128n_2x_VIKI_buf[WIDTH*2] U8G_NOCOMMON;
|
||||
u8g_pb_t u8g_dev_st7565_64128n_2x_VIKI_pb = { { 16, HEIGHT, 0, 0, 0 }, WIDTH, u8g_dev_st7565_64128n_2x_VIKI_buf };
|
||||
u8g_dev_t u8g_dev_st7565_64128n_2x_VIKI_sw_spi = { u8g_dev_st7565_64128n_2x_VIKI_fn, &u8g_dev_st7565_64128n_2x_VIKI_pb, &u8g_com_null_fn };
|
||||
|
||||
class U8GLIB_ST7565_64128n_2x_VIKI : public U8GLIB {
|
||||
public:
|
||||
@ -240,9 +236,6 @@ class U8GLIB_ST7565_64128n_2x_VIKI : public U8GLIB {
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
|
||||
#pragma GCC reset_options
|
||||
|
||||
#endif // U8GLIB_ST7565
|
||||
#endif // ULCDST7565_H
|
||||
|
@ -23,9 +23,7 @@
|
||||
#ifndef ULCDST7920_H
|
||||
#define ULCDST7920_H
|
||||
|
||||
#include "Marlin.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#include "../../Marlin.h"
|
||||
|
||||
#define ST7920_CLK_PIN LCD_PINS_D4
|
||||
#define ST7920_DAT_PIN LCD_PINS_ENABLE
|
||||
@ -186,5 +184,4 @@ class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
|
||||
|
||||
#pragma GCC reset_options
|
||||
|
||||
#endif // U8GLIB_ST7920
|
||||
#endif // ULCDST7920_H
|
||||
|
@ -20,6 +20,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* thermistornames.h
|
||||
*
|
||||
* Used by LCD code to obtain a thermistor name
|
||||
*
|
||||
* Usage: Set THERMISTOR_ID then #include this file
|
||||
* to set a new value for THERMISTOR_NAME.
|
||||
*/
|
||||
|
||||
#undef THERMISTOR_NAME
|
||||
|
||||
// Thermcouples
|
||||
|
@ -20,33 +20,43 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultralcd.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#include "Marlin.h"
|
||||
#include "language.h"
|
||||
#include "cardreader.h"
|
||||
#include "temperature.h"
|
||||
#include "planner.h"
|
||||
#include "stepper.h"
|
||||
#include "configuration_store.h"
|
||||
#include "utility.h"
|
||||
|
||||
#include "ultralcd.h"
|
||||
|
||||
#include "../sd/cardreader.h"
|
||||
#include "../module/temperature.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../module/stepper.h"
|
||||
#include "../module/configuration_store.h"
|
||||
|
||||
#include "../Marlin.h"
|
||||
|
||||
#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
|
||||
#include "buzzer.h"
|
||||
#include "../libs/buzzer.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#include "printcounter.h"
|
||||
#include "duration_t.h"
|
||||
#include "../module/printcounter.h"
|
||||
#include "../libs/duration_t.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_LCD_DISPLAY)
|
||||
#include "../feature/filwidth.h"
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#include "../module/probe.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
#include "endstops.h"
|
||||
#include "../module/endstops.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "ubl.h"
|
||||
bool ubl_lcd_map_control = false;
|
||||
#if HAS_LEVELING
|
||||
#include "../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
// Initialized by settings.load()
|
||||
@ -92,7 +102,7 @@ uint16_t max_display_update_time = 0;
|
||||
#endif
|
||||
|
||||
#if ENABLED(DAC_STEPPER_CURRENT)
|
||||
#include "stepper_dac.h" //was dac_mcp4728.h MarlinMain uses stepper dac for the m-codes
|
||||
#include "../feature/dac/stepper_dac.h" //was dac_mcp4728.h MarlinMain uses stepper dac for the m-codes
|
||||
uint8_t driverPercent[XYZE];
|
||||
#endif
|
||||
|
||||
@ -102,9 +112,6 @@ uint16_t max_display_update_time = 0;
|
||||
#define TALL_FONT_CORRECTION 0
|
||||
#endif
|
||||
|
||||
// Function pointer to menu functions.
|
||||
typedef void (*screenFunc_t)();
|
||||
|
||||
#if HAS_POWER_SWITCH
|
||||
extern bool powersupply_on;
|
||||
#endif
|
||||
@ -161,7 +168,7 @@ uint16_t max_display_update_time = 0;
|
||||
#endif
|
||||
|
||||
#if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
|
||||
#include "mesh_bed_leveling.h"
|
||||
#include "../feature/mbl/mesh_bed_leveling.h"
|
||||
extern void mesh_probing_done();
|
||||
#endif
|
||||
|
||||
@ -443,7 +450,7 @@ uint16_t max_display_update_time = 0;
|
||||
/**
|
||||
* General function to go directly to a screen
|
||||
*/
|
||||
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0) {
|
||||
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder/*=0*/) {
|
||||
if (currentScreen != screen) {
|
||||
|
||||
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) && ENABLED(BABYSTEPPING)
|
||||
@ -469,14 +476,14 @@ uint16_t max_display_update_time = 0;
|
||||
if (screen == lcd_status_screen) {
|
||||
defer_return_to_status = false;
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
ubl_lcd_map_control = false;
|
||||
ubl.lcd_map_control = false;
|
||||
#endif
|
||||
screen_history_depth = 0;
|
||||
}
|
||||
lcd_implementation_clear();
|
||||
// Re-initialize custom characters that may be re-used
|
||||
#if DISABLED(DOGLCD) && ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
if (!ubl_lcd_map_control) lcd_set_custom_characters(
|
||||
if (!ubl.lcd_map_control) lcd_set_custom_characters(
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
screen == lcd_status_screen
|
||||
#endif
|
||||
@ -928,7 +935,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
if (card.cardOK) {
|
||||
if (card.isFileOpen()) {
|
||||
if (card.sdprinting)
|
||||
if (IS_SD_PRINTING)
|
||||
MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause);
|
||||
else
|
||||
MENU_ITEM(function, MSG_RESUME_PRINT, lcd_sdcard_resume);
|
||||
@ -2224,7 +2231,7 @@ void kill_screen(const char* lcd_msg) {
|
||||
|
||||
void _lcd_ubl_map_homing() {
|
||||
defer_return_to_status = true;
|
||||
ubl_lcd_map_control = true; // Return to the map screen
|
||||
ubl.lcd_map_control = true; // Return to the map screen
|
||||
if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT < 3 ? 0 : (LCD_HEIGHT > 4 ? 2 : 1), PSTR(MSG_LEVEL_BED_HOMING));
|
||||
lcdDrawUpdate = LCDVIEW_CALL_NO_REDRAW;
|
||||
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
|
||||
|
@ -23,15 +23,21 @@
|
||||
#ifndef ULTRALCD_H
|
||||
#define ULTRALCD_H
|
||||
|
||||
#include "Marlin.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
||||
#include "../Marlin.h"
|
||||
|
||||
#define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0)
|
||||
#define BUTTON_PRESSED(BN) !READ(BTN_## BN)
|
||||
|
||||
extern int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
|
||||
|
||||
#if ENABLED(LCD_BED_LEVELING) && ENABLED(PROBE_MANUALLY)
|
||||
extern bool lcd_wait_for_move;
|
||||
#endif
|
||||
|
||||
int16_t lcd_strlen(const char* s);
|
||||
int16_t lcd_strlen_P(const char* s);
|
||||
void lcd_update();
|
||||
@ -74,6 +80,11 @@
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
|
||||
// Function pointer to menu functions.
|
||||
typedef void (*screenFunc_t)();
|
||||
|
||||
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0);
|
||||
|
||||
#define BLEN_A 0
|
||||
#define BLEN_B 1
|
||||
// Encoder click is directly connected
|
||||
@ -91,7 +102,18 @@
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void lcd_advanced_pause_show_message(const AdvancedPauseMessage message);
|
||||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
void lcd_mesh_edit_setup(float initial);
|
||||
float lcd_mesh_edit();
|
||||
void lcd_z_offset_edit_setup(float);
|
||||
float lcd_z_offset_edit();
|
||||
#endif
|
||||
|
||||
#if ENABLED(DELTA_CALIBRATION_MENU)
|
||||
float lcd_probe_pt(const float &lx, const float &ly);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
@ -189,16 +211,9 @@
|
||||
|
||||
void lcd_reset_status();
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
extern bool ubl_lcd_map_control;
|
||||
void lcd_mesh_edit_setup(float initial);
|
||||
float lcd_mesh_edit();
|
||||
void lcd_z_offset_edit_setup(float);
|
||||
float lcd_z_offset_edit();
|
||||
#endif
|
||||
|
||||
#if ENABLED(DELTA_CALIBRATION_MENU)
|
||||
float lcd_probe_pt(const float &lx, const float &ly);
|
||||
// For i2c define BUZZ to use lcd_buzz
|
||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||
#define BUZZ(d,f) lcd_buzz(d, f)
|
||||
#endif
|
||||
|
||||
#endif // ULTRALCD_H
|
||||
|
@ -36,27 +36,27 @@
|
||||
#ifndef ULTRALCD_IMPL_DOGM_H
|
||||
#define ULTRALCD_IMPL_DOGM_H
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
/**
|
||||
* Implementation of the LCD display routines for a DOGM128 graphic display.
|
||||
* These are common LCD 128x64 pixel graphic displays.
|
||||
*/
|
||||
#include "ultralcd.h"
|
||||
#include "ultralcd_st7920_u8glib_rrd.h"
|
||||
#include "ultralcd_st7565_u8glib_VIKI.h"
|
||||
#include "dogm_bitmaps.h"
|
||||
#include "utility.h"
|
||||
#include "duration_t.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7565_64128N)
|
||||
#include "dogm/ultralcd_st7565_u8glib_VIKI.h"
|
||||
#elif ENABLED(U8GLIB_ST7920)
|
||||
#include "dogm/ultralcd_st7920_u8glib_rrd.h"
|
||||
#endif
|
||||
|
||||
#include "dogm/dogm_bitmaps.h"
|
||||
#include "../libs/duration_t.h"
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "ubl.h"
|
||||
#include "../feature/ubl/ubl.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN)
|
||||
#include "_Bootscreen.h"
|
||||
#include "../config/_Bootscreen.h"
|
||||
#endif
|
||||
|
||||
// Only Western languages support big / small fonts
|
||||
@ -66,57 +66,57 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_SMALL_INFOFONT)
|
||||
#include "dogm_font_data_6x9_marlin.h"
|
||||
#include "dogm/dogm_font_data_6x9_marlin.h"
|
||||
#define FONT_STATUSMENU_NAME u8g_font_6x9
|
||||
#else
|
||||
#define FONT_STATUSMENU_NAME FONT_MENU_NAME
|
||||
#endif
|
||||
|
||||
#include "dogm_font_data_Marlin_symbols.h" // The Marlin special symbols
|
||||
#include "dogm/dogm_font_data_Marlin_symbols.h" // The Marlin special symbols
|
||||
#define FONT_SPECIAL_NAME Marlin_symbols
|
||||
|
||||
#if DISABLED(SIMULATE_ROMFONT)
|
||||
#if ENABLED(DISPLAY_CHARSET_ISO10646_1)
|
||||
#include "dogm_font_data_ISO10646_1.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_1.h"
|
||||
#define FONT_MENU_NAME ISO10646_1_5x7
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_PL)
|
||||
#include "dogm_font_data_ISO10646_1_PL.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_1_PL.h"
|
||||
#define FONT_MENU_NAME ISO10646_1_PL_5x7
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_5)
|
||||
#include "dogm_font_data_ISO10646_5_Cyrillic.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_5_Cyrillic.h"
|
||||
#define FONT_MENU_NAME ISO10646_5_Cyrillic_5x7
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_KANA)
|
||||
#include "dogm_font_data_ISO10646_Kana.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_Kana.h"
|
||||
#define FONT_MENU_NAME ISO10646_Kana_5x7
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_GREEK)
|
||||
#include "dogm_font_data_ISO10646_Greek.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_Greek.h"
|
||||
#define FONT_MENU_NAME ISO10646_Greek_5x7
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_CN)
|
||||
#include "dogm_font_data_ISO10646_CN.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_CN.h"
|
||||
#define FONT_MENU_NAME ISO10646_CN
|
||||
#define TALL_FONT_CORRECTION 1
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_TR)
|
||||
#include "dogm_font_data_ISO10646_1_tr.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_1_tr.h"
|
||||
#define FONT_MENU_NAME ISO10646_TR
|
||||
#elif ENABLED(DISPLAY_CHARSET_ISO10646_CZ)
|
||||
#include "dogm_font_data_ISO10646_CZ.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_CZ.h"
|
||||
#define FONT_MENU_NAME ISO10646_CZ
|
||||
#else // fall-back
|
||||
#include "dogm_font_data_ISO10646_1.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_1.h"
|
||||
#define FONT_MENU_NAME ISO10646_1_5x7
|
||||
#endif
|
||||
#else // SIMULATE_ROMFONT
|
||||
#if DISPLAY_CHARSET_HD44780 == JAPANESE
|
||||
#include "dogm_font_data_HD44780_J.h"
|
||||
#include "dogm/dogm_font_data_HD44780_J.h"
|
||||
#define FONT_MENU_NAME HD44780_J_5x7
|
||||
#elif DISPLAY_CHARSET_HD44780 == WESTERN
|
||||
#include "dogm_font_data_HD44780_W.h"
|
||||
#include "dogm/dogm_font_data_HD44780_W.h"
|
||||
#define FONT_MENU_NAME HD44780_W_5x7
|
||||
#elif DISPLAY_CHARSET_HD44780 == CYRILLIC
|
||||
#include "dogm_font_data_HD44780_C.h"
|
||||
#include "dogm/dogm_font_data_HD44780_C.h"
|
||||
#define FONT_MENU_NAME HD44780_C_5x7
|
||||
#else // fall-back
|
||||
#include "dogm_font_data_ISO10646_1.h"
|
||||
#include "dogm/dogm_font_data_ISO10646_1.h"
|
||||
#define FONT_MENU_NAME ISO10646_1_5x7
|
||||
#endif
|
||||
#endif // SIMULATE_ROMFONT
|
||||
@ -174,11 +174,10 @@
|
||||
U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
|
||||
#elif ENABLED(U8GLIB_ST7565_64128N)
|
||||
// The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller
|
||||
// U8GLIB_ST7565_64128n_2x_VIKI u8g(0); // using SW-SPI DOGLCD_MOSI != -1 && DOGLCD_SCK
|
||||
U8GLIB_ST7565_64128n_2x_VIKI u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI
|
||||
//U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
|
||||
//U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes HWSPI
|
||||
|
||||
//U8GLIB_ST7565_64128n_2x_VIKI u8g(0); // using SW-SPI DOGLCD_MOSI != -1 && DOGLCD_SCK
|
||||
U8GLIB_ST7565_64128n_2x_VIKI u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI
|
||||
//U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
|
||||
//U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes HWSPI
|
||||
#elif ENABLED(U8GLIB_SSD1306)
|
||||
// Generic support for SSD1306 OLED I2C LCDs
|
||||
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes
|
||||
|
@ -28,11 +28,14 @@
|
||||
* These are the most common LCD character displays.
|
||||
*/
|
||||
|
||||
#include "utility.h"
|
||||
#include "duration_t.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if LCD_HEIGHT > 3
|
||||
#include "../libs/duration_t.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "ubl.h"
|
||||
#include "../feature/ubl/ubl.h"
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#define ULTRA_X_PIXELS_PER_CHAR 5
|
||||
|
@ -23,7 +23,7 @@
|
||||
#ifndef UTF_MAPPER_H
|
||||
#define UTF_MAPPER_H
|
||||
|
||||
#include "language.h"
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#define HARDWARE_CHAR_OUT u8g.print
|
||||
|
Loading…
Reference in New Issue
Block a user