mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-09 23:05:00 -06:00
parent
57fe45a2a6
commit
9a8b1eab93
31 changed files with 326 additions and 312 deletions
|
@ -55,12 +55,12 @@
|
|||
|
||||
#if defined(ARDUINO) && !defined(ARDUINO_ARCH_STM32) && !defined(ARDUINO_ARCH_SAM)
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
||||
#include "../shared/Marduino.h"
|
||||
#include "../shared/Delay.h"
|
||||
#include "../../shared/Marduino.h"
|
||||
#include "../../shared/Delay.h"
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
|
|
@ -201,7 +201,7 @@
|
|||
#define DOGLCD
|
||||
#define IS_U8GLIB_ST7920 1
|
||||
#define IS_ULTIPANEL 1
|
||||
#define ENCODER_PULSES_PER_STEP 2
|
||||
#define STD_ENCODER_PULSES_PER_STEP 2
|
||||
|
||||
#elif ENABLED(MKS_12864OLED)
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2018 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file lcdprint_u8g.cpp
|
||||
* @brief LCD print api for u8glib
|
||||
|
|
|
@ -38,19 +38,19 @@
|
|||
|
||||
#if HAS_MEDIA
|
||||
#ifdef __SAMD21__
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.)
|
||||
#else
|
||||
// Hardware SPI on DUE
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X // 2 stripes, SW SPI (Original u8glib device)
|
||||
#endif
|
||||
#define U8G_PARAM LCD_PINS_RS
|
||||
#elif (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN)
|
||||
// Hardware SPI shared with SD Card
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.)
|
||||
#define U8G_PARAM LCD_PINS_RS
|
||||
#else
|
||||
// Software SPI
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X
|
||||
#define U8G_CLASS U8GLIB_ST7920_128X64_4X // 2 stripes, SW SPI (Original u8glib device)
|
||||
#define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,58 +75,58 @@
|
|||
#define HEIGHT 64
|
||||
#define PAGE_HEIGHT 8
|
||||
|
||||
#define CMD_COL_ADR(N) (0x10 | ((N) >> 4)), ((N) & 0xF)
|
||||
#define CMD_PAGE_ADR(N) (0x20), (N)
|
||||
#define CMD_COLUMN_RANGE(N,O) (0x21), (N), (O)
|
||||
#define CMD_PAGE_RANGE(N,O) (0x22), (N), (O)
|
||||
#define CMD_SCROLL(N) ((N) ? 0x2F : 0x2E)
|
||||
#define CMD_START_LINE(N) (0x40 | (N))
|
||||
#define CMD_CONTRAST(N) (0x81), (N)
|
||||
#define CMD_CHARGE_PUMP(N) (0x8D), ((N) ? 0x14 : 0x10)
|
||||
#define CMD_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0)
|
||||
#define CMD_ALL_PIX(N) ((N) ? 0xA5 : 0xA4)
|
||||
#define CMD_INVERTED(N) ((N) ? 0xA7 : 0xA6)
|
||||
#define CMD_MUX_RATIO(N) (0xA8), (N)
|
||||
#define CMD_ON(N) ((N) ? 0xAF : 0xAE)
|
||||
#define CMD_OUT_MODE(N) ((N) ? 0xC8 : 0xC0)
|
||||
#define CMD_DISP_OFFS(N) (0xD3), (N)
|
||||
#define CMD_OSC_FREQ(R,F) (0xD5), ((F) << 4 | (R))
|
||||
#define CMD_CHARGE_PER(P,D) (0xD9), ((D) << 4 | (P))
|
||||
#define CMD_COM_CONFIG(N) (0xDA), ((N) ? 0x12 : 0x02)
|
||||
#define CMD_VCOM_DESEL(N) (0xDB), (N)
|
||||
#define CMD_NOOP() (0xE3)
|
||||
|
||||
uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_seq);
|
||||
|
||||
// SH1106 (132x64) is compatible with SSD1306 (128x64) by adding a small margin to the larger display
|
||||
|
||||
#define SH1106_PAGE_ADR(N) (0x20), (N)
|
||||
#define SH1106_COL_ADR(N) (0x10 | ((N) >> 4)), ((N) & 0xFF)
|
||||
#define SH1106_COLUMN_RANGE(N,O) (0x21), (N), (O)
|
||||
#define SH1106_PAGE_RANGE(N,O) (0x22), (N), (O)
|
||||
#define SH1106_SCROLL(N) ((N) ? 0x2F : 0x2E)
|
||||
#define SH1106_START_LINE(N) (0x40 | (N))
|
||||
#define SH1106_CONTRAST(N) (0x81), (N)
|
||||
#define SH1106_CHARGE_PUMP(N) (0x8D), ((N) ? 0x14 : 0x10)
|
||||
#define SH1106_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0)
|
||||
#define SH1106_ALL_PIX(N) ((N) ? 0xA5 : 0xA4)
|
||||
#define SH1106_INVERTED(N) ((N) ? 0xA7 : 0xA6)
|
||||
#define SH1106_MUX_RATIO(N) (0xA8), (N)
|
||||
#define SH1106_ON(N) ((N) ? 0xAF : 0xAE)
|
||||
#define SH1106_OUT_MODE(N) ((N) ? 0xC8 : 0xC0)
|
||||
#define SH1106_DISP_OFFS(N) (0xD3), (N)
|
||||
#define SH1106_OSC_FREQ(R,F) (0xD5), ((F) << 4 | (R))
|
||||
#define SH1106_CHARGE_PER(P,D) (0xD9), ((D) << 4 | (P))
|
||||
#define SH1106_COM_CONFIG(N) (0xDA), ((N) ? 0x12 : 0x02)
|
||||
#define SH1106_VCOM_DESEL(N) (0xDB), (N)
|
||||
#define SH1106_NOOP() (0xE3)
|
||||
// SH1106 is compatible with SSD1306, but is 132x64. Display 128x64 centered within the 132x64.
|
||||
|
||||
static const uint8_t u8g_dev_sh1106_128x64_data_start_2_wire[] PROGMEM = {
|
||||
SH1106_COL_ADR(2), // Column 2 to center 128 pixels in 132 pixels
|
||||
U8G_ESC_END // End of sequence
|
||||
CMD_COL_ADR(2), // Column 2 to center 128 pixels in 132 pixels
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_sh1106_128x64_init_seq_2_wire[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // Initiate command mode
|
||||
SH1106_ON(0), // Display off, sleep mode
|
||||
SH1106_MUX_RATIO(0x3F), // Mux ratio
|
||||
SH1106_DISP_OFFS(0), // Display offset
|
||||
SH1106_START_LINE(0), // Start line
|
||||
SH1106_ADC_REVERSE(1), // Segment remap A0/A1
|
||||
SH1106_OUT_MODE(1), // 0: scan dir normal, 1: reverse
|
||||
SH1106_COM_CONFIG(1), // COM pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5)
|
||||
SH1106_CONTRAST(0xCF), // Set contrast control
|
||||
SH1106_PAGE_ADR(0x02), // page addressing mode
|
||||
SH1106_COLUMN_RANGE(2, 129), // Set column range 2 .. 129
|
||||
SH1106_PAGE_RANGE(0, 7), // Set page range 0 .. 7
|
||||
SH1106_CHARGE_PER(0x1, 0xF), // Pre-charge period
|
||||
SH1106_VCOM_DESEL(0x40), // Vcomh deselect level
|
||||
SH1106_ALL_PIX(0), // Output RAM to display
|
||||
SH1106_INVERTED(0), // Normal display mode
|
||||
SH1106_OSC_FREQ(0, 8), // Clock divide ratio (0:1) and oscillator frequency (8)
|
||||
SH1106_CHARGE_PUMP(1), // Charge pump setting
|
||||
SH1106_SCROLL(0), // Deactivate scroll
|
||||
SH1106_ON(1), // Display on
|
||||
U8G_ESC_END // End of sequence
|
||||
U8G_ESC_ADR(0), // Initiate command mode
|
||||
CMD_ON(0), // Display off, sleep mode
|
||||
CMD_MUX_RATIO(0x3F), // Mux ratio
|
||||
CMD_DISP_OFFS(0), // Display offset
|
||||
CMD_START_LINE(0), // Start line
|
||||
CMD_ADC_REVERSE(1), // Segment remap A0/A1
|
||||
CMD_OUT_MODE(1), // 0: scan dir normal, 1: reverse
|
||||
CMD_COM_CONFIG(1), // COM pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5)
|
||||
CMD_CONTRAST(0xCF), // Set contrast control
|
||||
CMD_PAGE_ADR(0x02), // page addressing mode
|
||||
CMD_COLUMN_RANGE(2, 129), // Set column range 2 .. 129
|
||||
CMD_PAGE_RANGE(0, 7), // Set page range 0 .. 7
|
||||
CMD_CHARGE_PER(0x1, 0xF), // Pre-charge period
|
||||
CMD_VCOM_DESEL(0x40), // Vcomh deselect level
|
||||
CMD_ALL_PIX(0), // Output RAM to display
|
||||
CMD_INVERTED(0), // Normal display mode
|
||||
CMD_OSC_FREQ(0, 8), // Clock divide ratio (0:1) and oscillator frequency (8)
|
||||
CMD_CHARGE_PUMP(1), // Charge pump setting
|
||||
CMD_SCROLL(0), // Deactivate scroll
|
||||
CMD_ON(1), // Display ON
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
uint8_t u8g_dev_sh1106_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
|
||||
|
@ -142,7 +142,7 @@ uint8_t u8g_dev_sh1106_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t m
|
|||
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_sh1106_128x64_data_start_2_wire);
|
||||
u8g_WriteByte(u8g, dev, 0xB0 | (pb->p.page*2)); // Select current page
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *) pb->buf);
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
u8g_SetAddress(u8g, dev, 0); // Instruction mode
|
||||
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_sh1106_128x64_data_start_2_wire);
|
||||
|
@ -157,39 +157,39 @@ uint8_t u8g_dev_sh1106_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t m
|
|||
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
|
||||
}
|
||||
|
||||
uint8_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
|
||||
u8g_pb_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf};
|
||||
uint8_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf[WIDTH * 2] U8G_NOCOMMON;
|
||||
u8g_pb_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb = { { 16, HEIGHT, 0, 0, 0 }, WIDTH, u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf };
|
||||
u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c_2_wire = { u8g_dev_sh1106_128x64_2x_2_wire_fn, &u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL };
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static const uint8_t u8g_dev_ssd1306_128x64_data_start_2_wire[] PROGMEM = {
|
||||
SH1106_COL_ADR(0), // Column 0
|
||||
U8G_ESC_END // End of sequence
|
||||
CMD_COL_ADR(0), // Column 0
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_ssd1306_128x64_init_seq_2_wire[] PROGMEM = {
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
SH1106_ON(0), // Display off, sleep mode
|
||||
SH1106_MUX_RATIO(0x3F), // Mux ratio
|
||||
SH1106_DISP_OFFS(0), // Display offset
|
||||
SH1106_START_LINE(0), // Start line
|
||||
SH1106_ADC_REVERSE(1), // Segment remap A0/A1
|
||||
SH1106_OUT_MODE(1), // 0: scan dir normal, 1: reverse
|
||||
SH1106_COM_CONFIG(1), // COM pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5)
|
||||
SH1106_CONTRAST(0xCF), // Set contrast control
|
||||
SH1106_PAGE_ADR(0x02), // page addressing mode
|
||||
SH1106_COLUMN_RANGE(0, 127), // Set column range 0 .. 127
|
||||
SH1106_PAGE_RANGE(0, 7), // Set page range from 0 .. 7
|
||||
SH1106_CHARGE_PER(0x1, 0xF), // Pre-charge period
|
||||
SH1106_VCOM_DESEL(0x40), // Vcomh deselect level
|
||||
SH1106_ALL_PIX(0), // Send RAM to display
|
||||
SH1106_INVERTED(0), // Normal display mode
|
||||
SH1106_OSC_FREQ(0, 8), // Clock divide ratio (0:1) and oscillator frequency (8)
|
||||
SH1106_CHARGE_PUMP(1), // Charge pump setting
|
||||
SH1106_SCROLL(0), // Deactivate scroll
|
||||
SH1106_ON(1), // Display on
|
||||
U8G_ESC_END // End of sequence
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
CMD_ON(0), // Display OFF, sleep mode
|
||||
CMD_MUX_RATIO(0x3F), // Mux ratio
|
||||
CMD_DISP_OFFS(0), // Display offset
|
||||
CMD_START_LINE(0), // Start line
|
||||
CMD_ADC_REVERSE(1), // Segment remap A0/A1
|
||||
CMD_OUT_MODE(1), // 0: scan dir normal, 1: reverse
|
||||
CMD_COM_CONFIG(1), // COM pin HW config, sequential COM pin config (bit 4), disable left/right remap (bit 5)
|
||||
CMD_CONTRAST(0xCF), // Set contrast control
|
||||
CMD_PAGE_ADR(2), // Page addressing mode
|
||||
CMD_COLUMN_RANGE(0, 127), // Set column range 0 .. 127
|
||||
CMD_PAGE_RANGE(0, 7), // Set page range from 0 .. 7
|
||||
CMD_CHARGE_PER(0x1, 0xF), // Pre-charge period
|
||||
CMD_VCOM_DESEL(0x40), // Vcomh deselect level
|
||||
CMD_ALL_PIX(0), // Send RAM to display
|
||||
CMD_INVERTED(0), // Normal display mode
|
||||
CMD_OSC_FREQ(0, 8), // Clock divide ratio (0:1) and oscillator frequency (8)
|
||||
CMD_CHARGE_PUMP(1), // Charge pump setting
|
||||
CMD_SCROLL(0), // Deactivate scroll
|
||||
CMD_ON(1), // Display ON
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
|
||||
|
@ -205,7 +205,7 @@ uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t
|
|||
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_ssd1306_128x64_data_start_2_wire);
|
||||
u8g_WriteByte(u8g, dev, 0xB0 | (pb->p.page*2)); // Select current page
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *) pb->buf);
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
u8g_SetAddress(u8g, dev, 0); // Instruction mode
|
||||
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_ssd1306_128x64_data_start_2_wire);
|
||||
|
@ -220,8 +220,8 @@ uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t
|
|||
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
|
||||
}
|
||||
|
||||
uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
|
||||
u8g_pb_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf};
|
||||
uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH * 2] U8G_NOCOMMON;
|
||||
u8g_pb_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf };
|
||||
u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire = { u8g_dev_ssd1306_128x64_2x_2_wire_fn, &u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL };
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -236,7 +236,7 @@ uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_s
|
|||
for (;;) {
|
||||
uint8_t value = u8g_pgm_read(esc_seq);
|
||||
if (is_escape == 0) {
|
||||
if (value != 255) {
|
||||
if (value != 0xFF) {
|
||||
if (u8g_WriteByte(u8g, dev, value) == 0) return 0;
|
||||
if (u8g_WriteByte(u8g, dev, I2C_CMD_MODE) == 0) return 0;
|
||||
}
|
||||
|
@ -245,17 +245,17 @@ uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_s
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (value == 255) {
|
||||
if (value == 0xFF) {
|
||||
if (u8g_WriteByte(u8g, dev, value) == 0) return 0;
|
||||
if (u8g_WriteByte(u8g, dev, I2C_CMD_MODE) == 0) return 0;
|
||||
}
|
||||
else if (value == 254) {
|
||||
else if (value == 0xFE) {
|
||||
break;
|
||||
}
|
||||
else if (value >= 0xF0) {
|
||||
// not yet used, do nothing
|
||||
// Not yet used, do nothing
|
||||
}
|
||||
else if (value >= 0xE0 ) {
|
||||
else if (value >= 0xE0) {
|
||||
u8g_SetAddress(u8g, dev, value & 0x0F);
|
||||
}
|
||||
else if (value >= 0xD0) {
|
||||
|
@ -270,11 +270,10 @@ uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_s
|
|||
u8g_SetResetHigh(u8g, dev);
|
||||
u8g_Delay(value);
|
||||
}
|
||||
else if (value >= 0xBE) {
|
||||
// not yet implemented
|
||||
else if (value >= 0xBE) { // Not yet implemented
|
||||
//u8g_SetVCC(u8g, dev, value & 0x01);
|
||||
}
|
||||
else if (value <= 127) {
|
||||
else if (value <= 0x7F) {
|
||||
u8g_Delay(value);
|
||||
}
|
||||
is_escape = 0;
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
#define PAGE_HEIGHT 8
|
||||
|
||||
#define SH1106_PAGE_ADR(N) (0x20), (N)
|
||||
#define SH1106_COL_ADR(N) (0x10 | ((N) >> 4)), ((N) & 0xFF)
|
||||
#define SH1106_COL_ADR(N) (0x10 | ((N) >> 4)), ((N) & 0xF)
|
||||
#define SH1106_COLUMN_RANGE(N,O) (0x21), (N), (O)
|
||||
#define SH1106_PAGE_RANGE(N,O) (0x22), (N), (O)
|
||||
#define SH1106_SCROLL(N) ((N) ? 0x2F : 0x2E)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#define PAGE_HEIGHT 8
|
||||
|
||||
#define SSD1309_PAGE_ADR(N) (0x20), (N)
|
||||
#define SSD1309_COL_ADR(N) (0x10 | ((N) >> 4)), ((N) & 0xFF)
|
||||
#define SSD1309_COL_ADR(N) (0x10 | ((N) >> 4)), ((N) & 0xF)
|
||||
#define SSD1309_COLUMN_RANGE(N,O) (0x21), (N), (O)
|
||||
#define SSD1309_PAGE_RANGE(N,O) (0x22), (N), (O)
|
||||
#define SSD1309_SCROLL(N) ((N) ? 0x2F : 0x2E)
|
||||
|
|
|
@ -85,72 +85,72 @@
|
|||
|
||||
/* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = {
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_RST(15), // do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
U8G_ESC_RST(15), // Do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/
|
||||
|
||||
ST7565_BIAS_MODE(0), // 0xA2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
|
||||
ST7565_ADC_REVERSE(0), // Normal ADC Select (according to Displaytech 64128N datasheet)
|
||||
|
||||
ST7565_OUT_MODE(1), // common output mode: set scan direction
|
||||
ST7565_OUT_MODE(1), // Common output mode: set scan direction
|
||||
ST7565_START_LINE(0), // Display start line for Displaytech 64128N
|
||||
|
||||
ST7565_POWER_CONTROL(0x4), // power control: turn on voltage converter
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
ST7565_POWER_CONTROL(0x4), // Power control: turn on voltage converter
|
||||
U8G_ESC_DLY(50), // Delay 50 ms
|
||||
|
||||
ST7565_POWER_CONTROL(0x6), // power control: turn on voltage regulator
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
ST7565_POWER_CONTROL(0x6), // Power control: turn on voltage regulator
|
||||
U8G_ESC_DLY(50), // Delay 50 ms
|
||||
|
||||
ST7565_POWER_CONTROL(0x7), // power control: turn on voltage follower
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
ST7565_POWER_CONTROL(0x7), // Power control: turn on voltage follower
|
||||
U8G_ESC_DLY(50), // Delay 50 ms
|
||||
|
||||
#ifdef ST7565_VOLTAGE_DIVIDER_VALUE
|
||||
// Set V5 voltage resistor ratio. Affects brightness of Displaytech 64128N
|
||||
ST7565_V5_RATIO(ST7565_VOLTAGE_DIVIDER_VALUE),
|
||||
#endif
|
||||
|
||||
ST7565_INVERTED(0), // display normal, bit val 0: LCD pixel off.
|
||||
ST7565_INVERTED(0), // Display normal, bit val 0: LCD pixel off.
|
||||
|
||||
ST7565_CONTRAST(0x1E), // Contrast value for Displaytech 64128N
|
||||
|
||||
ST7565_ON(1), // display on
|
||||
ST7565_ON(1), // Display on
|
||||
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
ST7565_ALL_PIX(1), // display all points, ST7565
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
ST7565_ALL_PIX(0), // normal display
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_END // end of sequence
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
ST7565_ALL_PIX(1), // Display all points, ST7565
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
ST7565_ALL_PIX(0), // Normal display
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_data_start[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
ST7565_COLUMN_ADR(ST7565_XOFFSET), // high 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
|
||||
U8G_ESC_END // end of sequence
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
ST7565_COLUMN_ADR(ST7565_XOFFSET), // High 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_sleep_on[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
ST7565_SLEEP_MODE(), // static indicator off
|
||||
//0x00, // indicator register set (not sure if this is required)
|
||||
ST7565_ON(0), // display off
|
||||
ST7565_ALL_PIX(1), // all points on
|
||||
U8G_ESC_CS(0), // disable chip, bugfix 12 nov 2014
|
||||
U8G_ESC_END // end of sequence
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
ST7565_SLEEP_MODE(), // Static indicator off
|
||||
//0x00, // Indicator register set (not sure if this is required)
|
||||
ST7565_ON(0), // Display off
|
||||
ST7565_ALL_PIX(1), // All points on
|
||||
U8G_ESC_CS(0), // Disable chip, bugfix 12 nov 2014
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_sleep_off[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
ST7565_ALL_PIX(0), // all points off
|
||||
ST7565_ON(1), // display on
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
U8G_ESC_CS(0), // disable chip, bugfix 12 nov 2014
|
||||
U8G_ESC_END // end of sequence
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
ST7565_ALL_PIX(0), // All points off
|
||||
ST7565_ON(1), // Display on
|
||||
U8G_ESC_DLY(50), // Delay 50 ms
|
||||
U8G_ESC_CS(0), // Disable chip, bugfix 12 nov 2014
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
uint8_t u8g_dev_st7565_64128n_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_t msg, void *arg) {
|
||||
|
@ -164,15 +164,15 @@ uint8_t u8g_dev_st7565_64128n_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_t m
|
|||
case U8G_DEV_MSG_PAGE_NEXT: {
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_data_start);
|
||||
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(pb->p.page)); /* select current page (ST7565R) */
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(pb->p.page)); // select current page (ST7565R)
|
||||
u8g_SetAddress(u8g, dev, 1); // data mode
|
||||
if (!u8g_pb_WriteBuffer(pb, u8g, dev)) return 0;
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
}
|
||||
break;
|
||||
case U8G_DEV_MSG_CONTRAST:
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // instruction mode
|
||||
u8g_WriteByte(u8g, dev, 0x81);
|
||||
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
|
@ -199,21 +199,21 @@ uint8_t u8g_dev_st7565_64128n_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_
|
|||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_data_start);
|
||||
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(2 * pb->p.page)); /* select current page (ST7565R) */
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(2 * pb->p.page)); // select current page (ST7565R)
|
||||
u8g_SetAddress(u8g, dev, 1); // data mode
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_data_start);
|
||||
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(2 * pb->p.page + 1)); /* select current page (ST7565R) */
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(2 * pb->p.page + 1)); // select current page (ST7565R)
|
||||
u8g_SetAddress(u8g, dev, 1); // data mode
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
}
|
||||
break;
|
||||
case U8G_DEV_MSG_CONTRAST:
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // instruction mode
|
||||
u8g_WriteByte(u8g, dev, 0x81);
|
||||
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
|
|
|
@ -63,22 +63,22 @@
|
|||
|
||||
/* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */
|
||||
static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = {
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_RST(15), // do reset low pulse with (15*16)+2 milliseconds (=maximum delay)
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_RST(15), // Do reset low pulse with (15*16)+2 milliseconds (=maximum delay)
|
||||
U8G_ESC_DLY(100), // 8 Dez 2012: additional delay 100 ms because of reset
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
U8G_ESC_DLY(50), // Delay 50 ms
|
||||
|
||||
0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0)
|
||||
0x00C, // display on, cursor & blink off; 0x08: all off
|
||||
0x00C, // Display on, cursor & blink off; 0x08: all off
|
||||
0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift
|
||||
0x002, // disable scroll, enable CGRAM address
|
||||
0x001, // clear RAM, needs 1.6 ms
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
0x002, // Disable scroll, enable CGRAM address
|
||||
0x001, // Clear RAM, needs 1.6 ms
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_END // end of sequence
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
void clear_graphics_DRAM(u8g_t *u8g, u8g_dev_t *dev) {
|
||||
|
@ -115,24 +115,24 @@ uint8_t u8g_dev_st7920_128x64_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
|
|||
uint8_t *ptr;
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
|
||||
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Cmd mode
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
y = pb->p.page_y0;
|
||||
ptr = (uint8_t *)pb->buf;
|
||||
for (i = 0; i < 8; i ++) {
|
||||
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
|
||||
u8g_WriteByte(u8g, dev, 0x03E ); /* enable extended mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Cmd mode
|
||||
u8g_WriteByte(u8g, dev, 0x03E ); // Enable extended mode
|
||||
|
||||
if (y < 32) {
|
||||
u8g_WriteByte(u8g, dev, 0x080 | y ); /* y pos */
|
||||
u8g_WriteByte(u8g, dev, 0x080 ); /* set x pos to 0*/
|
||||
u8g_WriteByte(u8g, dev, 0x080 | y ); // Y pos
|
||||
u8g_WriteByte(u8g, dev, 0x080 ); // Set x pos to 0
|
||||
}
|
||||
else {
|
||||
u8g_WriteByte(u8g, dev, 0x080 | (y-32) ); /* y pos */
|
||||
u8g_WriteByte(u8g, dev, 0x080 | 8); /* set x pos to 64*/
|
||||
u8g_WriteByte(u8g, dev, 0x080 | (y-32) ); // Y pos
|
||||
u8g_WriteByte(u8g, dev, 0x080 | 8); // Set x pos to 64
|
||||
}
|
||||
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
u8g_WriteSequence(u8g, dev, (LCD_PIXEL_WIDTH) / 8, ptr);
|
||||
ptr += (LCD_PIXEL_WIDTH) / 8;
|
||||
y++;
|
||||
|
@ -160,24 +160,24 @@ uint8_t u8g_dev_st7920_128x64_HAL_4x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg,
|
|||
uint8_t *ptr;
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
|
||||
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Cmd mode
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
y = pb->p.page_y0;
|
||||
ptr = (uint8_t *)pb->buf;
|
||||
for (i = 0; i < 32; i ++) {
|
||||
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
|
||||
u8g_WriteByte(u8g, dev, 0x03E ); /* enable extended mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Cmd mode
|
||||
u8g_WriteByte(u8g, dev, 0x03E ); // Enable extended mode
|
||||
|
||||
if (y < 32) {
|
||||
u8g_WriteByte(u8g, dev, 0x080 | y ); /* y pos */
|
||||
u8g_WriteByte(u8g, dev, 0x080 ); /* set x pos to 0*/
|
||||
u8g_WriteByte(u8g, dev, 0x080 | y ); // Y pos
|
||||
u8g_WriteByte(u8g, dev, 0x080 ); // Set x pos to 0
|
||||
}
|
||||
else {
|
||||
u8g_WriteByte(u8g, dev, 0x080 | (y-32) ); /* y pos */
|
||||
u8g_WriteByte(u8g, dev, 0x080 | 8); /* set x pos to 64*/
|
||||
u8g_WriteByte(u8g, dev, 0x080 | (y-32) ); // Y pos
|
||||
u8g_WriteByte(u8g, dev, 0x080 | 8); // Set x pos to 64
|
||||
}
|
||||
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
u8g_WriteSequence(u8g, dev, (LCD_PIXEL_WIDTH) / 8, ptr);
|
||||
ptr += (LCD_PIXEL_WIDTH) / 8;
|
||||
y++;
|
||||
|
@ -200,7 +200,7 @@ U8G_PB_DEV(u8g_dev_st7920_128x64_HAL_hw_spi, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT,
|
|||
u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_HW_SPI };
|
||||
|
||||
#if NONE(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32) || defined(U8G_HAL_LINKS)
|
||||
// Also use this device for HAL version of rrd class. This results in the same device being used
|
||||
// Also use this device for HAL version of RRD class. This results in the same device being used
|
||||
// for the ST7920 for HAL systems no matter what is selected in marlinui_DOGM.h.
|
||||
u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };
|
||||
#endif
|
||||
|
|
|
@ -83,59 +83,59 @@
|
|||
#define UC1701_BOOST_RATIO(N) (0xF8), (N)
|
||||
|
||||
static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = {
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_RST(1), // do reset low pulse with (1*16)+2 milliseconds
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_RST(1), // Do reset low pulse with (1*16)+2 milliseconds
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
|
||||
UC1701_RESET(), // soft reset
|
||||
UC1701_START_LINE(0), // set display start line to 0
|
||||
UC1701_RESET(), // Soft reset
|
||||
UC1701_START_LINE(0), // Set display start line to 0
|
||||
UC1701_ADC_REVERSE(0), // ADC set to reverse
|
||||
UC1701_OUT_MODE(1), // common output mode
|
||||
UC1701_INVERTED(0), // display normal, bit val 0: LCD pixel off
|
||||
UC1701_OUT_MODE(1), // Common output mode
|
||||
UC1701_INVERTED(0), // Display normal, bit val 0: LCD pixel off
|
||||
UC1701_BIAS_MODE(0), // LCD bias 1/9
|
||||
UC1701_POWER_CONTROL(0x7), // all power control circuits on
|
||||
UC1701_BOOST_RATIO(0x0), // set booster ratio to 4x
|
||||
UC1701_V5_RATIO(3), // set V0 voltage resistor ratio to large
|
||||
UC1701_CONTRAST(0x27), // set contrast
|
||||
UC1701_INDICATOR(0), // indicator disable
|
||||
UC1701_ON(1), // display on
|
||||
UC1701_POWER_CONTROL(0x7), // All power control circuits on
|
||||
UC1701_BOOST_RATIO(0x0), // Set booster ratio to 4x
|
||||
UC1701_V5_RATIO(3), // Set V0 voltage resistor ratio to large
|
||||
UC1701_CONTRAST(0x27), // Set contrast
|
||||
UC1701_INDICATOR(0), // Indicator disable
|
||||
UC1701_ON(1), // Display on
|
||||
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
|
||||
UC1701_ALL_PIX(1), // display all points, ST7565
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
UC1701_ALL_PIX(0), // normal display
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_DLY(150), // delay 150 ms before sending any data
|
||||
U8G_ESC_END // end of sequence
|
||||
UC1701_ALL_PIX(1), // Display all points, ST7565
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
U8G_ESC_DLY(100), // Delay 100 ms
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
UC1701_ALL_PIX(0), // Normal display
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_DLY(150), // Delay 150 ms before sending any data
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
#if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY, FYSETC_MINI_12864)
|
||||
UC1701_START_LINE(0), // set display start line to 0
|
||||
UC1701_START_LINE(0), // Set display start line to 0
|
||||
UC1701_ADC_REVERSE(0), // ADC set to reverse
|
||||
UC1701_OUT_MODE(1), // common output mode
|
||||
UC1701_INVERTED(0), // display normal, bit val 0: LCD pixel off
|
||||
UC1701_OUT_MODE(1), // Common output mode
|
||||
UC1701_INVERTED(0), // Display normal, bit val 0: LCD pixel off
|
||||
UC1701_BIAS_MODE(0), // LCD bias 1/9
|
||||
UC1701_POWER_CONTROL(0x7),// all power control circuits on
|
||||
UC1701_BOOST_RATIO(0x0), // set booster ratio to 4x
|
||||
UC1701_V5_RATIO(3), // set V0 voltage resistor ratio to large
|
||||
UC1701_INDICATOR(0), // indicator disable
|
||||
UC1701_ON(1), // display on
|
||||
UC1701_COLUMN_HI(0), // set upper 4 bits of the col adr to 0
|
||||
U8G_ESC_END, // end of sequence
|
||||
U8G_ESC_DLY(5) // delay 5 ms
|
||||
UC1701_POWER_CONTROL(0x7),// All power control circuits on
|
||||
UC1701_BOOST_RATIO(0x0), // Set booster ratio to 4x
|
||||
UC1701_V5_RATIO(3), // Set V0 voltage resistor ratio to large
|
||||
UC1701_INDICATOR(0), // Indicator disable
|
||||
UC1701_ON(1), // Display on
|
||||
UC1701_COLUMN_HI(0), // Set upper 4 bits of the col adr to 0
|
||||
U8G_ESC_END, // End of sequence
|
||||
U8G_ESC_DLY(5) // Delay 5 ms
|
||||
#else
|
||||
UC1701_COLUMN_ADR(0), // address 0
|
||||
U8G_ESC_END // end of sequence
|
||||
UC1701_COLUMN_ADR(0), // Address 0
|
||||
U8G_ESC_END // End of sequence
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -151,15 +151,15 @@ uint8_t u8g_dev_uc1701_mini12864_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg,
|
|||
case U8G_DEV_MSG_PAGE_NEXT: {
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
|
||||
u8g_WriteByte(u8g, dev, 0x0B0 | pb->p.page); /* select current page */
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_WriteByte(u8g, dev, 0x0B0 | pb->p.page); // Select current page
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
if (!u8g_pb_WriteBuffer(pb, u8g, dev)) return 0;
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
} break;
|
||||
|
||||
case U8G_DEV_MSG_CONTRAST:
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Instruction mode
|
||||
u8g_WriteByte(u8g, dev, 0x081);
|
||||
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
|
@ -180,20 +180,20 @@ uint8_t u8g_dev_uc1701_mini12864_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t m
|
|||
case U8G_DEV_MSG_PAGE_NEXT: {
|
||||
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
|
||||
u8g_WriteByte(u8g, dev, 0x0B0 | (2 * pb->p.page)); /* select current page */
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_WriteByte(u8g, dev, 0x0B0 | (2 * pb->p.page)); // Select current page
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
|
||||
u8g_WriteByte(u8g, dev, 0x0B0 | (2 * pb->p.page + 1)); /* select current page */
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
u8g_WriteByte(u8g, dev, 0x0B0 | (2 * pb->p.page + 1)); // Select current page
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
} break;
|
||||
|
||||
case U8G_DEV_MSG_CONTRAST:
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Instruction mode
|
||||
u8g_WriteByte(u8g, dev, 0x081);
|
||||
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// NOTE - the HAL version of the rrd device uses a generic ST7920 device.
|
||||
// See u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
|
||||
// NOTE - The HAL version of the RRD device uses a generic ST7920 device.
|
||||
// See u8g_dev_st7920_128x64_HAL.cpp
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2018 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file u8g_fontutf8.cpp
|
||||
* @brief font api for u8g lib
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2018 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file fontutf8.h
|
||||
* @brief font api for u8g lib
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
//
|
||||
|
||||
#if ANY(EDUTRONICS_12864OLED_SH1106, EDUTRONICS_12864OLED_SSD1306)
|
||||
#define LCDSCREEN_NAME "EDUTRONICS 12864 OLED"
|
||||
#define BTN_EN2 1
|
||||
#define BTN_EN1 3
|
||||
#define BTN_ENC 0
|
||||
|
|
|
@ -55,15 +55,9 @@
|
|||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 250
|
||||
#endif
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#define BOARD_ST7920_DELAY_3 250
|
||||
#endif
|
||||
|
||||
#define KILL_PIN -1 // NC
|
||||
|
|
|
@ -334,7 +334,6 @@
|
|||
//
|
||||
|
||||
#if ENABLED(ZONESTAR_12864LCD)
|
||||
#define LCDSCREEN_NAME "ZONESTAR LCD12864"
|
||||
#define LCD_SDSS_PIN 16
|
||||
#define LCD_PINS_RS 16 // ST7920 CS (LCD-4)
|
||||
#define LCD_PINS_EN 23 // ST7920 DAT LCD-R/W (LCD-5)
|
||||
|
@ -345,7 +344,6 @@
|
|||
#define BEEPER_PIN 37
|
||||
#define KILL_PIN 35
|
||||
#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define LCDSCREEN_NAME "Reprap LCD12864"
|
||||
// Use EXP1 & EXP2 connector
|
||||
#define LCD_PINS_RS 16 // ST7920 CS
|
||||
#define LCD_PINS_EN 17 // ST7920 DAT
|
||||
|
@ -362,7 +360,6 @@
|
|||
//================================================================================
|
||||
|
||||
#if ANY(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
|
||||
#define LCDSCREEN_NAME "ZONESTAR 12864OLED"
|
||||
#define LCD_SDSS_PIN 16
|
||||
#define LCD_PINS_RS 23 // RESET Pull low for 1s to init
|
||||
#define LCD_PINS_DC 17
|
||||
|
@ -386,7 +383,6 @@
|
|||
//================================================================================
|
||||
|
||||
#if ENABLED(ZONESTAR_LCD)
|
||||
#define LCDSCREEN_NAME "LCD2004 ADCKEY"
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
#define LCD_PINS_EN EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
|
|
@ -189,7 +189,6 @@
|
|||
//
|
||||
// LCD 128x64
|
||||
//
|
||||
#define LCDSCREEN_NAME "ZONESTAR_12864LCD"
|
||||
#define FORCE_SOFT_SPI
|
||||
//#define LCD_SDSS_PIN EXP1_03_PIN
|
||||
#define LCD_PINS_RS EXP1_03_PIN // ST7920 CS (LCD-4)
|
||||
|
@ -204,7 +203,6 @@
|
|||
//
|
||||
// OLED 128x64
|
||||
//
|
||||
#define LCDSCREEN_NAME "ZONESTAR 12864OLED"
|
||||
#define FORCE_SOFT_SPI
|
||||
#define LCD_PINS_RS EXP1_06_PIN
|
||||
#define LCD_PINS_DC EXP1_04_PIN
|
||||
|
|
|
@ -300,8 +300,14 @@
|
|||
#define LCD_BACKLIGHT_PIN -1
|
||||
#define FORCE_SOFT_SPI
|
||||
|
||||
#elif ENABLED(ULTI_CONTROLLER)
|
||||
|
||||
#define LCD_PINS_D6 EXP1_03_PIN
|
||||
#define DOGLCD_SCL_PIN EXP1_07_PIN // I2C1
|
||||
#define DOGLCD_SDA_PIN EXP1_08_PIN // I2C1
|
||||
|
||||
#else
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1 and MKS_LCD12864A/B are currently supported on the SKR E3 DIP."
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, ULTI_CONTROLLER, MKS_MINI_12864, FYSETC_MINI_12864_2_1 and MKS_LCD12864A/B are currently supported on the SKR E3 DIP."
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
#define DOGLCD_SCK EXP1_06_PIN
|
||||
#define DOGLCD_MOSI EXP1_08_PIN
|
||||
|
||||
#if ANY(FYSETC_MINI_12864, U8GLIB_ST7920)
|
||||
#if ANY(FYSETC_MINI_12864, IS_U8GLIB_ST7920)
|
||||
#define FORCE_SOFT_SPI
|
||||
#endif
|
||||
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
|
||||
|
|
|
@ -49,11 +49,6 @@
|
|||
//
|
||||
#define SERVO0_PIN PB0
|
||||
|
||||
//
|
||||
// Z Probe must be this pin
|
||||
//
|
||||
#define Z_MIN_PROBE_PIN PB1
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
|
@ -61,13 +56,20 @@
|
|||
#define X_MAX_PIN PF11
|
||||
#define Y_MIN_PIN PF14
|
||||
#define Y_MAX_PIN PF13
|
||||
#ifdef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
||||
#define Z_MIN_PIN PB1
|
||||
#else
|
||||
#define Z_MIN_PIN PG0
|
||||
#endif
|
||||
#define Z_MIN_PIN PG0
|
||||
#define Z_MAX_PIN PF15
|
||||
|
||||
//
|
||||
// Z Probe must be this pin
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#define Z_MIN_PROBE_PIN PB1
|
||||
#endif
|
||||
|
||||
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
#error "It's physically impossible to connect the Z Probe to the Z Min Endstop pin on this board."
|
||||
#endif
|
||||
|
||||
//
|
||||
// Filament Sensor
|
||||
//
|
||||
|
|
|
@ -192,7 +192,6 @@
|
|||
// 2 +5V
|
||||
// 1 GND
|
||||
|
||||
#define LCDSCREEN_NAME "ZONESTAR LCD12864"
|
||||
#define LCD_PINS_RS EXP1_03_PIN
|
||||
#define LCD_PINS_EN EXP1_06_PIN
|
||||
#define LCD_PINS_D4 EXP1_04_PIN
|
||||
|
@ -220,7 +219,6 @@
|
|||
// 3 RX3 PB11 KNOB_ENB
|
||||
|
||||
#define FORCE_SOFT_SPI
|
||||
#define LCDSCREEN_NAME "ZONESTAR 12864OLED"
|
||||
#define LCD_PINS_RS EXP1_06_PIN // = LCD_RESET_PIN
|
||||
#define LCD_PINS_DC EXP1_04_PIN // DC
|
||||
#define DOGLCD_CS EXP1_03_PIN // CS
|
||||
|
|
|
@ -280,7 +280,6 @@
|
|||
//
|
||||
|
||||
#if ENABLED(ZONESTAR_12864LCD)
|
||||
#define LCDSCREEN_NAME "ZONESTAR LCD12864"
|
||||
#define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_EN EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4!
|
||||
|
@ -290,7 +289,6 @@
|
|||
#define BTN_EN2 EXP1_08_PIN
|
||||
#define BTN_ENC EXP1_07_PIN
|
||||
#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864"
|
||||
#define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_EN EXP1_04_PIN // 6 DATA make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_D4 EXP1_06_PIN // 8 SCK make sure for zonestar zm3e4!
|
||||
|
@ -301,7 +299,6 @@
|
|||
#define BTN_ENC EXP1_01_PIN
|
||||
#elif ENABLED(ZONESTAR_DWIN_LCD)
|
||||
// Connect to EXP2 connector
|
||||
#define LCDSCREEN_NAME "ZONESTAR DWIN LCD"
|
||||
#define BEEPER_PIN EXP2_05_PIN
|
||||
#define KILL_PIN PC0
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
|
@ -310,7 +307,6 @@
|
|||
#endif
|
||||
|
||||
#if ENABLED(ZONESTAR_LCD2004_KNOB)
|
||||
#define LCDSCREEN_NAME "LCD2004 KNOB"
|
||||
#define LCD_PINS_RS EXP1_03_PIN
|
||||
#define LCD_PINS_EN EXP1_04_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
@ -323,7 +319,6 @@
|
|||
#define BEEPER_PIN EXP1_02_PIN
|
||||
#define KILL_PIN EXP2_07_PIN
|
||||
#elif ENABLED(ZONESTAR_LCD2004_ADCKEY)
|
||||
#define LCDSCREEN_NAME "LCD2004 5KEY"
|
||||
#define LCD_PINS_RS EXP1_03_PIN
|
||||
#define LCD_PINS_EN EXP1_04_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
|
|
|
@ -276,7 +276,6 @@
|
|||
#define WIFI_EN PC14
|
||||
|
||||
#if ENABLED(ZONESTAR_12864LCD)
|
||||
#define LCDSCREEN_NAME "ZONESTAR LCD12864"
|
||||
#define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_EN EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4!
|
||||
|
@ -286,7 +285,6 @@
|
|||
#define BTN_EN2 EXP1_08_PIN
|
||||
#define BTN_ENC EXP1_07_PIN
|
||||
#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864"
|
||||
#define LCD_PINS_RS EXP2_03_PIN // 7 CS make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_EN EXP2_06_PIN // 6 DATA make sure for zonestar zm3e4!
|
||||
#define LCD_PINS_D4 EXP2_04_PIN // 8 SCK make sure for zonestar zm3e4!
|
||||
|
@ -297,7 +295,6 @@
|
|||
#define BTN_ENC EXP2_07_PIN
|
||||
#elif ENABLED(ZONESTAR_DWIN_LCD)
|
||||
// Connect to EXP2 connector
|
||||
#define LCDSCREEN_NAME "ZONESTAR DWIN LCD"
|
||||
#define BEEPER_PIN EXP2_05_PIN // PE11
|
||||
#define KILL_PIN -1 // EXP1_01_PIN
|
||||
#define BTN_EN2 EXP2_07_PIN // PE8
|
||||
|
|
|
@ -280,7 +280,7 @@
|
|||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
|
|
|
@ -571,15 +571,9 @@
|
|||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 90
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
#endif
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 90
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
#endif
|
||||
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
|
|
|
@ -480,15 +480,9 @@
|
|||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
|
||||
//#define POWER_MONITOR_VOLTAGE_PIN PC3
|
||||
|
|
|
@ -275,14 +275,8 @@
|
|||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
|
|
|
@ -282,15 +282,9 @@
|
|||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
|
||||
//
|
||||
|
|
|
@ -308,15 +308,9 @@
|
|||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
|
||||
//
|
||||
|
|
|
@ -518,15 +518,9 @@
|
|||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_TFT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue