Module capsules::humidity [] [src]

Provides userspace with access to humidity sensors.

Userspace Interface

subscribe System Call

The subscribe system call supports the single subscribe_number zero, which is used to provide a callback that will return back the result of a humidity reading. The subscribecall return codes indicate the following:

command System Call

The command system call support one argument cmd which is used to specify the specific operation, currently the following cmd's are supported:

The possible return from the 'command' system call indicates the following:

Usage

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

let humidity = static_init!(
       capsules::humidity::HumiditySensor<'static>,
       capsules::humidity::HumiditySensor::new(si7021,
                                                kernel::Grant::create()), 96/8);
kernel::hil::sensors::HumidityDriver::set_client(si7021, humidity);

Reexports

use core::cell::Cell;
use kernel::AppId;
use kernel::Callback;
use kernel::Driver;
use kernel::Grant;
use kernel::ReturnCode;
use kernel::hil;

Structs

App
HumiditySensor

Enums

HumidityCommand

Constants

DRIVER_NUM

Syscall number