Type Alias DFRobotRainFallSensorComponentType

Source
pub type DFRobotRainFallSensorComponentType<A, I> = DFRobotRainFall<'static, A, I>;

Aliased Type§

struct DFRobotRainFallSensorComponentType<A, I> { /* private fields */ }

Implementations

Source§

impl<'a, A, I> DFRobotRainFall<'a, A, I>
where A: Alarm<'a>, I: I2CDevice,

Source

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

Source

pub fn startup(&self)

Trait Implementations

Source§

impl<'a, A, I> AlarmClient for DFRobotRainFall<'a, A, I>
where A: Alarm<'a>, I: I2CDevice,

Source§

fn alarm(&self)

Callback indicating the alarm time has been reached. The alarm MUST be disabled when this is called. If a new alarm is needed, the client can call Alarm::set_alarm.
Source§

impl<'a, A, I> I2CClient for DFRobotRainFall<'a, A, I>
where A: Alarm<'a>, 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, A, I> RainFallDriver<'a> for DFRobotRainFall<'a, A, I>
where A: Alarm<'a>, I: I2CDevice,

Source§

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

Source§

fn read_rainfall(&self, hours: usize) -> Result<(), ErrorCode>

Read the rain fall value from a sensor. The value is returned via the RainFallClient callback. Read more