display: Revert "display: Add ST7567 display support (#1540)"

This reverts commit 1b92af6078.

The standard "uc1701" lcd_type can now be used in place of the custom
"st7567" lcd_type.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-12-18 12:23:09 -05:00
parent 7532e4ccea
commit 0a86190bae
4 changed files with 9 additions and 44 deletions

View File

@ -1663,14 +1663,9 @@
# The pins connected to an uc1701 type lcd. The rst_pin is # The pins connected to an uc1701 type lcd. The rst_pin is
# optional. The cs_pin and a0_pin parameters must be provided when # optional. The cs_pin and a0_pin parameters must be provided when
# using an uc1701 display. # using an uc1701 display.
#rs_pin: #contrast: 40
#cs_pin: # The contrast to set when using a uc1701 type display. The value may
#a0_pin: # range from 0 to 63. Default is 40.
# The pins connected to an st7567 type lcd. These parameters must be
# provided when using an st7567 display.
#contrast:
# The contrast to set when using a uc1701/st7567 type displays. The value
# may range from 0 to 63. Default is 40 for uc1701 and 60 for st7567.
#cs_pin: #cs_pin:
#dc_pin: #dc_pin:
#spi_bus: #spi_bus:

View File

@ -6,6 +6,11 @@ All dates in this document are approximate.
# Changes # Changes
20191218: The display config section no longer supports "lcd_type:
st7567". Use the "uc1701" display type instead - set "lcd_type:
uc1701" and change the "rs_pin: some_pin" to "rst_pin: some_pin". It
may also be necessary to add a "contrast: 60" config setting.
20191210: The builtin T0, T1, T2, ... commands have been removed. The 20191210: The builtin T0, T1, T2, ... commands have been removed. The
extruder activate_gcode and deactivate_gcode config options have been extruder activate_gcode and deactivate_gcode config options have been
removed. If these commands (and scripts) are needed then define removed. If these commands (and scripts) are needed then define

View File

@ -11,8 +11,7 @@ import menu
LCD_chips = { LCD_chips = {
'st7920': st7920.ST7920, 'hd44780': hd44780.HD44780, 'st7920': st7920.ST7920, 'hd44780': hd44780.HD44780,
'uc1701': uc1701.UC1701, 'ssd1306': uc1701.SSD1306, 'uc1701': uc1701.UC1701, 'ssd1306': uc1701.SSD1306, 'sh1106': uc1701.SH1106,
'st7567': uc1701.ST7567, 'sh1106': uc1701.SH1106,
} }
M73_TIMEOUT = 5. M73_TIMEOUT = 5.

View File

@ -2,7 +2,6 @@
# #
# Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net> # Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net>
# Copyright (C) 2018 Eric Callahan <arksine.code@gmail.com> # Copyright (C) 2018 Eric Callahan <arksine.code@gmail.com>
# Copyright (C) 2019 Dmitry Budaev <condemil@gmail.com>
# #
# This file may be distributed under the terms of the GNU GPLv3 license. # This file may be distributed under the terms of the GNU GPLv3 license.
import logging import logging
@ -187,39 +186,6 @@ class UC1701(DisplayBase):
self.send([0xA4]) # normal display self.send([0xA4]) # normal display
self.flush() self.flush()
# The ST7567 is a "4-wire" SPI display device
class ST7567(DisplayBase):
def __init__(self, config):
DisplayBase.__init__(self, SPI4wire(config, "a0_pin"))
self.contrast = config.getint('contrast', 60, minval=0, maxval=63)
ppins = config.get_printer().lookup_object('pins')
rs_pin = config.get('rs_pin')
self.reset_pin = ppins.setup_pin('digital_out', rs_pin)
self.reset_pin.setup_start_value(start_value=1., shutdown_value=0.,
is_static=False)
def init(self):
# Send init commands
init_cmds = [0xE2, # System reset
0x40, # Set display to start at line 0
0xA0, # Set SEG direction
0xC8, # Set COM Direction
0xA2, # Set Bias = 1/9
0x2F, # Boost, regulator, follower on
0xF8, # Set booster ratio
0x00, # Booster ratio value (4x)
0x23, # Set regulation ratio (3)
0x81, # Set Electronic Volume
self.contrast, # Electronic Volume value
# 0xAC, # Set static indicator off
# 0x00, # NOP
0xA6, # Disable Inverse
0xAF] # Set display enable
self.send(init_cmds)
self.send([0xA5]) # display all
self.send([0xA4]) # normal display
self.flush()
logging.info("st7567 initialized")
# The SSD1306 supports both i2c and "4-wire" spi # The SSD1306 supports both i2c and "4-wire" spi
class SSD1306(DisplayBase): class SSD1306(DisplayBase):
def __init__(self, config, columns=128): def __init__(self, config, columns=128):