Struct ina260::INA260 [−][src]
pub struct INA260<I2C> { /* fields omitted */ }
Methods
impl<I2C, E> INA260<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
impl<I2C, E> INA260<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn new(i2c: I2C, address: u8) -> Result<Self, E>
[src]
pub fn new(i2c: I2C, address: u8) -> Result<Self, E>
Add a new driver for a INA260 chip found on the I2C bus at the specified address
pub fn release(self) -> I2C
[src]
pub fn release(self) -> I2C
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]
pub fn set_averaging_mode(&mut self, a: Averaging) -> Result<(), E>
Change the averaging mode of the INA260
pub fn set_operating_mode(&mut self, o: OperMode) -> Result<(), E>
[src]
pub fn set_operating_mode(&mut self, o: OperMode) -> Result<(), E>
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]
pub fn set_scconvtime_mode(&mut self, s: SCConvTime) -> Result<(), E>
Change the shut current conversion time
pub fn set_bvconvtime_mode(&mut self, b: BVConvTime) -> Result<(), E>
[src]
pub fn set_bvconvtime_mode(&mut self, b: BVConvTime) -> Result<(), E>
Change the bus voltage conversion time
pub fn did(&mut self) -> Result<u16, E>
[src]
pub fn did(&mut self) -> Result<u16, E>
Delivers the unique chip id
pub fn rid(&mut self) -> Result<u16, E>
[src]
pub fn rid(&mut self) -> Result<u16, E>
Delivers the die revision id
pub fn current_raw(&mut self) -> Result<i16, E>
[src]
pub fn current_raw(&mut self) -> Result<i16, E>
Delivers the measured raw current in 1.25mA per bit
pub fn current(&mut self) -> Result<i32, E>
[src]
pub fn current(&mut self) -> Result<i32, E>
Delivers the measured raw current in uA
pub fn voltage_raw(&mut self) -> Result<u16, E>
[src]
pub fn voltage_raw(&mut self) -> Result<u16, E>
Delivers the measured raw voltage in 1.25mV per bit
pub fn voltage(&mut self) -> Result<u32, E>
[src]
pub fn voltage(&mut self) -> Result<u32, E>
Delivers the measured raw voltage in uV
pub fn power_raw(&mut self) -> Result<u16, E>
[src]
pub fn power_raw(&mut self) -> Result<u16, E>
Delivers the measured raw power in 10mW per bit
pub fn power(&mut self) -> Result<u32, E>
[src]
pub fn power(&mut self) -> Result<u32, E>
Delivers the measured raw power in mW