Struct i2c_tpa2016::I2CTPA2016 [−][src]
This object communicates with a PA2016 audio amplifier.
Methods
impl<T> I2CTPA2016<T> where
T: I2CDevice + Sized,
[src]
impl<T> I2CTPA2016<T> where
T: I2CDevice + Sized,
pub fn new(i2cdev: T) -> Result<I2CTPA2016<T>, T::Error>
[src]
pub fn new(i2cdev: T) -> Result<I2CTPA2016<T>, T::Error>
Constructs a new I2CTPA2016<T>
.
pub fn set_gain(&mut self, gain: i8) -> Result<(), T::Error>
[src]
pub fn set_gain(&mut self, gain: i8) -> Result<(), T::Error>
Set the gain from -28 and 30
pub fn get_gain(&mut self) -> Result<i8, T::Error>
[src]
pub fn get_gain(&mut self) -> Result<i8, T::Error>
Returns the gain value.
pub fn enable_channel(
&mut self,
right: bool,
left: bool
) -> Result<(), T::Error>
[src]
pub fn enable_channel(
&mut self,
right: bool,
left: bool
) -> Result<(), T::Error>
pub fn set_agc_compression(&mut self, val: u8) -> Result<(), T::Error>
[src]
pub fn set_agc_compression(&mut self, val: u8) -> Result<(), T::Error>
Set the automatic gain control compression.
Values: 0 = 1:1 1 = 1:2 2 = 1:4 3 = 1:8
pub fn set_release_control(&mut self, release: u8) -> Result<(), T::Error>
[src]
pub fn set_release_control(&mut self, release: u8) -> Result<(), T::Error>
Set the release time in steps from 0 to 63 where each step is 0.0137s.
pub fn set_attack_control(&mut self, attack: u8) -> Result<(), T::Error>
[src]
pub fn set_attack_control(&mut self, attack: u8) -> Result<(), T::Error>
Set the attack time in steps from 0 to 63 where each step is 0.1067ms.
pub fn set_hold_control(&mut self, hold: u8) -> Result<(), T::Error>
[src]
pub fn set_hold_control(&mut self, hold: u8) -> Result<(), T::Error>
Set the hold time in steps from 0 to 63 where each step is 0.0137s.
pub fn set_limit_level_on(&mut self) -> Result<(), T::Error>
[src]
pub fn set_limit_level_on(&mut self) -> Result<(), T::Error>
Enable level limiting.
pub fn set_limit_level_off(&mut self) -> Result<(), T::Error>
[src]
pub fn set_limit_level_off(&mut self) -> Result<(), T::Error>
Disable level limiting.
pub fn set_limit_level(&mut self, limit: u8) -> Result<(), T::Error>
[src]
pub fn set_limit_level(&mut self, limit: u8) -> Result<(), T::Error>
Set the level limit from 0 and 31.
pub fn set_agc_max_gain(&mut self, max: u8) -> Result<(), T::Error>
[src]
pub fn set_agc_max_gain(&mut self, max: u8) -> Result<(), T::Error>
Set the amx gain from 0 and 12.
Trait Implementations
Auto Trait Implementations
impl<T> Send for I2CTPA2016<T> where
T: Send,
impl<T> Send for I2CTPA2016<T> where
T: Send,
impl<T> Sync for I2CTPA2016<T> where
T: Sync,
impl<T> Sync for I2CTPA2016<T> where
T: Sync,