\hypertarget{classDfu}{}\section{Dfu Class Reference}
\label{classDfu}\index{Dfu@{Dfu}}


The \mbox{\hyperlink{classDfu}{Dfu}} access class.  




{\ttfamily \#include $<$Dfu.\+h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classDfu_ae237bbdc39df9272dccb48914f0a7e93}{Dfu}} ()
\item 
\mbox{\hyperlink{classDfu_aba7370d1f8165b7cbdf76b9def4dd012}{$\sim$\+Dfu}} ()
\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_af5382877c998400827c2cb683ce39ede}{init}} (\textbf{ Bool} verbose)
\begin{DoxyCompactList}\small\item\em Initialise. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a253f0f518780d6a0c7fb83d037b90a74}{detect\+Device}} ()
\begin{DoxyCompactList}\small\item\em Check if D\+FU devuce exists. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_ae151601edd8abfda7b08b192271c2e8a}{validate\+File}} (\textbf{ B\+String} filename, \textbf{ B\+U\+Int} type, \textbf{ B\+String} \&version)
\begin{DoxyCompactList}\small\item\em Check if file is valid firmware. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a41e8686a4a77f1687101b3702c5e2a1f}{connect}} ()
\begin{DoxyCompactList}\small\item\em Connect to U\+SB D\+FU device. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a956159a3cbe8fa2c57f5f95065e8a882}{disconnect}} ()
\begin{DoxyCompactList}\small\item\em Disconnect from U\+SB D\+FU device. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a8c8a7b340dfa9e4dc9848a3cf5b0f9ce}{reset}} ()
\begin{DoxyCompactList}\small\item\em Reset. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a75f5ebf4035647dbc591da84cad0bae1}{clear\+Status}} ()
\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a3c11987240207be777d42385f722b449}{get\+Status}} (\mbox{\hyperlink{structDfuStatus}{Dfu\+Status}} \&status)
\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_a18c3e4a6473f508657db844713fe08be}{upload}} (\textbf{ B\+String} filename, \textbf{ B\+U\+Int} type)
\begin{DoxyCompactList}\small\item\em Upload a file. \end{DoxyCompactList}\item 
\textbf{ B\+Error} \mbox{\hyperlink{classDfu_ac7e8fcdc73d480fa38f27479cdda0b4e}{upload\+\_\+cmd}} (\textbf{ B\+U\+Int8} \textbf{ cmd}, \textbf{ B\+U\+Int32} address)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\textbf{ Bool} \mbox{\hyperlink{classDfu_ad2cfa8535942b7ed3fb29e7973d987c4}{overbose}}
\item 
\textbf{ Bool} \mbox{\hyperlink{classDfu_a361b420d884cbc090862990137e61cf7}{oconnected}}
\item 
libusb\+\_\+context $\ast$ \mbox{\hyperlink{classDfu_a0449ad449247c4e0728d083bc0735fc0}{ocontext}}
\item 
libusb\+\_\+device\+\_\+handle $\ast$ \mbox{\hyperlink{classDfu_ac630b6ef6945b5a5ab55414fdf20bce2}{odev}}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \mbox{\hyperlink{classDfu}{Dfu}} access class. 

