\doxysubsubsubsection{PWM/\+OC Channels tools }
\hypertarget{group___m_y_l_i_b_s___t_i_m___o_c}{}\label{group___m_y_l_i_b_s___t_i_m___o_c}\index{PWM/OC Channels tools@{PWM/OC Channels tools}}


Функции для инициализации базовых функций каналов таймера  


Collaboration diagram for PWM/\+OC Channels tools\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=302pt]{group___m_y_l_i_b_s___t_i_m___o_c}
\end{center}
\end{figure}
\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gadb2f465d89f609e035867e980c3a29c6}{TIM\+\_\+\+Output\+\_\+\+PWM\+\_\+\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, TIM\+\_\+\+OC\+\_\+\+Init\+Type\+Def \texorpdfstring{$\ast$}{*}s\+Config\+OC, uint32\+\_\+t TIM\+\_\+\+CHANNEL, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t PWM\+\_\+\+PIN)
\begin{DoxyCompactList}\small\item\em Инициализация выхода ШИМ таймера. \end{DoxyCompactList}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gae2608ca8023e9a0713af0b4fbfbc1889}{TIM\+\_\+\+OC\+\_\+\+Comparator\+\_\+\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint32\+\_\+t TIM\+\_\+\+CHANNEL)
\begin{DoxyCompactList}\small\item\em Инициализация OC компаратора таймера. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsubsection{Detailed Description}
Функции для инициализации базовых функций каналов таймера 

\begin{DoxyParagraph}{Пример использования\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ PWM\_Channel\_Init\_Example(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ TIM\_HandleTypeDef\ htim3;}
\DoxyCodeLine{\ \ \ \ TIM\_OC\_InitTypeDef\ sConfigOC;}
\DoxyCodeLine{\ \ \ \ GPIO\_TypeDef\ *GPIOx\ =\ GPIOB;}
\DoxyCodeLine{\ \ \ \ uint32\_t\ PWM\_PIN\ =\ GPIO\_PIN\_0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ таймера\ и\ канала\ PWM}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gadb2f465d89f609e035867e980c3a29c6}{TIM\_Output\_PWM\_Init}}(\&htim3,\ \&sConfigOC,\ TIM\_CHANNEL\_1,\ GPIOx,\ PWM\_PIN);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ компаратора\ OC}}
\DoxyCodeLine{\ \ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gae2608ca8023e9a0713af0b4fbfbc1889}{TIM\_OC\_Comparator\_Init}}(\&htim3,\ TIM\_CHANNEL\_1);}
\DoxyCodeLine{\}}

\end{DoxyCode}
 
\end{DoxyParagraph}


\label{doc-func-members}
\Hypertarget{group___m_y_l_i_b_s___t_i_m___o_c_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___m_y_l_i_b_s___t_i_m___o_c_gadb2f465d89f609e035867e980c3a29c6}\index{PWM/OC Channels tools@{PWM/OC Channels tools}!TIM\_Output\_PWM\_Init@{TIM\_Output\_PWM\_Init}}
\index{TIM\_Output\_PWM\_Init@{TIM\_Output\_PWM\_Init}!PWM/OC Channels tools@{PWM/OC Channels tools}}
\doxysubsubsubsubsubsection{\texorpdfstring{TIM\_Output\_PWM\_Init()}{TIM\_Output\_PWM\_Init()}}
{\footnotesize\ttfamily \label{group___m_y_l_i_b_s___t_i_m___o_c_gadb2f465d89f609e035867e980c3a29c6} 
HAL\+\_\+\+Status\+Type\+Def TIM\+\_\+\+Output\+\_\+\+PWM\+\_\+\+Init (\begin{DoxyParamCaption}\item[{TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{htim}{, }\item[{TIM\+\_\+\+OC\+\_\+\+Init\+Type\+Def \texorpdfstring{$\ast$}{*}}]{s\+Config\+OC}{, }\item[{uint32\+\_\+t}]{TIM\+\_\+\+CHANNEL}{, }\item[{GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}}]{GPIOx}{, }\item[{uint32\+\_\+t}]{GPIO\+\_\+\+PIN}{}\end{DoxyParamCaption})}



Инициализация выхода ШИМ таймера. 


\begin{DoxyParams}{Parameters}
{\em htim} & Указатель на хендл таймера. \\
\hline
{\em s\+Config\+OC} & Указатель на настрйоки канала таймера. \\
\hline
{\em TIM\+\_\+\+CHANNEL} & Канал таймера для настройки. \\
\hline
{\em GPIOx} & Порт для вывода ШИМ. \\
\hline
{\em GPIO\+\_\+\+PIN} & Пин для вывода ШИМ. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
HAL status. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
Предварительно надо инициализировать таймер \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga7044214f24a9868ba7e1650b55e639ec}{TIM\+\_\+\+Base\+\_\+\+Init}. 
\end{DoxyNote}


Definition at line \mbox{\hyperlink{general__tim_8c_source_l00226}{226}} of file \mbox{\hyperlink{general__tim_8c_source}{general\+\_\+tim.\+c}}.

\Hypertarget{group___m_y_l_i_b_s___t_i_m___o_c_gae2608ca8023e9a0713af0b4fbfbc1889}\index{PWM/OC Channels tools@{PWM/OC Channels tools}!TIM\_OC\_Comparator\_Init@{TIM\_OC\_Comparator\_Init}}
\index{TIM\_OC\_Comparator\_Init@{TIM\_OC\_Comparator\_Init}!PWM/OC Channels tools@{PWM/OC Channels tools}}
\doxysubsubsubsubsubsection{\texorpdfstring{TIM\_OC\_Comparator\_Init()}{TIM\_OC\_Comparator\_Init()}}
{\footnotesize\ttfamily \label{group___m_y_l_i_b_s___t_i_m___o_c_gae2608ca8023e9a0713af0b4fbfbc1889} 
HAL\+\_\+\+Status\+Type\+Def TIM\+\_\+\+OC\+\_\+\+Comparator\+\_\+\+Init (\begin{DoxyParamCaption}\item[{TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{htim}{, }\item[{uint32\+\_\+t}]{TIM\+\_\+\+CHANNEL}{}\end{DoxyParamCaption})}



Инициализация OC компаратора таймера. 


\begin{DoxyParams}{Parameters}
{\em htim} & Указатель на хендл таймера. \\
\hline
{\em TIM\+\_\+\+CHANNEL} & Канал таймера для настройки. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
HAL status. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
Предварительно надо инициализировать таймер \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga7044214f24a9868ba7e1650b55e639ec}{TIM\+\_\+\+Base\+\_\+\+Init}. 
\end{DoxyNote}


Definition at line \mbox{\hyperlink{general__tim_8c_source_l00272}{272}} of file \mbox{\hyperlink{general__tim_8c_source}{general\+\_\+tim.\+c}}.

