Module sensor
Available on crate feature
sensors only.Expand description
Provides a Sensor trait abstracting over implementation details of a sensor driver.
Structs§
- Reading
Channel - Provides metadata about a
Sample. - Reading
Channels - Metadata required to interpret samples returned by
Sensor::wait_for_reading(). - Reading
Waiter - Future returned by
Sensor::wait_for_reading(). - Sample
- Represents a value obtained from a sensor device, along with its metadata.
- Samples
- Samples returned by a sensor driver.
- TryFrom
IntError - The error type returned when a checked integral type conversion fails.
Enums§
- Mode
- Mode of a sensor driver.
- Reading
Error - Represents errors happening when accessing a sensor reading.
- Sample
Error - Errors returned when trying to interpret a sample.
- Sample
Metadata - Metadata associated with a
Sample. - SetMode
Error - Possible errors when attempting to set the mode of a sensor driver.
- State
- State of a sensor driver.
- Trigger
Measurement Error - Represents errors happening when triggering a sensor measurement.
Traits§
- Reading
- Implemented on
Samples, returned bySensor::wait_for_reading(). - Sensor
- This trait must be implemented by sensor drivers.
- Sensor
Access - Provides access to the sensor driver instance. For driver implementors only.
Type Aliases§
- Reading
Result - A specialized
Resulttype forReadingoperations.