Wm8994

Struct Wm8994 

Source
pub struct Wm8994<I2c, I2cError, Delay> { /* private fields */ }

Implementations§

Source§

impl<I2c, I2cError, Delay> Wm8994<I2c, I2cError, Delay>
where I2c: Read<Error = I2cError> + Write<Error = I2cError> + WriteRead<Error = I2cError>, Delay: DelayMs<u32>,

Source

pub fn new(config: Config, i2c: I2c, delay: Delay) -> Self

Source

pub fn init_headphone(&mut self) -> Result<(), Error<I2cError>>

Source

pub fn aif1_control1_wl(&mut self, value: u16) -> Result<(), Error<I2cError>>

Source

pub fn set_mute(&mut self, mute_on: bool) -> Result<(), Error<I2cError>>

Source

pub fn set_output_volume(&mut self, volume: u8) -> Result<(), Error<I2cError>>

Source

pub fn soft_reset(&mut self) -> Result<(), Error<I2cError>>

Source

pub fn get_family(&mut self) -> Result<u16, Error<I2cError>>

Source

pub fn read_reg(&mut self, reg: u16) -> Result<u16, Error<I2cError>>

Source

pub fn write_reg(&mut self, reg: u16, val: u16) -> Result<(), Error<I2cError>>

Auto Trait Implementations§

§

impl<I2c, I2cError, Delay> Freeze for Wm8994<I2c, I2cError, Delay>
where I2c: Freeze, Delay: Freeze,

§

impl<I2c, I2cError, Delay> RefUnwindSafe for Wm8994<I2c, I2cError, Delay>
where I2c: RefUnwindSafe, Delay: RefUnwindSafe, I2cError: RefUnwindSafe,

§

impl<I2c, I2cError, Delay> Send for Wm8994<I2c, I2cError, Delay>
where I2c: Send, Delay: Send, I2cError: Send,

§

impl<I2c, I2cError, Delay> Sync for Wm8994<I2c, I2cError, Delay>
where I2c: Sync, Delay: Sync, I2cError: Sync,

§

impl<I2c, I2cError, Delay> Unpin for Wm8994<I2c, I2cError, Delay>
where I2c: Unpin, Delay: Unpin, I2cError: Unpin,

§

impl<I2c, I2cError, Delay> UnwindSafe for Wm8994<I2c, I2cError, Delay>
where I2c: UnwindSafe, Delay: UnwindSafe, I2cError: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.