zephyr_display – Display access for Zephyr boards
This module provides Display, a displayio display class for the device selected by
the zephyr,display devicetree chosen property.
Note
This module is Zephyr-specific. On other ports the equivalent class is one of
the displayio display classes, such as busdisplay.BusDisplay.
Available on these boards
- class zephyr_display.Display(*, rotation: int = 0, auto_refresh: bool = True)
Manage the display selected by the Zephyr devicetree
There is no display bus argument because the device comes from the
zephyr,displaychosen devicetree node.Creating a
Displayreleases the display built during startup (supervisor.runtime.display), as with other display classes.Create a
Displayfor thezephyr,displaydevice.- Parameters:
- refresh(*, target_frames_per_second: int | None = None, minimum_frames_per_second: int = 0) bool
When auto_refresh is off, and
target_frames_per_secondis notNonethis waits for the target frame rate and then refreshes the display, returningTrue. If the call has taken too long since the last refresh call for the given target frame rate, then the refresh returnsFalseimmediately without updating the screen to try to keep latency low.If the time since the last successful refresh is below the minimum frame rate, then an exception will be raised. The default
minimum_frames_per_secondof 0 disables this behavior.When auto_refresh is off, and
target_frames_per_secondisNonethis will update the display immediately. When auto_refresh is on, it updates the display immediately too; the display also updates without calls to this.
- brightness: float
The brightness of the display as a float. 0.0 is off and 1.0 is full brightness.
Note
Zephyr displays do not implement brightness control yet, so reading or writing this raises
RuntimeError.
- root_group: displayio.Group | None
The
displayio.Groupthat is drawn on the display, orNonewhen the display is cleared.A
displayio.Groupcan only be the root group of one display at a time. Setting a group that is already in use raisesValueError.