\doxysection{general\+\_\+gpio.\+h} \hypertarget{general__gpio_8h_source}{}\label{general__gpio_8h_source}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_gpio.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_gpio.h}} \mbox{\hyperlink{general__gpio_8h}{Go to the documentation of this file.}} \begin{DoxyCode}{0} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00001}00001\ \textcolor{comment}{/**\ }} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00002}00002\ \textcolor{comment}{**************************************************************************}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ general\_gpio.h}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Заголовочный\ файл\ для\ модуля\ инициализации\ портов.}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00005}00005\ \textcolor{comment}{**************************************************************************}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00006}00006\ \textcolor{comment}{*\ @defgroup\ MY\_LIBS\_GPIO\ \ \ \ \ \ GPIO\ Tools}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00007}00007\ \textcolor{comment}{*\ @ingroup\ \ MYLIBS\_PERIPHERAL}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00008}00008\ \textcolor{comment}{*\ @brief\ \ \ \ Функции\ и\ макросы\ для\ удобной\ работы\ с\ GPIO.}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00009}00009\ \textcolor{comment}{*************************************************************************/}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00010}00010\ \textcolor{preprocessor}{\#ifndef\ \_\_GPIO\_GENERAL\_H\_}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00011}00011\ \textcolor{preprocessor}{\#define\ \_\_GPIO\_GENERAL\_H\_}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00012}00012\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00013}00013\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{mylibs__defs_8h}{mylibs\_defs.h}}"{}}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00014}00014\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00015}00015\ \textcolor{comment}{/**\ }} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00016}00016\ \textcolor{comment}{\ \ *\ @addtogroup\ GPIO\_INIT\ Init\ defines}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00017}00017\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GPIO\_GENERAL}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00018}00018\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Настройка\ состояний\ кнопок\ и\ количества\ тиков\ в\ периоде\ ШИМ}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00019}00019\ \textcolor{comment}{\ \ *\ @\{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00020}00020\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00021}00021\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00022}00022\ \textcolor{preprocessor}{\#ifndef\ LED\_PWM\_TICKS}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00023}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{00023}}\ \textcolor{preprocessor}{\#define\ LED\_PWM\_TICKS\ 15\ }\textcolor{comment}{///<\ Количество\ тиков\ в\ периоде\ ШИМ}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00024}00024\ \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00025}00025\ \ \ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00026}00026\ \textcolor{preprocessor}{\#ifndef\ LED\_ON}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00027}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_gaf2e697ac60e05813d45ea2c9c9e79c25}{00027}}\ \textcolor{preprocessor}{\#define\ LED\_ON\ 1\ \ }\textcolor{comment}{///<\ Состояние\ пина\ для\ включения\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00028}00028\ \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00029}00029\ \textcolor{preprocessor}{\#ifndef\ LED\_OFF}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00030}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga80700bb63bd56ebabbb4728aa433fd29}{00030}}\ \textcolor{preprocessor}{\#define\ LED\_OFF\ 0\ }\textcolor{comment}{///<\ Состояние\ пина\ для\ выключения\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00031}00031\ \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00032}00032\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00033}00033\ \textcolor{preprocessor}{\#ifndef\ SW\_ON}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00034}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga19d9e3aced311179a2914e0c9b13d0f9}{00034}}\ \textcolor{preprocessor}{\#define\ SW\_ON\ 1\ \ \ }\textcolor{comment}{///<\ Состояние\ пина\ при\ нажатой\ кнопке}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00035}00035\ \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00036}00036\ \textcolor{preprocessor}{\#ifndef\ SW\_OFF}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00037}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_gacd8900c9ec0efde1da3253b718574067}{00037}}\ \textcolor{preprocessor}{\#define\ SW\_OFF\ 0\ \ }\textcolor{comment}{///<\ Состояние\ пина\ при\ отжатой\ кнопке}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00038}00038\ \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00039}00039\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00040}00040\ \textcolor{comment}{/**\ GPIO\_INIT}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00041}00041\ \textcolor{comment}{\ \ *\ @\}}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00042}00042\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00043}00043\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00044}00044\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00045}00045\ \textcolor{comment}{//\ /**}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00046}00046\ \textcolor{comment}{//\ \ \ *\ @brief\ Маппинг\ альтернативной\ функции\ SPI\ между\ GPIO}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00047}00047\ \textcolor{comment}{//\ \ \ *\ @ingroup\ \ GPIO\_GENERAL}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00048}00048\ \textcolor{comment}{//\ \ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00049}00049\ \textcolor{comment}{//\ \#define\ SPI\_Alternate\_Mapping(INSTANCE)\ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00050}00050\ \textcolor{comment}{//\ ((((INSTANCE)\ ==\ TIM1)\ \ ||\ ((INSTANCE)\ ==\ TIM2))?\ \ \ \ \ GPIO\_AF1\_TIM1:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00051}00051\ \textcolor{comment}{//\ (((INSTANCE)\ ==\ TIM3)\ \ \ ||\ ((INSTANCE)\ ==\ TIM4)\ \ \ ||\ ((INSTANCE)\ ==\ TIM5))?\ GPIO\_AF2\_TIM3:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00052}00052\ \textcolor{comment}{//\ (((INSTANCE)\ ==\ TIM8)\ \ \ ||\ ((INSTANCE)\ ==\ TIM9)\ \ \ ||\ ((INSTANCE)\ ==\ TIM10)\ ||\ ((INSTANCE)\ ==\ TIM11))?\ GPIO\_AF3\_TIM8:\ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00053}00053\ \textcolor{comment}{//\ (((INSTANCE)\ ==\ TIM12)\ \ ||\ ((INSTANCE)\ ==\ TIM13)\ \ ||\ ((INSTANCE)\ ==\ TIM14))?\ GPIO\_AF9\_TIM12:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00054}00054\ \textcolor{comment}{//\ (0))}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00055}00055\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00056}00056\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00057}00057\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00058}00058\ \textcolor{comment}{\ \ *\ @brief\ Маппинг\ альтернативной\ функции\ TIM\ между\ GPIO}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00059}00059\ \textcolor{comment}{\ \ *\ @ingroup\ \ GPIO\_GENERAL}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00060}00060\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00061}\mbox{\hyperlink{group___g_p_i_o___g_e_n_e_r_a_l_ga34242874b455a72aa6e25841678ed105}{00061}}\ \textcolor{preprocessor}{\#define\ TIM\_Alternate\_Mapping(INSTANCE)\ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00062}00062\ \textcolor{preprocessor}{((((INSTANCE)\ ==\ TIM1)\ \ ||\ ((INSTANCE)\ ==\ TIM2))?\ GPIO\_AF1\_TIM1:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00063}00063\ \textcolor{preprocessor}{(((INSTANCE)\ ==\ TIM3)\ \ \ ||\ ((INSTANCE)\ ==\ TIM4)\ \ \ ||\ ((INSTANCE)\ ==\ TIM5))?\ GPIO\_AF2\_TIM3:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00064}00064\ \textcolor{preprocessor}{(((INSTANCE)\ ==\ TIM8)\ \ \ ||\ ((INSTANCE)\ ==\ TIM9)\ \ \ ||\ ((INSTANCE)\ ==\ TIM10)\ ||\ ((INSTANCE)\ ==\ TIM11))?\ GPIO\_AF3\_TIM8:\ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00065}00065\ \textcolor{preprocessor}{(((INSTANCE)\ ==\ TIM12)\ \ ||\ ((INSTANCE)\ ==\ TIM13)\ \ ||\ ((INSTANCE)\ ==\ TIM14))?\ GPIO\_AF9\_TIM12:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00066}00066\ \textcolor{preprocessor}{(0))}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00067}00067\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00068}00068\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00069}00069\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00070}00070\ \textcolor{comment}{\ \ *\ @brief\ Режимы\ работы\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00071}00071\ \textcolor{comment}{\ \ *\ @ingroup\ \ GPIO\_LEDS}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00072}00072\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00073}\mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{00073}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{enum}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00074}00074\ \{} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00075}\mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{00075}}\ \ \ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{LED\_IS\_OFF}}\ =\ 0,\ \ \ \ \ \ \ \textcolor{comment}{///<\ Светодиод\ выключен}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00076}\mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{00076}}\ \ \ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{LED\_IS\_ON}}\ =\ 1,\ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Светодиод\ включен}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00077}\mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{00077}}\ \ \ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{LED\_IS\_BLINKING}}\ =\ 2,\ \ \textcolor{comment}{///<\ Моргание\ светодиодом}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00078}\mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{00078}}\ \ \ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{LED\_IS\_FADING}}\ =\ 3,\ \ \ \ \textcolor{comment}{///<\ Плавное\ моргание\ светодиодом}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00079}00079\ \}\mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{GPIO\_LEDStateTypeDef}};} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00080}00080\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00081}00081\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00082}00082\ \textcolor{comment}{\ \ *\ @brief\ Структура\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00083}00083\ \textcolor{comment}{\ \ *\ @ingroup\ \ GPIO\_LEDS}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00084}00084\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00085}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{00085}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00086}00086\ \{} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00087}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{00087}}\ \ \ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{GPIO\_LEDStateTypeDef}}\ \mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}};\ \ \ \ \ \textcolor{comment}{///<\ Текущий\ режим\ работы\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00088}00088\ \ \ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00089}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{00089}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}};\ \ \ \ \ \ \ \ \textcolor{comment}{///<\ GPIO\ порт\ ножки\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00090}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{00090}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}};\ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ GPIO\ пин\ ножки\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00091}00091\ \ \ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00092}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{00092}}\ \ \ uint8\_t\ \ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{LED\_ActiveLvl}};\ \ \ \ \textcolor{comment}{///<\ Активный\ уровень\ ножки\ (при\ котором\ светодиод\ горит)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00093}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{00093}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{LED\_Period}};\ \ \ \ \ \ \ \textcolor{comment}{///<\ Период\ моргания\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00094}00094\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00095}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a8c43c12787f4a89f4a785f91a979ba68}{00095}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a8c43c12787f4a89f4a785f91a979ba68}{tickprev}};\textcolor{comment}{///<\ Период\ моргания\ светодиода}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00096}00096\ \}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}};} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00097}00097\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00098}00098\ \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00099}00099\ \textcolor{comment}{\ \ *\ @brief\ Структура\ кнопки}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00100}00100\ \textcolor{comment}{\ \ *\ @ingroup\ \ GPIO\_SWITCH}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00101}00101\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00102}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{00102}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00103}00103\ \{} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00104}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{00104}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}};\ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ GPIO\ порт\ ножки\ кнопки}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00105}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{00105}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}};\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ GPIO\ пин\ ножки\ кнопки}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00106}00106\ \ \ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00107}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{00107}}\ \ \ uint8\_t\ \ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{Sw\_ActiveLvl}};\ \ \ \ \ \textcolor{comment}{///<\ Активный\ уровень\ ножки\ (при\ котором\ кнопка\ нажата)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00108}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a245f1dc811279ce5d4598582db979a89}{00108}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a245f1dc811279ce5d4598582db979a89}{Sw\_PrevState}};\ \ \ \ \ \textcolor{comment}{///<\ Предыдущее\ состояние\ кнопки}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00109}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a2600e599a961af2e280c721894df4c06}{00109}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a2600e599a961af2e280c721894df4c06}{Sw\_FilterDelay}};\ \ \ \textcolor{comment}{///<\ Фильтр\ от\ дребезга\ (в\ мс)}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00110}00110\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00111}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a13f97b867ff1a77ef182c9b13d964ca6}{00111}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a13f97b867ff1a77ef182c9b13d964ca6}{tickprev}};\textcolor{comment}{///<\ Период\ моргания\ светодиода\ \ }} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00112}00112\ \}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\_SwitchTypeDef}};} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00113}00113\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00114}00114\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00115}00115\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00116}00116\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00117}00117\ \textcolor{comment}{/**\ }} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00118}00118\ \textcolor{comment}{\ \ *\ @addtogroup\ GPIO\_GENERAL\ \ General\ tools}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00119}00119\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MY\_LIBS\_GPIO}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00120}00120\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Общие\ функции/макросы\ для\ работы\ с\ GPIO}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00121}00121\ \textcolor{comment}{\ \ *\ @\{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00122}00122\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00123}00123\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00124}00124\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___g_e_n_e_r_a_l_ga962f010f783b81fcdd27eb6b53db28e6}{GPIO\_Clock\_Enable}}(GPIO\_TypeDef\ *GPIOx);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00125}00125\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00126}00126\ \textcolor{comment}{/**\ GPIO\_GENERAL}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00127}00127\ \textcolor{comment}{\ \ *\ @\}}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00128}00128\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00129}00129\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00130}00130\ \textcolor{comment}{/**\ }} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00131}00131\ \textcolor{comment}{*\ @addtogroup\ GPIO\_SWITCH\ \ Switch\ tools}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00132}00132\ \textcolor{comment}{*\ @ingroup\ \ \ \ MY\_LIBS\_GPIO}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00133}00133\ \textcolor{comment}{*\ @brief\ \ \ \ \ \ Функции\ для\ работы\ с\ GPIO,\ как\ с\ кнопкой}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00134}00134\ \textcolor{comment}{*\ @\{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00135}00135\ \textcolor{comment}{*/}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00136}00136\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00137}00137\ \textcolor{comment}{/*\ Инициализировать\ кнопку\ (структуру\ кнопки)\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00138}00138\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___s_w_i_t_c_h_gacafee0e68877f2b25df843356871d1f7}{GPIO\_Switch\_Init}}(\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\_SwitchTypeDef}}\ *sw,\ GPIO\_TypeDef\ *GPIOx,\ uint32\_t\ GPIO\_PIN\_X,\ uint8\_t\ SW\_On\_State);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00139}00139\ \textcolor{comment}{/*\ Считать\ состоянии\ кнопки\ запуска\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00140}00140\ uint8\_t\ \mbox{\hyperlink{group___g_p_i_o___s_w_i_t_c_h_ga4b6b8be19a9265bfee6b2bb8a68e988f}{GPIO\_Read\_Switch}}(\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\_SwitchTypeDef}}\ *swstart);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00141}00141\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00142}00142\ \textcolor{comment}{/**\ GPIO\_SWITCH}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00143}00143\ \textcolor{comment}{\ \ *\ @\}}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00144}00144\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00145}00145\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00146}00146\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00147}00147\ \textcolor{comment}{/**\ }} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00148}00148\ \textcolor{comment}{\ \ *\ @addtogroup\ GPIO\_LEDS\ \ LED\ tools}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00149}00149\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MY\_LIBS\_GPIO}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00150}00150\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Функции\ для\ работы\ с\ GPIO,\ для\ управления\ светодиодом}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00151}00151\ \textcolor{comment}{\ \ *\ @\{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00152}00152\ \textcolor{comment}{\ \ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00153}00153\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00154}00154\ \textcolor{comment}{/*\ Инициализировать\ светодиод\ (структуру\ светодиода)\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00155}00155\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gac936453c7a0841c0b17bcfdae4958084}{GPIO\_LED\_Init}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led,\ GPIO\_TypeDef\ *GPIOx,\ uint32\_t\ GPIO\_PIN\_X,\ uint8\_t\ LED\_On\_State);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00156}00156\ \textcolor{comment}{/*\ Включить\ светодиод\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00157}00157\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ga4b9572949326b050694cd55d0a7e5f6c}{GPIO\_LED\_On}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00158}00158\ \textcolor{comment}{/*\ Выключить\ светодиод\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00159}00159\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaadda2d4f021390a4e392210a5ace5357}{GPIO\_LED\_Off}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00160}00160\ \textcolor{comment}{/*\ Выставить\ светодиод\ по\ переменной\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00161}00161\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gae78b570447d55a462a679a89dbaa8ea2}{GPIO\_LED\_Set}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led,\ uint8\_t\ led\_state);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00162}00162\ \textcolor{comment}{/*\ Активировать\ моргание\ светодиодом\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00163}00163\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaf22f44ecaf6a1932b47edc5a845b03a9}{GPIO\_LED\_Blink\_Start}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led,\ uint32\_t\ period);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00164}00164\ \textcolor{comment}{/*\ Активировать\ моргание\ светодиодом\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00165}00165\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaa00f20021781464af3dfe74aa3e59a0a}{GPIO\_LED\_Fading\_Start}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led,\ uint32\_t\ period);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00166}00166\ \textcolor{comment}{/*\ Управление\ динамическими\ режимами\ свечения\ светодиода\ */}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00167}00167\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gad6e6189824406c4d472b6340c7f19bb2}{GPIO\_LED\_Dynamic\_Handle}}(\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}}\ *led);} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00168}00168\ \textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00169}00169\ \textcolor{comment}{/**\ GPIO\_LEDS}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00170}00170\ \textcolor{comment}{\ \ *\ @\}}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00171}00171\ \textcolor{comment}{\ \ */}\textcolor{comment}{}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00172}00172\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}} \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00173}00173\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00174}00174\ } \DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00175}00175\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_GPIO\_GENERAL\_H\_}} \end{DoxyCode}