[−][src]Struct gba_hal::data::NoiseFrequencyControl
Noise channel frequency and master control setting
Frequency is 524288 / r / 2^(s+1)
Hz. For r=0 assume r=0.5 instead.
- 0-2: divide ratio
r
- 3: Use a 7-bit counter (true) or 15-bit counter (false)
- 4-7: shift clock frequency
s
- 14: Stop output when length expires
- 15 (wo): Initialize / restart the sound.
Methods
impl NoiseFrequencyControl
[src]
impl NoiseFrequencyControl
[src]
pub const DIVIDE_RATIO_MASK: u16
[src]
pub const fn divide_ratio(self) -> u16
[src]
pub const fn with_divide_ratio(self, divide_ratio: u16) -> Self
[src]
pub const COUNTER_IS_7BIT_BIT: u16
[src]
pub const fn counter_is_7bit(self) -> bool
[src]
pub const fn with_counter_is_7bit(self, bit: bool) -> Self
[src]
pub const SHIFT_CLOCK_FREQUENCY_MASK: u16
[src]
pub const fn shift_clock_frequency(self) -> u16
[src]
pub const fn with_shift_clock_frequency(
self,
shift_clock_frequency: u16
) -> Self
[src]
self,
shift_clock_frequency: u16
) -> Self
pub const LENGTH_FLAG_BIT: u16
[src]
pub const fn length_flag(self) -> bool
[src]
pub const fn with_length_flag(self, bit: bool) -> Self
[src]
pub const INITIALIZE_BIT: u16
[src]
pub const fn initialize(self) -> bool
[src]
pub const fn with_initialize(self, bit: bool) -> Self
[src]
Trait Implementations
impl PartialEq<NoiseFrequencyControl> for NoiseFrequencyControl
[src]
fn eq(&self, other: &NoiseFrequencyControl) -> bool
[src]
fn ne(&self, other: &NoiseFrequencyControl) -> bool
[src]
impl Eq for NoiseFrequencyControl
[src]
impl Debug for NoiseFrequencyControl
[src]
impl Copy for NoiseFrequencyControl
[src]
impl Clone for NoiseFrequencyControl
[src]
fn clone(&self) -> NoiseFrequencyControl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for NoiseFrequencyControl
[src]
fn default() -> NoiseFrequencyControl
[src]
Auto Trait Implementations
impl Send for NoiseFrequencyControl
impl Sync for NoiseFrequencyControl
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,