Struct capsules::isl29035::Isl29035
[−]
[src]
pub struct Isl29035<'a, A: Alarm + 'a> { i2c: &'a I2CDevice, alarm: &'a A, state: Cell<State>, buffer: TakeCell<'static, [u8]>, client: Cell<Option<&'a AmbientLightClient>>, }
Fields
i2c: &'a I2CDevice
alarm: &'a A
state: Cell<State>
buffer: TakeCell<'static, [u8]>
client: Cell<Option<&'a AmbientLightClient>>
Methods
impl<'a, A: Alarm + 'a> Isl29035<'a, A>
[src]
pub fn new(
i2c: &'a I2CDevice,
alarm: &'a A,
buffer: &'static mut [u8]
) -> Isl29035<'a, A>
[src]
i2c: &'a I2CDevice,
alarm: &'a A,
buffer: &'static mut [u8]
) -> Isl29035<'a, A>
pub fn start_read_lux(&self)
[src]
Trait Implementations
impl<'a, A: Alarm + 'a> AmbientLight for Isl29035<'a, A>
[src]
fn set_client(&self, client: &'static AmbientLightClient)
[src]
Set the client to be notified when the capsule has data ready or has finished some command. This is likely called in a board's main.rs
. Read more
fn read_light_intensity(&self) -> ReturnCode
[src]
Get a single instantaneous reading of the ambient light intensity.
impl<'a, A: Alarm + 'a> Client for Isl29035<'a, A>
[src]
fn fired(&self)
[src]
Callback signaled when the alarm's clock reaches the value set in Alarm#set_alarm
. Read more
impl<'a, A: Alarm + 'a> I2CClient for Isl29035<'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