OpenCores
URL https://opencores.org/ocsvn/xenie/xenie/trunk

Subversion Repositories xenie

[/] [xenie/] [trunk/] [examples/] [Eth_example/] [mb_fw/] [drivers/] [iic_v3_4/] [doc/] [html/] [api/] [xiic__tempsensor__example_8c.html] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 DFC
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
<meta name="generator" content="Doxygen 1.8.11"/>
7
<title>iic_v3_4: xiic_tempsensor_example.c File Reference</title>
8
<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
<script type="text/javascript" src="jquery.js"></script>
10
<script type="text/javascript" src="dynsections.js"></script>
11
<link href="navtree.css" rel="stylesheet" type="text/css"/>
12
<script type="text/javascript" src="resize.js"></script>
13
<script type="text/javascript" src="navtreedata.js"></script>
14
<script type="text/javascript" src="navtree.js"></script>
15
<script type="text/javascript">
16
  $(document).ready(initResizable);
17
  $(window).load(resizeHeight);
18
</script>
19
<link href="doxygen.css" rel="stylesheet" type="text/css" />
20
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
21
</head>
22
<body>
23
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
24
<div id="titlearea">
25
<table cellspacing="0" cellpadding="0">
26
 <tbody>
27
 <tr style="height: 56px;">
28
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
29
  <td id="projectalign" style="padding-left: 0.5em;">
30
   <div id="projectname">iic_v3_4
31
   </div>
32
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
33
  </td>
34
 </tr>
35
 </tbody>
36
</table>
37
</div>
38
<!-- end header part -->
39
<!-- Generated by Doxygen 1.8.11 -->
40
  <div id="navrow1" class="tabs">
41
    <ul class="tablist">
42
      <li><a href="index.html"><span>Overview</span></a></li>
43
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
44
      <li><a href="globals.html"><span>APIs</span></a></li>
45
      <li><a href="files.html"><span>File&#160;List</span></a></li>
46
    </ul>
47
  </div>
48
</div><!-- top -->
49
<div id="side-nav" class="ui-resizable side-nav-resizable">
50
  <div id="nav-tree">
51
    <div id="nav-tree-contents">
52
      <div id="nav-sync" class="sync"></div>
53
    </div>
54
  </div>
55
  <div id="splitbar" style="-moz-user-select:none;"
56
       class="ui-resizable-handle">
57
  </div>
58
</div>
59
<script type="text/javascript">
60
$(document).ready(function(){initNavTree('xiic__tempsensor__example_8c.html','');});
61
</script>
62
<div id="doc-content">
63
<div class="header">
64
  <div class="summary">
65
<a href="#func-members">Functions</a>  </div>
66
  <div class="headertitle">
67
<div class="title">xiic_tempsensor_example.c File Reference</div>  </div>
68
</div><!--header-->
69
<div class="contents">
70
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
71
<div class="textblock"><p>This example only performs read operations (receive) from the IIC temperature sensor of the platform.</p>
72
<p>The <a class="el" href="group__iic__v3__1.html#ga337bf0d322d4a7d9b4f8baa30e00ab45" title="This function receives data as a master from a slave device on the IIC bus. ">XIic_MasterRecv()</a> API is used to receive the data.</p>
73
<p>This example assumes that there is an interrupt controller in the hardware system and the IIC device is connected to the interrupt controller.</p>
74
<dl class="section note"><dt>Note</dt><dd></dd></dl>
75
<p>7-bit addressing is used to access the tempsensor.</p>
76
<p>None</p>
77
<pre>
78
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date  Changes
79
----- ---- -------- -----------------------------------------------
80
1.00a jhl  09/10/03 Created
81
1.00a sv   05/09/05 Minor changes to comply to Doxygen and coding guidelines
82
</pre> </div><table class="memberdecls">
83
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
84
Functions</h2></td></tr>
85
<tr class="memitem:aac3cf14851d8400443fc92099624f671"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiic__tempsensor__example_8c.html#aac3cf14851d8400443fc92099624f671">TempSensorExample</a> (u16 IicDeviceId, u8 TempSensorAddress, u8 *TemperaturePtr)</td></tr>
86
<tr class="separator:aac3cf14851d8400443fc92099624f671"><td class="memSeparator" colspan="2">&#160;</td></tr>
87
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiic__tempsensor__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
88
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
89
</table>
90
<h2 class="groupheader">Function Documentation</h2>
91
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
92
<div class="memitem">
93
<div class="memproto">
94
      <table class="memname">
95
        <tr>
96
          <td class="memname">int main </td>
97
          <td>(</td>
98
          <td class="paramtype">void&#160;</td>
99
          <td class="paramname"></td><td>)</td>
