Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters to users
Imagine a calendar, weather display, daily planner or reading dashboard that stays visible even when the reader goes to sleep. Today an application can draw that screen, but cannot directly publish the result as an image. Giving it access to the existing framebuffer capture mechanism makes that possible without asking the firmware to implement a new sleep-screen feature for every application.
A working integration uses this approach to generate a custom sleep image while preserving the user's original wallpaper. A file rename is useful here because the guest does not need to load a whole image into its limited memory just to move it. The same capability benefits downloaded files and application-generated caches.
The intention is to let apps own their output and leave ordinary custom sleep-screen behavior in the firmware. The host must still authorize the affected files; this is not unrestricted storage access.
Summary
Adds two general-purpose primitives to the Dessen SDK, expanding application capabilities without introducing application-specific firmware functionality.
Framebuffer screenshot
dsn_screenshot(path)Allows applications to capture the current framebuffer as a BMP at an authorized filesystem location. Hosts can reuse existing native screenshot functionality rather than introduce a separate capture engine.
Potential uses include application-generated sleep screens, weather and calendar displays, personal dashboards, artwork, and exporting application output for documentation or debugging.
Filesystem rename
dsn_fs_rename(source, destination)Moves a regular file without copying its contents through guest memory. This complements the existing filesystem read, write, list and delete operations, and is particularly useful on memory-constrained devices.
Potential uses include configuration backups, publishing completed downloads, managing generated images, staging cache files and recovering from interrupted operations.
Permissions and isolation
DSN_ERR_UNAVAILABLE. An empty screenshot path probes host support.Practical example
An application can render a calendar, daily schedule, weather forecast or artwork and publish it as
/sleep.bmp, with the appropriate permissions. The firmware's existing custom sleep-screen behavior can display that image. The same primitives let the application preserve and restore the original custom image.This keeps application behavior in the application, while the SDK exposes small reusable capabilities.
Implementation
Actual framebuffer capture and device-specific permission enforcement are provided by the firmware host. This PR deliberately does not include firmware-side changes or an application-specific API.
Testing
Full upstream
make testpassed with Rust 1.97.1, the pinned FreeInk SDK and locked XPUI dependencies.