aboutsummaryrefslogtreecommitdiff
path: root/test/html/manual/doxygen.html
blob: 24d7326e00bd61b7cb28ddc0f25aa2f84e3bee66 (plain)
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<!-- HTML header for doxygen 1.8.7-->
<!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"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>avr-libc: AVR Libc</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="dox.css" rel="stylesheet" type="text/css"/>
</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: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">avr-libc
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Standard C library for AVR-GCC</div>
  </td>
   <td>        <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>
</td>
 </tr>
 </tbody>
</table>
<table>
  <tr>
    <td align="left"><a href="http://www.nongnu.org/avr-libc/"><h2>AVR Libc Home Page</h2></a></td>
    <td align="center" colspan=4><img src="avrs.png" alt="AVRs" align="middle" border="0"></td>
    <td align="right"><a href="https://savannah.nongnu.org/projects/avr-libc/"><h2>AVR Libc Development Pages</h2></a></td>
  </tr>
  <tr>
    <td align="center" width="20%"><a href="index.html"><h2>Main Page</h2></a></td>
    <td align="center" width="20%"><a href="pages.html"><h2>User Manual</h2></a></td>
    <td align="center" width="20%"><a href="modules.html"><h2>Library Reference</h2></a></td>
    <td align="center" width="20%"><a href="FAQ.html"><h2>FAQ</h2></a></td>
    <td align="center" width="20%"><a href="group__demos.html"><h2>Example Projects</h2></a></td>
  </tr>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</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="headertitle">
