\section{aversive\_\-10-03-12/modules/devices/radio/cc2420/cc2420.h File Reference}
\label{cc2420_8h}\index{aversive\_\-10-03-12/modules/devices/radio/cc2420/cc2420.h@{aversive\_\-10-03-12/modules/devices/radio/cc2420/cc2420.h}}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf CC2420\_\-STATUS\_\-CHECK}(bit)~((cc2420\_\-get\_\-status() \& \_\-BV(bit)) $>$$>$ (bit))
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf cc2420\_\-init} (void)
\item 
uint8\_\-t {\bf cc2420\_\-get\_\-status} (void)
\item 
uint8\_\-t {\bf cc2420\_\-strobe\_\-register} (uint8\_\-t reg)
\item 
uint16\_\-t {\bf cc2420\_\-read\_\-register} (uint8\_\-t reg)
\item 
void {\bf cc2420\_\-write\_\-register} (uint8\_\-t reg, uint16\_\-t value)
\item 
uint8\_\-t {\bf cc2420\_\-write\_\-txfifo} (uint8\_\-t $\ast$buffer, uint8\_\-t length)
\item 
uint8\_\-t {\bf cc2420\_\-write\_\-rxfifo} (uint8\_\-t $\ast$buffer, uint8\_\-t length)
\item 
void {\bf cc2420\_\-read\_\-rxfifo} (uint8\_\-t $\ast$buffer, uint8\_\-t length)
\item 
void {\bf cc2420\_\-write\_\-ram} (uint16\_\-t addr, uint8\_\-t $\ast$buffer, uint16\_\-t length)
\item 
void {\bf cc2420\_\-read\_\-ram} (uint16\_\-t addr, uint8\_\-t $\ast$buffer, uint16\_\-t length)
\end{CompactItemize}


\subsection{Define Documentation}
\index{cc2420.h@{cc2420.h}!CC2420\_\-STATUS\_\-CHECK@{CC2420\_\-STATUS\_\-CHECK}}
\index{CC2420\_\-STATUS\_\-CHECK@{CC2420\_\-STATUS\_\-CHECK}!cc2420.h@{cc2420.h}}
\subsubsection[CC2420\_\-STATUS\_\-CHECK]{\setlength{\rightskip}{0pt plus 5cm}\#define CC2420\_\-STATUS\_\-CHECK(bit)~((cc2420\_\-get\_\-status() \& \_\-BV(bit)) $>$$>$ (bit))}\label{cc2420_8h_11f9aea6ee9911e6ceb9f6957eaafcb3}




Definition at line 29 of file cc2420.h.

Referenced by cc2420\_\-init().

\subsection{Function Documentation}
\index{cc2420.h@{cc2420.h}!cc2420\_\-get\_\-status@{cc2420\_\-get\_\-status}}
\index{cc2420\_\-get\_\-status@{cc2420\_\-get\_\-status}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-get\_\-status]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t cc2420\_\-get\_\-status (void)}\label{cc2420_8h_4c1fa234f58c56a94337f22efb432dff}




Definition at line 49 of file cc2420.c.

References SLAVE\_\-DESELECT, SLAVE\_\-SELECT, SNOP, and spi\_\-send\_\-and\_\-receive\_\-byte().

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-init@{cc2420\_\-init}}
\index{cc2420\_\-init@{cc2420\_\-init}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void cc2420\_\-init (void)}\label{cc2420_8h_bc9ee32d919a3dc6af0d43c632228d9d}




Definition at line 212 of file cc2420.c.

References CC2420\_\-STATUS\_\-CHECK, DDR, E\_\-CC2420, NOTICE, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, SPI\_\-CLK\_\-RATE\_\-2, SPI\_\-FORMAT\_\-0, spi\_\-get\_\-mode(), spi\_\-init(), SPI\_\-MODE\_\-MASTER, SPI\_\-MODE\_\-UNINIT, spi\_\-register\_\-ss\_\-line(), spi\_\-send\_\-byte(), SXOSCON, and XOSC16M\_\-STABLE.

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-read\_\-ram@{cc2420\_\-read\_\-ram}}
\index{cc2420\_\-read\_\-ram@{cc2420\_\-read\_\-ram}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-read\_\-ram]{\setlength{\rightskip}{0pt plus 5cm}void cc2420\_\-read\_\-ram (uint16\_\-t {\em addr}, \/  uint8\_\-t $\ast$ {\em buffer}, \/  uint16\_\-t {\em length})}\label{cc2420_8h_dd33114803afd39d64d025159ee590c9}




Definition at line 192 of file cc2420.c.

References BANK\_\-MASK, i, RAM\_\-BIT, RAM\_\-MASK, RAM\_\-READ, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, spi\_\-receive\_\-byte(), and spi\_\-send\_\-byte().

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-read\_\-register@{cc2420\_\-read\_\-register}}
\index{cc2420\_\-read\_\-register@{cc2420\_\-read\_\-register}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-read\_\-register]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t cc2420\_\-read\_\-register (uint8\_\-t {\em reg})\hspace{0.3cm}{\tt  [inline]}}\label{cc2420_8h_3f7480aa30254c1ed475bca929307a6d}




