mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 04:54:11 -06:00
uc1701: make contrast configurable
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
9bd3e80421
commit
2e16be224e
2 changed files with 5 additions and 1 deletions
|
@ -153,6 +153,7 @@ class I2C:
|
|||
class UC1701(DisplayBase):
|
||||
def __init__(self, config):
|
||||
DisplayBase.__init__(self, SPI4wire(config, "a0_pin"))
|
||||
self.contrast = config.getint('contrast', 40, minval=0, maxval=63)
|
||||
def init(self):
|
||||
init_cmds = [0xE2, # System reset
|
||||
0x40, # Set display to start at line 0
|
||||
|
@ -166,7 +167,7 @@ class UC1701(DisplayBase):
|
|||
0x00, # Booster ratio value (4x)
|
||||
0x23, # Set resistor ratio (3)
|
||||
0x81, # Set Electronic Volume
|
||||
0x28, # Electronic volume value (40)
|
||||
self.contrast, # Electronic Volume value
|
||||
0xAC, # Set static indicator off
|
||||
0x00, # NOP
|
||||
0xA6, # Disable Inverse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue