bernii / embedded-graphics-framebuf

Generic framebuffer implementation in Rust for use with embedded-graphics library
MIT License
26 stars 7 forks source link

Implementing `ReadBuffer` for `&mut [C;N]` might be unsound #24

Open jounathaen opened 7 months ago

jounathaen commented 7 months ago

As mentioned in https://github.com/bernii/embedded-graphics-framebuf/pull/23, we basically implement ReadBuffer for all &mut [C;N] in https://github.com/bernii/embedded-graphics-framebuf/blob/4205fb28cf413c04a5d711d345482a409f2c606c/src/backends.rs#L92

This might be problematic because the slice could not be suitable for DMA access. Maybe it is already fine as is, but as I haven't fully thought this through, I'll leave this as an issue for now.