Definition at line 74 of file cc2420.c.

References READ\_\-BIT, REG\_\-BIT, REG\_\-MASK, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, spi\_\-receive\_\-byte(), and spi\_\-send\_\-byte().

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-read\_\-rxfifo@{cc2420\_\-read\_\-rxfifo}}
\index{cc2420\_\-read\_\-rxfifo@{cc2420\_\-read\_\-rxfifo}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-read\_\-rxfifo]{\setlength{\rightskip}{0pt plus 5cm}void cc2420\_\-read\_\-rxfifo (uint8\_\-t $\ast$ {\em buffer}, \/  uint8\_\-t {\em length})}\label{cc2420_8h_b69a6a2cbc39f3270651c88b8146f2be}




Definition at line 153 of file cc2420.c.

References i, READ\_\-BIT, REG\_\-BIT, RXFIFO, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, spi\_\-receive\_\-byte(), and spi\_\-send\_\-byte().

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-strobe\_\-register@{cc2420\_\-strobe\_\-register}}
\index{cc2420\_\-strobe\_\-register@{cc2420\_\-strobe\_\-register}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-strobe\_\-register]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t cc2420\_\-strobe\_\-register (uint8\_\-t {\em reg})\hspace{0.3cm}{\tt  [inline]}}\label{cc2420_8h_342c12ca4f2249a349aefb659cbbf09c}




Definition at line 62 of file cc2420.c.

References SLAVE\_\-DESELECT, SLAVE\_\-SELECT, and spi\_\-send\_\-and\_\-receive\_\-byte().\index{cc2420.h@{cc2420.h}!cc2420\_\-write\_\-ram@{cc2420\_\-write\_\-ram}}
\index{cc2420\_\-write\_\-ram@{cc2420\_\-write\_\-ram}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-write\_\-ram]{\setlength{\rightskip}{0pt plus 5cm}void cc2420\_\-write\_\-ram (uint16\_\-t {\em addr}, \/  uint8\_\-t $\ast$ {\em buffer}, \/  uint16\_\-t {\em length})}\label{cc2420_8h_a6fb86724149e1cc72db137075c7da57}




Definition at line 174 of file cc2420.c.

References BANK\_\-MASK, i, RAM\_\-BIT, RAM\_\-MASK, RAM\_\-READ\_\-WRITE, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, and spi\_\-send\_\-byte().

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-write\_\-register@{cc2420\_\-write\_\-register}}
\index{cc2420\_\-write\_\-register@{cc2420\_\-write\_\-register}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-write\_\-register]{\setlength{\rightskip}{0pt plus 5cm}void cc2420\_\-write\_\-register (uint8\_\-t {\em reg}, \/  uint16\_\-t {\em value})\hspace{0.3cm}{\tt  [inline]}}\label{cc2420_8h_ae2102538e6ecf5bd2c9c93c130cba9e}




Definition at line 90 of file cc2420.c.

References REG\_\-BIT, REG\_\-MASK, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, spi\_\-send\_\-byte(), and WRITE\_\-BIT.

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-write\_\-rxfifo@{cc2420\_\-write\_\-rxfifo}}
\index{cc2420\_\-write\_\-rxfifo@{cc2420\_\-write\_\-rxfifo}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-write\_\-rxfifo]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t cc2420\_\-write\_\-rxfifo (uint8\_\-t $\ast$ {\em buffer}, \/  uint8\_\-t {\em length})}\label{cc2420_8h_608b9f94478ecaa0314f70f40cacd9d6}




Definition at line 130 of file cc2420.c.

References i, REG\_\-BIT, RXFIFO, SFLUSHRX, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, spi\_\-send\_\-and\_\-receive\_\-byte(), spi\_\-send\_\-byte(), and WRITE\_\-BIT.

Referenced by main().\index{cc2420.h@{cc2420.h}!cc2420\_\-write\_\-txfifo@{cc2420\_\-write\_\-txfifo}}
\index{cc2420\_\-write\_\-txfifo@{cc2420\_\-write\_\-txfifo}!cc2420.h@{cc2420.h}}
\subsubsection[cc2420\_\-write\_\-txfifo]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t cc2420\_\-write\_\-txfifo (uint8\_\-t $\ast$ {\em buffer}, \/  uint8\_\-t {\em length})}\label{cc2420_8h_89aa51486918be5cb8832c0f5c631d33}




Definition at line 105 of file cc2420.c.

References E\_\-CC2420, i, NOTICE, REG\_\-BIT, SLAVE\_\-DESELECT, SLAVE\_\-SELECT, spi\_\-send\_\-and\_\-receive\_\-byte(), spi\_\-send\_\-byte(), TXFIFO, and WRITE\_\-BIT.