\section{aversive\_\-10-03-12/projects/firefly\_\-example1/main.c File Reference}
\label{firefly__example1_2main_8c}\index{aversive\_\-10-03-12/projects/firefly\_\-example1/main.c@{aversive\_\-10-03-12/projects/firefly\_\-example1/main.c}}
{\tt \#include $<$aversive.h$>$}\par
{\tt \#include $<$aversive/pgmspace.h$>$}\par
{\tt \#include $<$aversive/error.h$>$}\par
{\tt \#include $<$aversive/errno.h$>$}\par
{\tt \#include $<$aversive/wait.h$>$}\par
{\tt \#include $<$avr/interrupt.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$math.h$>$}\par
{\tt \#include $<$uart.h$>$}\par
{\tt \#include $<$spi.h$>$}\par
{\tt \#include $<$cc2420.h$>$}\par
{\tt \#include $<$cc2420\_\-arch.h$>$}\par
{\tt \#include $<$time\_\-ext.h$>$}\par
{\tt \#include \char`\"{}firefly2\_\-2.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
{\bf ISR} (\_\-\_\-vector\_\-default)
\item 
void {\bf mylog} (struct {\bf error} $\ast$e,...)
\item 
void {\bf init\_\-ports} (void)
\item 
int {\bf main} (void)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
uint8\_\-t {\bf i}
\end{CompactItemize}


\subsection{Function Documentation}
\index{firefly\_\-example1/main.c@{firefly\_\-example1/main.c}!init\_\-ports@{init\_\-ports}}
\index{init\_\-ports@{init\_\-ports}!firefly_example1/main.c@{firefly\_\-example1/main.c}}
\subsubsection[init\_\-ports]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-ports (void)}\label{firefly__example1_2main_8c_41959d20756307f8b73709871cc2bf47}




Definition at line 118 of file main.c.

References BUTTON\_\-DDR, BUTTON\_\-PIN, cbi, LED\_\-BLUE, LED\_\-DDR, LED\_\-GREEN, LED\_\-ORANGE, and LED\_\-RED.

Referenced by main().\index{firefly\_\-example1/main.c@{firefly\_\-example1/main.c}!ISR@{ISR}}
\index{ISR@{ISR}!firefly_example1/main.c@{firefly\_\-example1/main.c}}
\subsubsection[ISR]{\setlength{\rightskip}{0pt plus 5cm}ISR (\_\-\_\-vector\_\-default)}\label{firefly__example1_2main_8c_0c4271458583c66d6662599d7489194f}




Definition at line 52 of file main.c.

References EFAULT, EMERG, LED\_\-BLUE, LED\_\-CLR, LED\_\-GREEN, LED\_\-ORANGE, LED\_\-RED, LED\_\-SET, and TRUE.\index{firefly\_\-example1/main.c@{firefly\_\-example1/main.c}!main@{main}}
\index{main@{main}!firefly_example1/main.c@{firefly\_\-example1/main.c}}
\subsubsection[main]{\setlength{\rightskip}{0pt plus 5cm}int main (void)}\label{firefly__example1_2main_8c_840291bc02cba5474a4cb46a9b9566fe}




Definition at line 131 of file main.c.

References BUTTON\_\-PIN, BUTTON\_\-PORT, cc2420\_\-get\_\-status(), cc2420\_\-init(), cc2420\_\-read\_\-ram(), cc2420\_\-read\_\-register(), cc2420\_\-read\_\-rxfifo(), cc2420\_\-write\_\-ram(), cc2420\_\-write\_\-register(), cc2420\_\-write\_\-rxfifo(), ERROR, error\_\-register\_\-debug(), error\_\-register\_\-emerg(), error\_\-register\_\-error(), error\_\-register\_\-notice(), error\_\-register\_\-warning(), ESUCCESS, i, init\_\-ports(), LED\_\-BLUE, LED\_\-CLR, LED\_\-GREEN, LED\_\-ORANGE, LED\_\-RED, LED\_\-SET, MAIN, MANFIDH, MANFIDL, mylog(), \_\-time\_\-ext::nano, NOTICE, RAM\_\-IEEEADR, RAM\_\-TXFIFO, \_\-time\_\-ext::sec, spi\_\-display\_\-ss\_\-lines(), SYNCWORD, time\_\-ext\_\-get(), time\_\-ext\_\-init(), time\_\-ext\_\-set(), TST, uart1\_\-dev\_\-recv(), uart1\_\-dev\_\-send(), and uart\_\-init().\index{firefly\_\-example1/main.c@{firefly\_\-example1/main.c}!mylog@{mylog}}
\index{mylog@{mylog}!firefly_example1/main.c@{firefly\_\-example1/main.c}}
\subsubsection[mylog]{\setlength{\rightskip}{0pt plus 5cm}void mylog (struct {\bf error} $\ast$ {\em e}, \/   {\em ...})}\label{firefly__example1_2main_8c_aab56bb7da6481ca5dd7b244c80ec277}




Definition at line 78 of file main.c.

References E\_\-CC2420, E\_\-SPI, E\_\-TIME\_\-EXT, error::err\_\-num, ERROR\_\-SEVERITY\_\-DEBUG, ERROR\_\-SEVERITY\_\-EMERG, ERROR\_\-SEVERITY\_\-ERROR, ERROR\_\-SEVERITY\_\-NOTICE, ERROR\_\-SEVERITY\_\-WARNING, \_\-time\_\-ext::nano, \_\-time\_\-ext::sec, error::severity, error::text, and time\_\-ext\_\-get().

Referenced by main().

\subsection{Variable Documentation}
\index{firefly\_\-example1/main.c@{firefly\_\-example1/main.c}!i@{i}}
\index{i@{i}!firefly_example1/main.c@{firefly\_\-example1/main.c}}
\subsubsection[i]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t {\bf i}}\label{firefly__example1_2main_8c_f27e3188294c2df66d975b74a09c001d}




Definition at line 45 of file main.c.

Referenced by attr\_\-clear(), AX12\_\-checksum(), AX12\_\-recv(), AX12\_\-send(), bd\_\-manage\_\-from\_\-speed\_\-cmd(), cc2420\_\-read\_\-ram(), cc2420\_\-read\_\-rxfifo(), cc2420\_\-write\_\-ram(), cc2420\_\-write\_\-rxfifo(), cc2420\_\-write\_\-txfifo(), color\_\-setup(), cs\_\-do\_\-process(), dialog\_\-clear(), dialog\_\-inputbox(), dialog\_\-msgbox(), dialog\_\-textbox(), dialog\_\-yesno(), draw\_\-box(), draw\_\-shadow(), dump\_\-events(), dumplist(), encoders\_\-spi\_\-manage(), fill\_\-mem\_\-with\_\-mark(), first\_\-alpha(), HMAC\_\-MD5(), main(), menu\_\-default\_\-display(), min\_\-stack\_\-space\_\-available(), multiservo\_\-add(), print\_\-autowrap(), print\_\-button(), print\_\-scancode(), rc4\_\-init(), rdline\_\-newline(), recv(), scheduler\_\-interrupt(), and spi\_\-display\_\-ss\_\-lines().