sensor_info()

Get information for a sensor.

Synopsis:

#include <bps/sensor.h>
 
BPS_API int sensor_info(sensor_type_t type, sensor_info_t **info)

Arguments:

type
The type of sensor to get information for (for example, SENSOR_TYPE_ACCELEROMETER, SENSOR_TYPE_MAGNETOMETER, and so on).
info
The sensor_info_t structure to populate with the sensor information.

Library:

libbps

Description:

The sensor_info() function allocates sensor information data. It is the caller's responsibility to call sensor_info_destroy() once they are finished with the sensor information structure that is allocated by this function.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.