restored power_up()

power_up()
* voltages
* border waveform
* RAM X/Y COUNT

had been dropped during 'z' troubleshooting, but test clean now so added back to match SSD1680 behavior.
This commit is contained in:
Mikey Sklar 2024-12-01 19:58:21 -08:00
parent 1be3100af8
commit 6d0086efe6

View file

@ -247,12 +247,27 @@ class Adafruit_SSD1680Z(Adafruit_SSD1680):
bytearray([self._height, (self._height) >> 8, 0x00]),
)
self.command(_SSD1680_DATA_MODE, bytearray([0x03]))
# Set voltages
self.command(_SSD1680_WRITE_VCOM_REG, bytearray([0x36]))
self.command(_SSD1680_GATE_VOLTAGE, bytearray([0x17]))
self.command(_SSD1680_SOURCE_VOLTAGE, bytearray([0x41, 0x00, 0x32]))
self.command(_SSD1680_SET_RAMXPOS, bytearray([0x00, (self._width // 8)]))
self.command(
_SSD1680_SET_RAMYPOS,
bytearray([0x00, 0x00, self._height, (self._height) >> 8]),
)
# Set border waveform
self.command(_SSD1680_WRITE_BORDER, bytearray([0x05]))
# Set ram X count
self.command(_SSD1680_SET_RAMXCOUNT, bytearray([0x01]))
# Set ram Y count
self.command(_SSD1680_SET_RAMYCOUNT, bytearray([self._height, 0]))
self.busy_wait()
def update(self):
"""Update the display specifically for SSD1680Z."""
self.command(_SSD1680_DISP_CTRL2, bytearray([0xF7])) # Full update for SSD1680Z