Trait kernel::hil::sensors::PressureDriver
source · 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