\hypertarget{_sleep_walking__demo_8c}{
\section{C:/AVR32/ASF2.0.0/avr32/applications/uc3l-\/ek-\/SleepWalking-\/demo/SleepWalking\_\-demo.c File Reference}
\label{_sleep_walking__demo_8c}\index{C:/AVR32/ASF2.0.0/avr32/applications/uc3l-\/ek-\/SleepWalking-\/demo/SleepWalking\_\-demo.c@{C:/AVR32/ASF2.0.0/avr32/applications/uc3l-\/ek-\/SleepWalking-\/demo/SleepWalking\_\-demo.c}}
}


SleepWalking demo application using the ADCIFB and AST interface on AVR32 devices.  


{\ttfamily \#include \char`\"{}compiler.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}preprocessor.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}board.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}power\_\-clocks\_\-lib.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}gpio.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}ast.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}adcifb.h\char`\"{}}\par
\subsection*{Defines}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 Preset value used by ADCIFB analog comparator to compare with sampled value from Accelerometer X channel, this value will change according to the ADC resolution used (8/10/12 bit) }\begin{DoxyCompactItemize}
\item 
\hypertarget{_sleep_walking__demo_8c_af6fb73e0727dce8322dd7256f65206ee}{
\#define {\bfseries SENSOR\_\-PRESET\_\-VALUE}~0xF9}
\label{_sleep_walking__demo_8c_af6fb73e0727dce8322dd7256f65206ee}

\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Target frequency}\par
{\em \label{_amgrp2f275892ce508676bb829cb080973ff2}
 }\begin{DoxyCompactItemize}
\item 
\hypertarget{_sleep_walking__demo_8c_a3aadec51c692ecb5ea0c91ba3810ca8c}{
\#define {\bfseries EXAMPLE\_\-USART\_\-CLOCK\_\-MASK}~AVR32\_\-USART3\_\-CLK\_\-PBA}
\label{_sleep_walking__demo_8c_a3aadec51c692ecb5ea0c91ba3810ca8c}

\item 
\hypertarget{_sleep_walking__demo_8c_ae010c09e5971b62c1b744f35447309f6}{
\#define {\bfseries EXAMPLE\_\-TARGET\_\-DFLL\_\-FREQ\_\-HZ}~96000000}
\label{_sleep_walking__demo_8c_ae010c09e5971b62c1b744f35447309f6}

\item 
\hypertarget{_sleep_walking__demo_8c_ae9fe3730cef5cb7632bba36973853916}{
\#define {\bfseries EXAMPLE\_\-TARGET\_\-MCUCLK\_\-FREQ\_\-HZ}~12000000}
\label{_sleep_walking__demo_8c_ae9fe3730cef5cb7632bba36973853916}

\item 
\hypertarget{_sleep_walking__demo_8c_a3cd69ffbe523adac00de86953170ea88}{
\#define {\bfseries EXAMPLE\_\-TARGET\_\-PBACLK\_\-FREQ\_\-HZ}~12000000}
\label{_sleep_walking__demo_8c_a3cd69ffbe523adac00de86953170ea88}

\item 
\hypertarget{_sleep_walking__demo_8c_ae50e0fc21147a206d9232f46e5656811}{
\#define {\bfseries EXAMPLE\_\-TARGET\_\-CLK\_\-ADC\_\-FREQ\_\-HZ}~1500000}
\label{_sleep_walking__demo_8c_ae50e0fc21147a206d9232f46e5656811}

\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{_sleep_walking__demo_8c_af55b8bf8468f4e4ed7cecb1de50fd4ed}{init\_\-ast} (void)
\item 
void \hyperlink{_sleep_walking__demo_8c_a35eac47ddf6aa98acb9236d70ee934d2}{ADCIFB\_\-init} (void)
\item 
\hypertarget{_sleep_walking__demo_8c_a840291bc02cba5474a4cb46a9b9566fe}{
int \hyperlink{_sleep_walking__demo_8c_a840291bc02cba5474a4cb46a9b9566fe}{main} (void)}
\label{_sleep_walking__demo_8c_a840291bc02cba5474a4cb46a9b9566fe}

\begin{DoxyCompactList}\small\item\em This is an example showing how to use SleepWalking feature. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf Delay routine}\par
{\em \label{_amgrpb1c35993912bd7d38fb316bf2871928b}
 }\end{Indent}


\subsection{Detailed Description}
SleepWalking demo application using the ADCIFB and AST interface on AVR32 devices. 
\begin{DoxyItemize}
\item Compiler: IAR EWAVR32 and GNU GCC for AVR32
\item Supported devices: All AVR32 devices with GPIO/AST/ADCIFB.
\item AppNote:
\end{DoxyItemize}

\begin{DoxyAuthor}{Author}
Atmel Corporation: \href{http://www.atmel.com}{\tt http://www.atmel.com} \par
 Support and FAQ: \href{http://support.atmel.no/}{\tt http://support.atmel.no/} 
\end{DoxyAuthor}


\subsection{Function Documentation}
\hypertarget{_sleep_walking__demo_8c_a35eac47ddf6aa98acb9236d70ee934d2}{
\index{SleepWalking\_\-demo.c@{SleepWalking\_\-demo.c}!ADCIFB\_\-init@{ADCIFB\_\-init}}
\index{ADCIFB\_\-init@{ADCIFB\_\-init}!SleepWalking_demo.c@{SleepWalking\_\-demo.c}}
\subsubsection[{ADCIFB\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void ADCIFB\_\-init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{_sleep_walking__demo_8c_a35eac47ddf6aa98acb9236d70ee934d2}
ADCIFB\_\-init. \hypertarget{_sleep_walking__demo_8c_af55b8bf8468f4e4ed7cecb1de50fd4ed}{
\index{SleepWalking\_\-demo.c@{SleepWalking\_\-demo.c}!init\_\-ast@{init\_\-ast}}
\index{init\_\-ast@{init\_\-ast}!SleepWalking_demo.c@{SleepWalking\_\-demo.c}}
\subsubsection[{init\_\-ast}]{\setlength{\rightskip}{0pt plus 5cm}void init\_\-ast (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{_sleep_walking__demo_8c_af55b8bf8468f4e4ed7cecb1de50fd4ed}
AST Init. 