\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classDfu_ae237bbdc39df9272dccb48914f0a7e93}\label{classDfu_ae237bbdc39df9272dccb48914f0a7e93}} 
\index{Dfu@{Dfu}!Dfu@{Dfu}}
\index{Dfu@{Dfu}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{Dfu()}{Dfu()}}
{\footnotesize\ttfamily Dfu\+::\+Dfu (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classDfu_aba7370d1f8165b7cbdf76b9def4dd012}\label{classDfu_aba7370d1f8165b7cbdf76b9def4dd012}} 
\index{Dfu@{Dfu}!````~Dfu@{$\sim$Dfu}}
\index{````~Dfu@{$\sim$Dfu}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{$\sim$Dfu()}{~Dfu()}}
{\footnotesize\ttfamily Dfu\+::$\sim$\+Dfu (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classDfu_a75f5ebf4035647dbc591da84cad0bae1}\label{classDfu_a75f5ebf4035647dbc591da84cad0bae1}} 
\index{Dfu@{Dfu}!clearStatus@{clearStatus}}
\index{clearStatus@{clearStatus}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{clearStatus()}{clearStatus()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::clear\+Status (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classDfu_a41e8686a4a77f1687101b3702c5e2a1f}\label{classDfu_a41e8686a4a77f1687101b3702c5e2a1f}} 
\index{Dfu@{Dfu}!connect@{connect}}
\index{connect@{connect}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{connect()}{connect()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::connect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Connect to U\+SB D\+FU device. 

\mbox{\Hypertarget{classDfu_a253f0f518780d6a0c7fb83d037b90a74}\label{classDfu_a253f0f518780d6a0c7fb83d037b90a74}} 
\index{Dfu@{Dfu}!detectDevice@{detectDevice}}
\index{detectDevice@{detectDevice}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{detectDevice()}{detectDevice()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::detect\+Device (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Check if D\+FU devuce exists. 

\mbox{\Hypertarget{classDfu_a956159a3cbe8fa2c57f5f95065e8a882}\label{classDfu_a956159a3cbe8fa2c57f5f95065e8a882}} 
\index{Dfu@{Dfu}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{disconnect()}{disconnect()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::disconnect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Disconnect from U\+SB D\+FU device. 

\mbox{\Hypertarget{classDfu_a3c11987240207be777d42385f722b449}\label{classDfu_a3c11987240207be777d42385f722b449}} 
\index{Dfu@{Dfu}!getStatus@{getStatus}}
\index{getStatus@{getStatus}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{getStatus()}{getStatus()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::get\+Status (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structDfuStatus}{Dfu\+Status}} \&}]{status }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classDfu_af5382877c998400827c2cb683ce39ede}\label{classDfu_af5382877c998400827c2cb683ce39ede}} 
\index{Dfu@{Dfu}!init@{init}}
\index{init@{init}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{init()}{init()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::init (\begin{DoxyParamCaption}\item[{\textbf{ Bool}}]{verbose }\end{DoxyParamCaption})}



Initialise. 

\mbox{\Hypertarget{classDfu_a8c8a7b340dfa9e4dc9848a3cf5b0f9ce}\label{classDfu_a8c8a7b340dfa9e4dc9848a3cf5b0f9ce}} 
\index{Dfu@{Dfu}!reset@{reset}}
\index{reset@{reset}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{reset()}{reset()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::reset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Reset. 

\mbox{\Hypertarget{classDfu_a18c3e4a6473f508657db844713fe08be}\label{classDfu_a18c3e4a6473f508657db844713fe08be}} 
\index{Dfu@{Dfu}!upload@{upload}}
\index{upload@{upload}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{upload()}{upload()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::upload (\begin{DoxyParamCaption}\item[{\textbf{ B\+String}}]{filename,  }\item[{\textbf{ B\+U\+Int}}]{type }\end{DoxyParamCaption})}



Upload a file. 

\mbox{\Hypertarget{classDfu_ac7e8fcdc73d480fa38f27479cdda0b4e}\label{classDfu_ac7e8fcdc73d480fa38f27479cdda0b4e}} 
\index{Dfu@{Dfu}!upload\_cmd@{upload\_cmd}}
\index{upload\_cmd@{upload\_cmd}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{upload\_cmd()}{upload\_cmd()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::upload\+\_\+cmd (\begin{DoxyParamCaption}\item[{\textbf{ B\+U\+Int8}}]{cmd,  }\item[{\textbf{ B\+U\+Int32}}]{address }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classDfu_ae151601edd8abfda7b08b192271c2e8a}\label{classDfu_ae151601edd8abfda7b08b192271c2e8a}} 
\index{Dfu@{Dfu}!validateFile@{validateFile}}
\index{validateFile@{validateFile}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{validateFile()}{validateFile()}}
{\footnotesize\ttfamily \textbf{ B\+Error} Dfu\+::validate\+File (\begin{DoxyParamCaption}\item[{\textbf{ B\+String}}]{filename,  }\item[{\textbf{ B\+U\+Int}}]{type,  }\item[{\textbf{ B\+String} \&}]{version }\end{DoxyParamCaption})}



Check if file is valid firmware. 



\subsection{Member Data Documentation}
\mbox{\Hypertarget{classDfu_a361b420d884cbc090862990137e61cf7}\label{classDfu_a361b420d884cbc090862990137e61cf7}} 
\index{Dfu@{Dfu}!oconnected@{oconnected}}
\index{oconnected@{oconnected}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{oconnected}{oconnected}}
{\footnotesize\ttfamily \textbf{ Bool} Dfu\+::oconnected\hspace{0.3cm}{\ttfamily [private]}}

\mbox{\Hypertarget{classDfu_a0449ad449247c4e0728d083bc0735fc0}\label{classDfu_a0449ad449247c4e0728d083bc0735fc0}} 
\index{Dfu@{Dfu}!ocontext@{ocontext}}
\index{ocontext@{ocontext}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{ocontext}{ocontext}}
{\footnotesize\ttfamily libusb\+\_\+context$\ast$ Dfu\+::ocontext\hspace{0.3cm}{\ttfamily [private]}}

\mbox{\Hypertarget{classDfu_ac630b6ef6945b5a5ab55414fdf20bce2}\label{classDfu_ac630b6ef6945b5a5ab55414fdf20bce2}} 
\index{Dfu@{Dfu}!odev@{odev}}
\index{odev@{odev}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{odev}{odev}}
{\footnotesize\ttfamily libusb\+\_\+device\+\_\+handle$\ast$ Dfu\+::odev\hspace{0.3cm}{\ttfamily [private]}}

\mbox{\Hypertarget{classDfu_ad2cfa8535942b7ed3fb29e7973d987c4}\label{classDfu_ad2cfa8535942b7ed3fb29e7973d987c4}} 
\index{Dfu@{Dfu}!overbose@{overbose}}
\index{overbose@{overbose}!Dfu@{Dfu}}
\subsubsection{\texorpdfstring{overbose}{overbose}}
{\footnotesize\ttfamily \textbf{ Bool} Dfu\+::overbose\hspace{0.3cm}{\ttfamily [private]}}



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{Dfu_8h}{Dfu.\+h}}\item 
\mbox{\hyperlink{Dfu_8cpp}{Dfu.\+cpp}}\end{DoxyCompactItemize}
