[][src]Trait kernel::hil::sensors::AmbientLight

pub trait AmbientLight<'a> {
    fn set_client(&self, client: &'a dyn AmbientLightClient);

    fn read_light_intensity(&self) -> ReturnCode { ... }
}

A basic interface for an ambient light sensor.

Required methods

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

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.

Loading content...

Provided methods

fn read_light_intensity(&self) -> ReturnCode

Get a single instantaneous reading of the ambient light intensity.

Loading content...

Implementors

Loading content...