Struct tps6507x::Tps6507x [−][src]
Implementations
impl<I2C, E> Tps6507x<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
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]
&mut self,
power_path: PowerPath
) -> Result<(), Tps6507xError<E>>
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]
&mut self,
config: ChargerConfig
) -> Result<(), Tps6507xError<E>>
Set charger configuration
pub fn set_charger_reset(
&mut self,
assert: bool
) -> Result<(), Tps6507xError<E>>
[src]
&mut self,
assert: bool
) -> Result<(), Tps6507xError<E>>
Assert/Deassert charger reset bit
pub fn set_dcdc1(
&mut self,
voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
[src]
&mut self,
voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
Sets the output voltage for the DCDC1 converter
pub fn set_dcdc2_high(
&mut self,
voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
[src]
&mut self,
voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
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]
&mut self,
voltage: DCDCVoltage
) -> Result<(), Tps6507xError<E>>
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]
&mut self,
register: Registers,
value: u8
) -> Result<(), E>
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]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn2
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn7
[src]
impl<I2C> Channel<Tps6507x<I2C>> for TouchScreenAllFunc
[src]
impl<I2C> Channel<Tps6507x<I2C>> for TouchScreenXYPos
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn3
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn4
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageTsPin
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageIsetPin
[src]
impl<I2C> Channel<Tps6507x<I2C>> for InputVoltageCharger
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageBatPins
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn5
[src]
impl<I2C> Channel<Tps6507x<I2C>> for VoltageAdIn6
[src]
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]
I2C: WriteRead<Error = E> + Write<Error = E>,
CH: Channel<Tps6507x<I2C>, ID = AdcInputSelect>,
Auto Trait Implementations
impl<I2C> Send for Tps6507x<I2C> where
I2C: Send,
[src]
I2C: Send,
impl<I2C> Sync for Tps6507x<I2C> where
I2C: Sync,
[src]
I2C: Sync,
impl<I2C> Unpin for Tps6507x<I2C> where
I2C: Unpin,
[src]
I2C: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,