sensors_data_device_t Struct Reference


Data Fields

struct hw_device_t common
int(* data_close )(struct sensors_data_device_t *dev)
 Caller has completed using the sensor data.
int(* data_open )(struct sensors_data_device_t *dev, native_handle_t *nh)
 Prepare to read sensor data.
int(* poll )(struct sensors_data_device_t *dev, sensors_data_t *data)
 Return sensor data for one of the enabled sensors.

Detailed Description

Definition at line 314 of file sensors.h.


Field Documentation

struct hw_device_t sensors_data_device_t::common [read]

Definition at line 315 of file sensors.h.

Caller has completed using the sensor data.

The caller will not be blocked in sensors_data_poll when this routine is called.

Returns:
0 if successful, < 0 on error

int(* sensors_data_device_t::data_open)(struct sensors_data_device_t *dev, native_handle_t *nh)

Prepare to read sensor data.

This routine does NOT take ownership of the handle and must not close it. Typically this routine would use a duplicate of the nh parameter.

Parameters:
nh from sensors_control_open.
Returns:
0 if successful, < 0 on error

Return sensor data for one of the enabled sensors.

Returns:
sensor handle for the returned data, 0x7FFFFFFF when sensors_control_device_t.wake() is called and -errno on error