\hypertarget{index_avr_libc_intro}{}\doxysubsection{Introduction}\label{index_avr_libc_intro}
The latest version of this document is always available from \href{http://savannah.nongnu.org/projects/avr-libc/}{\texttt{ http\+://savannah.\+nongnu.\+org/projects/avr-\/libc/}}

The A\+VR Libc package provides a subset of the standard C library for \href{http://www.atmel.com/products/AVR/}{\texttt{ Atmel A\+VR 8-\/bit R\+I\+SC microcontrollers}}. In addition, the library provides the basic startup code needed by most applications.

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 A\+VR developer up to speed quickly using the freely available development tools\+: binutils, gcc avr-\/libc and many others.

If you find yourself stuck on a problem which this document doesn\textquotesingle{}t quite address, you may wish to post a message to the avr-\/gcc mailing list. Most of the developers of the A\+VR 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 \href{http://lists.nongnu.org/mailman/listinfo/avr-gcc-list}{\texttt{ http\+://lists.\+nongnu.\+org/mailman/listinfo/avr-\/gcc-\/list}} . Before posting to the list, you might want to try reading the \mbox{\hyperlink{FAQ}{Frequently Asked Questions}} chapter of this document.

\begin{DoxyNote}{Note}
If you think you\textquotesingle{}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 \href{https://savannah.nongnu.org/bugs/?group=avr-libc}{\texttt{ https\+://savannah.\+nongnu.\+org/bugs/?group=avr-\/libc}} to ensure the issue won\textquotesingle{}t be forgotten.
\end{DoxyNote}
\hypertarget{index_avr_libc_general}{}\doxysubsection{General information about this library}\label{index_avr_libc_general}
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 A\+N\+SI X3.\+159-\/1989 and I\+S\+O/\+I\+EC 9899\+:1990 (\char`\"{}\+A\+N\+S\+I-\/\+C\char`\"{}) standard, as well as parts of their successor I\+S\+O/\+I\+EC 9899\+:1999 (\char`\"{}\+C99\char`\"{}). Some additions have been inspired by other standards like I\+E\+EE Std 1003.\+1-\/1988 (\char`\"{}\+P\+O\+S\+I\+X.\+1\char`\"{}), while other extensions are purely A\+V\+R-\/specific (like the entire program-\/space string interface).

Unless otherwise noted, functions of this library are {\itshape not} 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 E\+E\+P\+R\+OM access routines. If these functions are used within both standard and interrupt contexts undefined behaviour will result. See the F\+AQ for a more detailed discussion.\hypertarget{index_supp_devices}{}\doxysubsection{Supported Devices}\label{index_supp_devices}
\index{supported devices@{supported devices}}

The following is a list of A\+VR 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.

\begin{DoxyParagraph}{mega\+A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item atmega103
\item atmega128
\item atmega128a
\item atmega1280
\item atmega1281
\item atmega1284
\item atmega1284p
\item atmega16
\item atmega161
\item atmega162
\item atmega163
\item atmega164a
\item atmega164p
\item atmega164pa
\item atmega165
\item atmega165a
\item atmega165p
\item atmega165pa
\item atmega168
\item atmega168a
\item atmega168p
\item atmega168pa
\item atmega16a
\item atmega2560
\item atmega2561
\item atmega32
\item atmega32a
\item atmega323
\item atmega324a
\item atmega324p
\item atmega324pa
\item atmega325
\item atmega325a
\item atmega325p
\item atmega325pa
\item atmega3250
\item atmega3250a
\item atmega3250p
\item atmega3250pa
\item atmega328
\item atmega328p
\item atmega48
\item atmega48a
\item atmega48pa
\item atmega48pb
\item atmega48p
\item atmega64
\item atmega64a
\item atmega640
\item atmega644
\item atmega644a
\item atmega644p
\item atmega644pa
\item atmega645
\item atmega645a
\item atmega645p
\item atmega6450
\item atmega6450a
\item atmega6450p
\item atmega8
\item atmega8a
\item atmega88
\item atmega88a
\item atmega88p
\item atmega88pa
\item atmega88pb
\item atmega8515
\item atmega8535
\end{DoxyItemize}

\begin{DoxyParagraph}{tiny\+A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item attiny4
\item attiny5
\item attiny10
\item attiny11 \mbox{\hyperlink{index_supp_dev_footnote_one}{\mbox{[}1\mbox{]}}}
\item attiny12 \mbox{\hyperlink{index_supp_dev_footnote_one}{\mbox{[}1\mbox{]}}}
\item attiny13
\item attiny13a
\item attiny15 \mbox{\hyperlink{index_supp_dev_footnote_one}{\mbox{[}1\mbox{]}}}
\item attiny20
\item attiny22
\item attiny24
\item attiny24a
\item attiny25
\item attiny26
\item attiny261
\item attiny261a
\item attiny28 \mbox{\hyperlink{index_supp_dev_footnote_one}{\mbox{[}1\mbox{]}}}
\item attiny2313
\item attiny2313a
\item attiny40
\item attiny4313
\item attiny43u
\item attiny44
\item attiny44a
\item attiny441
\item attiny45
\item attiny461
\item attiny461a
\item attiny48
\item attiny828
\item attiny84
\item attiny84a
\item attiny841
\item attiny85
\item attiny861
\item attiny861a
\item attiny87
\item attiny88
\item attiny1634
\end{DoxyItemize}

\begin{DoxyParagraph}{Automotive A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item atmega16m1
\item atmega32c1
\item atmega32m1
\item atmega64c1
\item atmega64m1
\item attiny167
\item ata5505
\item ata5272
\item ata5702m322
\item ata5782
\item ata5790
\item ata5790n
\item ata5831
\item ata5795
\item ata6612c
\item ata6613c
\item ata6614q
\item ata6616c
\item ata6617c
\item ata664251
\end{DoxyItemize}

\begin{DoxyParagraph}{C\+AN A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item at90can32
\item at90can64
\item at90can128
\end{DoxyItemize}

\begin{DoxyParagraph}{L\+CD A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item atmega169
\item atmega169a
\item atmega169p
\item atmega169pa
\item atmega329
\item atmega329a
\item atmega329p
\item atmega329pa
\item atmega3290
\item atmega3290a
\item atmega3290p
\item atmega3290pa
\item atmega649
\item atmega649a
\item atmega6490
\item atmega6490a
\item atmega6490p
\item atmega649p
\end{DoxyItemize}

\begin{DoxyParagraph}{Lighting A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item at90pwm1
\item at90pwm2
\item at90pwm2b
\item at90pwm216
\item at90pwm3
\item at90pwm3b
\item at90pwm316
\item at90pwm161
\item at90pwm81
\end{DoxyItemize}

\begin{DoxyParagraph}{Smart Battery A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item atmega8hva
\item atmega16hva
\item atmega16hva2
\item atmega16hvb
\item atmega16hvbrevb
\item atmega32hvb
\item atmega32hvbrevb
\item atmega64hve
\item atmega64hve2
\item atmega406
\end{DoxyItemize}

\begin{DoxyParagraph}{U\+SB A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item at90usb82
\item at90usb162
\item at90usb646
\item at90usb647
\item at90usb1286
\item at90usb1287
\item atmega8u2
\item atmega16u2
\item atmega16u4
\item atmega32u2
\item atmega32u4
\item atmega32u6
\end{DoxyItemize}

\begin{DoxyParagraph}{X\+M\+E\+GA Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item atxmega8e5
\item atxmega16a4
\item atxmega16a4u
\item atxmega16c4
\item atxmega16d4
\item atxmega32a4
\item atxmega32a4u
\item atxmega32c3
\item atxmega32c4
\item atxmega32d3
\item atxmega32d4
\item atxmega32e5
\item atxmega64a1
\item atxmega64a1u
\item atxmega64a3
\item atxmega64a3u
\item atxmega64a4u
\item atxmega64b1
\item atxmega64b3
\item atxmega64c3
\item atxmega64d3
\item atxmega64d4
\item atxmega128a1
\item atxmega128a1u
\item atxmega128a3
\item atxmega128a3u
\item atxmega128a4u
\item atxmega128b1
\item atxmega128b3
\item atxmega128c3
\item atxmega128d3
\item atxmega128d4
\item atxmega192a3
\item atxmega192a3u
\item atxmega192c3
\item atxmega192d3
\item atxmega256a3
\item atxmega256a3u
\item atxmega256a3b
\item atxmega256a3bu
\item atxmega256c3
\item atxmega256d3
\item atxmega384c3
\item atxmega384d3
\end{DoxyItemize}

\begin{DoxyParagraph}{Wireless A\+VR devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item atmega644rfr2
\item atmega64rfr2
\item atmega128rfa1
\item atmega1284rfr2
\item atmega128rfr2
\item atmega2564rfr2
\item atmega256rfr2
\end{DoxyItemize}

\begin{DoxyParagraph}{Miscellaneous Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item at94K \mbox{\hyperlink{index_supp_dev_footnote_two}{\mbox{[}2\mbox{]}}}
\item at76c711 \mbox{\hyperlink{index_supp_dev_footnote_three}{\mbox{[}3\mbox{]}}}
\item at43usb320
\item at43usb355
\item at86rf401
\item at90scr100
\item ata6285
\item ata6286
\item ata6289
\item m3000 \mbox{\hyperlink{index_supp_dev_footnote_four}{\mbox{[}4\mbox{]}}}
\end{DoxyItemize}

\begin{DoxyParagraph}{Classic A\+VR Devices\+:}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item at90s1200 \mbox{\hyperlink{index_supp_dev_footnote_one}{\mbox{[}1\mbox{]}}}
\item at90s2313
\item at90s2323
\item at90s2333
\item at90s2343
\item at90s4414
\item at90s4433
\item at90s4434
\item at90s8515
\item at90c8534
\item at90s8535
\end{DoxyItemize}

\label{index_supp_dev_footnote_one}%
\Hypertarget{index_supp_dev_footnote_one}%
 \begin{DoxyNote}{Note}
{\bfseries{\mbox{[}1\mbox{]}}} Assembly only. There is no direct support for these devices to be programmed in C since they do not have a R\+AM based stack. Still, it could be possible to program them in C, see the \mbox{\hyperlink{FAQ_faq_tinyavr_c}{F\+AQ}} for an option.
\end{DoxyNote}
\label{index_supp_dev_footnote_two}%
\Hypertarget{index_supp_dev_footnote_two}%
 \begin{DoxyNote}{Note}
{\bfseries{\mbox{[}2\mbox{]}}} The at94K devices are a combination of F\+P\+GA and A\+VR microcontroller. \mbox{[}T\+Roth-\/2002/11/12\+: Not sure of the level of support for these. More information would be welcomed.\mbox{]}
\end{DoxyNote}
\label{index_supp_dev_footnote_three}%
\Hypertarget{index_supp_dev_footnote_three}%
 \begin{DoxyNote}{Note}
{\bfseries{\mbox{[}3\mbox{]}}} The at76c711 is a U\+SB to fast serial interface bridge chip using an A\+VR core.
\end{DoxyNote}
\label{index_supp_dev_footnote_four}%
\Hypertarget{index_supp_dev_footnote_four}%
 \begin{DoxyNote}{Note}
{\bfseries{\mbox{[}4\mbox{]}}} The m3000 is a motor controller A\+VR A\+S\+IC from Intelligent Motion Systems (I\+MS) / Schneider Electric.
\end{DoxyNote}
\hypertarget{index_license}{}\doxysubsection{avr-\/libc License}\label{index_license}
avr-\/libc can be freely used and redistributed, provided the following license conditions are met.

\begin{DoxyVerb}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.
\end{DoxyVerb}
 