Compare commits
No commits in common. "main" and "2.0.0" have entirely different histories.
2 changed files with 4 additions and 7 deletions
|
|
@ -12,7 +12,7 @@ sphinx:
|
||||||
configuration: docs/conf.py
|
configuration: docs/conf.py
|
||||||
|
|
||||||
build:
|
build:
|
||||||
os: ubuntu-lts-latest
|
os: ubuntu-20.04
|
||||||
tools:
|
tools:
|
||||||
python: "3"
|
python: "3"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,11 @@ Usage Example
|
||||||
import fourwire
|
import fourwire
|
||||||
import adafruit_ili9341
|
import adafruit_ili9341
|
||||||
|
|
||||||
# If you use explicit pins with busio.SPI(...), calling release_displays() first
|
|
||||||
# prevents "pin in use" errors on subsequent reloads.
|
|
||||||
displayio.release_displays()
|
|
||||||
|
|
||||||
spi = board.SPI()
|
spi = board.SPI()
|
||||||
tft_cs = board.D9
|
tft_cs = board.D9
|
||||||
tft_dc = board.D10
|
tft_dc = board.D10
|
||||||
|
|
||||||
|
displayio.release_displays()
|
||||||
display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs)
|
display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs)
|
||||||
|
|
||||||
display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)
|
display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)
|
||||||
|
|
@ -60,8 +57,8 @@ Usage Example
|
||||||
color_palette[0] = 0xFF0000
|
color_palette[0] = 0xFF0000
|
||||||
|
|
||||||
bg_sprite = displayio.TileGrid(color_bitmap,
|
bg_sprite = displayio.TileGrid(color_bitmap,
|
||||||
pixel_shader=color_palette,
|
pixel_shader=color_palette,
|
||||||
x=0, y=0)
|
x=0, y=0)
|
||||||
splash.append(bg_sprite)
|
splash.append(bg_sprite)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue