Struct moa_peripherals_yamaha::sn76489::ToneGenerator
source · struct ToneGenerator {
on: bool,
attenuation: f32,
wave: SquareWave,
}
Fields§
§on: bool
§attenuation: f32
§wave: SquareWave
Implementations§
source§impl ToneGenerator
impl ToneGenerator
fn new(sample_rate: usize) -> Self
fn set_attenuation(&mut self, attenuation: u8)
fn set_counter(&mut self, count: usize)
fn get_sample(&mut self) -> f32
Trait Implementations§
source§impl Clone for ToneGenerator
impl Clone for ToneGenerator
source§fn clone(&self) -> ToneGenerator
fn clone(&self) -> ToneGenerator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ToneGenerator
impl RefUnwindSafe for ToneGenerator
impl Send for ToneGenerator
impl Sync for ToneGenerator
impl Unpin for ToneGenerator
impl UnwindSafe for ToneGenerator
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
source§impl<T, S> IntoAddress<T> for Swhere
T: FromAddress<S>,
impl<T, S> IntoAddress<T> for Swhere
T: FromAddress<S>,
source§fn into_address(self) -> T
fn into_address(self) -> T
Translate the given address into an address of type
T