\doxysection{general\+\_\+gpio.\+c}
\hypertarget{general__gpio_8c_source}{}\label{general__gpio_8c_source}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/STM32\_General/Src/general\_gpio.c@{E:/.WORK/STM32/STM32\_ExtendedLibs/STM32\_General/Src/general\_gpio.c}}
\mbox{\hyperlink{general__gpio_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00001}00001\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00002}00002\ \textcolor{comment}{**************************************************************************}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00003}00003\ \textcolor{comment}{*\ @file\ general\_gpio.c}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Модуль\ для\ инициализации\ портов\ и\ работы\ с\ ними.}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00005}00005\ \textcolor{comment}{**************************************************************************}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00006}00006\ \textcolor{comment}{*\ @details\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00007}00007\ \textcolor{comment}{Реализация\ функций\ для\ работы\ с\ GPIO:}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00008}00008\ \textcolor{comment}{\ -\/\ Включение\ тактирования\ портов}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00009}00009\ \textcolor{comment}{\ -\/\ Инициализация\ светодиодов\ и\ кнопок}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00010}00010\ \textcolor{comment}{\ -\/\ Управление\ светодиодами:\ включение,\ выключение,\ моргание,\ плавное\ затухание}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00011}00011\ \textcolor{comment}{\ -\/\ Чтение\ состояния\ кнопок\ с\ фильтром\ от\ дребезга}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00012}00012\ \textcolor{comment}{***************************************************************************/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00013}00013\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__gpio_8h}{general\_gpio.h}}"{}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00014}00014\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00015}00015\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00016}00016\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/GPIO\ INIT\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00017}00017\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00018}00018\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00019}00019\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00020}00020\ \textcolor{comment}{\ \ *\ @brief\ Включить\ тактирование\ порта\ GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00021}00021\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00022}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___g_e_n_e_r_a_l_ga962f010f783b81fcdd27eb6b53db28e6}{00022}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___g_e_n_e_r_a_l_ga962f010f783b81fcdd27eb6b53db28e6}{GPIO\_Clock\_Enable}}(GPIO\_TypeDef\ *GPIOx)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00023}00023\ \{\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00024}00024\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga5d066a5b9781f9437e75d98677489eb9}{check\_null\_ptr\_1}}(GPIOx))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00025}00025\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00026}00026\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00027}00027\ \ \ HAL\_StatusTypeDef\ status\ =\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00028}00028\ \ \ \textcolor{comment}{//\ choose\ port\ for\ enable\ clock}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00029}00029\ \ \ \textcolor{keywordflow}{if}\ (GPIOx==GPIOA)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00030}00030\ \ \ \ \ \_\_HAL\_RCC\_GPIOA\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00031}00031\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (GPIOx==GPIOB)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00032}00032\ \ \ \ \ \_\_HAL\_RCC\_GPIOB\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00033}00033\ \textcolor{preprocessor}{\#ifdef\ GPIOC}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00034}00034\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (GPIOx==GPIOC)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00035}00035\ \ \ \ \ \_\_HAL\_RCC\_GPIOC\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00036}00036\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00037}00037\ \textcolor{preprocessor}{\#ifdef\ GPIOD}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00038}00038\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (GPIOx==GPIOD)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00039}00039\ \ \ \ \ \_\_HAL\_RCC\_GPIOD\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00040}00040\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00041}00041\ \textcolor{preprocessor}{\#ifdef\ GPIOE}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00042}00042\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (GPIOx==GPIOE)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00043}00043\ \ \ \ \ \_\_HAL\_RCC\_GPIOE\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00044}00044\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00045}00045\ \textcolor{preprocessor}{\#ifdef\ GPIOF}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00046}00046\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (GPIOx==GPIOF)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00047}00047\ \ \ \ \ \_\_HAL\_RCC\_GPIOF\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00048}00048\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00049}00049\ \textcolor{preprocessor}{\#ifdef\ GPIOH}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00050}00050\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (GPIOx==GPIOF)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00051}00051\ \ \ \ \ \_\_HAL\_RCC\_GPIOH\_CLK\_ENABLE();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00052}00052\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00053}00053\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00054}00054\ \ \ \ \ status\ =\ HAL\_ERROR;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00055}00055\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00056}00056\ \ \ \textcolor{keywordflow}{return}\ status;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00057}00057\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00058}00058\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00059}00059\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/GPIO\ INIT\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00060}00060\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00061}00061\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00062}00062\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00063}00063\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00064}00064\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/GPIO\ LED\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00065}00065\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00066}00066\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00067}00067\ \textcolor{comment}{\ \ *\ @brief\ \ Инициализировать\ светодиод\ (структуру\ светодиода)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00068}00068\ \textcolor{comment}{\ \ *\ @param\ led\ \ \ \ \ \ \ \ \ \ \ \ \ \ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00069}00069\ \textcolor{comment}{\ \ *\ @param\ GPIOx\ \ \ \ \ \ \ \ \ \ \ \ Указатель\ на\ структуру\ порта\ для\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00070}00070\ \textcolor{comment}{\ \ *\ @param\ GPIO\_PIN\_X\ \ \ \ \ \ \ Пин\ для\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00071}00071\ \textcolor{comment}{\ \ *\ @param\ LED\_ActiveLevel\ \ Состояния\ пина,\ при\ котором\ светодиод\ будет\ включен}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00072}00072\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00073}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gac936453c7a0841c0b17bcfdae4958084}{00073}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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\_ActiveLevel)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00074}00074\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00075}00075\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ GPIOx,\ GPIO\_PIN\_X))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00076}00076\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00077}00077\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00078}00078\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}}\ \ \ \ \ \ \ =\ GPIOx;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00079}00079\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}\ \ \ \ \ \ \ \ =\ GPIO\_PIN\_X;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00080}00080\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{LED\_ActiveLvl}}\ \ =\ LED\_ActiveLevel;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00081}00081\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00082}00082\ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaadda2d4f021390a4e392210a5ace5357}{GPIO\_LED\_Off}}(led);}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00083}00083\ \ \ \textcolor{keywordflow}{return}\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00084}00084\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00085}00085\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00086}00086\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00087}00087\ \textcolor{comment}{\ \ *\ @brief\ \ Включить\ светодиод\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00088}00088\ \textcolor{comment}{\ \ *\ @param\ \ led\ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00089}00089\ \textcolor{comment}{\ \ *\ @return\ HAL\ Status}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00090}00090\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00091}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ga4b9572949326b050694cd55d0a7e5f6c}{00091}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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_8c_source_l00092}00092\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00093}00093\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00094}00094\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;\ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00095}00095\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00096}00096\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}}\ =\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{LED\_IS\_ON}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00097}00097\ \ \ HAL\_GPIO\_WritePin(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{LED\_ActiveLvl}});}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00098}00098\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00099}00099\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00100}00100\ \ \ \textcolor{keywordflow}{return}\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00101}00101\ \}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00102}00102\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00103}00103\ \textcolor{comment}{\ \ *\ @brief\ \ Выключить\ светодиод\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00104}00104\ \textcolor{comment}{\ \ *\ @param\ \ led\ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00105}00105\ \textcolor{comment}{\ \ *\ @return\ HAL\ Status}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00106}00106\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00107}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaadda2d4f021390a4e392210a5ace5357}{00107}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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_8c_source_l00108}00108\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00109}00109\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00110}00110\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;\ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00111}00111\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00112}00112\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}}\ =\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{LED\_IS\_OFF}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00113}00113\ \ \ HAL\_GPIO\_WritePin(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}},\ !led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{LED\_ActiveLvl}});}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00114}00114\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00115}00115\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00116}00116\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00117}00117\ \ \ \textcolor{keywordflow}{return}\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00118}00118\ \}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00119}00119\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00120}00120\ \textcolor{comment}{\ \ *\ @brief\ \ Выставить\ светодиод\ по\ переменной}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00121}00121\ \textcolor{comment}{\ \ *\ @param\ \ led\ \ \ \ \ \ \ \ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00122}00122\ \textcolor{comment}{\ \ *\ @param\ \ led\_state\ \ Состояние\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00123}00123\ \textcolor{comment}{\ \ *\ @return\ HAL\ Status}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00124}00124\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00125}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gae78b570447d55a462a679a89dbaa8ea2}{00125}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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_8c_source_l00126}00126\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00127}00127\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00128}00128\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;\ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00129}00129\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00130}00130\ \ \ \textcolor{keywordflow}{if}(led\_state)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00131}00131\ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00132}00132\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ga4b9572949326b050694cd55d0a7e5f6c}{GPIO\_LED\_On}}(led);}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00133}00133\ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00134}00134\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00135}00135\ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00136}00136\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaadda2d4f021390a4e392210a5ace5357}{GPIO\_LED\_Off}}(led);}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00137}00137\ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00138}00138\ \}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00139}00139\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00140}00140\ \textcolor{comment}{\ \ *\ @brief\ \ Активировать\ моргание\ светодиодом}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00141}00141\ \textcolor{comment}{\ \ *\ @param\ \ led\ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00142}00142\ \textcolor{comment}{\ \ *\ @param\ \ period\ Период\ плавного\ моргания\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00143}00143\ \textcolor{comment}{\ \ *\ @return\ HAL\ Status}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00144}00144\ \textcolor{comment}{\ \ *\ @details\ \ Функция\ ставит\ режим\ моргания,\ который\ после\ управляется\ в\ @ref\ GPIO\_LED\_Dynamic\_Handle}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00145}00145\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00146}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaf22f44ecaf6a1932b47edc5a845b03a9}{00146}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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_8c_source_l00147}00147\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00148}00148\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00149}00149\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;\ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00150}00150\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00151}00151\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}}\ =\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{LED\_IS\_BLINKING}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00152}00152\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{LED\_Period}}\ =\ period;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00153}00153\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00154}00154\ \ \ \textcolor{keywordflow}{return}\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00155}00155\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00156}00156\ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00157}00157\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00158}00158\ \textcolor{comment}{\ \ *\ @brief\ \ Активировать\ моргание\ светодиодом}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00159}00159\ \textcolor{comment}{\ \ *\ @param\ \ led\ \ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00160}00160\ \textcolor{comment}{\ \ *\ @param\ \ period\ Период\ плавного\ моргания\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00161}00161\ \textcolor{comment}{\ \ *\ @return\ HAL\ Status}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00162}00162\ \textcolor{comment}{\ \ *\ @details\ \ Функция\ ставит\ режим\ моргания,\ который\ после\ управляется\ в\ @ref\ GPIO\_LED\_Dynamic\_Handle}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00163}00163\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00164}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaa00f20021781464af3dfe74aa3e59a0a}{00164}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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_8c_source_l00165}00165\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00166}00166\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00167}00167\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;\ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00168}00168\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00169}00169\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}}\ =\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{LED\_IS\_FADING}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00170}00170\ \ \ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{LED\_Period}}\ =\ period;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00171}00171\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00172}00172\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00173}00173\ \ \ \textcolor{keywordflow}{return}\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00174}00174\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00175}00175\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00176}00176\ \textcolor{comment}{//uint8\_t\ LED\_PWM\_FADING\_DUTYS[LED\_PWM\_TICKS]\ =\ \{0\ 1\ 2\ 3\ 4\ 5\ 6\ 7\ 8\ 9\ 10\ 11\ 12\ \}}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00177}00177\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00178}00178\ \textcolor{comment}{\ \ *\ @brief\ \ Управление\ динамическими\ режимами\ свечения\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00179}00179\ \textcolor{comment}{\ \ *\ @param\ \ Указатель\ на\ структуру\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00180}00180\ \textcolor{comment}{\ \ *\ @details\ \ Функция\ моргает/плавно\ моргает\ светодиодом\ в\ неблокирующем\ режиме}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00181}00181\ \textcolor{comment}{\ \ *\ Т.е.\ функцию\ надо\ вызывать\ постоянно,\ чтобы\ она\ мониторила\ тики\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00182}00182\ \textcolor{comment}{\ \ *\ и\ в\ нужный\ момент\ переключала\ светодиод}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00183}00183\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00184}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gad6e6189824406c4d472b6340c7f19bb2}{00184}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_y_l_i_b_s___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_8c_source_l00185}00185\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00186}00186\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(led,\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00187}00187\ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00188}00188\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00189}00189\ \ \ \textcolor{comment}{/*\ Режим\ моргания\ светодиода\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00190}00190\ \ \ \textcolor{keywordflow}{if}(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}}\ ==\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{LED\_IS\_BLINKING}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00191}00191\ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00192}00192\ \ \ \ \ uint32\_t\ tickcurrent\ =\ \mbox{\hyperlink{group___l_i_b_s___c_o_n_f_i_g_ga9c853b02c22f26023c34d1d404b6d653}{local\_time}}();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00193}00193\ \ \ \ \ \textcolor{comment}{/*\ Ожидание\ истечения\ периода\ моргания\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00194}00194\ \ \ \ \ \textcolor{keywordflow}{if}((tickcurrent\ -\/\ led-\/>tickprev)\ >\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{LED\_Period}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00195}00195\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00196}00196\ \ \ \ \ \ \ \textcolor{comment}{/*\ Моргание\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00197}00197\ \ \ \ \ \ \ HAL\_GPIO\_TogglePin(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}});}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00198}00198\ \ \ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00199}00199\ \ \ \ \ \ \ led-\/>tickprev\ =\ tickcurrent;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00200}00200\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00201}00201\ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00202}00202\ \ \ \textcolor{comment}{/*\ Режим\ плавного\ моргания\ светодиода\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00203}00203\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{state}}\ ==\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{LED\_IS\_FADING}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00204}00204\ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00205}00205\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{unsigned}\ direction\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00206}00206\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{int}\ duty\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00207}00207\ \ \ \ \ uint32\_t\ tickcurrent\ =\ \mbox{\hyperlink{group___l_i_b_s___c_o_n_f_i_g_ga9c853b02c22f26023c34d1d404b6d653}{local\_time}}();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00208}00208\ \ \ \ \ \textcolor{comment}{/*\ Ожидание\ момента\ изменения\ яркости\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00209}00209\ \ \ \ \ \textcolor{comment}{/*\ Период\ ШИМ\ 20\ мс,\ поэтому\ менять\ яроксть\ надо\ 40\ раз\ за\ период\ (туда\ обратно)\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00210}00210\ \ \ \ \ \textcolor{keywordflow}{if}((tickcurrent\ -\/\ led-\/>tickprev)\ >\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{LED\_Period}}/(\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{LED\_PWM\_TICKS}}*2))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00211}00211\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00212}00212\ \ \ \ \ \ \ \textcolor{comment}{/*\ Формирование\ разтухания\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00213}00213\ \ \ \ \ \ \ \textcolor{keywordflow}{if}(direction\ ==\ 0)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00214}00214\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00215}00215\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(++duty\ >=\ \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{LED\_PWM\_TICKS}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00216}00216\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00217}00217\ \ \ \ \ \ \ \ \ \ \ direction\ =\ 1;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00218}00218\ \ \ \ \ \ \ \ \ \ \ duty\ =\ \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{LED\_PWM\_TICKS}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00219}00219\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00220}00220\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00221}00221\ \ \ \ \ \ \ \textcolor{comment}{/*\ Формирование\ затухания\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00222}00222\ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00223}00223\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00224}00224\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(-\/-\/duty\ \ <=\ 0)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00225}00225\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00226}00226\ \ \ \ \ \ \ \ \ \ \ direction\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00227}00227\ \ \ \ \ \ \ \ \ \ \ duty\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00228}00228\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00229}00229\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00230}00230\ \ \ \ \ \ \ led-\/>tickprev\ =\ tickcurrent;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00231}00231\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00232}00232\ \ \ \ \ \textcolor{comment}{/*\ Формирование\ ШИМ\ для\ изменения\ яркости\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00233}00233\ \ \ \ \ \textcolor{keywordtype}{int}\ duty\_crt\ =\ (duty*duty/\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{LED\_PWM\_TICKS}});}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00234}00234\ \ \ \ \ \textcolor{keywordflow}{if}(tickcurrent\%\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{LED\_PWM\_TICKS}}\ <\ duty\_crt)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00235}00235\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00236}00236\ \ \ \ \ \ \ HAL\_GPIO\_WritePin(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{LED\_ActiveLvl}});}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00237}00237\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00238}00238\ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00239}00239\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00240}00240\ \ \ \ \ \ \ HAL\_GPIO\_WritePin(led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{LED\_Port}},\ led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{LED\_Pin}},\ !led-\/>\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{LED\_ActiveLvl}});}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00241}00241\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00242}00242\ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00243}00243\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00244}00244\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/GPIO\ LED\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00245}00245\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00246}00246\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00247}00247\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00248}00248\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/GPIO\ SW\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00249}00249\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00250}00250\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00251}00251\ \textcolor{comment}{*\ @brief\ \ Инициализировать\ кнопку\ (структуру\ кнопки)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00252}00252\ \textcolor{comment}{\ \ *\ @param\ \ sw\ \ \ \ \ \ \ \ \ \ \ \ \ Указатель\ на\ структуру\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00253}00253\ \textcolor{comment}{\ \ *\ @param\ \ GPIOx\ \ \ \ \ \ \ \ \ \ Указатель\ на\ структуру\ порта\ для\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00254}00254\ \textcolor{comment}{\ \ *\ @param\ \ GPIO\_PIN\_X\ \ \ \ \ Пин\ для\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00255}00255\ \textcolor{comment}{\ \ *\ @param\ \ SW\_ActiveLevel\ Состояния\ пина,\ когда\ кнопка\ нажата}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00256}00256\ \textcolor{comment}{\ \ *\ @return\ HAL\ Status}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00257}00257\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00258}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___s_w_i_t_c_h_gacafee0e68877f2b25df843356871d1f7}{00258}}\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y_l_i_b_s___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\_ActiveLevel)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00259}00259\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00260}00260\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(sw,\ GPIOx,\ GPIO\_PIN\_X))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00261}00261\ \ \ \ \ \textcolor{keywordflow}{return}\ HAL\_ERROR;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00262}00262\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00263}00263\ \ \ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}}\ \ \ \ \ \ \ =\ GPIOx;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00264}00264\ \ \ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}}\ \ \ \ \ \ \ \ =\ GPIO\_PIN\_X;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00265}00265\ \ \ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{Sw\_ActiveLvl}}\ \ =\ SW\_ActiveLevel;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00266}00266\ \ \ \textcolor{keywordflow}{return}\ HAL\_OK;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00267}00267\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00268}00268\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00269}00269\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00270}00270\ \textcolor{comment}{\ \ *\ @brief\ \ Считать\ состоянии\ кнопки\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00271}00271\ \textcolor{comment}{\ \ *\ @param\ \ sw\ \ Указатель\ на\ структуру\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00272}00272\ \textcolor{comment}{\ \ *\ @return\ 1\ -\/\ если\ кнопка\ нажата,\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00273}00273\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ 0\ -\/\ если\ отжата,\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00274}00274\ \textcolor{comment}{\ \ *\ \ \ \ \ \ \ \ \ -\/1\ -\/\ если\ ошибка}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00275}00275\ \textcolor{comment}{\ \ *\ @details\ \ Функция\ включает\ в\ себя\ неблокирующую\ проверку\ на\ дребезг}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00276}00276\ \textcolor{comment}{\ \ *\ Т.е.\ функцию\ надо\ вызывать\ постоянно,\ чтобы\ она\ мониторила\ состояние\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00277}00277\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00278}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___s_w_i_t_c_h_ga960b24335b2026abcad126ab8c422d70}{00278}}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___s_w_i_t_c_h_ga960b24335b2026abcad126ab8c422d70}{GPIO\_Read\_Switch}}(\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\_SwitchTypeDef}}\ *sw)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00279}00279\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00280}00280\ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___e_r_r_o_r___h_a_n_d_l_e_r___d_e_f_i_n_e_s_ga838b40542faa9aa273d18f921b21fda2}{check\_null\_ptr\_3}}(sw,\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}},\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}}))}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00281}00281\ \ \ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00282}00282\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00283}00283\ \ \ \textcolor{keywordflow}{if}(HAL\_GPIO\_ReadPin(sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}},\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}})\ ==\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{Sw\_ActiveLvl}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00284}00284\ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00285}00285\ \ \ \ \ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a245f1dc811279ce5d4598582db979a89}{Sw\_PrevState}}\ =\ 1;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00286}00286\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00287}00287\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00288}00288\ \ \ \ \ \textcolor{keywordflow}{if}(sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a2600e599a961af2e280c721894df4c06}{Sw\_FilterDelay}})\ \textcolor{comment}{//\ если\ включена\ защита\ от\ дребезга}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00289}00289\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00290}00290\ \ \ \ \ \ \ \textcolor{keywordflow}{if}(sw-\/>tickprev\ ==\ 0)}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00291}00291\ \ \ \ \ \ \ \ \ sw-\/>tickprev\ =\ \mbox{\hyperlink{group___l_i_b_s___c_o_n_f_i_g_ga9c853b02c22f26023c34d1d404b6d653}{local\_time}}();}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00292}00292\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00293}00293\ \ \ \ \ \ \ \textcolor{keywordflow}{if}((\mbox{\hyperlink{group___l_i_b_s___c_o_n_f_i_g_ga9c853b02c22f26023c34d1d404b6d653}{local\_time}}()\ -\/\ sw-\/>tickprev)\ >=\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a2600e599a961af2e280c721894df4c06}{Sw\_FilterDelay}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00294}00294\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00295}00295\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(HAL\_GPIO\_ReadPin(sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}},\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}})\ ==\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{Sw\_ActiveLvl}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00296}00296\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00297}00297\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 1;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00298}00298\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00299}00299\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00300}00300\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00301}00301\ \ \ \ \ \ \ \ \ \ \ sw-\/>tickprev\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00302}00302\ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00303}00303\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00304}00304\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00305}00305\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00306}00306\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{comment}{//\ если\ нет\ защиты\ от\ дребезга}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00307}00307\ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00308}00308\ \ \ \ \ \ \ \textcolor{keywordflow}{if}(HAL\_GPIO\_ReadPin(sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}},\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}})\ ==\ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{Sw\_ActiveLvl}})}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00309}00309\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00310}00310\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 1;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00311}00311\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00312}00312\ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00313}00313\ \ \ \ \ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00314}00314\ \ \ \ \ \ \ \ \ sw-\/>tickprev\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00315}00315\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00316}00316\ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00317}00317\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00318}00318\ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00319}00319\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00320}00320\ \ \ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00321}00321\ \ \ \ \ sw-\/>\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a245f1dc811279ce5d4598582db979a89}{Sw\_PrevState}}\ =\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00322}00322\ \ \ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00323}00323\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00324}00324\ \}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00325}00325\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/GPIO\ SW\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8c_source_l00326}00326\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}

\end{DoxyCode}
