1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Ethernet Interface</title>
<title>CMSIS-Driver: Ethernet Interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-Driver
 <span id="projectnumber">Version 2.7.1</span>
</div>
<div id="projectbrief">Peripheral Interface for Middleware and Application Code</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Usage and Description</span></a></li>
<li><a href="modules.html"><span>Reference</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__eth__interface__gr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#groups">Content</a> |
<a href="#nested-classes">Data Structures</a> |
<a href="#enum-members">Enumerations</a> </div>
<div class="headertitle">
<div class="title">Ethernet Interface</div> </div>
</div><!--header-->
<div class="contents">
<p>Ethernet common definitions (Driver_ETH.h)
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Content</h2></td></tr>
<tr class="memitem:group__eth__interface__types1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__eth__interface__types1.html">Media Interface Types</a></td></tr>
<tr class="memdesc:group__eth__interface__types1"><td class="mdescLeft"> </td><td class="mdescRight">Ethernet Media Interface type. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__eth__mac__interface__gr"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__eth__mac__interface__gr.html">Ethernet MAC Interface</a></td></tr>
<tr class="memdesc:group__eth__mac__interface__gr"><td class="mdescLeft"> </td><td class="mdescRight">Driver API for Ethernet MAC Peripheral (Driver_ETH_MAC.h) <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__eth__phy__interface__gr"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__eth__phy__interface__gr.html">Ethernet PHY Interface</a></td></tr>
<tr class="memdesc:group__eth__phy__interface__gr"><td class="mdescLeft"> </td><td class="mdescRight">Driver API for Ethernet PHY Peripheral (Driver_ETH_PHY.h) <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structARM__ETH__LINK__INFO"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__eth__interface__gr.html#structARM__ETH__LINK__INFO">ARM_ETH_LINK_INFO</a></td></tr>
<tr class="memdesc:structARM__ETH__LINK__INFO"><td class="mdescLeft"> </td><td class="mdescRight">Ethernet link information. <a href="group__eth__interface__gr.html#structARM__ETH__LINK__INFO">More...</a><br/></td></tr>
<tr class="separator:structARM__ETH__LINK__INFO"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:structARM__ETH__MAC__ADDR"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__eth__interface__gr.html#structARM__ETH__MAC__ADDR">ARM_ETH_MAC_ADDR</a></td></tr>
<tr class="memdesc:structARM__ETH__MAC__ADDR"><td class="mdescLeft"> </td><td class="mdescRight">Ethernet MAC Address. <a href="group__eth__interface__gr.html#structARM__ETH__MAC__ADDR">More...</a><br/></td></tr>
<tr class="separator:structARM__ETH__MAC__ADDR"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gacf7db5320eb841b462a4af3c56cc9291"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291">ARM_ETH_LINK_STATE</a> { <br/>
  <a class="el" href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291a5f635c9352db6cb6fa9ad95660850487">ARM_ETH_LINK_DOWN</a>,
<br/>
  <a class="el" href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291ab5e5b02c3c8a5a0fefcf69f3be7e31c1">ARM_ETH_LINK_UP</a>
<br/>
}</td></tr>
<tr class="memdesc:gacf7db5320eb841b462a4af3c56cc9291"><td class="mdescLeft"> </td><td class="mdescRight">Ethernet link state. <a href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291">More...</a><br/></td></tr>
<tr class="separator:gacf7db5320eb841b462a4af3c56cc9291"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Ethernet common definitions (Driver_ETH.h) </p>
<p><b>Ethernet</b> is a networking technology for exchanging data packages between computer systems. Several microcontrollers integrate an Ethernet MAC (Media Access Control) data-link layer that interfaces to an Ethernet PHY (Physical Interface Transceiver).</p>
<p>Wikipedia offers more information about the <a href="http://en.wikipedia.org/wiki/Ethernet" target="_blank"><b>Ethernet</b></a>.</p>
<p><b>Block Diagram</b></p>
<p>The Ethernet PHY connects typically to the Ethernet MAC using an MII (Media Independent Interface) or RMII (Reduced Media Independent Interface).</p>
<p><br/>
</p>
<div class="image">
<img src="EthernetSchematic.png" alt="EthernetSchematic.png"/>
<div class="caption">
Block Diagram of a typical Ethernet Interface</div></div>
<p><b>Ethernet API</b></p>
<p>The following header files define the Application Programming Interface (API) for the <b>Ethernet</b> interface:</p>
<ul>
<li><b>Driver_ETH.h</b> : Common definitions of the Ethernet PHY and MAC part</li>
<li><b>Driver_ETH_MAC.h</b> : API for the Ethernet MAC</li>
<li><b>Driver_ETH_PHY.h</b> : API for the Ethernet PHY</li>
</ul>
<p>The driver implementation of the Ethernet MAC is a typical part of a Device Family Pack (DFP) that supports the peripherals of the microcontroller family. The driver implementation of the Ethernet PHY is a typical part of a <b>Network</b> Software Pack, since PHY is typically not integrated into the microcontroller.</p>
<dl class="section note"><dt>Note</dt><dd>For parameters, the value marked with (default) is the setting after the driver initialization.</dd></dl>
<p><b>Driver Functions</b></p>
<p>The driver functions are published in the access struct as explained in <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a></p>
<ul>
<li><a class="el" href="group__eth__mac__interface__gr.html#structARM__DRIVER__ETH__MAC">ARM_DRIVER_ETH_MAC</a> : access struct for <b>Ethernet MAC</b> driver functions.</li>
<li><a class="el" href="group__eth__phy__interface__gr.html#structARM__DRIVER__ETH__PHY">ARM_DRIVER_ETH_PHY</a> : access struct for <b>Ethernet PHY</b> driver functions.</li>
</ul>
<p>Both drivers are used in combination and usually the Ethernet MAC provides a media interface to the Ethernet PHY. A typical setup sequence for the drivers is shown below:</p>
<p><b>Example Code</b></p>
<p>The following example code shows the usage of the Ethernet interface.</p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__eth__mac__interface__gr.html#structARM__DRIVER__ETH__MAC">ARM_DRIVER_ETH_MAC</a> Driver_ETH_MAC0;</div>
<div class="line"><span class="keyword">extern</span> <a class="code" href="group__eth__phy__interface__gr.html#structARM__DRIVER__ETH__PHY">ARM_DRIVER_ETH_PHY</a> Driver_ETH_PHY0;</div>
<div class="line"> </div>
<div class="line"><span class="keyword">static</span> <a class="code" href="group__eth__mac__interface__gr.html#structARM__DRIVER__ETH__MAC">ARM_DRIVER_ETH_MAC</a> *mac;</div>
<div class="line"><span class="keyword">static</span> <a class="code" href="group__eth__phy__interface__gr.html#structARM__DRIVER__ETH__PHY">ARM_DRIVER_ETH_PHY</a> *phy;</div>
<div class="line"><span class="keyword">static</span> <a class="code" href="group__eth__interface__gr.html#structARM__ETH__MAC__ADDR">ARM_ETH_MAC_ADDR</a> own_mac_address;</div>
<div class="line"><span class="keyword">static</span> <a class="code" href="group__eth__mac__interface__gr.html#structARM__ETH__MAC__CAPABILITIES">ARM_ETH_MAC_CAPABILITIES</a> capabilities;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> ethernet_mac_notify (uint32_t event) {</div>
<div class="line"> <span class="keywordflow">switch</span> (event) {</div>
<div class="line"> :</div>
<div class="line"> } </div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> initialize_ethernet_interface (<span class="keywordtype">void</span>) {</div>
<div class="line"> mac = &Driver_ETH_MAC0;</div>
<div class="line"> phy = &Driver_ETH_PHY0;</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Initialize Media Access Controller</span></div>
<div class="line"> capabilities = mac-><a class="code" href="group__eth__mac__interface__gr.html#a9fd725bb058c584a9ced9c579561cdf1">GetCapabilities</a> ();</div>
<div class="line"> </div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#aa34417c70cb8b43567c59aa530866cc7">Initialize</a> (ethernet_mac_notify);</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#aba8f1c8019af95ffe19c32403e3240ef">PowerControl</a> (<a class="code" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a>);</div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">if</span> (capabilities.<a class="code" href="group__eth__mac__interface__gr.html#a7fdea04bacd9c0e12792751055ef6238">mac_address</a> == 0) {</div>
<div class="line"> <span class="comment">// populate own_mac_address with the address to use</span></div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#ac640f929dc4d5bde3e4282c75b25c00d">SetMacAddress</a>(&own_mac_address);</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">else</span> {</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a02837059933cd04b04bf795a7138f218">GetMacAddress</a>(&own_mac_address);</div>
<div class="line"> }</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Initialize Physical Media Interface</span></div>
<div class="line"> <span class="keywordflow">if</span> (phy-><a class="code" href="group__eth__phy__interface__gr.html#a9f9e7173bf8fed4d774fa48da53739ba">Initialize</a> (mac-><a class="code" href="group__eth__mac__interface__gr.html#a0f2ddb734e4242077275761400b26e35">PHY_Read</a>, mac-><a class="code" href="group__eth__mac__interface__gr.html#ac3efe9bdc31c3b1d7fd8eb82bbfb4c13">PHY_Write</a>) == <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) {</div>
<div class="line"> phy-><a class="code" href="group__eth__phy__interface__gr.html#aba8f1c8019af95ffe19c32403e3240ef">PowerControl</a> (<a class="code" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a>);</div>
<div class="line"> phy-><a class="code" href="group__eth__phy__interface__gr.html#a7dfc7cf346c80e7fdb2fe4cea2c61161">SetInterface</a> (capabilities.<a class="code" href="group__eth__mac__interface__gr.html#a3c5cb74e086417a01d0079f847a3fc8d">media_interface</a>);</div>
<div class="line"> phy-><a class="code" href="group__eth__phy__interface__gr.html#ae6686344f4d6afa0881d1e545c898a3d">SetMode</a> (<a class="code" href="group__eth__phy__mode__ctrls.html#ga6a8c54f8fed3e5f68bd04eb715d10ab9">ARM_ETH_PHY_AUTO_NEGOTIATE</a>);</div>
<div class="line"> }</div>
<div class="line"> :</div>
<div class="line"> :</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><span class="keyword">static</span> <a class="code" href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291">ARM_ETH_LINK_STATE</a> ethernet_link; <span class="comment">// current link status</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> ethernet_check_link_status (<span class="keywordtype">void</span>) {</div>
<div class="line"> <a class="code" href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291">ARM_ETH_LINK_STATE</a> link;</div>
<div class="line"> </div>
<div class="line"> link = phy-><a class="code" href="group__eth__phy__interface__gr.html#a0e25b2f267edc874f1bd785175fcf08a">GetLinkState</a> ();</div>
<div class="line"> <span class="keywordflow">if</span> (link == ethernet_link) { </div>
<div class="line"> <span class="keywordflow">return</span>; <span class="comment">// link state unchanged</span></div>
<div class="line"> }</div>
<div class="line"> <span class="comment">// link state changed</span></div>
<div class="line"> ethernet_link = link; </div>
<div class="line"> <span class="keywordflow">if</span> (link == <a class="code" href="Driver__ETH_8h.html#gacf7db5320eb841b462a4af3c56cc9291ab5e5b02c3c8a5a0fefcf69f3be7e31c1">ARM_ETH_LINK_UP</a>) { <span class="comment">// start transfer</span></div>
<div class="line"> <a class="code" href="group__eth__interface__gr.html#structARM__ETH__LINK__INFO">ARM_ETH_LINK_INFO</a> info = phy-><a class="code" href="group__eth__phy__interface__gr.html#ac162bfaf93512fa0966bfbb923c45463">GetLinkInfo</a> ();</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__eth__mac__ctrls.html#ga7819c7a1aa7bbc13dc42d0fd7e75a23c">ARM_ETH_MAC_CONFIGURE</a>,</div>
<div class="line"> info.<a class="code" href="group__eth__interface__gr.html#a220859a8b5da0232739a11cbe7f79fc5">speed</a> << <a class="code" href="Driver__ETH__MAC_8h.html#ad7fd5c5f4d4f39a56466c2d34cb699ef">ARM_ETH_MAC_SPEED_Pos</a> |</div>
<div class="line"> info.<a class="code" href="group__eth__interface__gr.html#a44b6cae894d7311dcdae7e93969c3c09">duplex</a> << <a class="code" href="Driver__ETH__MAC_8h.html#a245688f6265e8d017435dc6d2c233b87">ARM_ETH_MAC_DUPLEX_Pos</a> |</div>
<div class="line"> <a class="code" href="group__eth__mac__configuration__ctrls.html#ga43792feab641c3c87eafb943351ab0f4">ARM_ETH_MAC_ADDRESS_BROADCAST</a>);</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__eth__mac__ctrls.html#ga3a98c8a7ee5ed4b1ffd250eecaeefe5c">ARM_ETH_MAC_CONTROL_TX</a>, 1);</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__eth__mac__ctrls.html#gae0964364b81b38b6e1fbf7196f3be869">ARM_ETH_MAC_CONTROL_RX</a>, 1);</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">else</span> { <span class="comment">// stop transfer</span></div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__eth__mac__ctrls.html#ga530812ef349a2e297f23de72e660fe27">ARM_ETH_MAC_FLUSH</a>, <a class="code" href="group__eth__mac__flush__flag__ctrls.html#ga2d10ff33f4f4927820c6a17a2262b120">ARM_ETH_MAC_FLUSH_TX</a> | <a class="code" href="group__eth__mac__flush__flag__ctrls.html#gac18950811038319960756f063e1ef6d4">ARM_ETH_MAC_FLUSH_RX</a>);</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__eth__mac__ctrls.html#ga3a98c8a7ee5ed4b1ffd250eecaeefe5c">ARM_ETH_MAC_CONTROL_TX</a>, 0);</div>
<div class="line"> mac-><a class="code" href="group__eth__mac__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a>(<a class="code" href="group__eth__mac__ctrls.html#gae0964364b81b38b6e1fbf7196f3be869">ARM_ETH_MAC_CONTROL_RX</a>, 0);</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --> <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structARM__ETH__LINK__INFO" id="structARM__ETH__LINK__INFO"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ARM_ETH_LINK_INFO</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>Ethernet link information. </p>
<p>The Ethernet Link information provides parameters about the current established communication.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__eth__phy__interface__gr.html#ga8c79dcd7a12656403f3befab3c8605a2">ARM_ETH_PHY_GetLinkInfo</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a220859a8b5da0232739a11cbe7f79fc5"></a>uint32_t</td>
<td class="fieldname">
speed: 2</td>
<td class="fielddoc">
Link speed: 0= 10 MBit, 1= 100 MBit, 2= 1 GBit. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a44b6cae894d7311dcdae7e93969c3c09"></a>uint32_t</td>
<td class="fieldname">
duplex: 1</td>
<td class="fielddoc">
Duplex mode: 0= Half, 1= Full. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 29</td>
<td class="fielddoc">
</td></tr>
</table>
</div>
</div>
<a name="structARM__ETH__MAC__ADDR" id="structARM__ETH__MAC__ADDR"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct ARM_ETH_MAC_ADDR</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>Ethernet MAC Address. </p>
<p>Stores the MAC Address of the Ethernet interface as defined by IEEE 802. Wikipedia offers more information about the <a href="http://en.wikipedia.org/wiki/MAC_address" target="_blank"><b>MAC Address</b></a>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__eth__mac__interface__gr.html#ga66308c1e791952047e974bd653037fae">ARM_ETH_MAC_GetMacAddress</a>, <a class="el" href="group__eth__mac__interface__gr.html#ga7cc3d17c7312c5032202dfd9a915f24a">ARM_ETH_MAC_SetMacAddress</a>, <a class="el" href="group__eth__mac__interface__gr.html#ga150fe30290275a4b32756f94208124e8">ARM_ETH_MAC_SetAddressFilter</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab590318ac859d0e57e15c3dd6c62a605"></a>uint8_t</td>
<td class="fieldname">
b[6]</td>
<td class="fielddoc">
MAC Address (6 bytes), MSB first. </td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gacf7db5320eb841b462a4af3c56cc9291"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__eth__interface__gr.html#gacf7db5320eb841b462a4af3c56cc9291">ARM_ETH_LINK_STATE</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Ethernet link state. </p>
<p>The Ethernet Link status shows if the communication is currently established (up) or interrupted (down).</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__eth__phy__interface__gr.html#ga4085cd24ebe33b78d51a3c003da4a5ba">ARM_ETH_PHY_GetLinkState</a> </li>
</ul>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gacf7db5320eb841b462a4af3c56cc9291a5f635c9352db6cb6fa9ad95660850487"></a>ARM_ETH_LINK_DOWN</em> </td><td class="fielddoc">
<p>Link is down. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gacf7db5320eb841b462a4af3c56cc9291ab5e5b02c3c8a5a0fefcf69f3be7e31c1"></a>ARM_ETH_LINK_UP</em> </td><td class="fielddoc">
<p>Link is up. </p>
</td></tr>
</table>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Wed Jul 10 2019 15:20:31 for CMSIS-Driver Version 2.7.1 by Arm Ltd. All rights reserved.
<!--
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
-->
</li>
</ul>
</div>
</body>
</html>
|