Module capsules_extra::air_quality

source ·
Expand description

Provides userspace with access to air quality sensors.

§Usage

You need a device that provides the hil::sensors::AirQualityDriver trait.


let grant_cap = create_capability!(capabilities::MemoryAllocationCapability);
let grant_temperature = board_kernel.create_grant(&grant_cap);

let temp = static_init!(
       capsules::temperature::AirQualitySensor<'static>,
       capsules::temperature::AirQualitySensor::new(si7021,
                                                board_kernel.create_grant(&grant_cap)));

kernel::hil::sensors::AirQualityDriver::set_client(si7021, temp);

Structs§

Constants§