pub struct NoiseCtrl(/* private fields */);Expand description
Channel 4 control (NR44).
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7 | trigger | W | (Re)start the channel. |
| 6 | length_enable | R/W | Stop the channel when the length timer expires. |
| 5-0 | — | Unused. |
Implementations§
Source§impl NoiseCtrl
impl NoiseCtrl
Sourcepub const fn length_enable(&self) -> bool
pub const fn length_enable(&self) -> bool
Stop the channel when the length timer expires.
Bits: 6..7
Sourcepub const fn with_length_enable_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_length_enable_checked(self, value: bool) -> Result<Self, ()>
Stop the channel when the length timer expires.
Bits: 6..7
Sourcepub const fn with_length_enable(self, value: bool) -> Self
pub const fn with_length_enable(self, value: bool) -> Self
Stop the channel when the length timer expires.
Bits: 6..7
Sourcepub const fn set_length_enable(&mut self, value: bool)
pub const fn set_length_enable(&mut self, value: bool)
Stop the channel when the length timer expires.
Bits: 6..7
Sourcepub const fn set_length_enable_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_length_enable_checked(&mut self, value: bool) -> Result<(), ()>
Stop the channel when the length timer expires.
Bits: 6..7
Sourcepub const fn with_trigger_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_trigger_checked(self, value: bool) -> Result<Self, ()>
Trigger (write-only): (re)start the channel.
Bits: 7..8
Sourcepub const fn with_trigger(self, value: bool) -> Self
pub const fn with_trigger(self, value: bool) -> Self
Trigger (write-only): (re)start the channel.
Bits: 7..8
Sourcepub const fn set_trigger(&mut self, value: bool)
pub const fn set_trigger(&mut self, value: bool)
Trigger (write-only): (re)start the channel.
Bits: 7..8
Trait Implementations§
impl Copy for NoiseCtrl
impl Eq for NoiseCtrl
impl StructuralPartialEq for NoiseCtrl
Auto Trait Implementations§
impl BankSafe for NoiseCtrl
impl Freeze for NoiseCtrl
impl RefUnwindSafe for NoiseCtrl
impl Send for NoiseCtrl
impl Sync for NoiseCtrl
impl Unpin for NoiseCtrl
impl UnsafeUnpin for NoiseCtrl
impl UnwindSafe for NoiseCtrl
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