Expand description
This crate provides an async/await interface for controlling Waveshare E-Paper displays.
It is built on top of embedded-hal-async and embedded-graphics, making it compatible with a
wide range of embedded platforms.
§Core traits
§Hardware
The use must implement the EpdHw trait for their hardware. This trait abstracts over the
underlying hardware components required to control an E-Paper display, including SPI
communication, GPIO pins (for Data/Command, Reset, and Busy and a delay timer. You need to
implement this trait for your chosen peripherals. This trades off some set up code (implementing
this trait), for simple type signatures with fewer generic parameters.
§Functionality
Functionality is split into composable traits, to enable granular support per display, and stateful functionality that can be checked at compilation time.
- Reset: basic hardware reset support
- Sleep: displays that can be put to sleep
- Wake: displays that can be woken from sleep
- DisplaySimple: basic support for writing and displaying a single framebuffer
- DisplayPartial: support for partial refresh using a diff
Additionally, the crate provides:
buffermodule: Contains utilities for creating and managing efficient display buffers that implementembedded-graphics::DrawTarget. These are designed to be fast and compact.- various
<display>modules: each display lives in its own module, such asepd2in9for the 2.9“ e-paper display.
Modules§
Enums§
- Error
- Indicates usage errors due to incorrect states.
Traits§
- Display
Partial - Displays that support a partial update, where a “diff” framebuffer is diffed against a base framebuffer, and only the changed pixels from the diff are actually updated.
- Display
Simple - Simple displays that support writing and displaying framebuffers of a certain bit configuration.
- Displayable
- Base trait for any display where the display can be updated separate from its framebuffer data.
- EpdHw
- Provides access to the hardware needed to control an EPD.
- Reset
- Displays that have a hardware reset.
- Sleep
- Displays that can sleep to save power.
- Wake
- Displays that can be woken from a sleep state.