Expand description
Display backend abstraction for DMA-based rendering.
This module provides a platform-agnostic interface for asynchronous framebuffer transfers using DMA (Direct Memory Access). This enables double-buffered rendering where the CPU can render to one buffer while the display hardware transfers another buffer.
§Safety
The key safety property of this API is that start_dma_transfer takes
ownership of the framebuffer and returns a DmaTransfer token. The
buffer is locked inside the token for the duration of the transfer —
the compiler prevents any access to it until DmaTransfer::wait
returns it. This eliminates the data race that arises from the
previous borrow-based API, where DMA could be reading from memory that
the CPU was free to overwrite.
Re-exports§
pub use crate::present::PresentRegion as DisplayRegion;
Structs§
- Completed
Transfer - A transfer token that is already complete.
- Simulator
Backend - No-op display backend for simulators and testing.
- Transfer
Error - Returned when a DMA transfer fails to start.
Enums§
- Display
Error - Error types for display backend operations.
Traits§
- Async
DmaTransfer - An asynchronous DMA transfer that can be awaited as a future.
- Display
Backend - Platform-agnostic display backend trait.
- DmaTransfer
- An in-progress DMA transfer that holds the framebuffer until completion.