Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 3 additions & 8 deletions adafruit_gizmo/tft_gizmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,15 @@
class TFT_Gizmo(ST7789):
"""Class representing a TFT Gizmo."""

def __init__(self, *, spi=None, cs=None, dc=None, backlight=None):
def __init__(self, *, spi=None, cs=board.RX, dc=board.TX,
backlight=board.A3, rotation=180):
displayio.release_displays()
if spi is None:
import busio
spi = busio.SPI(board.SCL, MOSI=board.SDA)
if cs is None:
cs = board.RX
if dc is None:
dc = board.TX
if backlight is None:
backlight = board.A3
self._display_bus = displayio.FourWire(spi,
command=dc,
chip_select=cs)
super().__init__(self._display_bus, width=240, height=240,
rowstart=80, backlight_pin=backlight,
rotation=180)
rotation=rotation)
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Uncomment the below if you use native CircuitPython modules such as
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
autodoc_mock_imports = ["adafruit_st7789", "digitalio", "busio", "displayio"]
autodoc_mock_imports = ["adafruit_st7789", "digitalio", "busio", "displayio", "board"]


intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
Expand Down