3 Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan,
4 Jason Lapenta, Scott Smedley
6 This file is part of the DT3155 Device Driver.
8 The DT3155 Device Driver is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 The DT3155 Device Driver is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with the DT3155 Device Driver; if not, write to the Free
20 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 Date Programmer Description of changes made
27 -------------------------------------------------------------------
29 24-Jul-2002 SS GPL licence.
30 26-Oct-2009 SS Porting to 2.6.30 kernel.
39 /* User functions for buffering */
40 /* Initialize the buffering system. This should */
41 /* be called prior to enabling interrupts */
43 u32 dt3155_setup_buffers(u32 *allocatorAddr);
45 /* Get the next frame of data if it is ready. Returns */
46 /* zero if no data is ready. If there is data but */
47 /* the user has a locked buffer, it will unlock that */
48 /* buffer and return it to the free list. */
50 int dt3155_get_ready_buffer(int minor);
52 /* Return a locked buffer to the free list */
54 void dt3155_release_locked_buffer(int minor);
56 /* Flush the buffer system */
57 int dt3155_flush(int minor);
59 /**********************************
60 * Simple array based que struct
61 **********************************/
63 bool are_empty_buffers(int minor);
64 void push_empty(int index, int minor);
66 int pop_empty(int minor);
68 bool is_ready_buf_empty(int minor);
69 bool is_ready_buf_full(int minor);
71 void push_ready(int minor, int index);
72 int pop_ready(int minor);