Struct tps6507x::Tps6507x[][src]

pub struct Tps6507x<I2C> { /* fields omitted */ }

Implementations

impl<I2C, E> Tps6507x<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

pub fn new(i2c: I2C) -> Self[src]

Create driver instance

pub fn destroy(self) -> I2C[src]

Destroy driver and free interface

pub fn set_power_path(
    &mut self,
    power_path: PowerPath
) -> Result<(), Tps6507xError<E>>
[src]

Config power path control register

pub fn usb_power(&mut self) -> Result<bool, Tps6507xError<E>>[src]

Get USB power enable flag

pub fn acc_power(&mut self) -> Result<bool, Tps6507xError<E>>[src]

Get AC power enable flag

pub fn set_charger_config(
    &mut self,
    config: ChargerConfig
) -> Result<(), Tps6507xError<E>>
[src]

Set charger configuration

pub fn set_charger_reset(
    &mut self,
    assert: bool
) -> Result<(), Tps6507xError<E>>
[src]

Assert/Deassert charger reset bit

pub fn set_dcdc1(
    &mut self,
    voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
[src]

Sets the output voltage for the DCDC1 converter

pub fn set_dcdc2_high(
    &mut self,
    voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
[src]

The output voltage for DCDC2 is switched between the value defined in DEFDCDC2_LOW and DEFDCDC2_HIGH depending on the status of the DEFDCDC2 pin. If DEFDCDC2 is LOW the value in DEFDCDC2_LOW is selected, if DEFDCDC2 = HIGH, the value in DEFDCDC2_HIGH is selected.

pub fn set_dcdc3_high(
    &mut self,
    voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
[src]

The output voltage for DCDC3 is switched between the value defined in DEFDCDC3_LOW and DEFDCDC3_HIGH depending on the status of the DEFDCDC3 pin. If DEFDCDC3 is LOW the value in DEFDCDC3_LOW is selected, if DEFDCDC3 = HIGH, the value in DEFDCDC3_HIGH is selected.

pub fn set_ldo1(&mut self, voltage: LDO1Voltage) -> Result<(), Tps6507xError<E>>[src]

Sets output voltage of LDO1

pub fn set_ldo2(&mut self, voltage: DCDCVoltage) -> Result<(), Tps6507xError<E>>[src]

The DEFLDO2 register is used to set the output voltage of LDO2

pub fn set_adc_vref(&mut self, enable: bool) -> Result<(), Tps6507xError<E>>[src]

Asserts/deasserts reference voltage LDO (pin BYPASS) for ADC

pub fn write_register_raw(
    &mut self,
    register: Registers,
    value: u8
) -> Result<(), E>
[src]

Raw register write access

pub fn read_register_raw(&mut self, register: Registers) -> Result<u8, E>[src]

Raw register read access

Trait Implementations

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn1[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn2[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn7[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for TouchScreenAllFunc[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for TouchScreenXYPos[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn3[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn4[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageTsPin[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageIsetPin[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for InputVoltageCharger[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageBatPins[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn5[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn6[src]

type ID = AdcInputSelect

Channel ID type Read more

impl<I2C, E, CH> OneShot<Tps6507x<I2C>, u16, CH> for Tps6507x<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>,
    CH: Channel<Tps6507x<I2C>, ID = AdcInputSelect>, 
[src]

type Error = E

Error type returned by ADC methods

Auto Trait Implementations

impl<I2C> Send for Tps6507x<I2C> where
    I2C: Send
[src]

impl<I2C> Sync for Tps6507x<I2C> where
    I2C: Sync
[src]

impl<I2C> Unpin for Tps6507x<I2C> where
    I2C: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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> 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.