Commit a1ef3862 authored by Christian Dietrich's avatar Christian Dietrich

Added Example for future documentation

parent cea45e86
\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:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment