Skip to content
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

Build failure #73

Open
thejpster opened this issue Feb 3, 2025 · 0 comments
Open

Build failure #73

thejpster opened this issue Feb 3, 2025 · 0 comments

Comments

@thejpster
Copy link
Member

error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
   --> src/spi.rs:230:12
    |
230 |         unsafe { core::ptr::write_volatile(&self.dev.dr as *const _ as *mut u8, data) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
    = note: even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get`
    = note: `#[deny(invalid_reference_casting)]` on by default

error: could not compile `neotron-bmc-pico` (lib) due to 1 previous error

Seen in #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant