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__low__level__dynamic__eeprom__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_low_level_dynamic_eeprom_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__low__level__dynamic__eeprom__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_low_level_dynamic_eeprom_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>The <a class="el" href="group__iic__v3__1.html#gadeaf11cda2466ae1c6036a3de0f52874" title="Send data as a master on the IIC bus. ">XIic_DynSend()</a> API is used to transmit the data and <a class="el" href="group__iic__v3__1.html#ga9979fbd483e1c8c495c9eb2bfd7ad6e9" title="Receive data as a master on the IIC bus. ">XIic_DynRecv()</a> API is used to receive the data.</p>
72
<p>The example is tested on ML300/ML310/ML403/ML501/ML507/ML510 Xilinx boards.</p>
73
<p>The ML310/ML410/ML510 boards have a on-board 64 Kb serial IIC EEPROM (Microchip 24LC64A). The WP pin of the IIC EEPROM is hardwired to ground on this board.</p>
74
<p>The ML300 board has an on-board 32 Kb serial IIC EEPROM(Microchip 24LC32A). The WP pin of the IIC EEPROM has to be connected to ground for this example. The WP is connected to pin Y3 of the FPGA.</p>
75
<p>The ML403 board has an on-board 4 Kb serial IIC EEPROM(Microchip 24LC04A). The WP pin of the IIC EEPROM is hardwired to ground on this board.</p>
76
<p>The ML501/ML505/ML507/ML605/SP601/SP605 boards have an on-board 8 Kb serial IIC EEPROM(STM M24C08). The WP pin of the IIC EEPROM is hardwired to ground on these boards.</p>
77
<p>The AddressType for ML300/ML310/ML410/ML510 boards should be u16 as the address pointer in the on board EEPROM is 2 bytes.</p>
78
<p>The AddressType for ML403/ML501/ML505/ML507/ML605/SP601/SP605 boards should be u8 as the address pointer for the on board EEPROM is 1 byte.</p>
79
<p>The 7 bit IIC Slave address of the IIC EEPROM on the ML300/ML310/ML410/ML403/ ML501/ML505/ML507/ML510 boards is 0x50. The 7 bit IIC Slave address of the IIC EEPROM on the ML605/SP601/SP605 boards is 0x54. Refer to the User Guide's of the respective boards for further information about the IIC slave address of IIC EEPROM's.</p>
80
<p>The define EEPROM_ADDRESS in this file needs to be changed depending on the board on which this example is to be run.</p>
81
<p>This code assumes that no Operating System is being used.</p>
82
<dl class="section note"><dt>Note</dt><dd></dd></dl>
83
<p>None.</p>
84
<pre>
85
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
86
----- ---- -------- ---------------------------------------------------------
87
1.00a mta  03/20/06 Created.
88
2.00a sdm  09/22/09 Converted all register accesses to 32 bit access.
89
2.01a ktn  03/17/10 Updated the information about the EEPROM's used on
90
              ML605/SP601/SP605 boards. Updated the example so that it
91
              can be used to access the entire IIC EEPROM for devices
92
              like M24C04/M24C08 that use LSB bits of the IIC device
93
              select code (IIC slave address) to specify the higher
94
              address bits of the EEPROM internal address.
95
3.3   sk    06/18/16 checked bytes written with the input byte count and
96
                     returns error if the value is not matched.
97
</pre> </div><table class="memberdecls">
98
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
99
Functions</h2></td></tr>
100
<tr class="memitem:a50f19b8762ac4b72ca5740da9b4c3690"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiic__low__level__dynamic__eeprom__example_8c.html#a50f19b8762ac4b72ca5740da9b4c3690">EepromWriteByte</a> (u8 *BufferPtr, u8 ByteCount)</td></tr>
101
<tr class="separator:a50f19b8762ac4b72ca5740da9b4c3690"><td class="memSeparator" colspan="2">&#160;</td></tr>
102
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xiic__low__level__dynamic__eeprom__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
103
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
104
</table>
105
<h2 class="groupheader">Function Documentation</h2>
106
<a class="anchor" id="a50f19b8762ac4b72ca5740da9b4c3690"></a>
107
<div class="memitem">
108
<div class="memproto">
109
      <table class="memname">
110
        <tr>
111
          <td class="memname">u8 EepromWriteByte </td>
