Module rainfall

Source
Expand description

Provides userspace with access to rain fall 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 rain fall reading.

§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:

  • 0: check whether the driver exists
  • 1: read rainfall

The possible return from the ‘command’ system call indicates the following:

  • Ok(()): The operation has been successful.
  • NOSUPPORT: Invalid cmd.
  • NOMEM: Insufficient memory available.
  • INVAL: Invalid address of the buffer or other error.

§Usage

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

Structs§

App
RainFallSensor

Constants§

DRIVER_NUM