Type Alias ChirpI2cMoistureComponentType

Source
pub type ChirpI2cMoistureComponentType<I> = ChirpI2cMoisture<'static, I>;

Aliased Type§

struct ChirpI2cMoistureComponentType<I> { /* private fields */ }

Implementations

Source§

impl<'a, I> ChirpI2cMoisture<'a, I>
where I: I2CDevice,

Source

pub fn new(i2c: &'a I, buffer: &'static mut [u8]) -> ChirpI2cMoisture<'a, I>

Source

pub fn initialise(&self)

Trait Implementations

Source§

impl<I> I2CClient for ChirpI2cMoisture<'_, I>
where I: I2CDevice,

Source§

fn command_complete(&self, buffer: &'static mut [u8], status: Result<(), Error>)

Called when an I2C command completed. The error denotes whether the command completed successfully or if an error occured.
Source§

impl<'a, I> MoistureDriver<'a> for ChirpI2cMoisture<'a, I>
where I: I2CDevice,

Source§

fn set_client(&self, client: &'a dyn MoistureClient)

Source§

fn read_moisture(&self) -> Result<(), ErrorCode>

Read the moisture value from a sensor. The value is returned via the MoistureClient callback. Read more