112
          <td>(</td>
113
          <td class="paramtype">u8 *&#160;</td>
114
          <td class="paramname"><em>BufferPtr</em>, </td>
115
        </tr>
116
        <tr>
117
          <td class="paramkey"></td>
118
          <td></td>
119
          <td class="paramtype">u8&#160;</td>
120
          <td class="paramname"><em>ByteCount</em>&#160;</td>
121
        </tr>
122
        <tr>
123
          <td></td>
124
          <td>)</td>
125
          <td></td><td></td>
126
        </tr>
127
      </table>
128
</div><div class="memdoc">
129
 
130
<p>This function writes a buffer of bytes to the IIC serial EEPROM. </p>
131
<dl class="params"><dt>Parameters</dt><dd>
132
  <table class="params">
133
    <tr><td class="paramname">BufferPtr</td><td>contains the address of the data to write. </td></tr>
134
    <tr><td class="paramname">ByteCount</td><td>contains the number of bytes in the buffer to be written. Note that this should not exceed the page size of the EEPROM as noted by the constant PAGE_SIZE.</td></tr>
135
  </table>
136
  </dd>
137
</dl>
138
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written, a value less than that which was specified as an input indicates an error.</dd></dl>
139
<dl class="section note"><dt>Note</dt><dd>one. </dd></dl>
140
 
141
<p>References <a class="el" href="xiic__low__level__eeprom__example_8c.html#a5c87929a9d1ad69044b17cde4cf03c0a">EepromReadByte()</a>, <a class="el" href="group__iic__v3__1.html#ga9979fbd483e1c8c495c9eb2bfd7ad6e9">XIic_DynRecv()</a>, <a class="el" href="group__iic__v3__1.html#gadeaf11cda2466ae1c6036a3de0f52874">XIic_DynSend()</a>, <a class="el" href="group__iic__v3__1.html#gab28be58b11c65ecc54fc2f0c300412c1">XIic_ReadReg</a>, <a class="el" href="group__iic__v3__1.html#ga41bc9ddb46bd9eca389b60503e7a0589">XIIC_SR_BUS_BUSY_MASK</a>, <a class="el" href="group__iic__v3__1.html#gaa039f3dea3b57add15de333f733b5561">XIIC_SR_REG_OFFSET</a>, and <a class="el" href="group__iic__v3__1.html#gacdf6b790e752c7f789c81ee4721bafe8">XIIC_STOP</a>.</p>
142
 
143
<p>Referenced by <a class="el" href="xiic__low__level__dynamic__eeprom__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>
144
 
145
</div>
146
</div>
147
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
148
<div class="memitem">
149
<div class="memproto">
150
      <table class="memname">
151
        <tr>
152
          <td class="memname">int main </td>
153
          <td>(</td>
154
          <td class="paramtype">void&#160;</td>
155
          <td class="paramname"></td><td>)</td>
156
          <td></td>
157
        </tr>
158
      </table>
159
</div><div class="memdoc">
160
 
161
<p>Main function to call the low level Dynamic EEPROM example. </p>
162
<dl class="params"><dt>Parameters</dt><dd>
163
  <table class="params">
164
    <tr><td class="paramname">None.</td><td></td></tr>
165
  </table>
166
  </dd>
167
</dl>
168
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
169
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>
170
 
171
<p>References <a class="el" href="xiic__low__level__eeprom__example_8c.html#a5c87929a9d1ad69044b17cde4cf03c0a">EepromReadByte()</a>, <a class="el" href="xiic__low__level__dynamic__eeprom__example_8c.html#a50f19b8762ac4b72ca5740da9b4c3690">EepromWriteByte()</a>, <a class="el" href="group__iic__v3__1.html#gab28be58b11c65ecc54fc2f0c300412c1">XIic_ReadReg</a>, <a class="el" href="group__iic__v3__1.html#ga41bc9ddb46bd9eca389b60503e7a0589">XIIC_SR_BUS_BUSY_MASK</a>, <a class="el" href="group__iic__v3__1.html#gaa039f3dea3b57add15de333f733b5561">XIIC_SR_REG_OFFSET</a>, <a class="el" href="group__iic__v3__1.html#gaee53acd662dfc1cca568f88401620780">XIIC_SR_RX_FIFO_EMPTY_MASK</a>, and <a class="el" href="group__iic__v3__1.html#ga3e6ab2b0daa0a08862d649fb769f87e9">XIIC_SR_TX_FIFO_EMPTY_MASK</a>.</p>
172
 
173
</div>
174
</div>
175
</div><!-- contents -->
176
</div><!-- doc-content -->
177
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
178
  <ul>
179
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
180
  </ul>
181
</div>
182
</body>
183
</html>

powered by: WebSVN 2.1.0

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