[][src]Struct ina260::INA260

pub struct INA260<I2C>(_, _);

Methods

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

pub fn new(i2c: 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 release(self) -> I2C[src]

Put the INA260 chip managed by the driver in shut down and release I2C resource

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

Change the averaging mode of the INA260

pub fn set_operating_mode(&mut self, 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, s: SCConvTime) -> Result<(), E>[src]

Change the shut current conversion time

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

Change the bus voltage conversion time

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

Delivers the unique chip id

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

Delivers the die revision id

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

Delivers the measured raw current in 1.25mA per bit

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

Delivers the measured current in uA

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

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

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

Delivers the measured raw voltage in 1.25mV per bit

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

Delivers the measured voltage in uV

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

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

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

Delivers the measured power in 10mW per bit

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

Delivers the measured raw power in mW

pub fn power_split(&mut self) -> 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 INA260<I2C> where
    I2C: Unpin

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

impl<I2C> Sync for INA260<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]