Updated: October 28, 2024 |
Allocate an empty buffer for publishing interim data
#include <sensor/sensor_interim_data.h>
sensor_error_t sensor_interim_data_alloc(sensor_handle_t handle, sensor_buffer_t *buffer, bool block)
This function attempts to allocate an empty buffer to be used for publishing interim data. If the call is non-blocking, SENSOR_ENODATA is returned if no free buffers are available at the time. If the call is blocking, it won't return until a buffer is available.
SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.