Struct capsules::si7021::SI7021
[−]
[src]
pub struct SI7021<'a, A: Alarm + 'a> { i2c: &'a I2CDevice, alarm: &'a A, temp_callback: Cell<Option<&'static TemperatureClient>>, humidity_callback: Cell<Option<&'static HumidityClient>>, state: Cell<State>, on_deck: Cell<OnDeck>, buffer: TakeCell<'static, [u8]>, }
Fields
i2c: &'a I2CDevice
alarm: &'a A
temp_callback: Cell<Option<&'static TemperatureClient>>
humidity_callback: Cell<Option<&'static HumidityClient>>
state: Cell<State>
on_deck: Cell<OnDeck>
buffer: TakeCell<'static, [u8]>
Methods
impl<'a, A: Alarm + 'a> SI7021<'a, A>
[src]
pub fn new(
i2c: &'a I2CDevice,
alarm: &'a A,
buffer: &'static mut [u8]
) -> SI7021<'a, A>
[src]
i2c: &'a I2CDevice,
alarm: &'a A,
buffer: &'static mut [u8]
) -> SI7021<'a, A>
pub fn read_id(&self)
[src]
fn init_measurement(&self, buffer: &'static mut [u8])
[src]
fn set_idle(&self, buffer: &'static mut [u8])
[src]
Trait Implementations
impl<'a, A: Alarm + 'a> I2CClient for SI7021<'a, A>
[src]
fn command_complete(&self, buffer: &'static mut [u8], _error: Error)
[src]
Called when an I2C command completed. The error
denotes whether the command completed successfully or if an error occured. Read more