\doxysection{E\+:/.WORK/\+STM32/\+STM32\+\_\+\+Extended\+Libs/\+My\+Libs\+General/\+Inc/general\+\_\+tim.h File Reference}
\hypertarget{general__tim_8h}{}\label{general__tim_8h}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_tim.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_tim.h}}


Заголовочный файл для модуля инициализации таймеров и работы с ними.  


{\ttfamily \#include "{}mylibs\+\_\+defs.\+h"{}}\newline
{\ttfamily \#include "{}general\+\_\+gpio.\+h"{}}\newline
Include dependency graph for general\+\_\+tim.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=229pt]{general__tim_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{general__tim_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct_t_i_m___settings_type_def}{TIM\+\_\+\+Settings\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура инициализации таймера \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура инициализации енкодера \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga23382b8f04b3e6db2c59dfa1ef5ea4a2}{HAL\+\_\+\+TIM\+\_\+\+MODULE\+\_\+\+ENABLED}}
\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga54a98c21365e0bc45b81555d2b101f2b}{USE\+\_\+\+TIM1}}
\begin{DoxyCompactList}\small\item\em Включить TIM1 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga72535a44955b43cbcd56e25039ab32eb}{USE\+\_\+\+TIM2}}
\begin{DoxyCompactList}\small\item\em Включить TIM2 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga5b5685a43273b6e37242a4aba3ee0617}{USE\+\_\+\+TIM3}}
\begin{DoxyCompactList}\small\item\em Включить TIM3 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga1493b39c9214501180b81b4c892f9be0}{USE\+\_\+\+TIM4}}
\begin{DoxyCompactList}\small\item\em Включить TIM4 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga252f4fba93fc265110e83760e0590af3}{USE\+\_\+\+TIM5}}
\begin{DoxyCompactList}\small\item\em Включить TIM5 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga8fe31b98160627d19038222910be3f46}{USE\+\_\+\+TIM6}}
\begin{DoxyCompactList}\small\item\em Включить TIM6 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga7cdc54cc8cbbb6e9f60001f1e3e6ec67}{USE\+\_\+\+TIM7}}
\begin{DoxyCompactList}\small\item\em Включить TIM7 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga28ba33d7c6bf22821dafa5bcee4854be}{USE\+\_\+\+TIM8}}
\begin{DoxyCompactList}\small\item\em Включить TIM8 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_gaac627c0e98c9594cc41b1b46eb39e44a}{USE\+\_\+\+TIM9}}
\begin{DoxyCompactList}\small\item\em Включить TIM9 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga98c0691052d1da2c4053dd3586ff7ce9}{USE\+\_\+\+TIM10}}
\begin{DoxyCompactList}\small\item\em Включить TIM10 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga176c97f06ebcf14e06e5c5bdbfac44c2}{USE\+\_\+\+TIM11}}
\begin{DoxyCompactList}\small\item\em Включить TIM11 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga4e2b0e6cdf9eed74581b575c3fd9516b}{USE\+\_\+\+TIM12}}
\begin{DoxyCompactList}\small\item\em Включить TIM12 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_gaf48ef87650517652ddec039a189507ac}{USE\+\_\+\+TIM13}}
\begin{DoxyCompactList}\small\item\em Включить TIM13 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga9ae40be31d5271abe3e49f896d916d5c}{USE\+\_\+\+TIM14}}
\begin{DoxyCompactList}\small\item\em Включить TIM14 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{general__tim_8h_a867308f75c1be4f2090bcda3bcd900c9}{TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos}}~0
\item 
\#define \mbox{\hyperlink{general__tim_8h_a8c43257cbfd6ac70b6eb0839e47bbd07}{TIM\+\_\+\+IT\+\_\+\+CONF}}~(1$<$$<$(TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos))
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaeb611874216a4661fb83366b99b9e787}{TIM\+\_\+\+ITMode\+Type\+Def}} \{ \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaeb611874216a4661fb83366b99b9e787ab0869828a4dfd62eaa44868ca27835f8}{TIM\+\_\+\+DEFAULT}} = 0
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaeb611874216a4661fb83366b99b9e787a89ecf1ef6d45ead2efcb7dd30396114c}{TIM\+\_\+\+IT\+\_\+\+MODE}} = (1\texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<}( 0 ))
 \}
