From ba7a3f82400626558a10bfe88e10e669a66bc205 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 2 Jun 2025 15:51:30 -0500 Subject: [PATCH] displayio api updates --- examples/buttons_example.py | 3 ++- examples/touchpaint_example.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/buttons_example.py b/examples/buttons_example.py index be6e4a4..e9a5cb1 100644 --- a/examples/buttons_example.py +++ b/examples/buttons_example.py @@ -9,6 +9,7 @@ import board import displayio +import fourwire import terminalio from adafruit_button import Button from adafruit_hx8357 import HX8357 @@ -25,7 +26,7 @@ tft_cs = board.D9 tft_dc = board.D10 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) display = HX8357(display_bus, width=480, height=320, rotation=0) i2c = board.I2C() # uses board.SCL and board.SDA diff --git a/examples/touchpaint_example.py b/examples/touchpaint_example.py index cce9009..fdc0bba 100644 --- a/examples/touchpaint_example.py +++ b/examples/touchpaint_example.py @@ -7,6 +7,7 @@ import board import displayio +import fourwire from adafruit_hx8357 import HX8357 import adafruit_ft5336 @@ -21,7 +22,7 @@ tft_cs = board.D9 tft_dc = board.D10 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) # display is rotated to align x, y with touch screen x, y display = HX8357(display_bus, width=320, height=480, rotation=90)