sensor_interim_data_alloc()

Allocate an empty buffer to publish interim data

Synopsis:

#include <sensor/sensor_interim_data.h>
sensor_error_t sensor_interim_data_alloc(sensor_handle_t handle,
                                         sensor_buffer_t *buffer,
                                         bool block)

Arguments:

handle
The handle that's returned from calling sensor_interim_data_open().
buffer
On success, gets filled with information about the buffer that was allocated.
block
If set to 'true', will block until a buffer becomes available.

Library:

libsensor

Description:

If the call is non-blocking, SENSOR_ENODATA returns if no free buffers are available at the time. If the call is blocking, it won't return until a buffer is available.

Returns:

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