pub fn write_bits(&mut self, reg: u8, start_bit: u8, length: u8, data: u8) -> Result<(), Mpu6050Error<E>> {
        let mut byte: [u8; 1] = [0; 1];
        self.read_bytes(reg, &mut byte)?;
        bits::set_bits(&mut byte[0], start_bit, length, data);
        Ok(self.write_byte(reg, byte[0])?)
    }
/// Write bits data at reg from start_bit to start_bit+length
Write bits data at reg from start_bit to start_bit+length
Write bits data at reg from start_bit to start_bit + length
pub fn write_bits(&mut self, reg: u8, start_bit: u8, length: u8, data: u8) -> Result<(), Mpu6050Error<E>> {
        let mut byte: [u8; 1] = [0; 1];
        self.read_bytes(reg, &mut byte)?;
        bits::set_bits(&mut byte[0], start_bit, length, data);
        Ok(self.write_byte(reg, byte[0])?)
    }
pub fn write_bits ( & mut self , reg : u8 , start_bit : u8 , length : u8 , data : u8 ) -> Result < ( ) , Mpu6050Error < E > > { let mut byte : [ u8 ; 1 ] = [ 0 ; 1 ] ; self . read_bytes ( reg , & mut byte ) ? ; bits :: set_bits ( & mut byte [ 0 ] , start_bit , length , data ) ; Ok ( self . write_byte ( reg , byte [ 0 ] ) ? ) }
Write bits data at reg from start_bit to start_bit+length
Write bits data at reg from start_bit to start_bit + length
&mut self
reg
u8
start_bit
u8
length
u8
data
u8
&mut self
reg
u8
start_bit
u8
length
u8
data
u8