Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api_drivers/common_api_drivers/display/st7796/_st7796_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
_VCMPCTL = const(0xC5)
_PGC = const(0xE0)
_NGC = const(0xE1)
_INVON = const(0x21)
_DISPON = const(0x29)

_EM = const(0xB7)
Expand Down Expand Up @@ -118,6 +119,10 @@ def init(self):

time.sleep_ms(120) # NOQA

# IPS panels are normally-inverted: without INVON the whole display
# renders in negative. The st7789 init does the same.
self.set_params(_INVON)

self.set_params(_DISPON)

time.sleep_ms(120) # NOQA