Added reference entry for comedi_get_hardware_buffer_size().
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 28 Mar 2008 18:16:45 +0000 (18:16 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 28 Mar 2008 18:16:45 +0000 (18:16 +0000)
doc/extensions_funcref.txt
doc/reference.xml

index 0c1a8e3620aff318168ca5579db016e863fa8899..01c0a024ab1d3f9ab374fad54119a16597ed494c 100644 (file)
@@ -66,6 +66,25 @@ Description:
 Returns:
  0 on success, -1 on error.
 
+Function: comedi_get_hardware_buffer_size -- get size of subdevice's hardware buffer
+Retval: int
+Param: comedi_t *device
+Param: unsigned int subdevice
+Param: <link linkend="ref-enum-comedi-io-direction">enum comedi_io_direction</link> direction
+Description:
+       This functions returns the number of bytes the subdevice can hold in it's hardware buffer.
+       The term "hardware buffer" refers to any fifos, etc. on the acquisition board itself which
+       are used during streaming commands.  This does not include the buffer maintained by
+       the comedi kernel module in host memory, whose size may be queried by
+       <link linkend="func-ref-comedi-get-buffer-size"><function>comedi_get_buffer_size</function></link>.
+       The <parameter>direction</parameter> parameter of type
+       <link linkend="ref-enum-comedi-io-direction">enum comedi_io_direction</link>
+       should be set to COMEDI_INPUT to query the input buffer size (e.g., the buffer of an analog
+       input subdevice), or COMEDI_OUTPUT to query the output buffer size (e.g., the buffer of
+       an analog output).
+Returns:
+       Number of bytes, or -1 on error.
+
 Function: comedi_get_routing -- get routing for an output
 Retval: int
 Param: comedi_t * device
index dcbc670b6eb6fc05ced198d3ab167cf034e7aa8e..d12aaeb77bd3cb7a223cc352b49a417bf4c84a80 100644 (file)
@@ -153,6 +153,30 @@ and converting from a physical value to Comedi's integer sample values (COMEDI_F
 
 </section>
 
+<section id="ref-enum-comedi-io-direction">
+<title>
+enum comedi_io_direction
+</title>
+
+<para>
+<programlisting>
+enum comedi_io_direction
+{
+       COMEDI_INPUT,
+       COMEDI_OUTPUT
+};
+</programlisting>
+</para>
+<para>
+A comedi_io_direction is used to select between input or output.  For example,
+<link linkend="func-ref-comedi-dio-config"><function>comedi_dio_config</function></link>
+uses the COMEDI_INPUT and COMEDI_OUTPUT values to specify
+whether a configurable digital i/o channel should be configured as an input
+or output.
+</para>
+
+</section>
+
 <section id="ref-enum-comedi-subdevice-type">
 <title>
 enum comedi_subdevice_type