ring_hw.h 661 B

123456789101112131415161718192021222324252627
  1. /*
  2. * ring_hw.h - common functionality for iio hardware ring buffers
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License version 2 as published by
  6. * the Free Software Foundation.
  7. *
  8. * Copyright (c) 2009 Jonathan Cameron <jic23@kernel.org>
  9. *
  10. */
  11. #ifndef _RING_HW_H_
  12. #define _RING_HW_H_
  13. /**
  14. * struct iio_hw_ring_buffer- hardware ring buffer
  15. * @buf: generic ring buffer elements
  16. * @private: device specific data
  17. */
  18. struct iio_hw_buffer {
  19. struct iio_buffer buf;
  20. void *private;
  21. };
  22. #define iio_to_hw_buf(r) container_of(r, struct iio_hw_buffer, buf)
  23. #endif /* _RING_HW_H_ */