\section{aversive\_\-10-03-12/projects/firefly\_\-example1/firefly2\_\-2.h File Reference}
\label{firefly2__2_8h}\index{aversive\_\-10-03-12/projects/firefly\_\-example1/firefly2\_\-2.h@{aversive\_\-10-03-12/projects/firefly\_\-example1/firefly2\_\-2.h}}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf INPUT\_\-PIN}~0
\item 
\#define {\bf OUTPUT\_\-PIN}~1
\item 
\#define {\bf SPI\_\-SS}~0
\item 
\#define {\bf SCK}~1
\item 
\#define {\bf MOSI}~2
\item 
\#define {\bf CSN}~0
\item 
\#define {\bf LED\_\-DDR}~DDRE
\item 
\#define {\bf LED\_\-PORT}~PORTE
\item 
\#define {\bf LED\_\-ORANGE}~2
\item 
\#define {\bf LED\_\-BLUE}~3
\item 
\#define {\bf LED\_\-GREEN}~4
\item 
\#define {\bf LED\_\-RED}~5
\item 
\#define {\bf BUTTON\_\-DDR}~DDRA
\item 
\#define {\bf BUTTON\_\-PORT}~PINA
\item 
\#define {\bf BUTTON\_\-PIN}~7
\item 
\#define {\bf DEBUG\_\-0}~3
\item 
\#define {\bf DEBUG\_\-1}~4
\item 
\#define {\bf DEBUG\_\-2}~0
\item 
\#define {\bf DEBUG\_\-3}~1
\item 
\#define {\bf SET}(port, pin)~port $|$= (1$<$$<$(pin))
\item 
\#define {\bf CLR}(port, pin)~port \&= $\sim$(1$<$$<$(pin))
\item 
\#define {\bf TST}(port, pin)~((port \& (1$<$$<$(pin)))$>$$>$(pin))
\item 
\#define {\bf LED\_\-SET}(led)~cbi(LED\_\-PORT, (led))
\item 
\#define {\bf LED\_\-CLR}(led)~sbi(LED\_\-PORT, (led))
\end{CompactItemize}


