\doxysection{Me\+Mega\+Pi\+Pro4\+Dc\+Motor.\+h}
\hypertarget{_me_mega_pi_pro4_dc_motor_8h_source}{}\label{_me_mega_pi_pro4_dc_motor_8h_source}\index{src/MeMegaPiPro4DcMotor.h@{src/MeMegaPiPro4DcMotor.h}}
\mbox{\hyperlink{_me_mega_pi_pro4_dc_motor_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00041\ \textcolor{preprocessor}{\#ifndef\ MeMegaPiPro4DcMotor\_H}}
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#define\ MeMegaPiPro4DcMotor\_H}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#include\ <Arduino.h>}}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_me_config_8h}{MeConfig.h}}"{}}}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#ifdef\ ME\_PORT\_DEFINED}}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_me_port_8h}{MePort.h}}"{}}}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#ifndef\ ME\_PORT\_DEFINED}}
\DoxyCodeLine{00059\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor}{MeMegaPiPro4DcMotor}}}
\DoxyCodeLine{00060\ \#else\ \textcolor{comment}{//\ !ME\_PORT\_DEFINED}}
\DoxyCodeLine{00061\ class\ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor}{MeMegaPiPro4DcMotor}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{class_me_port}{MePort}}}
\DoxyCodeLine{00062\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ !ME\_PORT\_DEFINED}}
\DoxyCodeLine{00063\ \{}
\DoxyCodeLine{00064\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00065\ \textcolor{preprocessor}{\#ifdef\ ME\_PORT\_DEFINED}}
\DoxyCodeLine{00072\ \ \ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor_a82a9c5416fb71a07550902f6dca71119}{MeMegaPiPro4DcMotor}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00079\ \ \ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor_a82a9c5416fb71a07550902f6dca71119}{MeMegaPiPro4DcMotor}}(uint8\_t\ port);}
\DoxyCodeLine{00080\ \textcolor{preprocessor}{\#else\ }\textcolor{comment}{//\ ME\_PORT\_DEFINED}}
\DoxyCodeLine{00089\ \ \ MeMegaPiPro4DcMotor(uint8\_t\ dir\_pin,uint8\_t\ pwm\_pin);}
\DoxyCodeLine{00090\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ ME\_PORT\_DEFINED}}
\DoxyCodeLine{00107\ \ \ void\ setpin(uint8\_t\ dir\_pin,uint8\_t\ pwm\_pin);}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00123\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor_a4e6b8c161cfe6367a1c43f9b129a8597}{reset}}(uint8\_t\ port);}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00141\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor_a4e6b8c161cfe6367a1c43f9b129a8597}{reset}}(uint8\_t\ port,\ uint8\_t\ slot);}
\DoxyCodeLine{00142\ }
\DoxyCodeLine{00157\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor_aa38cacfe02e74049f0b5b2ffa397676e}{run}}(int16\_t\ speed);}
\DoxyCodeLine{00158\ }
\DoxyCodeLine{00171\ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_me_mega_pi_pro4_dc_motor_afd87d1eda99dbde9a1a2223777b9b520}{stop}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00172\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00173\ \ \ \textcolor{keyword}{volatile}\ uint8\_t\ dc\_dir\_pin;}
\DoxyCodeLine{00174\ \ \ \textcolor{keyword}{volatile}\ uint8\_t\ dc\_pwm\_pin;}
\DoxyCodeLine{00175\ \ \ int16\_t\ \ last\_speed;}
\DoxyCodeLine{00176\ \};}
\DoxyCodeLine{00177\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00178\ }
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ }

\end{DoxyCode}
