pub struct NoiseFreq(/* private fields */);Expand description
Channel 4 frequency and randomness (NR43).
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7-4 | shift | R/W | Clock shift. |
| 3 | short_lfsr | R/W | LFSR width: set = 7-bit (more tonal), clear = 15-bit. |
| 2-0 | divider | R/W | Clock divider. |
Implementations§
Source§impl NoiseFreq
impl NoiseFreq
Sourcepub const fn with_divider_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_divider_checked(self, value: u8) -> Result<Self, ()>
Clock divider.
Bits: 0..3
Sourcepub const fn with_divider(self, value: u8) -> Self
pub const fn with_divider(self, value: u8) -> Self
Clock divider.
Bits: 0..3
Sourcepub const fn set_divider(&mut self, value: u8)
pub const fn set_divider(&mut self, value: u8)
Clock divider.
Bits: 0..3
Sourcepub const fn set_divider_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_divider_checked(&mut self, value: u8) -> Result<(), ()>
Clock divider.
Bits: 0..3
Sourcepub const fn short_lfsr(&self) -> bool
pub const fn short_lfsr(&self) -> bool
LFSR width: false = 15-bit, true = 7-bit (more tonal).
Bits: 3..4
Sourcepub const fn with_short_lfsr_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_short_lfsr_checked(self, value: bool) -> Result<Self, ()>
LFSR width: false = 15-bit, true = 7-bit (more tonal).
Bits: 3..4
Sourcepub const fn with_short_lfsr(self, value: bool) -> Self
pub const fn with_short_lfsr(self, value: bool) -> Self
LFSR width: false = 15-bit, true = 7-bit (more tonal).
Bits: 3..4
Sourcepub const fn set_short_lfsr(&mut self, value: bool)
pub const fn set_short_lfsr(&mut self, value: bool)
LFSR width: false = 15-bit, true = 7-bit (more tonal).
Bits: 3..4
Sourcepub const fn set_short_lfsr_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_short_lfsr_checked(&mut self, value: bool) -> Result<(), ()>
LFSR width: false = 15-bit, true = 7-bit (more tonal).
Bits: 3..4
Sourcepub const fn with_shift_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_shift_checked(self, value: u8) -> Result<Self, ()>
Clock shift.
Bits: 4..8
Sourcepub const fn with_shift(self, value: u8) -> Self
pub const fn with_shift(self, value: u8) -> Self
Clock shift.
Bits: 4..8
Trait Implementations§
impl Copy for NoiseFreq
impl Eq for NoiseFreq
impl StructuralPartialEq for NoiseFreq
Auto Trait Implementations§
impl BankSafe for NoiseFreq
impl Freeze for NoiseFreq
impl RefUnwindSafe for NoiseFreq
impl Send for NoiseFreq
impl Sync for NoiseFreq
impl Unpin for NoiseFreq
impl UnsafeUnpin for NoiseFreq
impl UnwindSafe for NoiseFreq
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