#from drivers.ili93xx.ili9341 import ILI9341 as SSD # 4-bit buffer, also supports grayscale/greyscale
fromdrivers.ili93xx.ili9341_8bitimportILI9341asSSD# 8-bit buffer (needs more 2x memory of 4-bit driver) - does not support grayscale/greyscale, for non-color use matching r, g, b values.
# setting usd to True will correct this - https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#32-drivers-for-ili9341
# landscape - CYD1
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, usd=True) # CYD - with single USB port, height=240, width=320 - works in landscape mode
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, usd=True, rotated=True) # CYD - with single USB port, height=240, width=320 - works in landscape mode
##ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, usd=True, rotated=False) # CYD - with single USB port, height=240, width=320 - GARBAGE displayed
# portrait - CYD1
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=320, width=240, usd=False, rotated=False) # CYD - with single USB port - works in portrait mode, with USB at top of screen
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=320, width=240, usd=True, rotated=False) # CYD - with single USB port - works in portrait mode, with USB at bottom of screen
##ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=320, width=240, usd=False, rotated=True) # CYD - with single USB port - GARBAGE displayed
##################################
# NOTE on CYD2 display is rotated, in comparison to CYD1
# landscape - CYD2
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=240, width=320, usd=False, rotated=False) # CYD2 with 2x USB ports
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=240, width=320, usd=True, rotated=False) # CYD2 with 2x USB ports, upside down
####this does not work. Still figuring out nano landscape options for CYD2
# portrait - CYD2
# CYD2 - with 2 USB ports - NOTE when screen inits get static
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=320, width=240, usd=False, rotated=True) # CYD2 with 2x USB ports, this works for portrait viewing, with USB at bottom of screen
#ssd = SSD(spi, dc=pdc, cs=pcs, rst=prst, height=320, width=240, usd=True, rotated=True) # CYD2 with 2x USB ports, this works for portrait viewing, with USB at top of screen