Skip to content

Commit

Permalink
Merge pull request #18 from prcutler/root-group-fix
Browse files Browse the repository at this point in the history
Update to use fourwire and root_group for CP 9 compatibility
  • Loading branch information
dhalbert authored Nov 3, 2023
2 parents 1d9c144 + 16120f1 commit 18470db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Usage Example
import board
import busio
import displayio
import fourwire
import adafruit_ssd1325
displayio.release_displays()
Expand All @@ -73,7 +74,7 @@ Usage Example
tft_dc = board.D8
tft_reset = board.D7
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_reset,
display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_reset,
baudrate=1000000)
time.sleep(1)
display = adafruit_ssd1325.SSD1325(display_bus, width=128, height=64)
Expand Down
5 changes: 3 additions & 2 deletions examples/ssd1325_gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import board
import displayio
import fourwire
import adafruit_ssd1325

displayio.release_displays()
Expand All @@ -13,7 +14,7 @@
oled_dc = board.D6
oled_reset = board.D9

display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=oled_dc, chip_select=oled_cs, reset=oled_reset, baudrate=1000000
)
time.sleep(1)
Expand All @@ -40,6 +41,6 @@

g.append(t)

display.show(g)
display.root_group = g

time.sleep(10)
5 changes: 3 additions & 2 deletions examples/ssd1325_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import board
import displayio
import fourwire
import terminalio
from adafruit_display_text import label
import adafruit_ssd1325
Expand All @@ -18,7 +19,7 @@
spi = board.SPI()
oled_cs = board.D5
oled_dc = board.D6
display_bus = displayio.FourWire(
display_bus = fourwire.FourWire(
spi, command=oled_dc, chip_select=oled_cs, baudrate=1000000, reset=board.D9
)

Expand All @@ -36,7 +37,7 @@

# Make the display context
splash = displayio.Group()
display.show(splash)
display.root_group = splash

color_bitmap = displayio.Bitmap(display.width, display.height, 1)
color_palette = displayio.Palette(1)
Expand Down

0 comments on commit 18470db

Please sign in to comment.