pub struct AudioInterface { /* private fields */ }
Expand description
A wrapper around a mutable reference to the Audio Interface’s memory mapped registers.
See AudioInterface::new()
for usage details.
Implementations§
Source§impl AudioInterface
impl AudioInterface
Sourcepub unsafe fn new() -> Self
pub unsafe fn new() -> Self
Creates a new wrapped mutable reference to the Audio Interface’s memory mapped registers, starting at 0xA4500000
.
Developers are recommended to use Hardware::take()
instead.
But for unrestricted, unsafe, access, this struct provides a method-based version to the
static functions available at the module level.
§Safety
This provides unrestricted access to memory mapped registers. Data races could occur if writing to a register in both regular code and inside interrupt handlers.
This is especially problematic if performing a read-modify-write operation; an interrupt could trigger between reading a register, and writing a modified value back to the same register. Thus anything written to that register inside the interrupt, would only apply for a short moment before being overwritten.
Trait Implementations§
Source§impl Deref for AudioInterface
impl Deref for AudioInterface
Auto Trait Implementations§
impl Freeze for AudioInterface
impl RefUnwindSafe for AudioInterface
impl Send for AudioInterface
impl Sync for AudioInterface
impl Unpin for AudioInterface
impl !UnwindSafe for AudioInterface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, U> UnsafeFrom<U> for Twhere
T: From<U>,
impl<T, U> UnsafeFrom<U> for Twhere
T: From<U>,
Source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls T::from(other)
.
That is, this conversion is whatever the implementation of From
<U> for T
chooses to
do.
Source§impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
Source§unsafe fn unsafe_into(self) -> U
unsafe fn unsafe_into(self) -> U
Calls U::unsafe_from(self)
.
That is, this conversion is whatever the implementation of UnsafeFrom
<T> for U
chooses to do.