\hypertarget{group__avr__stdlib}{}\doxysubsection{$<$stdlib.\+h$>$\+: General utilities}
\label{group__avr__stdlib}\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxysubsubsection*{Non-\/standard (i.\+e. non-\/\+I\+SO C) functions.}
\begin{DoxyCompactItemize}
\item 
char $\ast$ \mbox{\hyperlink{group__avr__stdlib_ga5a3fce5fbd20140584619ba9aed09f75}{ltoa}} (long val, char $\ast$s, int radix)
\item 
char $\ast$ \mbox{\hyperlink{group__avr__stdlib_gad50d835af7e358518fd100179732e948}{utoa}} (unsigned int val, char $\ast$s, int radix)
\item 
char $\ast$ \mbox{\hyperlink{group__avr__stdlib_ga34f41757388f40e340f31e370ac009b5}{ultoa}} (unsigned long val, char $\ast$s, int radix)
\item 
long \mbox{\hyperlink{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}{random}} (void)
\item 
void \mbox{\hyperlink{group__avr__stdlib_ga4fca27496ca29c0a723d197696641eff}{srandom}} (unsigned long \+\_\+\+\_\+seed)
\item 
long \mbox{\hyperlink{group__avr__stdlib_gaa99a0733f06d2b9960a1401c2721af1e}{random\+\_\+r}} (unsigned long $\ast$\+\_\+\+\_\+ctx)
\item 
char $\ast$ \mbox{\hyperlink{group__avr__stdlib_gaa571de9e773dde59b0550a5ca4bd2f00}{itoa}} (int val, char $\ast$s, int radix)
\item 
\#define \mbox{\hyperlink{group__avr__stdlib_ga3bd31f0d9a9127548b734e7ca03cc6df}{R\+A\+N\+D\+O\+M\+\_\+\+M\+AX}}~0x7\+F\+F\+F\+F\+F\+FF
\end{DoxyCompactItemize}
\doxysubsubsection*{Conversion functions for double arguments.}
\label{_amgrp67796e0946dab291b611cb32584a051f}%
Note that these functions are not located in the default library, {\ttfamily libc.\+a}, but in the mathematical library, {\ttfamily libm.\+a}. So when linking the application, the {\ttfamily -\/lm} option needs to be specified. \begin{DoxyCompactItemize}
\item 
char $\ast$ \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre}} (double \+\_\+\+\_\+val, char $\ast$\+\_\+\+\_\+s, unsigned char \+\_\+\+\_\+prec, unsigned char \+\_\+\+\_\+flags)
\item 
char $\ast$ \mbox{\hyperlink{group__avr__stdlib_ga060c998e77fb5fc0d3168b3ce8771d42}{dtostrf}} (double \+\_\+\+\_\+val, signed char \+\_\+\+\_\+width, unsigned char \+\_\+\+\_\+prec, char $\ast$\+\_\+\+\_\+s)
\item 
\#define \mbox{\hyperlink{group__avr__stdlib_ga815d0d26e215d9b78af1cb2288d22361}{D\+T\+O\+S\+T\+R\+\_\+\+A\+L\+W\+A\+Y\+S\+\_\+\+S\+I\+GN}}~0x01        /$\ast$ put \textquotesingle{}+\textquotesingle{} or \textquotesingle{} \textquotesingle{} for positives $\ast$/
\item 
\#define \mbox{\hyperlink{group__avr__stdlib_ga268774f80047812307365f3113109767}{D\+T\+O\+S\+T\+R\+\_\+\+P\+L\+U\+S\+\_\+\+S\+I\+GN}}~0x02        /$\ast$ put \textquotesingle{}+\textquotesingle{} rather than \textquotesingle{} \textquotesingle{} $\ast$/
\item 
\#define \mbox{\hyperlink{group__avr__stdlib_ga125348f1e1fed1793426f4c4dc6fb2f7}{D\+T\+O\+S\+T\+R\+\_\+\+U\+P\+P\+E\+R\+C\+A\+SE}}~0x04        /$\ast$ put \textquotesingle{}E\textquotesingle{} rather \textquotesingle{}e\textquotesingle{} $\ast$/
\item 
\#define \mbox{\hyperlink{group__avr__stdlib_ga687984f47d8cce148d1b914d2b79612a}{E\+X\+I\+T\+\_\+\+S\+U\+C\+C\+E\+SS}}~0
\item 
\#define \mbox{\hyperlink{group__avr__stdlib_ga73efe787c131b385070f25d18b7c9aa4}{E\+X\+I\+T\+\_\+\+F\+A\+I\+L\+U\+RE}}~1
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{stdlib_8h}{stdlib.h}}>} }
\end{DoxyCode}