\subsection{Define Documentation}
\index{firefly2\_\-2.h@{firefly2\_\-2.h}!BUTTON\_\-DDR@{BUTTON\_\-DDR}}
\index{BUTTON\_\-DDR@{BUTTON\_\-DDR}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[BUTTON\_\-DDR]{\setlength{\rightskip}{0pt plus 5cm}\#define BUTTON\_\-DDR~DDRA}\label{firefly2__2_8h_b798f60243a5bba94d99175e4c05d9c1}




Definition at line 24 of file firefly2\_\-2.h.

Referenced by init\_\-ports().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!BUTTON\_\-PIN@{BUTTON\_\-PIN}}
\index{BUTTON\_\-PIN@{BUTTON\_\-PIN}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[BUTTON\_\-PIN]{\setlength{\rightskip}{0pt plus 5cm}\#define BUTTON\_\-PIN~7}\label{firefly2__2_8h_bc2ad14f0789907024ac765711ffd3da}




Definition at line 26 of file firefly2\_\-2.h.

Referenced by init\_\-ports(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!BUTTON\_\-PORT@{BUTTON\_\-PORT}}
\index{BUTTON\_\-PORT@{BUTTON\_\-PORT}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[BUTTON\_\-PORT]{\setlength{\rightskip}{0pt plus 5cm}\#define BUTTON\_\-PORT~PINA}\label{firefly2__2_8h_c8ba909fc8614df64040d2e12c0780e4}




Definition at line 25 of file firefly2\_\-2.h.

Referenced by main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!CLR@{CLR}}
\index{CLR@{CLR}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[CLR]{\setlength{\rightskip}{0pt plus 5cm}\#define CLR(port, \/  pin)~port \&= $\sim$(1$<$$<$(pin))}\label{firefly2__2_8h_b9567688fd0d19fe39d54f38a92d8863}




Definition at line 40 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!CSN@{CSN}}
\index{CSN@{CSN}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[CSN]{\setlength{\rightskip}{0pt plus 5cm}\#define CSN~0}\label{firefly2__2_8h_8df4f3a8a2035df063402ae5f0c1d2f8}




Definition at line 13 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!DEBUG\_\-0@{DEBUG\_\-0}}
\index{DEBUG\_\-0@{DEBUG\_\-0}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[DEBUG\_\-0]{\setlength{\rightskip}{0pt plus 5cm}\#define DEBUG\_\-0~3}\label{firefly2__2_8h_13529e90ec1f8612278ec8004bf2400b}




Definition at line 29 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!DEBUG\_\-1@{DEBUG\_\-1}}
\index{DEBUG\_\-1@{DEBUG\_\-1}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[DEBUG\_\-1]{\setlength{\rightskip}{0pt plus 5cm}\#define DEBUG\_\-1~4}\label{firefly2__2_8h_1e200bcebbe754f519450acca4eca97f}




Definition at line 30 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!DEBUG\_\-2@{DEBUG\_\-2}}
\index{DEBUG\_\-2@{DEBUG\_\-2}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[DEBUG\_\-2]{\setlength{\rightskip}{0pt plus 5cm}\#define DEBUG\_\-2~0}\label{firefly2__2_8h_11fe3ddeafe099987eaa7db428706d34}




Definition at line 31 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!DEBUG\_\-3@{DEBUG\_\-3}}
\index{DEBUG\_\-3@{DEBUG\_\-3}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[DEBUG\_\-3]{\setlength{\rightskip}{0pt plus 5cm}\#define DEBUG\_\-3~1}\label{firefly2__2_8h_61f2dae661ffe2244719f569aa0a7e2b}




Definition at line 32 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!INPUT\_\-PIN@{INPUT\_\-PIN}}
\index{INPUT\_\-PIN@{INPUT\_\-PIN}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[INPUT\_\-PIN]{\setlength{\rightskip}{0pt plus 5cm}\#define INPUT\_\-PIN~0}\label{firefly2__2_8h_1a806e0533aa476bb6e62b7d22c93572}




Definition at line 6 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-BLUE@{LED\_\-BLUE}}
\index{LED\_\-BLUE@{LED\_\-BLUE}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-BLUE]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-BLUE~3}\label{firefly2__2_8h_e2e40566d27689f8581d7b0f12271d45}




Definition at line 20 of file firefly2\_\-2.h.

Referenced by init\_\-ports(), ISR(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-CLR@{LED\_\-CLR}}
\index{LED\_\-CLR@{LED\_\-CLR}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-CLR]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-CLR(led)~sbi(LED\_\-PORT, (led))}\label{firefly2__2_8h_5e41900271fc8ecec1a8659fe5dabe13}




Definition at line 48 of file firefly2\_\-2.h.

Referenced by ISR(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-DDR@{LED\_\-DDR}}
\index{LED\_\-DDR@{LED\_\-DDR}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-DDR]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-DDR~DDRE}\label{firefly2__2_8h_2eb4252b35effe1188cb61b6124fa617}




Definition at line 17 of file firefly2\_\-2.h.

Referenced by init\_\-ports().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-GREEN@{LED\_\-GREEN}}
\index{LED\_\-GREEN@{LED\_\-GREEN}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-GREEN]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-GREEN~4}\label{firefly2__2_8h_ca338dbd19d7940923334629f6e5f3b7}




Definition at line 21 of file firefly2\_\-2.h.

Referenced by init\_\-ports(), ISR(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-ORANGE@{LED\_\-ORANGE}}
\index{LED\_\-ORANGE@{LED\_\-ORANGE}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-ORANGE]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-ORANGE~2}\label{firefly2__2_8h_4d9260fdff3b0a796816640bbac505cc}




Definition at line 19 of file firefly2\_\-2.h.

Referenced by init\_\-ports(), ISR(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-PORT@{LED\_\-PORT}}
\index{LED\_\-PORT@{LED\_\-PORT}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-PORT]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-PORT~PORTE}\label{firefly2__2_8h_663daa01e565aee93c6f20c5845b90b4}




Definition at line 18 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-RED@{LED\_\-RED}}
\index{LED\_\-RED@{LED\_\-RED}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-RED]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-RED~5}\label{firefly2__2_8h_31e20330f8ce94e0dd10b005a15c5898}




Definition at line 22 of file firefly2\_\-2.h.

Referenced by init\_\-ports(), ISR(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!LED\_\-SET@{LED\_\-SET}}
\index{LED\_\-SET@{LED\_\-SET}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[LED\_\-SET]{\setlength{\rightskip}{0pt plus 5cm}\#define LED\_\-SET(led)~cbi(LED\_\-PORT, (led))}\label{firefly2__2_8h_2da73d4a1880a18cb09ec74e1b8e3226}




Definition at line 47 of file firefly2\_\-2.h.

Referenced by ISR(), and main().\index{firefly2\_\-2.h@{firefly2\_\-2.h}!MOSI@{MOSI}}
\index{MOSI@{MOSI}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[MOSI]{\setlength{\rightskip}{0pt plus 5cm}\#define MOSI~2}\label{firefly2__2_8h_5d3f11f2fdf8a7e27b975291e0c2c8cc}




Definition at line 12 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!OUTPUT\_\-PIN@{OUTPUT\_\-PIN}}
\index{OUTPUT\_\-PIN@{OUTPUT\_\-PIN}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[OUTPUT\_\-PIN]{\setlength{\rightskip}{0pt plus 5cm}\#define OUTPUT\_\-PIN~1}\label{firefly2__2_8h_a600b28b8b5a973164811aac98de8e2d}




Definition at line 7 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!SCK@{SCK}}
\index{SCK@{SCK}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[SCK]{\setlength{\rightskip}{0pt plus 5cm}\#define SCK~1}\label{firefly2__2_8h_2dd443a4430713d325ab86895a4a45eb}




Definition at line 11 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!SET@{SET}}
\index{SET@{SET}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[SET]{\setlength{\rightskip}{0pt plus 5cm}\#define SET(port, \/  pin)~port $|$= (1$<$$<$(pin))}\label{firefly2__2_8h_e940c8ff2fff05f0606ce9000e762af5}




Definition at line 39 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!SPI\_\-SS@{SPI\_\-SS}}
\index{SPI\_\-SS@{SPI\_\-SS}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[SPI\_\-SS]{\setlength{\rightskip}{0pt plus 5cm}\#define SPI\_\-SS~0}\label{firefly2__2_8h_81f0aae3c3a2adba06ac3b802b38915a}




Definition at line 10 of file firefly2\_\-2.h.\index{firefly2\_\-2.h@{firefly2\_\-2.h}!TST@{TST}}
\index{TST@{TST}!firefly2_2.h@{firefly2\_\-2.h}}
\subsubsection[TST]{\setlength{\rightskip}{0pt plus 5cm}\#define TST(port, \/  pin)~((port \& (1$<$$<$(pin)))$>$$>$(pin))}\label{firefly2__2_8h_f414f52d3a872cc85247c310816a626e}




Definition at line 44 of file firefly2\_\-2.h.

Referenced by main().