\begin{DoxyCompactList}\small\item\em Режим прерываний таймера \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaa0a51c870325217ac099881f09dd0800}{TIM\+\_\+\+MHz\+Tick\+Base\+Type\+Def}} \{ \newline
\mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800ae838122c0e83bc57ad31b546bf2f00e5}{TIM\+\_\+\+Base\+\_\+\+Disable}} = 0
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a63df3123d0ddc592b189ed1594456ea2}{TIM\+\_\+\+Tick\+Base\+\_\+1\+US}} = 1
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a060b01e890891fd17c8f95b55a94139f}{TIM\+\_\+\+Tick\+Base\+\_\+10\+US}} = 10
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a096ef0ab67788487f69d8877c6d89b30}{TIM\+\_\+\+Tick\+Base\+\_\+100\+US}} = 100
, \newline
\mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a6a66c5ed1d966c9e30f0219b664d2b25}{TIM\+\_\+\+Tick\+Base\+\_\+1\+MS}} = 1000
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a7421a08abd119e71aa99eea5ab5d6daa}{TIM\+\_\+\+Tick\+Base\+\_\+10\+MS}} = 10000
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a18527a2d781eb4365aecd9a3184fc1da}{TIM\+\_\+\+Tick\+Base\+\_\+100\+MS}} = 100000
 \}
\begin{DoxyCompactList}\small\item\em Длительность тика таймера (частота тактирования таймера) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{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}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_ga8d16c3b7e7c6decc54c5c3d1a8bf0fbc}{TIM\+\_\+\+Encoder\+\_\+\+Init}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc1, TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Инициализация режима энкодер у таймера. \end{DoxyCompactList}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_gac3bc6525f88c275e47eb864e6d567501}{TIM\+\_\+\+Encoder\+\_\+\+Read}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc)
\begin{DoxyCompactList}\small\item\em Считать энкодер. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_ga117b795017e9e3a357ddefe323412761}{TIM\+\_\+\+Encoder\+\_\+\+Read\+Switch}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc)
\begin{DoxyCompactList}\small\item\em Считать кнопку энкодера. \end{DoxyCompactList}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga4c0dfde4e15f677600605348b4e97834}{TIM\+\_\+\+Delay\+\_\+\+Start}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Начать отсчет неблокирующей задержки. \end{DoxyCompactList}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga88c552a133cb6e3015453cccab74c07e}{TIM\+\_\+\+Delay}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint16\+\_\+t delay)
\begin{DoxyCompactList}\small\item\em Задержка в тиках таймера (блокирующая). \end{DoxyCompactList}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga108637af414bff3373059273b815ce9b}{TIM\+\_\+\+Delay\+\_\+\+Non\+Blocking}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint16\+\_\+t delay)
\begin{DoxyCompactList}\small\item\em Задержка в тиках таймера (неблокирующая). \end{DoxyCompactList}\item 
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga7044214f24a9868ba7e1650b55e639ec}{TIM\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_t_i_m___settings_type_def}{TIM\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}stim)
\begin{DoxyCompactList}\small\item\em Инициализация таймера. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaeb611874216a4661fb83366b99b9e787}{TIM\+\_\+\+ITMode\+Type\+Def}} it\+\_\+mode)
\begin{DoxyCompactList}\small\item\em Инициализация CLK и NVIC таймеров. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga879e3f1c919c02990736730275367115}{TIM\+\_\+\+Base\+\_\+\+Msp\+De\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Деинициализация CLK и NVIC таймеров. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Заголовочный файл для модуля инициализации таймеров и работы с ними. 



Definition in file \mbox{\hyperlink{general__tim_8h_source}{general\+\_\+tim.\+h}}.



\label{doc-define-members}
\Hypertarget{general__tim_8h_doc-define-members}
\doxysubsection{Macro Definition Documentation}
\Hypertarget{general__tim_8h_a867308f75c1be4f2090bcda3bcd900c9}\index{general\_tim.h@{general\_tim.h}!TIM\_IT\_CONF\_Pos@{TIM\_IT\_CONF\_Pos}}
\index{TIM\_IT\_CONF\_Pos@{TIM\_IT\_CONF\_Pos}!general\_tim.h@{general\_tim.h}}
\doxysubsubsection{\texorpdfstring{TIM\_IT\_CONF\_Pos}{TIM\_IT\_CONF\_Pos}}
{\footnotesize\ttfamily \label{general__tim_8h_a867308f75c1be4f2090bcda3bcd900c9} 
\#define TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos~0}



Definition at line \mbox{\hyperlink{general__tim_8h_source_l00056}{56}} of file \mbox{\hyperlink{general__tim_8h_source}{general\+\_\+tim.\+h}}.

\Hypertarget{general__tim_8h_a8c43257cbfd6ac70b6eb0839e47bbd07}\index{general\_tim.h@{general\_tim.h}!TIM\_IT\_CONF@{TIM\_IT\_CONF}}
\index{TIM\_IT\_CONF@{TIM\_IT\_CONF}!general\_tim.h@{general\_tim.h}}
\doxysubsubsection{\texorpdfstring{TIM\_IT\_CONF}{TIM\_IT\_CONF}}
{\footnotesize\ttfamily \label{general__tim_8h_a8c43257cbfd6ac70b6eb0839e47bbd07} 
\#define TIM\+\_\+\+IT\+\_\+\+CONF~(1$<$$<$(TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos))}



Definition at line \mbox{\hyperlink{general__tim_8h_source_l00063}{63}} of file \mbox{\hyperlink{general__tim_8h_source}{general\+\_\+tim.\+h}}.

