This source file includes following definitions.
- iio_push_to_buffers_with_timestamp
1
2
3
4
5
6
7 #ifndef _IIO_BUFFER_GENERIC_H_
8 #define _IIO_BUFFER_GENERIC_H_
9 #include <linux/sysfs.h>
10 #include <linux/iio/iio.h>
11
12 struct iio_buffer;
13
14 void iio_buffer_set_attrs(struct iio_buffer *buffer,
15 const struct attribute **attrs);
16
17 int iio_push_to_buffers(struct iio_dev *indio_dev, const void *data);
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 static inline int iio_push_to_buffers_with_timestamp(struct iio_dev *indio_dev,
34 void *data, int64_t timestamp)
35 {
36 if (indio_dev->scan_timestamp) {
37 size_t ts_offset = indio_dev->scan_bytes / sizeof(int64_t) - 1;
38 ((int64_t *)data)[ts_offset] = timestamp;
39 }
40
41 return iio_push_to_buffers(indio_dev, data);
42 }
43
44 bool iio_validate_scan_mask_onehot(struct iio_dev *indio_dev,
45 const unsigned long *mask);
46
47 void iio_device_attach_buffer(struct iio_dev *indio_dev,
48 struct iio_buffer *buffer);
49
50 #endif