]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/man/device_read.html
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / man / device_read.html
index 56d3b776e1282e933f8587bad5f231d3a02ac7cd..3b91f97f424b3008a114d88b34262d2650c16367 100755 (executable)
@@ -1 +1,100 @@
-<h2>device_read</h2>\r<hr>\r<p>\r<strong>Function</strong> - Read a sequence of bytes from a specific device.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>#include&ltdevice/device.h&gt</strong>\r\r<strong>kern_return_t   device_read</strong>\r                <strong>(device_t</strong>                                <var>device</var>,\r                 <strong>mach_port_t</strong>                         <var>reply_port</var>,\r                 <strong>dev_mode_t</strong>                                <var>mode</var>,\r                 <strong>recnum_t</strong>                                <var>recnum</var>,\r                 <strong>io_buf_len_t</strong>                      <var>bytes_wanted</var>,\r                 <strong>io_buf_ptr_t</strong>                      <var>io_buf_ptr_t</var>,\r                 <strong>mach_msg_type_number_t</strong>  <var>mach_msg_type_number_t</var><strong>);</strong>\r\r\r<strong>#include&ltdevice/device_request.h&gt</strong>\r\r<strong>kern_return_t   device_read_request</strong>\r                <strong>(mach_port_t</strong>                            <var>device</var>,\r                 <strong>mach_port_t</strong>                        <var>reply_port</var>,\r                 <strong>dev_mode_t</strong>                                <var>mode</var>,\r                 <strong>recnum_t</strong>                                <var>recnum</var>,\r                 <strong>io_buf_len_t</strong>                      <var>bytes_wanted</var><strong>);</strong>\r\r\r\r<strong>kern_return_t   ds_device_read_reply</strong>\r                <strong>(mach_port_t</strong>                         <var>reply_port</var>,\r                 <strong>kern_return_t</strong>                      <var>return_code</var>,\r                 <strong>io_buf_ptr_t</strong>                              <var>data</var>,\r                 <strong>mach_msg_type_number_t</strong>              <var>data_count</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>device</var> \r<dd>\r[in device send right]\rA device port to the device to be read.\r<p>\r<dt> <var>reply_port</var> \r<dd>\r[in reply receive (to be converted to send-once) right]\rThe port to \rwhich the reply message is to be sent.\r<p>\r<dt> <var>mode</var> \r<dd>\r[in scalar]\rI/O mode value.  Meaningful options are:\r<dl>\r<p>\r<dt> <strong>D_NOWAIT</strong>\r<dd>\rDo not wait if data is unavailable.\r</dl>\r<p>\r<dt> <var>recnum</var> \r<dd>\r[in scalar]\rRecord number to be read.\r<p>\r<dt> <var>bytes_wanted</var> \r<dd>\r[in scalar]\rSize of data transfer.\r<p>\r<dt> <var>return_code</var> \r<dd>\r[in scalar]\rThe return status code from the read.\r<p>\r<dt> <var>data</var> \r<dd>\r[out pointer to dynamic array of bytes, in for asynchronous form]\rReturned data bytes.\r<p>\r<dt> <var>data_count</var> \r<dd>\r[out scalar, in for asynchronous form]\rNumber of returned data bytes.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>device_read</strong> function reads a sequence of bytes\rfrom a device object.  The \rmeaning of <var>recnum</var> as well as the specific operation performed is device\rdependent.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="device_read_inband.html"><strong>device_read_inband</strong></a>,\r<a href="device_read_overwrite.html"><strong>device_read_overwrite</strong></a>,\r<a href="device_reply_server.html"><strong>device_reply_server</strong></a>.\r
\ No newline at end of file
+<h2>device_read</h2>
+<hr>
+<p>
+<strong>Function</strong> - Read a sequence of bytes from a specific device.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>#include&ltdevice/device.h&gt</strong>
+
+<strong>kern_return_t   device_read</strong>
+                <strong>(device_t</strong>                                <var>device</var>,
+                 <strong>mach_port_t</strong>                         <var>reply_port</var>,
+                 <strong>dev_mode_t</strong>                                <var>mode</var>,
+                 <strong>recnum_t</strong>                                <var>recnum</var>,
+                 <strong>io_buf_len_t</strong>                      <var>bytes_wanted</var>,
+                 <strong>io_buf_ptr_t</strong>                      <var>io_buf_ptr_t</var>,
+                 <strong>mach_msg_type_number_t</strong>  <var>mach_msg_type_number_t</var><strong>);</strong>
+
+
+<strong>#include&ltdevice/device_request.h&gt</strong>
+
+<strong>kern_return_t   device_read_request</strong>
+                <strong>(mach_port_t</strong>                            <var>device</var>,
+                 <strong>mach_port_t</strong>                        <var>reply_port</var>,
+                 <strong>dev_mode_t</strong>                                <var>mode</var>,
+                 <strong>recnum_t</strong>                                <var>recnum</var>,
+                 <strong>io_buf_len_t</strong>                      <var>bytes_wanted</var><strong>);</strong>
+
+
+
+<strong>kern_return_t   ds_device_read_reply</strong>
+                <strong>(mach_port_t</strong>                         <var>reply_port</var>,
+                 <strong>kern_return_t</strong>                      <var>return_code</var>,
+                 <strong>io_buf_ptr_t</strong>                              <var>data</var>,
+                 <strong>mach_msg_type_number_t</strong>              <var>data_count</var><strong>);</strong>
+</pre>
+<h3>PARAMETERS</h3>
+<dl>
+<p>
+<dt> <var>device</var> 
+<dd>
+[in device send right]
+A device port to the device to be read.
+<p>
+<dt> <var>reply_port</var> 
+<dd>
+[in reply receive (to be converted to send-once) right]
+The port to 
+which the reply message is to be sent.
+<p>
+<dt> <var>mode</var> 
+<dd>
+[in scalar]
+I/O mode value.  Meaningful options are:
+<dl>
+<p>
+<dt> <strong>D_NOWAIT</strong>
+<dd>
+Do not wait if data is unavailable.
+</dl>
+<p>
+<dt> <var>recnum</var> 
+<dd>
+[in scalar]
+Record number to be read.
+<p>
+<dt> <var>bytes_wanted</var> 
+<dd>
+[in scalar]
+Size of data transfer.
+<p>
+<dt> <var>return_code</var> 
+<dd>
+[in scalar]
+The return status code from the read.
+<p>
+<dt> <var>data</var> 
+<dd>
+[out pointer to dynamic array of bytes, in for asynchronous form]
+Returned data bytes.
+<p>
+<dt> <var>data_count</var> 
+<dd>
+[out scalar, in for asynchronous form]
+Number of returned data bytes.
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>device_read</strong> function reads a sequence of bytes
+from a device object.  The 
+meaning of <var>recnum</var> as well as the specific operation performed is device
+dependent.
+<h3>RETURN VALUES</h3>
+<p>
+Only generic errors apply.
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="device_read_inband.html"><strong>device_read_inband</strong></a>,
+<a href="device_read_overwrite.html"><strong>device_read_overwrite</strong></a>,
+<a href="device_reply_server.html"><strong>device_reply_server</strong></a>.