1
0
mirror of synced 2024-11-22 04:54:24 +01:00

Added Example for future documentation

This commit is contained in:
Christian Dietrich 2014-10-09 17:37:31 +02:00
parent cea45e869f
commit a1ef38622f

50
source/avremu.tex Normal file
View File

@ -0,0 +1,50 @@
\documentclass{article}
\usepackage{avremu}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{filecontents}
\usepackage{tcolorbox}
\begin{filecontents*}{hello-world.c}
#include <avr/io.h>
int
main(void)
{
char *str = "Hello World!";
char *p = str;
while (*p) {
UDR = *p++;
}
asm volatile ("break;");
}
\end{filecontents*}
\title{The \texttt{avremu} Package}
\author{Christian Dietrich\\
\url{stettberger@dokucode.de}}
\begin{document}
\maketitle
\begin{tcolorbox}
\lstinputlisting[language=C]{hello-world.c}
\tcblower
\begin{lstlisting}[language=TeX]
\avrloadc{hello-world.c}
\avrrun
UDR='\avrUDR' in \avrinstrcount\ instructions
\end{lstlisting}
\end{tcolorbox}
\begin{tcolorbox}
\avrloadc{hello-world.c}\avrrun
UDR='\avrUDR' in \avrinstrcount\ instructions
\end{tcolorbox}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: