4 This is a place for code driver writers wish to share between
6 If it ever grows beyond a couple inline functions, I'll make
7 a cfc.o module to go with this header file. cfc is short
8 for comedi-frank-common.
10 Author: Frank Mori Hess <fmhess@users.sourceforge.net>
11 Copyright (C) 2002 Frank Mori Hess
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 ************************************************************************/
29 #include "linux/comedidev.h"
31 /* Writes an array of data points to comedi's buffer */
32 unsigned int cfc_write_array_to_buffer( comedi_subdevice *subd, void *data,
33 unsigned int num_bytes );
35 inline unsigned int cfc_write_to_buffer( comedi_subdevice *subd, sampl_t data )
37 return cfc_write_array_to_buffer( subd, &data, sizeof( data ) );
40 inline unsigned int cfc_write_long_to_buffer( comedi_subdevice *subd, lsampl_t data )
42 return cfc_write_array_to_buffer( subd, &data, sizeof( data ) );
45 unsigned int cfc_read_array_from_buffer( comedi_subdevice *subd, void *data,
46 unsigned int num_bytes );