Trait vl53l1_reg::Entry
source · pub trait Entry: Sized {
type Array: AsMut<[u8]> + AsRef<[u8]> + Default;
const INDEX: Index;
fn into_array(self) -> Self::Array;
fn from_array(arr: Self::Array) -> Self;
fn index(&self) -> Index { ... }
}
Expand description
Implemented for all entries within the register map.
An entry represents a single value represented by 1, 2 or 4 8-bit registers.
Required Associated Types§
Required Associated Constants§
Required Methods§
sourcefn into_array(self) -> Self::Array
fn into_array(self) -> Self::Array
Encode self in an array, ready for transmission over I2C (to MSB).
sourcefn from_array(arr: Self::Array) -> Self
fn from_array(arr: Self::Array) -> Self
Decode self from an of bytes in the order they were received over I2C (from MSB).