100
          <td></td>
101
        </tr>
102
      </table>
103
</div><div class="memdoc">
104
 
105
<p>The purpose of this function is to illustrate how to use the IIC driver to read the temperature. </p>
106
<dl class="params"><dt>Parameters</dt><dd>
107
  <table class="params">
108
    <tr><td class="paramname">None</td><td></td></tr>
109
  </table>
110
  </dd>
111
</dl>
112
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, XST_FAILURE if unsuccessful</dd></dl>
113
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>
114
 
115
<p>References <a class="el" href="xiic__tempsensor__example_8c.html#aac3cf14851d8400443fc92099624f671">TempSensorExample()</a>.</p>
116
 
117
</div>
118
</div>
119
<a class="anchor" id="aac3cf14851d8400443fc92099624f671"></a>
120
<div class="memitem">
121
<div class="memproto">
122
      <table class="memname">
123
        <tr>
124
          <td class="memname">int TempSensorExample </td>
125
          <td>(</td>
126
          <td class="paramtype">u16&#160;</td>
127
          <td class="paramname"><em>IicDeviceId</em>, </td>
128
        </tr>
129
        <tr>
130
          <td class="paramkey"></td>
131
          <td></td>
132
          <td class="paramtype">u8&#160;</td>
133
          <td class="paramname"><em>TempSensorAddress</em>, </td>
134
        </tr>
135
        <tr>
136
          <td class="paramkey"></td>
137
          <td></td>
138
          <td class="paramtype">u8 *&#160;</td>
139
          <td class="paramname"><em>TemperaturePtr</em>&#160;</td>
140
        </tr>
141
        <tr>
142
          <td></td>
143
          <td>)</td>
144
          <td></td><td></td>
145
        </tr>
146
      </table>
147
</div><div class="memdoc">
148
 
149
<p>The function reads the temperature of the IIC temperature sensor on the IIC bus. </p>
150
<p>It initializes the IIC device driver and sets it up to communicate with the temperature sensor. This function does contain a loop that polls for completion of the IIC processing such that it may not return if interrupts or the hardware are not working.</p>
151
<dl class="params"><dt>Parameters</dt><dd>
152
  <table class="params">
153
    <tr><td class="paramname">IicDeviceId</td><td>is the XPAR_&lt;IIC_instance&gt;_DEVICE_ID value from xparameters.h for the IIC Device </td></tr>
154
    <tr><td class="paramname">TempSensorAddress</td><td>is the address of the Temperature Sensor device on the IIC bus </td></tr>
155
    <tr><td class="paramname">TemperaturePtr</td><td>is the data byte read from the temperature sensor</td></tr>
156
  </table>
157
  </dd>
158
</dl>
159
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, else XST_FAILURE to indicate a Failure.</dd></dl>
160
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>
161
 
162
<p>References <a class="el" href="struct_x_iic___config.html#ae783f76b6713be6d9b77060d77328102">XIic_Config::BaseAddress</a>, <a class="el" href="group__iic__v3__1.html#gace6af337aea33e4f162897b40591e0ac">XII_ADDR_TO_SEND_TYPE</a>, <a class="el" href="group__iic__v3__1.html#ga301f08e1fa6e74bf4c2885702bf0ff70">XIic_CfgInitialize()</a>, <a class="el" href="group__iic__v3__1.html#ga50c5aa4448e8993c80ef7b6a87b1aaea">XIic_InterruptHandler()</a>, <a class="el" href="group__iic__v3__1.html#ga1dcc65dd7cb7863bf6769aed5d785304">XIic_LookupConfig()</a>, <a class="el" href="group__iic__v3__1.html#ga337bf0d322d4a7d9b4f8baa30e00ab45">XIic_MasterRecv()</a>, <a class="el" href="group__iic__v3__1.html#gad944f42c3d9972fc2c986a7eed726297">XIic_SetAddress()</a>, <a class="el" href="group__iic__v3__1.html#ga86b4b2b307df26df2ecac39337c78bed">XIic_SetRecvHandler()</a>, <a class="el" href="group__iic__v3__1.html#gaa74a6884f6dfc826a10768d7d0333991">XIic_SetStatusHandler()</a>, and <a class="el" href="group__iic__v3__1.html#ga5f4e497710a9c3719f27d40faa74a10f">XIic_Start()</a>.</p>
163
 
164
<p>Referenced by <a class="el" href="xiic__tempsensor__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>
165
 
166
</div>
167
</div>
168
</div><!-- contents -->
169
</div><!-- doc-content -->
170
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
171
  <ul>
172
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
173
  </ul>
174
</div>
175
</body>
176
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.