pub struct SensorConfig {
pub name: String<SENSOR_NAME_LEN>,
pub iface: String<8>,
pub address: u8,
pub driver: DriverConfig,
}Expand description
Sensor configuration, e.g. for an I2C sensor.
Fields§
§name: String<SENSOR_NAME_LEN>Sensor name (e.g. “prs0”) used in SignalConfig.source.sensor to link signals to sensors.
iface: String<8>Interface name (e.g. “i2c1”) to determine which interface/bus to use.
address: u8Sensor-specific address (e.g. I2C address).
driver: DriverConfigDriver name and optional driver-specific configuration parameters.
Trait Implementations§
Source§impl Debug for SensorConfig
impl Debug for SensorConfig
Source§impl Default for SensorConfig
impl Default for SensorConfig
Source§fn default() -> SensorConfig
fn default() -> SensorConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SensorConfig
impl<'de> Deserialize<'de> for SensorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SensorConfig
impl RefUnwindSafe for SensorConfig
impl Send for SensorConfig
impl Sync for SensorConfig
impl Unpin for SensorConfig
impl UnwindSafe for SensorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more