This file declares some basic C macros and functions as defined by the I\+SO standard, plus some A\+V\+R-\/specific extensions. 

\doxysubsubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__avr__stdlib_ga815d0d26e215d9b78af1cb2288d22361}\label{group__avr__stdlib_ga815d0d26e215d9b78af1cb2288d22361}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!DTOSTR\_ALWAYS\_SIGN@{DTOSTR\_ALWAYS\_SIGN}}
\index{DTOSTR\_ALWAYS\_SIGN@{DTOSTR\_ALWAYS\_SIGN}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{DTOSTR\_ALWAYS\_SIGN}{DTOSTR\_ALWAYS\_SIGN}}
{\footnotesize\ttfamily \#define D\+T\+O\+S\+T\+R\+\_\+\+A\+L\+W\+A\+Y\+S\+\_\+\+S\+I\+GN~0x01        /$\ast$ put \textquotesingle{}+\textquotesingle{} or \textquotesingle{} \textquotesingle{} for positives $\ast$/}

Bit value that can be passed in {\ttfamily flags} to \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre()}}. \mbox{\Hypertarget{group__avr__stdlib_ga268774f80047812307365f3113109767}\label{group__avr__stdlib_ga268774f80047812307365f3113109767}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!DTOSTR\_PLUS\_SIGN@{DTOSTR\_PLUS\_SIGN}}
\index{DTOSTR\_PLUS\_SIGN@{DTOSTR\_PLUS\_SIGN}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{DTOSTR\_PLUS\_SIGN}{DTOSTR\_PLUS\_SIGN}}
{\footnotesize\ttfamily \#define D\+T\+O\+S\+T\+R\+\_\+\+P\+L\+U\+S\+\_\+\+S\+I\+GN~0x02        /$\ast$ put \textquotesingle{}+\textquotesingle{} rather than \textquotesingle{} \textquotesingle{} $\ast$/}

Bit value that can be passed in {\ttfamily flags} to \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre()}}. \mbox{\Hypertarget{group__avr__stdlib_ga125348f1e1fed1793426f4c4dc6fb2f7}\label{group__avr__stdlib_ga125348f1e1fed1793426f4c4dc6fb2f7}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!DTOSTR\_UPPERCASE@{DTOSTR\_UPPERCASE}}
\index{DTOSTR\_UPPERCASE@{DTOSTR\_UPPERCASE}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{DTOSTR\_UPPERCASE}{DTOSTR\_UPPERCASE}}
{\footnotesize\ttfamily \#define D\+T\+O\+S\+T\+R\+\_\+\+U\+P\+P\+E\+R\+C\+A\+SE~0x04        /$\ast$ put \textquotesingle{}E\textquotesingle{} rather \textquotesingle{}e\textquotesingle{} $\ast$/}

Bit value that can be passed in {\ttfamily flags} to \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre()}}. \mbox{\Hypertarget{group__avr__stdlib_ga73efe787c131b385070f25d18b7c9aa4}\label{group__avr__stdlib_ga73efe787c131b385070f25d18b7c9aa4}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!EXIT\_FAILURE@{EXIT\_FAILURE}}
\index{EXIT\_FAILURE@{EXIT\_FAILURE}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{EXIT\_FAILURE}{EXIT\_FAILURE}}
{\footnotesize\ttfamily \#define E\+X\+I\+T\+\_\+\+F\+A\+I\+L\+U\+RE~1}

Unsuccessful termination for \mbox{\hyperlink{stdlib_8h_a137096a48cc0c731052cadfb69c39b34}{exit()}}; evaluates to a non-\/zero value. \mbox{\Hypertarget{group__avr__stdlib_ga687984f47d8cce148d1b914d2b79612a}\label{group__avr__stdlib_ga687984f47d8cce148d1b914d2b79612a}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!EXIT\_SUCCESS@{EXIT\_SUCCESS}}
\index{EXIT\_SUCCESS@{EXIT\_SUCCESS}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{EXIT\_SUCCESS}{EXIT\_SUCCESS}}
{\footnotesize\ttfamily \#define E\+X\+I\+T\+\_\+\+S\+U\+C\+C\+E\+SS~0}

Successful termination for \mbox{\hyperlink{stdlib_8h_a137096a48cc0c731052cadfb69c39b34}{exit()}}; evaluates to 0. \mbox{\Hypertarget{group__avr__stdlib_ga3bd31f0d9a9127548b734e7ca03cc6df}\label{group__avr__stdlib_ga3bd31f0d9a9127548b734e7ca03cc6df}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!RANDOM\_MAX@{RANDOM\_MAX}}
\index{RANDOM\_MAX@{RANDOM\_MAX}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{RANDOM\_MAX}{RANDOM\_MAX}}
{\footnotesize\ttfamily \#define R\+A\+N\+D\+O\+M\+\_\+\+M\+AX~0x7\+F\+F\+F\+F\+F\+FF}

Highest number that can be generated by \mbox{\hyperlink{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}{random()}}. 

\doxysubsubsection{Function Documentation}
\mbox{\Hypertarget{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}\label{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!dtostre@{dtostre}}
\index{dtostre@{dtostre}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{dtostre()}{dtostre()}}
{\footnotesize\ttfamily char$\ast$ dtostre (\begin{DoxyParamCaption}\item[{double}]{\+\_\+\+\_\+val,  }\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{unsigned char}]{\+\_\+\+\_\+prec,  }\item[{unsigned char}]{\+\_\+\+\_\+flags }\end{DoxyParamCaption})}

The \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre()}} function converts the double value passed in {\ttfamily val} into an A\+S\+C\+II representation that will be stored under {\ttfamily s}. The caller is responsible for providing sufficient storage in {\ttfamily s}.

Conversion is done in the format {\ttfamily \char`\"{}\mbox{[}-\/\mbox{]}d.\+ddde±dd\char`\"{}} where there is one digit before the decimal-\/point character and the number of digits after it is equal to the precision {\ttfamily prec}; if the precision is zero, no decimal-\/point character appears. If {\ttfamily flags} has the D\+T\+O\+S\+T\+R\+E\+\_\+\+U\+P\+P\+E\+R\+C\+A\+SE bit set, the letter {\ttfamily \textquotesingle{}E\textquotesingle{}} (rather than {\ttfamily \textquotesingle{}e\textquotesingle{}} ) will be used to introduce the exponent. The exponent always contains two digits; if the value is zero, the exponent is {\ttfamily \char`\"{}00\char`\"{}}.

If {\ttfamily flags} has the D\+T\+O\+S\+T\+R\+E\+\_\+\+A\+L\+W\+A\+Y\+S\+\_\+\+S\+I\+GN bit set, a space character will be placed into the leading position for positive numbers.

If {\ttfamily flags} has the D\+T\+O\+S\+T\+R\+E\+\_\+\+P\+L\+U\+S\+\_\+\+S\+I\+GN bit set, a plus sign will be used instead of a space character in this case.

The \mbox{\hyperlink{group__avr__stdlib_ga6c140bdd3b9bd740a1490137317caa44}{dtostre()}} function returns the pointer to the converted string {\ttfamily s}. \mbox{\Hypertarget{group__avr__stdlib_ga060c998e77fb5fc0d3168b3ce8771d42}\label{group__avr__stdlib_ga060c998e77fb5fc0d3168b3ce8771d42}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!dtostrf@{dtostrf}}
\index{dtostrf@{dtostrf}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{dtostrf()}{dtostrf()}}
{\footnotesize\ttfamily char$\ast$ dtostrf (\begin{DoxyParamCaption}\item[{double}]{\+\_\+\+\_\+val,  }\item[{signed char}]{\+\_\+\+\_\+width,  }\item[{unsigned char}]{\+\_\+\+\_\+prec,  }\item[{char $\ast$}]{\+\_\+\+\_\+s }\end{DoxyParamCaption})}

The \mbox{\hyperlink{group__avr__stdlib_ga060c998e77fb5fc0d3168b3ce8771d42}{dtostrf()}} function converts the double value passed in {\ttfamily val} into an A\+S\+C\+II representationthat will be stored under {\ttfamily s}. The caller is responsible for providing sufficient storage in {\ttfamily s}.

Conversion is done in the format {\ttfamily \char`\"{}\mbox{[}-\/\mbox{]}d.\+ddd\char`\"{}}. The minimum field width of the output string (including the possible {\ttfamily \textquotesingle{}}.\textquotesingle{} and the possible sign for negative values) is given in {\ttfamily width}, and {\ttfamily prec} determines the number of digits after the decimal sign. {\ttfamily width} is signed value, negative for left adjustment.

The \mbox{\hyperlink{group__avr__stdlib_ga060c998e77fb5fc0d3168b3ce8771d42}{dtostrf()}} function returns the pointer to the converted string {\ttfamily s}. \mbox{\Hypertarget{group__avr__stdlib_gaa571de9e773dde59b0550a5ca4bd2f00}\label{group__avr__stdlib_gaa571de9e773dde59b0550a5ca4bd2f00}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!itoa@{itoa}}
\index{itoa@{itoa}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{itoa()}{itoa()}}
{\footnotesize\ttfamily char$\ast$ itoa (\begin{DoxyParamCaption}\item[{int}]{val,  }\item[{char $\ast$}]{s,  }\item[{int}]{radix }\end{DoxyParamCaption})}



Convert an integer to a string. 

The function \mbox{\hyperlink{group__avr__stdlib_gaa571de9e773dde59b0550a5ca4bd2f00}{itoa()}} converts the integer value from {\ttfamily val} into an A\+S\+C\+II representation that will be stored under {\ttfamily s}. The caller is responsible for providing sufficient storage in {\ttfamily s}.

\begin{DoxyNote}{Note}
The minimal size of the buffer {\ttfamily s} depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 $\ast$ sizeof (int) + 1 characters, i.\+e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
If the buffer is too small, you risk a buffer overflow.
\end{DoxyWarning}
Conversion is done using the {\ttfamily radix} as base, which may be a number between 2 (binary conversion) and up to 36. If {\ttfamily radix} is greater than 10, the next digit after {\ttfamily \textquotesingle{}9\textquotesingle{}} will be the letter {\ttfamily \textquotesingle{}a\textquotesingle{}}.

If radix is 10 and val is negative, a minus sign will be prepended.

The \mbox{\hyperlink{group__avr__stdlib_gaa571de9e773dde59b0550a5ca4bd2f00}{itoa()}} function returns the pointer passed as {\ttfamily s}. \mbox{\Hypertarget{group__avr__stdlib_ga5a3fce5fbd20140584619ba9aed09f75}\label{group__avr__stdlib_ga5a3fce5fbd20140584619ba9aed09f75}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!ltoa@{ltoa}}
\index{ltoa@{ltoa}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{ltoa()}{ltoa()}}
{\footnotesize\ttfamily char$\ast$ ltoa (\begin{DoxyParamCaption}\item[{long}]{val,  }\item[{char $\ast$}]{s,  }\item[{int}]{radix }\end{DoxyParamCaption})}



Convert a long integer to a string. 

The function \mbox{\hyperlink{group__avr__stdlib_ga5a3fce5fbd20140584619ba9aed09f75}{ltoa()}} converts the long integer value from {\ttfamily val} into an A\+S\+C\+II representation that will be stored under {\ttfamily s}. The caller is responsible for providing sufficient storage in {\ttfamily s}.

\begin{DoxyNote}{Note}
The minimal size of the buffer {\ttfamily s} depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 $\ast$ sizeof (long int) + 1 characters, i.\+e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
If the buffer is too small, you risk a buffer overflow.
\end{DoxyWarning}
Conversion is done using the {\ttfamily radix} as base, which may be a number between 2 (binary conversion) and up to 36. If {\ttfamily radix} is greater than 10, the next digit after {\ttfamily \textquotesingle{}9\textquotesingle{}} will be the letter {\ttfamily \textquotesingle{}a\textquotesingle{}}.

If radix is 10 and val is negative, a minus sign will be prepended.

The \mbox{\hyperlink{group__avr__stdlib_ga5a3fce5fbd20140584619ba9aed09f75}{ltoa()}} function returns the pointer passed as {\ttfamily s}. \mbox{\Hypertarget{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}\label{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!random@{random}}
\index{random@{random}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{random()}{random()}}
{\footnotesize\ttfamily long random (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

The \mbox{\hyperlink{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}{random()}} function computes a sequence of pseudo-\/random integers in the range of 0 to {\ttfamily R\+A\+N\+D\+O\+M\+\_\+\+M\+AX} (as defined by the header file $<$\mbox{\hyperlink{stdlib_8h}{stdlib.\+h}}$>$).

The \mbox{\hyperlink{group__avr__stdlib_ga4fca27496ca29c0a723d197696641eff}{srandom()}} function sets its argument {\ttfamily seed} as the seed for a new sequence of pseudo-\/random numbers to be returned by \mbox{\hyperlink{stdlib_8h_ae23144bcbb8e3742b00eb687c36654d1}{rand()}}. These sequences are repeatable by calling \mbox{\hyperlink{group__avr__stdlib_ga4fca27496ca29c0a723d197696641eff}{srandom()}} with the same seed value.

If no seed value is provided, the functions are automatically seeded with a value of 1. \mbox{\Hypertarget{group__avr__stdlib_gaa99a0733f06d2b9960a1401c2721af1e}\label{group__avr__stdlib_gaa99a0733f06d2b9960a1401c2721af1e}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!random\_r@{random\_r}}
\index{random\_r@{random\_r}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{random\_r()}{random\_r()}}
{\footnotesize\ttfamily long random\+\_\+r (\begin{DoxyParamCaption}\item[{unsigned long $\ast$}]{\+\_\+\+\_\+ctx }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}{random()}} that stores the context in the user-\/supplied variable located at {\ttfamily ctx} instead of a static library variable so the function becomes re-\/entrant. \mbox{\Hypertarget{group__avr__stdlib_ga4fca27496ca29c0a723d197696641eff}\label{group__avr__stdlib_ga4fca27496ca29c0a723d197696641eff}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!srandom@{srandom}}
\index{srandom@{srandom}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{srandom()}{srandom()}}
{\footnotesize\ttfamily void srandom (\begin{DoxyParamCaption}\item[{unsigned long}]{\+\_\+\+\_\+seed }\end{DoxyParamCaption})}

Pseudo-\/random number generator seeding; see \mbox{\hyperlink{group__avr__stdlib_ga114aeb1751119382aaf3340355b22cfd}{random()}}. \mbox{\Hypertarget{group__avr__stdlib_ga34f41757388f40e340f31e370ac009b5}\label{group__avr__stdlib_ga34f41757388f40e340f31e370ac009b5}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!ultoa@{ultoa}}
\index{ultoa@{ultoa}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{ultoa()}{ultoa()}}
{\footnotesize\ttfamily char$\ast$ ultoa (\begin{DoxyParamCaption}\item[{unsigned long}]{val,  }\item[{char $\ast$}]{s,  }\item[{int}]{radix }\end{DoxyParamCaption})}



Convert an unsigned long integer to a string. 

The function \mbox{\hyperlink{group__avr__stdlib_ga34f41757388f40e340f31e370ac009b5}{ultoa()}} converts the unsigned long integer value from {\ttfamily val} into an A\+S\+C\+II representation that will be stored under {\ttfamily s}. The caller is responsible for providing sufficient storage in {\ttfamily s}.

\begin{DoxyNote}{Note}
The minimal size of the buffer {\ttfamily s} depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 $\ast$ sizeof (unsigned long int) + 1 characters, i.\+e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
If the buffer is too small, you risk a buffer overflow.
\end{DoxyWarning}
Conversion is done using the {\ttfamily radix} as base, which may be a number between 2 (binary conversion) and up to 36. If {\ttfamily radix} is greater than 10, the next digit after {\ttfamily \textquotesingle{}9\textquotesingle{}} will be the letter {\ttfamily \textquotesingle{}a\textquotesingle{}}.

The \mbox{\hyperlink{group__avr__stdlib_ga34f41757388f40e340f31e370ac009b5}{ultoa()}} function returns the pointer passed as {\ttfamily s}. \mbox{\Hypertarget{group__avr__stdlib_gad50d835af7e358518fd100179732e948}\label{group__avr__stdlib_gad50d835af7e358518fd100179732e948}} 
\index{$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}!utoa@{utoa}}
\index{utoa@{utoa}!$<$stdlib.h$>$: General utilities@{$<$stdlib.h$>$: General utilities}}
\doxyparagraph{\texorpdfstring{utoa()}{utoa()}}
{\footnotesize\ttfamily char$\ast$ utoa (\begin{DoxyParamCaption}\item[{unsigned int}]{val,  }\item[{char $\ast$}]{s,  }\item[{int}]{radix }\end{DoxyParamCaption})}



Convert an unsigned integer to a string. 

The function \mbox{\hyperlink{group__avr__stdlib_gad50d835af7e358518fd100179732e948}{utoa()}} converts the unsigned integer value from {\ttfamily val} into an A\+S\+C\+II representation that will be stored under {\ttfamily s}. The caller is responsible for providing sufficient storage in {\ttfamily s}.

\begin{DoxyNote}{Note}
The minimal size of the buffer {\ttfamily s} depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 $\ast$ sizeof (unsigned int) + 1 characters, i.\+e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.
\end{DoxyNote}
\begin{DoxyWarning}{Warning}
If the buffer is too small, you risk a buffer overflow.
\end{DoxyWarning}
Conversion is done using the {\ttfamily radix} as base, which may be a number between 2 (binary conversion) and up to 36. If {\ttfamily radix} is greater than 10, the next digit after {\ttfamily \textquotesingle{}9\textquotesingle{}} will be the letter {\ttfamily \textquotesingle{}a\textquotesingle{}}.

The \mbox{\hyperlink{group__avr__stdlib_gad50d835af7e358518fd100179732e948}{utoa()}} function returns the pointer passed as {\ttfamily s}. 