Updated: October 28, 2024 |
Event buffering modes
#include <sensor/sensor_api.h>
typedef enum { SENSOR_EVENTMODE_READONLY, SENSOR_EVENTMODE_READWRITE, SENSOR_EVENTMODE_READWRITE_EXCLUSIVE } sensor_eventmode_t;
When you use this mode, you can modify buffers prior to delivery to callback functions or read-only event consumers.
With this mode, the buffers are mapped read/write but the modified buffers are not shared with other event consumers.
The event buffering mode dictates the behavior of the buffer argument of sensor_get_buffer() if using events. For callbacks, it affects the behavior of the buffers passed to them.