\doxysection{Me\+USBHost Class Reference}
\hypertarget{class_me_u_s_b_host}{}\label{class_me_u_s_b_host}\index{MeUSBHost@{MeUSBHost}}


Driver for Me USB Host module.  




{\ttfamily \#include $<$src/\+Me\+USBHost.\+h$>$}



Inheritance diagram for Me\+USBHost\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{class_me_u_s_b_host__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for Me\+USBHost\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{class_me_u_s_b_host__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_me_u_s_b_host_a046694bf0110a4fed7650f2c370e167c}{Me\+USBHost}} ()
\item 
\Hypertarget{class_me_u_s_b_host_a243ad20b863557a79055f8808e7f8199}\label{class_me_u_s_b_host_a243ad20b863557a79055f8808e7f8199} 
{\bfseries Me\+USBHost} (uint8\+\_\+t \mbox{\hyperlink{class_me_port_ab5295b9e84ecedf3f93ab47cf8f10284}{s1}}, uint8\+\_\+t \mbox{\hyperlink{class_me_port_a6c09cece23372a6ab340512a0db3e37d}{s2}})
\item 
\mbox{\hyperlink{class_me_u_s_b_host_a27367dd6f4253fa7222af2cc4c90d91d}{Me\+USBHost}} (uint8\+\_\+t port)
\item 
void \mbox{\hyperlink{class_me_u_s_b_host_a4a05983202d4f7479f3480053543d7e5}{init}} (int8\+\_\+t type)
\item 
int16\+\_\+t \mbox{\hyperlink{class_me_u_s_b_host_ab243f4416f3d91498c3b7a94abf96e0e}{init\+HIDDevice}} ()
\item 
int16\+\_\+t \mbox{\hyperlink{class_me_u_s_b_host_a1ec6f4ebdb3f888e04d8ef5c83ff75f0}{probe\+Device}} ()
\item 
void \mbox{\hyperlink{class_me_u_s_b_host_a11d5c84408175ade230ef51021c42232}{reset\+Bus}} ()
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_u_s_b_host_afdf22bd1a9c271c87d981b3da4a6e711}{host\+\_\+recv}} ()
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_me_port}{Me\+Port}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_me_port_ae4b9e8e718b626d0ce4017a430878210}{Me\+Port}} (void)
\item 
\mbox{\hyperlink{class_me_port_a7a1d7cdf061740148cd893ba481420a3}{Me\+Port}} (uint8\+\_\+t port)
\item 
\mbox{\hyperlink{class_me_port_a1458b606f98da409d7ab4fa7d09c6816}{Me\+Port}} (uint8\+\_\+t port, uint8\+\_\+t slot)
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a8d9ca22e35477573b27c4165ac61def0}{get\+Port}} (void)
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a4c73dec349340e958b9567b06fa6f27c}{get\+Slot}} (void)
\item 
bool \mbox{\hyperlink{class_me_port_a8b7b990f5fa85dfc28f7f3d0d7ba46b9}{d\+Read1}} (uint8\+\_\+t mode=INPUT)
\item 
bool \mbox{\hyperlink{class_me_port_ab4fd13565335bd781da8f44bae803031}{d\+Read2}} (uint8\+\_\+t mode=INPUT)
\item 
bool \mbox{\hyperlink{class_me_port_aabcb0e1dc89942cf302b8cbac2cbd0a5}{dp\+Read1}} (void)
\item 
bool \mbox{\hyperlink{class_me_port_a2e4b6faf3e9494e819ccee47dfb8010e}{dp\+Read2}} (void)
\item 
void \mbox{\hyperlink{class_me_port_a9d5f60427202c26bc8da4b1e6a66c5c2}{d\+Write1}} (bool value)
\item 
void \mbox{\hyperlink{class_me_port_a0d9ee041f8361f45bcc83bed9577415f}{d\+Write2}} (bool value)
\item 
int16\+\_\+t \mbox{\hyperlink{class_me_port_acfd28b1ab8cc6af5bf8223446022525c}{a\+Read1}} (void)
\item 
int16\+\_\+t \mbox{\hyperlink{class_me_port_a63709dcbe9850c0d3baec1fed72809bf}{a\+Read2}} (void)
\item 
void \mbox{\hyperlink{class_me_port_adb4d7959f2059bf9986a8e5a631988ae}{a\+Write1}} (int16\+\_\+t value)
\item 
void \mbox{\hyperlink{class_me_port_a3834f0f30618ec31789d524dd367e44f}{a\+Write2}} (int16\+\_\+t value)
\item 
void \mbox{\hyperlink{class_me_port_a7b82ce913d98ecff906569d795073892}{reset}} (uint8\+\_\+t port)
\item 
void \mbox{\hyperlink{class_me_port_a91e3cca62e5f8fffead56f8104488d4d}{reset}} (uint8\+\_\+t port, uint8\+\_\+t slot)
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a1ed16a0f863a618cc9f32b27015107e7}{pin1}} (void)
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a8a1b3cd06dffbb48d40c3adf25011803}{pin2}} (void)
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_aea7dad0142d940c0395b1782fe5adeae}{pin}} (void)
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a637d42b5a62d655b8517bc8a363206f3}{pin}} (uint8\+\_\+t port, uint8\+\_\+t slot)
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{class_me_u_s_b_host_a622250869f9c9891693704dac7bf755d}\label{class_me_u_s_b_host_a622250869f9c9891693704dac7bf755d} 
bool {\bfseries ch375\+\_\+online}
\item 
\Hypertarget{class_me_u_s_b_host_a0c6c216aed070712f58832250114ef2b}\label{class_me_u_s_b_host_a0c6c216aed070712f58832250114ef2b} 
bool {\bfseries device\+\_\+online}
\item 
\Hypertarget{class_me_u_s_b_host_acdbee090607978992c99a0db0f4aea2d}\label{class_me_u_s_b_host_acdbee090607978992c99a0db0f4aea2d} 
bool {\bfseries device\+\_\+ready}
\item 
\Hypertarget{class_me_u_s_b_host_a60068ee3ed55ac8ed74afe5ffa805df4}\label{class_me_u_s_b_host_a60068ee3ed55ac8ed74afe5ffa805df4} 
uint8\+\_\+t {\bfseries RECV\+\_\+\+BUFFER} \mbox{[}CH375\+\_\+\+MAX\+\_\+\+DATA\+\_\+\+LEN\mbox{]}
\end{DoxyCompactItemize}
\doxysubsubsection*{Additional Inherited Members}
\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{class_me_port}{Me\+Port}}}
\begin{DoxyCompactItemize}
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_ab5295b9e84ecedf3f93ab47cf8f10284}{s1}}
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a6c09cece23372a6ab340512a0db3e37d}{s2}}
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_adc9cdd4e574061d41244fc662974544f}{\+\_\+port}}
\item 
uint8\+\_\+t \mbox{\hyperlink{class_me_port_a4159543b593b047cd82fedab30b178b7}{\+\_\+slot}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Driver for Me USB Host module. 

Class\+: \doxylink{class_me_u_s_b_host}{Me\+USBHost} \begin{DoxyParagraph}{Description}
Declaration of Class \doxylink{class_me_u_s_b_host}{Me\+USBHost}.
\end{DoxyParagraph}
\begin{DoxyParagraph}{Copyright (C), 2012-\/2016, Make\+Block}

\end{DoxyParagraph}


\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{class_me_u_s_b_host_a046694bf0110a4fed7650f2c370e167c}\label{class_me_u_s_b_host_a046694bf0110a4fed7650f2c370e167c} 
\index{MeUSBHost@{MeUSBHost}!MeUSBHost@{MeUSBHost}}
\index{MeUSBHost@{MeUSBHost}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{MeUSBHost()}{MeUSBHost()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Me\+USBHost\+::\+Me\+USBHost (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Alternate Constructor which can call your own function to map the USB Host to arduino port, no pins are used or initialized here. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\Hypertarget{class_me_u_s_b_host_a27367dd6f4253fa7222af2cc4c90d91d}\label{class_me_u_s_b_host_a27367dd6f4253fa7222af2cc4c90d91d} 
\index{MeUSBHost@{MeUSBHost}!MeUSBHost@{MeUSBHost}}
\index{MeUSBHost@{MeUSBHost}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{MeUSBHost()}{MeUSBHost()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Me\+USBHost\+::\+Me\+USBHost (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{port }\end{DoxyParamCaption})}

Alternate Constructor which can call your own function to map the USB Host to arduino port, ~\newline
 the slot2 pin will be used for key pin. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em port} & -\/ RJ25 port from PORT\+\_\+1 to M2 \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\Hypertarget{class_me_u_s_b_host_afdf22bd1a9c271c87d981b3da4a6e711}\label{class_me_u_s_b_host_afdf22bd1a9c271c87d981b3da4a6e711} 
\index{MeUSBHost@{MeUSBHost}!host\_recv@{host\_recv}}
\index{host\_recv@{host\_recv}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{host\_recv()}{host\_recv()}}
{\footnotesize\ttfamily uint8\+\_\+t Me\+USBHost\+::host\+\_\+recv (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
host\+\_\+recv 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
The USB Host receive data. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
Return the length of data. 
\end{DoxyReturn}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_u_s_b_host_a4a05983202d4f7479f3480053543d7e5}\label{class_me_u_s_b_host_a4a05983202d4f7479f3480053543d7e5} 
\index{MeUSBHost@{MeUSBHost}!init@{init}}
\index{init@{init}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{init()}{init()}}
{\footnotesize\ttfamily void Me\+USBHost\+::init (\begin{DoxyParamCaption}\item[{int8\+\_\+t}]{type }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
init 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Init the data Bus. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em type} & -\/ The type of data Bus. \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_u_s_b_host_ab243f4416f3d91498c3b7a94abf96e0e}\label{class_me_u_s_b_host_ab243f4416f3d91498c3b7a94abf96e0e} 
\index{MeUSBHost@{MeUSBHost}!initHIDDevice@{initHIDDevice}}
\index{initHIDDevice@{initHIDDevice}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{initHIDDevice()}{initHIDDevice()}}
{\footnotesize\ttfamily int16\+\_\+t Me\+USBHost\+::init\+HIDDevice (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
init\+HIDDevice 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Init the HID Device. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
The result of init\+HIDDevice\textquotesingle{}s action. 
\end{DoxyReturn}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_u_s_b_host_a1ec6f4ebdb3f888e04d8ef5c83ff75f0}\label{class_me_u_s_b_host_a1ec6f4ebdb3f888e04d8ef5c83ff75f0} 
\index{MeUSBHost@{MeUSBHost}!probeDevice@{probeDevice}}
\index{probeDevice@{probeDevice}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{probeDevice()}{probeDevice()}}
{\footnotesize\ttfamily int16\+\_\+t Me\+USBHost\+::probe\+Device (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
probe\+Device 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Prode of USB Host Device. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
The result of device\textquotesingle{}s probe. 
\end{DoxyReturn}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}
\Hypertarget{class_me_u_s_b_host_a11d5c84408175ade230ef51021c42232}\label{class_me_u_s_b_host_a11d5c84408175ade230ef51021c42232} 
\index{MeUSBHost@{MeUSBHost}!resetBus@{resetBus}}
\index{resetBus@{resetBus}!MeUSBHost@{MeUSBHost}}
\doxysubsubsection{\texorpdfstring{resetBus()}{resetBus()}}
{\footnotesize\ttfamily void Me\+USBHost\+::reset\+Bus (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\begin{DoxyParagraph}{Function}
reset\+Bus 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Description}
Reset the data Bus. 
\end{DoxyParagraph}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em None} & \\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Output}
None 
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
None 
\end{DoxyReturn}
\begin{DoxyParagraph}{Others}
None 
\end{DoxyParagraph}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
src/\mbox{\hyperlink{_me_u_s_b_host_8h}{Me\+USBHost.\+h}}\item 
src/\mbox{\hyperlink{_me_u_s_b_host_8cpp}{Me\+USBHost.\+cpp}}\end{DoxyCompactItemize}
