sensor_stop_events()

Stop receiving sensor events.

Synopsis:

#include <bps/sensor.h>
 
BPS_API int sensor_stop_events(sensor_type_t type)

Arguments:

type
The types of events to stop. You can use the values that are defined in the sensor_type_t enumeration to specify the sensor events to stop.

Library:

libbps

Description:

The sensor_stop_events() function stops sensor events from being delivered to the application using BPS. You must make sure that you call this function with the same parameters that you specified in sensor_request_events() . For example, if you called sensor_request_events(SENSOR_TYPE_MAGNETOMETER), you must make sure to call sensor_stop_events(SENSOR_TYPE_MAGNETOMETER) instead of specifying a different sensor type, such as SENSOR_TYPE_GYROSCOPE or SENSOR_TYPE_TEMPERATURE.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.