pub struct AudioCtrl(/* private fields */);Expand description
Audio master control (NR52).
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7 | audio_on | R/W | Master audio power; off clears and locks the other registers. |
| 6-4 | — | Unused. | |
| 3 | ch4_on | RO | Channel 4 (noise) is running. |
| 2 | ch3_on | RO | Channel 3 (wave) is running. |
| 1 | ch2_on | RO | Channel 2 (pulse) is running. |
| 0 | ch1_on | RO | Channel 1 (pulse) is running. |
Implementations§
Source§impl AudioCtrl
impl AudioCtrl
Sourcepub const fn audio_on(&self) -> bool
pub const fn audio_on(&self) -> bool
Master audio power. Turning it off clears and locks the other registers.
Bits: 7..8
Sourcepub const fn with_audio_on_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_audio_on_checked(self, value: bool) -> Result<Self, ()>
Master audio power. Turning it off clears and locks the other registers.
Bits: 7..8
Sourcepub const fn with_audio_on(self, value: bool) -> Self
pub const fn with_audio_on(self, value: bool) -> Self
Master audio power. Turning it off clears and locks the other registers.
Bits: 7..8
Sourcepub const fn set_audio_on(&mut self, value: bool)
pub const fn set_audio_on(&mut self, value: bool)
Master audio power. Turning it off clears and locks the other registers.
Bits: 7..8
Trait Implementations§
impl Copy for AudioCtrl
impl Eq for AudioCtrl
impl StructuralPartialEq for AudioCtrl
Auto Trait Implementations§
impl BankSafe for AudioCtrl
impl Freeze for AudioCtrl
impl RefUnwindSafe for AudioCtrl
impl Send for AudioCtrl
impl Sync for AudioCtrl
impl Unpin for AudioCtrl
impl UnsafeUnpin for AudioCtrl
impl UnwindSafe for AudioCtrl
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
Mutably borrows from an owned value. Read more