[][src]Struct gba_hal::data::Sweep

#[repr(transparent)]
pub struct Sweep(_);

Controls the sweep effect (Pulse A only).

  • 0-2: Shift number
  • 3: Sweep is decreasing or increasing
  • 4-6: Time per sweep. Units of x/128 sec aka x * 7.8 ms

If sweep is disabled by setting sweep time to 0, the sweep should also be set to decreasing mode.

Methods

impl Sweep[src]

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

A const "zero value" constructor

impl Sweep[src]

pub const SHIFT_NUM_MASK: u8[src]

pub const fn shift_num(self) -> u8[src]

pub const fn with_shift_num(self, shift_num: u8) -> Self[src]

pub const DECREASING_BIT: u8[src]

pub const fn decreasing(self) -> bool[src]

pub const fn with_decreasing(self, bit: bool) -> Self[src]

pub const TIMER_MASK: u8[src]

pub const fn timer(self) -> u8[src]

pub const fn with_timer(self, timer: u8) -> Self[src]

Trait Implementations

impl PartialEq<Sweep> for Sweep[src]

impl Eq for Sweep[src]

impl Debug for Sweep[src]

impl Copy for Sweep[src]

impl Clone for Sweep[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Sweep[src]

Auto Trait Implementations

impl Send for Sweep

impl Sync for Sweep

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]