Updated: April 19, 2023 |
Return the memory for a data buffer that was retrieved
#include <sensor/sensor_api.h>
sensor_error_t sensor_return_buffer(sensor_handle_t handle, sensor_buffer_t *buffer)
Calling this function is required to return the memory for any buffers retrieved through a call to sensor_get_buffer(). It is also required for data callbacks that return false to indicate that their received buffer must be released later.
SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.