From: Ian Abbott Date: Fri, 4 May 2012 17:20:42 +0000 (+0100) Subject: doc/reference.xml: Removed some comedilib internals. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=683e685c9f8bf15d6ef336d51e78814cd2a52969;p=comedilib.git doc/reference.xml: Removed some comedilib internals. Removed subdevice_struct as it is internal to comedilib. Removed struct comedi_t_struct, leaving only the comedi_t typedef as applications only see it as a pointer to an opaque, incomplete type. --- diff --git a/doc/reference.xml b/doc/reference.xml index b1dcfd9..8cf7123 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -224,7 +224,6 @@ Data types and structures This Section explains the data structures that users of the &comedi; API are confronted with: -typedef struct subdevice_struct subdevice_struct: typedef struct comedi_devinfo_struct comedi_devinfo; typedef struct comedi_t_struct comedi_t; typedef struct sampl_t_struct sampl_t; @@ -240,50 +239,6 @@ The data structures used in the implementation of the &comedi; drivers are treated elsewhere. -
- -subdevice_struct - - - -The data type subdevice_struct is used to store -information about a subdevice. This structure is usually filled in -automatically when the driver is loaded (attached), so -programmers need not access this data structure directly. - -typedef struct subdevice_struct subdevice; - -struct subdevice_struct{ - unsigned int type; - unsigned int n_chan; - unsigned int subd_flags; - unsigned int timer_type; - unsigned int len_chanlist; - lsampl_t maxdata; - unsigned int flags; - unsigned int range_type; - - lsampl_t *maxdata_list; - unsigned int *range_type_list; - unsigned int *flags_list; - - comedi_range *rangeinfo; - comedi_range **rangeinfo_list; - - unsigned int has_cmd; - unsigned int has_insn_bits; - - int cmd_mask_errno; - comedi_cmd *cmd_mask; - int cmd_timed_errno; - comedi_cmd *cmd_timed; -}; - - - - -
-
@@ -324,23 +279,12 @@ The data type <type>comedi_t</type> is used to represent an open &comedi; device: <programlisting> typedef struct comedi_t_struct comedi_t; - -struct comedi_t_struct{ - int magic; // driver-specific magic number, for identification - int fd; // file descriptor, for open() and close() - int n_subdevices; // number of subdevices on this device - <link linkend="ref-type-comedi-devinfo">comedi_devinfo</link> devinfo; - <link linkend="ref-type-subdevice">subdevice</link> *subdevices; // pointer to subdevice list - // filled in automatically at load time - unsigned int has_insnlist_ioctl; // can process <link linkend="anchor.instruction.list">instruction lists</link> - unsigned int has_insn_ioctl; // can process <link linkend="instructions">instructions</link> -}; </programlisting> -A valid <parameter>comedi_t</parameter> pointer is returned by a +A valid <type>comedi_t</type> pointer is returned by a successful call to <function><link linkend="func-ref-comedi-open">comedi_open</link></function>, and should be used for subsequent access to the device. -It is a transparent type, and pointers to type +It is an opaque type, and pointers to type <parameter>comedi_t</parameter> should not be dereferenced by the application. </para>