Updated: October 28, 2024 |
Create and open the next available file on the sensor roll for writing
#include <sensor/sensor_api.h>
sensor_error_t sensor_roll_open_file(sensor_handle_t handle, int *fd, char *filename, int namelen, sensor_roll_format_t ext)
The sensor roll is a directory where the Sensor library saves files. The Sensor library manages unique filenames within this directory on behalf of the application. Use this function to retrieve the next available file from the sensor roll.
When the function succeeds, the new file is open for writing. To close it, call sensor_roll_close_file().
SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.