logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

buffer.h (985B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /* industrial I/O buffer definitions needed both in and out of kernel
  3. */
  4. #ifndef _IIO_BUFFER_H_
  5. #define _IIO_BUFFER_H_
  6. #include <linux/types.h>
  7. /* Flags for iio_dmabuf.flags */
  8. #define IIO_BUFFER_DMABUF_CYCLIC (1 << 0)
  9. #define IIO_BUFFER_DMABUF_SUPPORTED_FLAGS 0x00000001
  10. /**
  11. * struct iio_dmabuf - Descriptor for a single IIO DMABUF object
  12. * @fd: file descriptor of the DMABUF object
  13. * @flags: one or more IIO_BUFFER_DMABUF_* flags
  14. * @bytes_used: number of bytes used in this DMABUF for the data transfer.
  15. * Should generally be set to the DMABUF's size.
  16. */
  17. struct iio_dmabuf {
  18. __u32 fd;
  19. __u32 flags;
  20. __u64 bytes_used;
  21. };
  22. #define IIO_BUFFER_GET_FD_IOCTL _IOWR('i', 0x91, int)
  23. #define IIO_BUFFER_DMABUF_ATTACH_IOCTL _IOW('i', 0x92, int)
  24. #define IIO_BUFFER_DMABUF_DETACH_IOCTL _IOW('i', 0x93, int)
  25. #define IIO_BUFFER_DMABUF_ENQUEUE_IOCTL _IOW('i', 0x94, struct iio_dmabuf)
  26. #endif /* _IIO_BUFFER_H_ */