pub trait PressureDriver<'a> {
// Required methods
fn read_atmospheric_pressure(&self) -> Result<(), ErrorCode>;
fn set_client(&self, client: &'a dyn PressureClient);
}
Expand description
A Basic interface for a barometer sensor.
Required Methods§
Sourcefn read_atmospheric_pressure(&self) -> Result<(), ErrorCode>
fn read_atmospheric_pressure(&self) -> Result<(), ErrorCode>
Used to initialize a atmospheric pressure reading
This function might return the following errors:
BUSY
: Indicates that the hardware is busy with an existing operation or initialisation/calibration.FAIL
: Failed to correctly communicate over communication protocol.NOSUPPORT
: Indicates that this data type isn’t supported.
Sourcefn set_client(&self, client: &'a dyn PressureClient)
fn set_client(&self, client: &'a dyn PressureClient)
Set the client