1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<title>MI_InitDevice</title>
8<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
9</head>
10<body>
11<h1>MI_InitDevice <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1>
12<h2>Syntax</h2>
13<dl>
14  <dd>
15<code>#include &lt;nitro/mi.h&gt;<br />
16  <br />
17  void MI_InitDevice(MIDevice *device, void *userdata,
18                   <A href="MIDeviceReadFunction.html">MIDeviceReadFunction</A> read,
19                   <A href="MIDeviceWriteFunction.html">MIDeviceWriteFunction</A> write);</code></dd>
20</dl>
21
22<h2>Arguments</h2>
23<table border="1" width="100%">
24  <tbody>
25    <tr>
26      <td width="13%"><em><strong>device</strong></em></td>
27      <td width="87%">Pointer to the <A href="MIDevice.html"><CODE>MIDevice</CODE></A> structure to be initialized.</td>
28    </tr>
29    <tr>
30      <td width="13%"><em><strong>userdata</strong></em></td>
31      <td width="87%">Any user-defined value to be linked with the structure.</td>
32    </tr>
33    <tr>
34      <td width="13%"><em><strong>read</strong></em></td>
35      <td width="87%">The pointer to the callback function that will be used for read access.</td>
36    </tr>
37    <tr>
38      <td width="13%"><em><strong>device</strong></em></td>
39      <td width="87%">The pointer to the callback function that will be used for write access.</td>
40    </tr>
41  </TBODY>
42</table>
43
44<h2>Return Values</h2>
45<p>None.</p>
46
47<h2>Description</h2>
48<p>Specifies the callbacks to use for read and write access and a freely configurable argument, and initializes the <A href="MIDevice.html"><CODE>MIDevice</CODE></A> structure.<br />Calling <A href="MI_ReadDevice.html"><CODE>MI_ReadDevice()</CODE></A> or <A href="MI_WriteDevice.html"><CODE>MI_WriteDevice()</CODE></A> with this structure will cause the callback functions to be called directly.<br />
49</p>
50<p>
51This is a utility feature designed to separate the device control component from the module design. For more information, see the reference for the <a href="MIDevice.html"><CODE>MIDevice</CODE></a> structure.
52</p>
53
54<h2>See Also</h2>
55<p><code><a href="MI_ReadDevice.html">MI_ReadDevice</a>, <a href="MI_WriteDevice.html">MI_WriteDevice</a><br /> <a href="MIDevice.html">MIDevice</a>, <a href="MIDeviceReadFunction.html">MIDeviceReadFunction</a>, <a href="MIDeviceWriteFunction.html">MIDeviceWriteFunction</a><br /></code></p>
56<h2>Revision History</h2>
57<p>
582007/05/09 Initial version.
59</p>
60<hr><p>CONFIDENTIAL</p></body>
61</html>
62