<div class="title">AVR Libc </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="avr_libc_intro"></a>
Introduction</h1>
<p>The latest version of this document is always available from <a href="http://savannah.nongnu.org/projects/avr-libc/">http://savannah.nongnu.org/projects/avr-libc/</a></p>
<p>The AVR Libc package provides a subset of the standard C library for <a href="http://www.atmel.com/products/AVR/">Atmel AVR 8-bit RISC microcontrollers</a>. In addition, the library provides the basic startup code needed by most applications.</p>
<p>There is a wealth of information in this document which goes beyond simply describing the interfaces and routines provided by the library. We hope that this document provides enough information to get a new AVR developer up to speed quickly using the freely available development tools: binutils, gcc avr-libc and many others.</p>
<p>If you find yourself stuck on a problem which this document doesn't quite address, you may wish to post a message to the avr-gcc mailing list. Most of the developers of the AVR binutils and gcc ports in addition to the devleopers of avr-libc subscribe to the list, so you will usually be able to get your problem resolved. You can subscribe to the list at <a href="http://lists.nongnu.org/mailman/listinfo/avr-gcc-list">http://lists.nongnu.org/mailman/listinfo/avr-gcc-list</a> . Before posting to the list, you might want to try reading the <a class="el" href="FAQ.html">Frequently Asked Questions</a> chapter of this document.</p>
<dl class="section note"><dt>Note</dt><dd>If you think you've found a bug, or have a suggestion for an improvement, either in this documentation or in the library itself, please use the bug tracker at <a href="https://savannah.nongnu.org/bugs/?group=avr-libc">https://savannah.nongnu.org/bugs/?group=avr-libc</a> to ensure the issue won't be forgotten.</dd></dl>
<h1><a class="anchor" id="avr_libc_general"></a>
General information about this library</h1>
<p>In general, it has been the goal to stick as best as possible to established standards while implementing this library. Commonly, this refers to the C library as described by the ANSI X3.159-1989 and ISO/IEC 9899:1990 ("ANSI-C") standard, as well as parts of their successor ISO/IEC 9899:1999 ("C99"). Some additions have been inspired by other standards like IEEE Std 1003.1-1988 ("POSIX.1"), while other extensions are purely AVR-specific (like the entire program-space string interface).</p>
<p>Unless otherwise noted, functions of this library are <em>not</em> guaranteed to be reentrant. In particular, any functions that store local state are known to be non-reentrant, as well as functions that manipulate IO registers like the EEPROM access routines. If these functions are used within both standard and interrupt contexts undefined behaviour will result. See the FAQ for a more detailed discussion.</p>
<h1><a class="anchor" id="supp_devices"></a>
Supported Devices</h1>
<p><a name="supported%20devices"></a></p>
<p>The following is a list of AVR devices currently supported by the library. Note that actual support for some newer devices depends on the ability of the compiler/assembler to support these devices at library compile-time.</p>
<dl class="section user"><dt>megaAVR Devices:</dt><dd></dd></dl>
<ul>
<li>atmega103</li>
<li>atmega128</li>
<li>atmega128a</li>
<li>atmega1280</li>
<li>atmega1281</li>
<li>atmega1284</li>
<li>atmega1284p</li>
<li>atmega16</li>
<li>atmega161</li>
<li>atmega162</li>
<li>atmega163</li>
<li>atmega164a</li>
<li>atmega164p</li>
<li>atmega164pa</li>
<li>atmega165</li>
<li>atmega165a</li>
<li>atmega165p</li>
<li>atmega165pa</li>
<li>atmega168</li>
<li>atmega168a</li>
<li>atmega168p</li>
<li>atmega168pa</li>
<li>atmega16a</li>
<li>atmega2560</li>
<li>atmega2561</li>
<li>atmega32</li>
<li>atmega32a</li>
<li>atmega323</li>
<li>atmega324a</li>
<li>atmega324p</li>
<li>atmega324pa</li>
<li>atmega325</li>
<li>atmega325a</li>
<li>atmega325p</li>
<li>atmega325pa</li>
<li>atmega3250</li>
<li>atmega3250a</li>
<li>atmega3250p</li>
<li>atmega3250pa</li>
<li>atmega328</li>
<li>atmega328p</li>
<li>atmega48</li>
<li>atmega48a</li>
<li>atmega48pa</li>
<li>atmega48pb</li>
<li>atmega48p</li>
<li>atmega64</li>
<li>atmega64a</li>
<li>atmega640</li>
<li>atmega644</li>
<li>atmega644a</li>
<li>atmega644p</li>
<li>atmega644pa</li>
<li>atmega645</li>
<li>atmega645a</li>
<li>atmega645p</li>
<li>atmega6450</li>
<li>atmega6450a</li>
<li>atmega6450p</li>
<li>atmega8</li>
<li>atmega8a</li>
<li>atmega88</li>
<li>atmega88a</li>
<li>atmega88p</li>
<li>atmega88pa</li>
<li>atmega88pb</li>
<li>atmega8515</li>
<li>atmega8535</li>
</ul>
<dl class="section user"><dt>tinyAVR Devices:</dt><dd></dd></dl>
<ul>
<li>attiny4</li>
<li>attiny5</li>
<li>attiny10</li>
<li>attiny11 <a class="el" href="index.html#supp_dev_footnote_one">[1]</a></li>
<li>attiny12 <a class="el" href="index.html#supp_dev_footnote_one">[1]</a></li>
<li>attiny13</li>
<li>attiny13a</li>
<li>attiny15 <a class="el" href="index.html#supp_dev_footnote_one">[1]</a></li>
<li>attiny20</li>
<li>attiny22</li>
<li>attiny24</li>
<li>attiny24a</li>
<li>attiny25</li>
<li>attiny26</li>
<li>attiny261</li>
<li>attiny261a</li>
<li>attiny28 <a class="el" href="index.html#supp_dev_footnote_one">[1]</a></li>
<li>attiny2313</li>
<li>attiny2313a</li>
<li>attiny40</li>
<li>attiny4313</li>
<li>attiny43u</li>
<li>attiny44</li>
<li>attiny44a</li>
<li>attiny441</li>
<li>attiny45</li>
<li>attiny461</li>
<li>attiny461a</li>
<li>attiny48</li>
<li>attiny828</li>
<li>attiny84</li>
<li>attiny84a</li>
<li>attiny841</li>
<li>attiny85</li>
<li>attiny861</li>
<li>attiny861a</li>
<li>attiny87</li>
<li>attiny88</li>
<li>attiny1634</li>
</ul>
<dl class="section user"><dt>Automotive AVR Devices:</dt><dd></dd></dl>
<ul>
<li>atmega16m1</li>
<li>atmega32c1</li>
<li>atmega32m1</li>
<li>atmega64c1</li>
<li>atmega64m1</li>
<li>attiny167</li>
<li>ata5505</li>
<li>ata5272</li>
<li>ata5702m322</li>
<li>ata5782</li>
<li>ata5790</li>
<li>ata5790n</li>
<li>ata5831</li>
<li>ata5795</li>
<li>ata6612c</li>
<li>ata6613c</li>
<li>ata6614q</li>
<li>ata6616c</li>
<li>ata6617c</li>
<li>ata664251</li>
</ul>
<dl class="section user"><dt>CAN AVR Devices:</dt><dd></dd></dl>
<ul>
<li>at90can32</li>
<li>at90can64</li>
<li>at90can128</li>
</ul>
<dl class="section user"><dt>LCD AVR Devices:</dt><dd></dd></dl>
<ul>
<li>atmega169</li>
<li>atmega169a</li>
<li>atmega169p</li>
<li>atmega169pa</li>
<li>atmega329</li>
<li>atmega329a</li>
<li>atmega329p</li>
<li>atmega329pa</li>
<li>atmega3290</li>
<li>atmega3290a</li>
<li>atmega3290p</li>
<li>atmega3290pa</li>
<li>atmega649</li>
<li>atmega649a</li>
<li>atmega6490</li>
<li>atmega6490a</li>
<li>atmega6490p</li>
<li>atmega649p</li>
</ul>
<dl class="section user"><dt>Lighting AVR Devices:</dt><dd></dd></dl>
<ul>
<li>at90pwm1</li>
<li>at90pwm2</li>
<li>at90pwm2b</li>
<li>at90pwm216</li>
<li>at90pwm3</li>
<li>at90pwm3b</li>
<li>at90pwm316</li>
<li>at90pwm161</li>
<li>at90pwm81</li>
</ul>
<dl class="section user"><dt>Smart Battery AVR Devices:</dt><dd></dd></dl>
<ul>
<li>atmega8hva</li>
<li>atmega16hva</li>
<li>atmega16hva2</li>
<li>atmega16hvb</li>
<li>atmega16hvbrevb</li>
<li>atmega32hvb</li>
<li>atmega32hvbrevb</li>
<li>atmega64hve</li>
<li>atmega64hve2</li>
<li>atmega406</li>
</ul>
<dl class="section user"><dt>USB AVR Devices:</dt><dd></dd></dl>
<ul>
<li>at90usb82</li>
<li>at90usb162</li>
<li>at90usb646</li>
<li>at90usb647</li>
<li>at90usb1286</li>
<li>at90usb1287</li>
<li>atmega8u2</li>
<li>atmega16u2</li>
<li>atmega16u4</li>
<li>atmega32u2</li>
<li>atmega32u4</li>
<li>atmega32u6</li>
</ul>
<dl class="section user"><dt>XMEGA Devices:</dt><dd></dd></dl>
<ul>
<li>atxmega8e5</li>
<li>atxmega16a4</li>
<li>atxmega16a4u</li>
<li>atxmega16c4</li>
<li>atxmega16d4</li>
<li>atxmega32a4</li>
<li>atxmega32a4u</li>
<li>atxmega32c3</li>
<li>atxmega32c4</li>
<li>atxmega32d3</li>
<li>atxmega32d4</li>
<li>atxmega32e5</li>
<li>atxmega64a1</li>
<li>atxmega64a1u</li>
<li>atxmega64a3</li>
<li>atxmega64a3u</li>
<li>atxmega64a4u</li>
<li>atxmega64b1</li>
<li>atxmega64b3</li>
<li>atxmega64c3</li>
<li>atxmega64d3</li>
<li>atxmega64d4</li>
<li>atxmega128a1</li>
<li>atxmega128a1u</li>
<li>atxmega128a3</li>
<li>atxmega128a3u</li>
<li>atxmega128a4u</li>
<li>atxmega128b1</li>
<li>atxmega128b3</li>
<li>atxmega128c3</li>
<li>atxmega128d3</li>
<li>atxmega128d4</li>
<li>atxmega192a3</li>
<li>atxmega192a3u</li>
<li>atxmega192c3</li>
<li>atxmega192d3</li>
<li>atxmega256a3</li>
<li>atxmega256a3u</li>
<li>atxmega256a3b</li>
<li>atxmega256a3bu</li>
<li>atxmega256c3</li>
<li>atxmega256d3</li>
<li>atxmega384c3</li>
<li>atxmega384d3</li>
</ul>
<dl class="section user"><dt>Wireless AVR devices:</dt><dd></dd></dl>
<ul>
<li>atmega644rfr2</li>
<li>atmega64rfr2</li>
<li>atmega128rfa1</li>
<li>atmega1284rfr2</li>
<li>atmega128rfr2</li>
<li>atmega2564rfr2</li>
<li>atmega256rfr2</li>
</ul>
<dl class="section user"><dt>Miscellaneous Devices:</dt><dd></dd></dl>
<ul>
<li>at94K <a class="el" href="index.html#supp_dev_footnote_two">[2]</a></li>
<li>at76c711 <a class="el" href="index.html#supp_dev_footnote_three">[3]</a></li>
<li>at43usb320</li>
<li>at43usb355</li>
<li>at86rf401</li>
<li>at90scr100</li>
<li>ata6285</li>
<li>ata6286</li>
<li>ata6289</li>
<li>m3000 <a class="el" href="index.html#supp_dev_footnote_four">[4]</a></li>
</ul>
<dl class="section user"><dt>Classic AVR Devices:</dt><dd></dd></dl>
<ul>
<li>at90s1200 <a class="el" href="index.html#supp_dev_footnote_one">[1]</a></li>
<li>at90s2313</li>
<li>at90s2323</li>
<li>at90s2333</li>
<li>at90s2343</li>
<li>at90s4414</li>
<li>at90s4433</li>
<li>at90s4434</li>
<li>at90s8515</li>
<li>at90c8534</li>
<li>at90s8535</li>
</ul>
<p><a class="anchor" id="supp_dev_footnote_one"></a> </p><dl class="section note"><dt>Note</dt><dd><b>[1]</b> Assembly only. There is no direct support for these devices to be programmed in C since they do not have a RAM based stack. Still, it could be possible to program them in C, see the <a class="el" href="FAQ.html#faq_tinyavr_c">FAQ</a> for an option.</dd></dl>
<p><a class="anchor" id="supp_dev_footnote_two"></a> </p><dl class="section note"><dt>Note</dt><dd><b>[2]</b> The at94K devices are a combination of FPGA and AVR microcontroller. [TRoth-2002/11/12: Not sure of the level of support for these. More information would be welcomed.]</dd></dl>
<p><a class="anchor" id="supp_dev_footnote_three"></a> </p><dl class="section note"><dt>Note</dt><dd><b>[3]</b> The at76c711 is a USB to fast serial interface bridge chip using an AVR core.</dd></dl>
<p><a class="anchor" id="supp_dev_footnote_four"></a> </p><dl class="section note"><dt>Note</dt><dd><b>[4]</b> The m3000 is a motor controller AVR ASIC from Intelligent Motion Systems (IMS) / Schneider Electric.</dd></dl>
<h1><a class="anchor" id="license"></a>
avr-libc License</h1>
<p>avr-libc can be freely used and redistributed, provided the following license conditions are met.</p>
<pre class="fragment">Portions of avr-libc are Copyright (c) 1999-2016
Werner Boellmann,
Dean Camera,
Pieter Conradie,
Brian Dean,
Keith Gudger,
Wouter van Gulik,
Bjoern Haase,
Steinar Haugen,
Peter Jansen,
Reinhard Jessich,
Magnus Johansson,
Harald Kipp,
Carlos Lamas,
Cliff Lawson,
Artur Lipowski,
Marek Michalkiewicz,
Todd C. Miller,
Rich Neswold,
Colin O'Flynn,
Bob Paddock,
Andrey Pashchenko,
Reiner Patommel,
Florin-Viorel Petrov,
Alexander Popov,
Michael Rickman,
Theodore A. Roth,
Juergen Schilling,
Philip Soeberg,
Anatoly Sokolov,
Nils Kristian Strom,
Michael Stumpf,
Stefan Swanepoel,
Helmut Wallner,
Eric B. Weddington,
Joerg Wunsch,
Dmitry Xmelkov,
Atmel Corporation,
egnite Software GmbH,
The Regents of the University of California. 
All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:

   * Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

   * Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.

   * Neither the name of the copyright holders nor the names of
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.
</pre> </div></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.7-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 8 2016 23:59:10 for avr-libc by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>