Trait vl53l1x_uld::comm::Read
source · [−]pub trait Read {
type Error: Debug;
fn read_registers(
&mut self,
address: u8,
register: [u8; 2],
bytes: &mut [u8]
) -> Result<(), Self::Error>;
}
Expand description
Trait to read a registers for the VL53L1X.
Required Associated Types
Required Methods
sourcefn read_registers(
&mut self,
address: u8,
register: [u8; 2],
bytes: &mut [u8]
) -> Result<(), Self::Error>
fn read_registers(
&mut self,
address: u8,
register: [u8; 2],
bytes: &mut [u8]
) -> Result<(), Self::Error>
Read registers into the given bytes.
address
- The i2c address.register
- The register to read from (Auto increments if more than 1 byte is read).bytes
- The slice into which the read data will be put.