[−][src]Crate vl53l1_reg
A crate for low-level access to the registers on the VL53L1X.
Provides:
- A type for every "entry" in the register map.
- An
Entry
trait for abstracting over register entries. - An
Index
type for a dynamic representation of entry indices into the register map. - An
State
type for a dynamic representation of entry state. write_*
andread_*
functions for writing and reading to and from the VL53L1X's registers.- A
structs
module with commonly grouped registers and generated methods for writing and reading these groups at once.
The generated code takes quite a while to compile (~7 secs) so it has been split into this
separate crate and re-exported under the reg
module in the main crate.
Re-exports
pub use structs::Entries; |
Modules
settings | |
structs |
Macros
write_all_entries |
Structs
Enums
Index | A dynamic representation of an entry's 16-bit index within the register map. |
State | A dynamic representation of entry state. |
Constants
MAX_SLICE_LEN | The maximum amount of data that may be written to |
SLAVE_ADDR | The slave address of the VL53L1X. Note that |
Traits
Entry | Implemented for all entries within the register map. |
Functions
read_byte | Shorthand for reading a single byte from the register at the given index. |
read_entry | Read the value for a single entry. |
read_slice | Read the value at the given index into the given slice. |
read_word | Shorthand for reading two consecutive bytes from the given index. |
write_byte | Shorthand for writing a slice with a single byte. |
write_entry | Read the the given entry. |
write_slice | Write given slice of data to the device at the given index. |
write_word | Shorthand for writing a slice with a single word. |