[][src]Struct gba_hal::data::NoiseFrequencyControl

#[repr(transparent)]
pub struct 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]

pub const fn new() -> Self[src]

A const "zero value" constructor

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]

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]

impl Eq for NoiseFrequencyControl[src]

impl Debug for NoiseFrequencyControl[src]

impl Copy for NoiseFrequencyControl[src]

impl Clone for 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]

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]