[−][src]Struct tpa2016d2::Tpa2016d2
Representation of a Texas Instruments TPA2016d2 audio amplifier
Methods
impl<I2C, E> Tpa2016d2<I2C> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
I2C: Write<Error = E> + WriteRead<Error = E>,
pub fn new(i2c: I2C) -> Tpa2016d2<I2C>
[src]
Creates a new device connected through the supplied i2c device
pub fn sync(&mut self) -> Result<(), E>
[src]
Read all registers and update our view of the registers
pub fn release(self) -> I2C
[src]
Consume the device and release the i2c device
pub fn device_reg(&mut self, idx: u8) -> Result<u8, E>
[src]
pub fn speaker_enable(&mut self, le: bool, re: bool) -> Result<(), E>
[src]
Enable or disable speakers
pub fn get_faults(&mut self) -> Result<Faults, E>
[src]
pub fn disable_device(&mut self) -> Result<(), E>
[src]
Shutdown the device Control, Bias and Oscillators are disabled
pub fn noise_gate(&mut self, enable: bool) -> Result<(), E>
[src]
pub fn set_attack_time(&mut self, val: u8) -> Result<(), E>
[src]
pub fn set_release_time(&mut self, val: u8) -> Result<(), E>
[src]
Set release time / per 6 dB
pub fn set_hold_time(&mut self, val: u8) -> Result<(), E>
[src]
pub fn gain(&mut self, gain: u8) -> Result<(), E>
[src]
Set the gain
pub fn noise_gate_threshold(&mut self, val: NoiseGateThreshold) -> Result<(), E>
[src]
pub fn output_limiter_level(&mut self, val: u8) -> Result<(), E>
[src]
pub fn compression_ratio(&mut self, ratio: CompressionRatio) -> Result<(), E>
[src]
pub fn set_agc_preset(&mut self, preset: AgcPreset) -> Result<(), E>
[src]
Auto Trait Implementations
impl<I2C> Send for Tpa2016d2<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for Tpa2016d2<I2C> where
I2C: Sync,
I2C: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
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, 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,