-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an iterator over XFB rows #25
base: main
Are you sure you want to change the base?
Conversation
libstd’s runtime changed the prototype of lang = "start" in ddee45e1d7fd34563c13513d974f792fae41a2f7 to support changing the SIGPIPE behaviour on Linux, so this function now takes a third argument on every platform. Additionally, it now supports user_main() returning any Termination, so we don’t need a transmute() any longer. :)
This fixes the build on current nightly (since 2023-04-22).
This emits slices of u16, and allows users to not use unsafe for drawing.
|
||
/// A struct representing the eXternal FrameBuffer, or XFB. It represents the image that will be | ||
/// sent to the screen, in YUYV format. It must be allocated as contiguous physical memory. | ||
pub struct Xfb { | ||
data: Pin<Box<[u8]>>, | ||
data: Box<[u16]>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data needs to be pinned for the duration of the use of the XFB due to mmio usage. Rust doesn't confirm that the pointer wont move.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides one small issue it all looks awesome!
This emits slices of
u16
, and allows users to not use unsafe for drawing.This is based on #21, since it wouldn’t build on current nightly otherwise.