Trait vl53l1x_uld::comm::Write
source · [−]pub trait Write {
type Error: Debug;
fn write_registers(
&mut self,
address: u8,
register: [u8; 2],
bytes: &[u8]
) -> Result<(), Self::Error>;
}
Expand description
Trait to write registers for the VL53L1X.
Required Associated Types
Required Methods
sourcefn write_registers(
&mut self,
address: u8,
register: [u8; 2],
bytes: &[u8]
) -> Result<(), Self::Error>
fn write_registers(
&mut self,
address: u8,
register: [u8; 2],
bytes: &[u8]
) -> Result<(), Self::Error>
Write registers with the given bytes. (Number of bytes is limited to 4 for non iterator implementations)
Arguments
address
- The i2c address.register
- The register to write to (Auto increments if more than 1 byte is written).bytes
- The bytes to be written at the given address.