[][src]Struct ina260::INA260NonOwned

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

Methods

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

pub fn new(i2c: &mut I2C, address: u8) -> Result<Self, E>[src]

Add a new driver for a INA260 chip found on the I2C bus at the specified address

pub fn set_averaging_mode(
    &mut self,
    i2c: &mut I2C,
    a: Averaging
) -> Result<(), E>
[src]

Change the averaging mode of the INA260

pub fn set_operating_mode(
    &mut self,
    i2c: &mut I2C,
    o: OperMode
) -> Result<(), E>
[src]

Change the operating mode of the INA260. Please note that if you change to Triggered mode, you'll have to call this method again each time you would like to get a new sample.

pub fn set_scconvtime_mode(
    &mut self,
    i2c: &mut I2C,
    s: SCConvTime
) -> Result<(), E>
[src]

Change the shut current conversion time

pub fn set_bvconvtime_mode(
    &mut self,
    i2c: &mut I2C,
    b: BVConvTime
) -> Result<(), E>
[src]

Change the bus voltage conversion time

pub fn did(&mut self, i2c: &mut I2C) -> Result<u16, E>[src]

Delivers the unique chip id

pub fn rid(&mut self, i2c: &mut I2C) -> Result<u16, E>[src]

Delivers the die revision id

pub fn current_raw(&mut self, i2c: &mut I2C) -> Result<i16, E>[src]

Delivers the measured raw current in 1.25mA per bit

pub fn current(&mut self, i2c: &mut I2C) -> Result<i32, E>[src]

Delivers the measured current in uA

pub fn current_split(&mut self, i2c: &mut I2C) -> Result<(i8, u32), E>[src]

Delivers the measured current in as tuple of full volts and tenth millivolts

pub fn voltage_raw(&mut self, i2c: &mut I2C) -> Result<u16, E>[src]

Delivers the measured raw voltage in 1.25mV per bit

pub fn voltage(&mut self, i2c: &mut I2C) -> Result<u32, E>[src]

Delivers the measured voltage in uV

pub fn voltage_split(&mut self, i2c: &mut I2C) -> Result<(u8, u32), E>[src]

Delivers the measured voltage in as tuple of full volts and tenth millivolts

pub fn power_raw(&mut self, i2c: &mut I2C) -> Result<u16, E>[src]

Delivers the measured power in 10mW per bit

pub fn power(&mut self, i2c: &mut I2C) -> Result<u32, E>[src]

Delivers the measured raw power in mW

pub fn power_split(&mut self, i2c: &mut I2C) -> Result<(u8, u32), E>[src]

Delivers the measured power in as tuple of full volts and tenth millivolts

Auto Trait Implementations

impl<I2C> Unpin for INA260NonOwned<I2C> where
    I2C: Unpin

impl<I2C> Send for INA260NonOwned<I2C> where
    I2C: Send

impl<I2C> Sync for INA260NonOwned<I2C> where
    I2C: Sync

Blanket Implementations

impl<T> From<T> for 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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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