Commit | Line | Data |
---|---|---|
574fb258 JC |
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 | * | |
0f8c9620 | 8 | * Copyright (c) 2009 Jonathan Cameron <jic23@kernel.org> |
574fb258 JC |
9 | * |
10 | */ | |
11 | ||
f3f883b4 RD |
12 | #ifndef _RING_HW_H_ |
13 | #define _RING_HW_H_ | |
14 | ||
574fb258 JC |
15 | /** |
16 | * struct iio_hw_ring_buffer- hardware ring buffer | |
17 | * @buf: generic ring buffer elements | |
18 | * @private: device specific data | |
19 | */ | |
14555b14 JC |
20 | struct iio_hw_buffer { |
21 | struct iio_buffer buf; | |
574fb258 JC |
22 | void *private; |
23 | }; | |
24 | ||
14555b14 | 25 | #define iio_to_hw_buf(r) container_of(r, struct iio_hw_buffer, buf) |
f3f883b4 RD |
26 | |
27 | #endif /* _RING_HW_H_ */ |