Доработал модуль TIM (с точки зрения документции. Код не проверен)

Доработна документация в целом
	- добавелн main page
	- исправлены ошибки в шапках и коментах
	- добавлен граф инклюдов
This commit is contained in:
2025-10-19 11:55:12 +03:00
parent f61aa1ff0f
commit 9d720767b0
534 changed files with 13259 additions and 9229 deletions

View File

@@ -38,152 +38,156 @@
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00034}00034\ \textcolor{preprocessor}{\#define\ MyLibs\_Error\_Handler(...)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00035}00035\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ MyLibs\_Error\_Handler}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00036}00036\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00037}00037\ \textcolor{comment}{/**\ @brief\ Проверить\ указатель\ на\ NULL\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00038}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga0b75f0bcf066acdf797b8e6730c52f86}{00038}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_1(\_p1\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\_p1\_\ ==\ NULL)}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00039}00039\ \textcolor{comment}{/**\ @brief\ Проверить\ два\ указателя\ на\ NULL\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00040}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_gae7d1cbb9075ee4b830342fd564d96be0}{00040}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_2(\_p1\_,\ \_p2\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((\_p1\_\ ==\ NULL)\ ||\ (\_p2\_\ ==\ NULL))}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00041}00041\ \textcolor{comment}{/**\ @brief\ Проверить\ три\ указателя\ на\ NULL\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00042}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga002f4a5f5d8bb37d88f607386bc6ba2e}{00042}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_3(\_p1\_,\ \_p2\_,\ \_p3\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ ((\_p1\_\ ==\ NULL)\ ||\ (\_p2\_\ ==\ NULL)\ ||\ (\_p3\_\ ==\ NULL))}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00043}00043\ \textcolor{comment}{/**\ @brief\ Проверить\ четыре\ указателя\ на\ NULL\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00044}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_gade91c09d89a5f69003dcfe506ed0327f}{00044}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_4(\_p1\_,\ \_p2\_,\ \_p3\_,\ \_p4\_)\ \ \ \ \ \ \ \ ((\_p1\_\ ==\ NULL)\ ||\ (\_p2\_\ ==\ NULL)\ ||\ (\_p3\_\ ==\ NULL)\ ||\ (\_p4\_\ ==\ NULL))}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00045}00045\ \textcolor{comment}{/**\ @brief\ Проверить\ пять\ указателей\ на\ NULL\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00046}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga944edcd2c65519578d36730b94701f64}{00046}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_5(\_p1\_,\ \_p2\_,\ \_p3\_,\ \_p4\_,\ \_p5\_)\ \ ((\_p1\_\ ==\ NULL)\ ||\ (\_p2\_\ ==\ NULL)\ ||\ (\_p3\_\ ==\ NULL)\ ||\ (\_p4\_\ ==\ NULL)\ ||\ (\_p5\_\ ==\ NULL))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00047}00047\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00048}00048\ \textcolor{comment}{/**\ ERROR\_HANDLER\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00049}00049\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00050}00050\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00051}00051\ \ \ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00052}00052\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00053}00053\ \textcolor{comment}{/***************************************************************************}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00054}00054\ \textcolor{comment}{********************************ACCESS\_DEFINES*****************************/}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00055}00055\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00037}00037\ \textcolor{comment}{/**\ @brief\ Проверить\ один\ указатель\ на\ NULL\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00038}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga5d066a5b9781f9437e75d98677489eb9}{00038}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_1(p1)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (p1\ ==\ NULL)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00039}00039\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00040}00040\ \textcolor{comment}{/**\ @brief\ Проверить\ два\ указателя\ на\ NULL\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00041}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga27b363f333cacdccc15f5174e096b5b3}{00041}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_2(p1,\ p2)\ \ \ \ \ \ \ \ \ \ \ \ \ \ ((p1\ ==\ NULL)\ ||\ (p1\ !=\ NULL\ \&\&\ p2\ ==\ NULL))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00042}00042\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00043}00043\ \textcolor{comment}{/**\ @brief\ Проверить\ три\ указателя\ на\ NULL\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00044}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{00044}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_3(p1,\ p2,\ p3)\ \ \ \ \ \ \ \ \ \ ((p1\ ==\ NULL)\ ||\ (p1\ !=\ NULL\ \&\&\ ((p2\ ==\ NULL)\ ||\ (p2\ !=\ NULL\ \&\&\ p3\ ==\ NULL))))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00045}00045\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00046}00046\ \textcolor{comment}{/**\ @brief\ Проверить\ четыре\ указателя\ на\ NULL\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00047}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga590973be111afc3f9ba15e6939530254}{00047}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_4(p1,\ p2,\ p3,\ p4)\ \ \ \ \ \ ((p1\ ==\ NULL)\ ||\ (p1\ !=\ NULL\ \&\&\ ((p2\ ==\ NULL)\ ||\ (p2\ !=\ NULL\ \&\&\ ((p3\ ==\ NULL)\ ||\ (p3\ !=\ NULL\ \&\&\ p4\ ==\ NULL))))))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00048}00048\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00049}00049\ \textcolor{comment}{/**\ @brief\ Проверить\ пять\ указателей\ на\ NULL\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00050}\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_gaab0aafd7a4a21ec4f338b19269f65490}{00050}}\ \textcolor{preprocessor}{\#define\ check\_null\_ptr\_5(p1,\ p2,\ p3,\ p4,\ p5)\ \ ((p1\ ==\ NULL)\ ||\ (p1\ !=\ NULL\ \&\&\ ((p2\ ==\ NULL)\ ||\ (p2\ !=\ NULL\ \&\&\ ((p3\ ==\ NULL)\ ||\ (p3\ !=\ NULL\ \&\&\ ((p4\ ==\ NULL)\ ||\ (p4\ !=\ NULL\ \&\&\ p5\ ==\ NULL))))))))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00051}00051\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00052}00052\ \textcolor{comment}{/**\ ERROR\_HANDLER\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00053}00053\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00054}00054\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00055}00055\ \ \ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00056}00056\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00057}00057\ \textcolor{comment}{/***************************************************************************}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00058}00058\ \textcolor{comment}{******************************DELAYS\_DEFINES*******************************/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00059}00059\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00060}00060\ \textcolor{comment}{\ \ *\ @addtogroup\ DELAYS\_DEFINES\ \ \ \ Delays\ defines}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00061}00061\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MYLIBS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00062}00062\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ \ Макросы\ и\ определения\ для\ работы\ с\ задержками\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00063}00063\ \textcolor{comment}{\ \ *\ @details}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00064}00064\ \textcolor{comment}{\ \ *\ Этот\ блок\ содержит\ макросы\ для\ реализации\ задержек\ с\ использованием\ HAL\ или\ FreeRTOS:}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00065}00065\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelay\ \ \ \ \ \ \ \ \ \ \ \ \ —\ простая\ задержка\ заданной\ длительности;}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00066}00066\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelayStart\ \ \ \ \ \ \ \ \ сохранение\ текущего\ времени\ начала\ задержки;}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00067}00067\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelayWhileActive\ \ —\ проверка,\ активна\ ли\ задержка;}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00068}00068\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelayWaitDone\ \ \ \ \ \ проверка,\ завершена\ ли\ задержка.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00069}00069\ \textcolor{comment}{\ \ *\ Эти\ макросы\ удобны\ для\ реализации\ неблокирующих\ задержек.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00070}00070\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00071}00071\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00072}00072\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00073}00073\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00074}00074\ \textcolor{comment}{\ \ *\ @def\ msDelay(\_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00075}00075\ \textcolor{comment}{\ \ *\ @brief\ Задержка\ на\ указанное\ количество\ миллисекунд.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00076}00076\ \textcolor{comment}{\ \ *\ @param\ \_ms\_\ Время\ задержки\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00077}00077\ \textcolor{comment}{\ \ *\ @note\ Использует\ HAL\_Delay\ или\ osDelay\ в\ зависимости\ от\ @ref\ FREERTOS\_DELAY.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00078}00078\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00079}00079\ \textcolor{preprocessor}{\#ifdef\ FREERTOS\_DELAY}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00080}00080\ \textcolor{preprocessor}{\ \ \#define\ msDelay(\_ms\_)\ \ \ \ \ \ \ osDelay(\_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00081}00081\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00082}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_gabeb97579daeb622c6651ed03c4a27479}{00082}}\ \textcolor{preprocessor}{\ \ \#define\ msDelay(\_ms\_)\ \ \ \ \ \ \ HAL\_Delay(\_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00083}00083\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00084}00084\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00085}00085\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00086}00086\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00087}00087\ \textcolor{comment}{\ \ *\ @brief\ Начать\ отсчет\ задержки.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00088}00088\ \textcolor{comment}{\ \ *\ @param\ \_pvar\_\ Указатель\ на\ переменную\ типа\ uint32\_t\ для\ хранения\ времени\ старта.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00089}00089\ \textcolor{comment}{\ \ *\ @details\ После\ вызова\ этого\ макроса\ переменная\ \_pvar\_\ содержит\ текущее\ количество\ миллисекунд}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00090}00090\ \textcolor{comment}{\ \ *\ с\ момента\ запуска\ системы\ (HAL\_GetTick).\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00091}00091\ \textcolor{comment}{\ \ *\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00092}00092\ \textcolor{comment}{\ \ *\ Используется\ для\ реализации\ неблокирующих\ задержек.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00093}00093\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00094}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_ga8a5051b1292d1019fe8dd3fc5521ab25}{00094}}\ \textcolor{preprocessor}{\#define\ msDelayStart(\_pvar\_)\ \ \ \ \ \ \ \ \ \ \ \ *(\_pvar\_)\ =\ HAL\_GetTick()}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00095}00095\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00096}00096\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00097}00097\ \textcolor{comment}{\ *\ @brief\ Проверяет,\ активна\ ли\ задержка.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00098}00098\ \textcolor{comment}{\ *\ @param\ \_ms\_\ Длительность\ задержки\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00099}00099\ \textcolor{comment}{\ *\ @param\ \_pvar\_\ Указатель\ на\ переменную,\ в\ которой\ сохранено\ время\ начала\ (@ref\ msDelayStart).}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00100}00100\ \textcolor{comment}{\ *\ @retval\ 1\ Задержка\ еще\ активна.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00101}00101\ \textcolor{comment}{\ *\ @retval\ 0\ Задержка\ завершена.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00102}00102\ \textcolor{comment}{\ *\ @details}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00103}00103\ \textcolor{comment}{\ *\ Возвращает\ true,\ пока\ время\ задержки\ не\ истекло.\ Используется\ в\ проверках,}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00104}00104\ \textcolor{comment}{\ *\ когда\ нужно\ **действовать,\ пока\ задержка\ выполняется**.\ Пример:}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00105}00105\ \textcolor{comment}{\ *\ @code}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00106}00106\ \textcolor{comment}{\ *\ while(msDelayWhileActive(1000,\ \&tick))\ \{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00107}00107\ \textcolor{comment}{\ *\ \ \ \ \ //\ выполняем\ другие\ задачи,\ задержка\ не\ блокирует\ поток}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00108}00108\ \textcolor{comment}{\ *\ \}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00109}00109\ \textcolor{comment}{\ *\ @endcode}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00110}00110\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00111}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_ga0b97e172659a59ee4fa56f851643ae85}{00111}}\ \textcolor{preprocessor}{\#define\ msDelayWhileActive(\_ms\_,\ \_pvar\_)\ \ \ \ (HAL\_GetTick()\ -\/\ *(\_pvar\_)\ <\ \_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00112}00112\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00113}00113\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00114}00114\ \textcolor{comment}{\ *\ @brief\ Проверяет,\ завершилась\ ли\ задержка.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00115}00115\ \textcolor{comment}{\ *\ @param\ \_ms\_\ Длительность\ задержки\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00116}00116\ \textcolor{comment}{\ *\ @param\ \_pvar\_\ Указатель\ на\ переменную,\ в\ которой\ сохранено\ время\ начала\ (msDelayStart).}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00117}00117\ \textcolor{comment}{\ *\ @retval\ 1\ Задержка\ завершена.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00118}00118\ \textcolor{comment}{\ *\ @retval\ 0\ Задержка\ еще\ активна.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00119}00119\ \textcolor{comment}{\ *\ @details}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00120}00120\ \textcolor{comment}{\ *\ Возвращает\ true,\ когда\ задержка\ уже\ завершена.\ Используется\ в\ проверках,}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00121}00121\ \textcolor{comment}{\ *\ когда\ нужно\ **выполнить\ действие\ только\ после\ окончания\ задержки**.\ Пример:}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00122}00122\ \textcolor{comment}{\ *\ @code}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00123}00123\ \textcolor{comment}{\ *\ if(msDelayWaitDone(1000,\ \&tick))\ \{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00124}00124\ \textcolor{comment}{\ *\ \ \ \ \ //\ выполняем\ действие\ после\ завершения\ задержки}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00125}00125\ \textcolor{comment}{\ *\ \}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00126}00126\ \textcolor{comment}{\ *\ @endcode}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00127}00127\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00128}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_gaed082c07b9fc4d1894330d885b9b5518}{00128}}\ \textcolor{preprocessor}{\#define\ msDelayWaitDone(\_ms\_,\ \_pvar\_)\ \ \ \ (HAL\_GetTick()\ -\/\ *(\_pvar\_)\ >=\ \_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00129}00129\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00130}00130\ \textcolor{comment}{/**\ DELAYS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00131}00131\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00132}00132\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00133}00133\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00134}00134\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00135}00135\ \textcolor{comment}{/***************************************************************************}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00136}00136\ \textcolor{comment}{*******************************MATH\_DEFINES********************************/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00137}00137\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00138}00138\ \textcolor{comment}{\ \ *\ @addtogroup\ UTILS\_DEFINES\ \ \ \ \ \ Utils\ defines}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00139}00139\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MYLIBS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00140}00140\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Общие\ вспомогательные\ макросы}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00141}00141\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00142}00142\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00143}00143\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00144}00144\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00145}00145\ \textcolor{comment}{\ *\ @brief\ Обнуление\ структуры.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00146}00146\ \textcolor{comment}{\ *\ @param\ \_struct\_\ Структура,\ которую\ нужно\ обнулить.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00147}00147\ \textcolor{comment}{\ *\ @details\ Макрос\ использует\ memset\ для\ обнуления\ всей\ памяти\ структуры.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00148}00148\ \textcolor{comment}{\ *\ Используется\ для\ быстрой\ и\ безопасной\ инициализации\ переменных\ структур\ до\ нуля.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00149}00149\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00150}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_gaf5e598848326d48e86167e5099a029be}{00150}}\ \textcolor{preprocessor}{\#define\ ClearStruct(\_struct\_)\ \ \ \ \ memset(\&(\_struct\_),\ 0,\ sizeof(\_struct\_))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00151}00151\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00152}00152\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00153}00153\ \textcolor{comment}{\ \ *\ @brief\ \ Деление\ с\ округлением\ вверх}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00154}00154\ \textcolor{comment}{\ \ *\ @param\ \_val\_\ Делимое.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00155}00155\ \textcolor{comment}{\ \ *\ @param\ \_div\_\ Делитель.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00156}00156\ \textcolor{comment}{\ \ *\ @return\ Результат\ деления,\ округленный\ вверх.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00157}00157\ \textcolor{comment}{\ \ *\ @details\ \ Если\ результат\ деления\ без\ остатка:\ он\ возвращается\ как\ есть}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00158}00158\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ Если\ с\ остатком\ -\/\ округляется\ вверх}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00159}00159\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00160}00160\ \textcolor{comment}{//\#define\ Divide\_Up(\_val\_,\ \_div\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (((\_val\_)\%(\_div\_))?\ (\_val\_)/(\_div\_)+1\ :\ (\_val\_)/\_div\_)\ \ /*\ через\ тернарный\ оператор\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00161}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_gabf45f2b60eedf80cf9d1dbe4302a741e}{00161}}\ \textcolor{preprocessor}{\#define\ Divide\_Up(\_val\_,\ \_div\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((\_val\_\ -\/\ 1)\ /\ \_div\_)\ +\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{/*\ через\ мат\ выражение\ */}\textcolor{preprocessor}{\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00162}00162\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00163}00163\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00164}00164\ \textcolor{comment}{\ \ *\ @brief\ \ Swap\ between\ Little\ Endian\ and\ Big\ Endian}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00165}00165\ \textcolor{comment}{\ \ *\ @param\ v\ Исходное\ 16-\/битное\ значение.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00166}00166\ \textcolor{comment}{\ \ *\ @return\ Результат\ с\ поменяными\ местами\ старшим\ и\ младшим\ байтом.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00167}00167\ \textcolor{comment}{\ \ *\ @details\ \ Переключения\ между\ двумя\ типами\ хранения\ слова:\ HI-\/LO\ байты\ и\ LO-\/HI\ байты.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00168}00168\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00169}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_ga0f22e895ac7781c3d1b68fee182c4291}{00169}}\ \textcolor{preprocessor}{\#define\ ByteSwap16(v)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (((v\&0xFF00)\ >>\ (8))\ |\ ((v\&0x00FF)\ <<\ (8)))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00170}00170\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00171}00171\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00172}00172\ \textcolor{comment}{\ \ *\ @brief\ \ Абсолютное\ значение\ числа}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00173}00173\ \textcolor{comment}{\ \ *\ @param\ x\ Число.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00174}00174\ \textcolor{comment}{\ \ *\ @return\ Абсолютное\ значение\ числа\ x.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00175}00175\ \textcolor{comment}{\ \ *\ @details\ \ Берет\ число\ по\ модулю.\ Хз\ как\ работает\ библиотечный\ abs\ в\ stdlib.h,\ мб\ это\ быстрее,\ но\ вряд\ ли\ конечно.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00176}00176\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00177}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_ga996f7be338ccb40d1a2a5abc1ad61759}{00177}}\ \textcolor{preprocessor}{\#define\ ABS(x)\ (\ ((x)\ >\ 0)?\ (x)\ :\ -\/(x))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00178}00178\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00179}00179\ \textcolor{comment}{/**\ UTILS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00180}00180\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00181}00181\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00182}00182\ \ \ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00183}00183\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\_\_MYLIBS\_DEFINES\_H\_}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00058}00058\ \textcolor{comment}{********************************ACCESS\_DEFINES*****************************/}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00059}00059\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00060}00060\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00061}00061\ \textcolor{comment}{/***************************************************************************}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00062}00062\ \textcolor{comment}{******************************DELAYS\_DEFINES*******************************/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00063}00063\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00064}00064\ \textcolor{comment}{\ \ *\ @addtogroup\ DELAYS\_DEFINES\ \ \ \ Delays\ defines}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00065}00065\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MYLIBS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00066}00066\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ \ Макросы\ и\ определения\ для\ работы\ с\ задержками\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00067}00067\ \textcolor{comment}{\ \ *\ @details}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00068}00068\ \textcolor{comment}{\ \ *\ Этот\ блок\ содержит\ макросы\ для\ реализации\ задержек\ с\ использованием\ HAL\ или\ FreeRTOS:}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00069}00069\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelay\ \ \ \ \ \ \ \ \ \ \ \ \ —\ простая\ задержка\ заданной\ длительности;}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00070}00070\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelayStart\ \ \ \ \ \ \ \ —\ сохранение\ текущего\ времени\ начала\ задержки;}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00071}00071\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelayWhileActive\ \ —\ проверка,\ активна\ ли\ задержка;}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00072}00072\ \textcolor{comment}{\ \ *\ -\/\ @ref\ msDelayWaitDone\ \ \ \ \ —\ проверка,\ завершена\ ли\ задержка.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00073}00073\ \textcolor{comment}{\ \ *\ Эти\ макросы\ удобны\ для\ реализации\ неблокирующих\ задержек.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00074}00074\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00075}00075\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00076}00076\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00077}00077\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00078}00078\ \textcolor{comment}{\ \ *\ @def\ msDelay(\_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00079}00079\ \textcolor{comment}{\ \ *\ @brief\ Задержка\ на\ указанное\ количество\ миллисекунд.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00080}00080\ \textcolor{comment}{\ \ *\ @param\ \_ms\_\ Время\ задержки\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00081}00081\ \textcolor{comment}{\ \ *\ @note\ Использует\ HAL\_Delay\ или\ osDelay\ в\ зависимости\ от\ @ref\ FREERTOS\_DELAY.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00082}00082\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00083}00083\ \textcolor{preprocessor}{\#ifdef\ FREERTOS\_DELAY}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00084}00084\ \textcolor{preprocessor}{\ \ \#define\ msDelay(\_ms\_)\ \ \ \ \ \ \ osDelay(\_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00085}00085\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00086}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_gabeb97579daeb622c6651ed03c4a27479}{00086}}\ \textcolor{preprocessor}{\ \ \#define\ msDelay(\_ms\_)\ \ \ \ \ \ \ HAL\_Delay(\_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00087}00087\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00088}00088\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00089}00089\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00090}00090\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00091}00091\ \textcolor{comment}{\ \ *\ @brief\ Начать\ отсчет\ задержки.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00092}00092\ \textcolor{comment}{\ \ *\ @param\ \_pvar\_\ Указатель\ на\ переменную\ типа\ uint32\_t\ для\ хранения\ времени\ старта.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00093}00093\ \textcolor{comment}{\ \ *\ @details\ После\ вызова\ этого\ макроса\ переменная\ \_pvar\_\ содержит\ текущее\ количество\ миллисекунд}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00094}00094\ \textcolor{comment}{\ \ *\ с\ момента\ запуска\ системы\ (HAL\_GetTick).\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00095}00095\ \textcolor{comment}{\ \ *\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00096}00096\ \textcolor{comment}{\ \ *\ Используется\ для\ реализации\ неблокирующих\ задержек.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00097}00097\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00098}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_ga8a5051b1292d1019fe8dd3fc5521ab25}{00098}}\ \textcolor{preprocessor}{\#define\ msDelayStart(\_pvar\_)\ \ \ \ \ \ \ \ \ \ \ \ *(\_pvar\_)\ =\ HAL\_GetTick()}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00099}00099\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00100}00100\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00101}00101\ \textcolor{comment}{\ *\ @brief\ Проверяет,\ активна\ ли\ задержка.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00102}00102\ \textcolor{comment}{\ *\ @param\ \_ms\_\ Длительность\ задержки\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00103}00103\ \textcolor{comment}{\ *\ @param\ \_pvar\_\ Указатель\ на\ переменную,\ в\ которой\ сохранено\ время\ начала\ (@ref\ msDelayStart).}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00104}00104\ \textcolor{comment}{\ *\ @retval\ 1\ Задержка\ еще\ активна.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00105}00105\ \textcolor{comment}{\ *\ @retval\ 0\ Задержка\ завершена.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00106}00106\ \textcolor{comment}{\ *\ @details}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00107}00107\ \textcolor{comment}{\ *\ Возвращает\ true,\ пока\ время\ задержки\ не\ истекло.\ Используется\ в\ проверках,}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00108}00108\ \textcolor{comment}{\ *\ когда\ нужно\ **действовать,\ пока\ задержка\ выполняется**.\ Пример:}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00109}00109\ \textcolor{comment}{\ *\ @code}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00110}00110\ \textcolor{comment}{\ *\ while(msDelayWhileActive(1000,\ \&tick))\ \{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00111}00111\ \textcolor{comment}{\ *\ \ \ \ \ //\ выполняем\ другие\ задачи,\ задержка\ не\ блокирует\ поток}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00112}00112\ \textcolor{comment}{\ *\ \}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00113}00113\ \textcolor{comment}{\ *\ @endcode}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00114}00114\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00115}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_ga0b97e172659a59ee4fa56f851643ae85}{00115}}\ \textcolor{preprocessor}{\#define\ msDelayWhileActive(\_ms\_,\ \_pvar\_)\ \ \ \ (HAL\_GetTick()\ -\/\ *(\_pvar\_)\ <\ \_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00116}00116\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00117}00117\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00118}00118\ \textcolor{comment}{\ *\ @brief\ Проверяет,\ завершилась\ ли\ задержка.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00119}00119\ \textcolor{comment}{\ *\ @param\ \_ms\_\ Длительность\ задержки\ в\ миллисекундах.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00120}00120\ \textcolor{comment}{\ *\ @param\ \_pvar\_\ Указатель\ на\ переменную,\ в\ которой\ сохранено\ время\ начала\ (msDelayStart).}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00121}00121\ \textcolor{comment}{\ *\ @retval\ 1\ Задержка\ завершена.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00122}00122\ \textcolor{comment}{\ *\ @retval\ 0\ Задержка\ еще\ активна.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00123}00123\ \textcolor{comment}{\ *\ @details}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00124}00124\ \textcolor{comment}{\ *\ Возвращает\ true,\ когда\ задержка\ уже\ завершена.\ Используется\ в\ проверках,}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00125}00125\ \textcolor{comment}{\ *\ когда\ нужно\ **выполнить\ действие\ только\ после\ окончания\ задержки**.\ Пример:}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00126}00126\ \textcolor{comment}{\ *\ @code}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00127}00127\ \textcolor{comment}{\ *\ if(msDelayWaitDone(1000,\ \&tick))\ \{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00128}00128\ \textcolor{comment}{\ *\ \ \ \ \ //\ выполняем\ действие\ после\ завершения\ задержки}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00129}00129\ \textcolor{comment}{\ *\ \}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00130}00130\ \textcolor{comment}{\ *\ @endcode}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00131}00131\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00132}\mbox{\hyperlink{group___d_e_l_a_y_s___d_e_f_i_n_e_s_gaed082c07b9fc4d1894330d885b9b5518}{00132}}\ \textcolor{preprocessor}{\#define\ msDelayWaitDone(\_ms\_,\ \_pvar\_)\ \ \ \ (HAL\_GetTick()\ -\/\ *(\_pvar\_)\ >=\ \_ms\_)}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00133}00133\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00134}00134\ \textcolor{comment}{/**\ DELAYS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00135}00135\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00136}00136\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00137}00137\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00138}00138\ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00139}00139\ \textcolor{comment}{/***************************************************************************}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00140}00140\ \textcolor{comment}{*******************************MATH\_DEFINES********************************/}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00141}00141\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00142}00142\ \textcolor{comment}{\ \ *\ @addtogroup\ UTILS\_DEFINES\ \ \ \ \ \ Utils\ defines}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00143}00143\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MYLIBS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00144}00144\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Общие\ вспомогательные\ макросы}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00145}00145\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00146}00146\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00147}00147\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00148}00148\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00149}00149\ \textcolor{comment}{\ *\ @brief\ Обнуление\ структуры.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00150}00150\ \textcolor{comment}{\ *\ @param\ \_struct\_\ Структура,\ которую\ нужно\ обнулить.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00151}00151\ \textcolor{comment}{\ *\ @details\ Макрос\ использует\ memset\ для\ обнуления\ всей\ памяти\ структуры.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00152}00152\ \textcolor{comment}{\ *\ Используется\ для\ быстрой\ и\ безопасной\ инициализации\ переменных\ структур\ до\ нуля.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00153}00153\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00154}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_gaf5e598848326d48e86167e5099a029be}{00154}}\ \textcolor{preprocessor}{\#define\ ClearStruct(\_struct\_)\ \ \ \ \ memset(\&(\_struct\_),\ 0,\ sizeof(\_struct\_))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00155}00155\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00156}00156\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00157}00157\ \textcolor{comment}{\ \ *\ @brief\ \ Деление\ с\ округлением\ вверх}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00158}00158\ \textcolor{comment}{\ \ *\ @param\ \_val\_\ Делимое.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00159}00159\ \textcolor{comment}{\ \ *\ @param\ \_div\_\ Делитель.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00160}00160\ \textcolor{comment}{\ \ *\ @return\ Результат\ деления,\ округленный\ вверх.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00161}00161\ \textcolor{comment}{\ \ *\ @details\ \ Если\ результат\ деления\ без\ остатка:\ он\ возвращается\ как\ есть}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00162}00162\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ Если\ с\ остатком\ -\/\ округляется\ вверх}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00163}00163\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00164}00164\ \textcolor{comment}{//\#define\ Divide\_Up(\_val\_,\ \_div\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (((\_val\_)\%(\_div\_))?\ (\_val\_)/(\_div\_)+1\ :\ (\_val\_)/\_div\_)\ \ /*\ через\ тернарный\ оператор\ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00165}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_gabf45f2b60eedf80cf9d1dbe4302a741e}{00165}}\ \textcolor{preprocessor}{\#define\ Divide\_Up(\_val\_,\ \_div\_)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ((\_val\_\ -\/\ 1)\ /\ \_div\_)\ +\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\textcolor{comment}{/*\ через\ мат\ выражение\ */}\textcolor{preprocessor}{\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00166}00166\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00167}00167\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00168}00168\ \textcolor{comment}{\ \ *\ @brief\ \ Swap\ between\ Little\ Endian\ and\ Big\ Endian}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00169}00169\ \textcolor{comment}{\ \ *\ @param\ v\ Исходное\ 16-\/битное\ значение.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00170}00170\ \textcolor{comment}{\ \ *\ @return\ Результат\ с\ поменяными\ местами\ старшим\ и\ младшим\ байтом.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00171}00171\ \textcolor{comment}{\ \ *\ @details\ \ Переключения\ между\ двумя\ типами\ хранения\ слова:\ HI-\/LO\ байты\ и\ LO-\/HI\ байты.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00172}00172\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00173}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_ga0f22e895ac7781c3d1b68fee182c4291}{00173}}\ \textcolor{preprocessor}{\#define\ ByteSwap16(v)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (((v\&0xFF00)\ >>\ (8))\ |\ ((v\&0x00FF)\ <<\ (8)))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00174}00174\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00175}00175\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00176}00176\ \textcolor{comment}{\ \ *\ @brief\ \ Абсолютное\ значение\ числа}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00177}00177\ \textcolor{comment}{\ \ *\ @param\ x\ Число.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00178}00178\ \textcolor{comment}{\ \ *\ @return\ Абсолютное\ значение\ числа\ x.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00179}00179\ \textcolor{comment}{\ \ *\ @details\ \ Берет\ число\ по\ модулю.\ Хз\ как\ работает\ библиотечный\ abs\ в\ stdlib.h,\ мб\ это\ быстрее,\ но\ вряд\ ли\ конечно.}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00180}00180\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00181}\mbox{\hyperlink{group___u_t_i_l_s___d_e_f_i_n_e_s_ga996f7be338ccb40d1a2a5abc1ad61759}{00181}}\ \textcolor{preprocessor}{\#define\ ABS(x)\ (\ ((x)\ >\ 0)?\ (x)\ :\ -\/(x))}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00182}00182\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00183}00183\ \textcolor{comment}{/**\ UTILS\_DEFINES}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00184}00184\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00185}00185\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00186}00186\ \ \ }
\DoxyCodeLine{\Hypertarget{mylibs__defs_8h_source_l00187}00187\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\_\_MYLIBS\_DEFINES\_H\_}}
\end{DoxyCode}