sensor_stop()

Updated: October 26, 2022

Stop streaming data from a sensor

Synopsis:

#include <sensor/sensor_api.h>
sensor_error_t sensor_stop(sensor_handle_t handle,
                           struct timespec *time)

Arguments:

handle
The handle that's returned from calling sensor_open().
time
Optional absolute time at which to stop streaming; if time is NULL, streaming will stop immediately.

Library:

libsensor

Description:

This function stops streaming data from the given sensor. After streaming has been stopped, no more data will be received from the sensor.

Returns:

SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.