\doxysection{E\+:/.WORK/\+STM32/\+STM32\+\_\+\+Extended\+Libs/\+My\+Libs\+General/\+Inc/general\+\_\+gpio.h File Reference} \hypertarget{general__gpio_8h}{}\label{general__gpio_8h}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_gpio.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_gpio.h}} Заголовочный файл для модуля инициализации портов. {\ttfamily \#include "{}mylibs\+\_\+defs.\+h"{}}\newline \doxysubsubsection*{Classes} \begin{DoxyCompactItemize} \item struct \mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\+\_\+\+LEDType\+Def}} \begin{DoxyCompactList}\small\item\em Структура светодиода \end{DoxyCompactList}\item struct \mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\+\_\+\+Switch\+Type\+Def}} \begin{DoxyCompactList}\small\item\em Структура кнопки \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsubsection*{Macros} \begin{DoxyCompactItemize} \item \#define \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{LED\+\_\+\+PWM\+\_\+\+TICKS}}~15 \begin{DoxyCompactList}\small\item\em Количество тиков в периоде ШИМ \end{DoxyCompactList}\item \#define \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_gaf2e697ac60e05813d45ea2c9c9e79c25}{LED\+\_\+\+ON}}~1 \begin{DoxyCompactList}\small\item\em Состояние пина для включения светодиода \end{DoxyCompactList}\item \#define \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga80700bb63bd56ebabbb4728aa433fd29}{LED\+\_\+\+OFF}}~0 \begin{DoxyCompactList}\small\item\em Состояние пина для выключения светодиода \end{DoxyCompactList}\item \#define \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga19d9e3aced311179a2914e0c9b13d0f9}{SW\+\_\+\+ON}}~1 \begin{DoxyCompactList}\small\item\em Состояние пина при нажатой кнопке \end{DoxyCompactList}\item \#define \mbox{\hyperlink{group___g_p_i_o___i_n_i_t_gacd8900c9ec0efde1da3253b718574067}{SW\+\_\+\+OFF}}~0 \begin{DoxyCompactList}\small\item\em Состояние пина при отжатой кнопке \end{DoxyCompactList}\item \#define \mbox{\hyperlink{group___g_p_i_o___g_e_n_e_r_a_l_ga34242874b455a72aa6e25841678ed105}{TIM\+\_\+\+Alternate\+\_\+\+Mapping}}(INSTANCE) \begin{DoxyCompactList}\small\item\em Маппинг альтернативной функции SPI между GPIO. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsubsection*{Enumerations} \begin{DoxyCompactItemize} \item enum \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{GPIO\+\_\+\+LEDState\+Type\+Def}} \{ \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{LED\+\_\+\+IS\+\_\+\+OFF}} = 0 , \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{LED\+\_\+\+IS\+\_\+\+ON}} = 1 , \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{LED\+\_\+\+IS\+\_\+\+BLINKING}} = 2 , \mbox{\hyperlink{group___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{LED\+\_\+\+IS\+\_\+\+FADING}} = 3 \} \begin{DoxyCompactList}\small\item\em Режимы работы светодиода \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsubsection*{Functions} \begin{DoxyCompactItemize} \item HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_p_i_o___g_e_n_e_r_a_l_ga962f010f783b81fcdd27eb6b53db28e6}{GPIO\+\_\+\+Clock\+\_\+\+Enable}} (GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx) \begin{DoxyCompactList}\small\item\em Включить тактирование порта GPIO. \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+Switch\+Type\+Def}} \texorpdfstring{$\ast$}{*}sw, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t GPIO\+\_\+\+PIN\+\_\+X, uint8\+\_\+t SW\+\_\+\+On\+\_\+\+State) \begin{DoxyCompactList}\small\item\em Инициализировать кнопку (структуру кнопки) \end{DoxyCompactList}\item 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\+\_\+\+Switch\+Type\+Def}} \texorpdfstring{$\ast$}{*}swstart) \begin{DoxyCompactList}\small\item\em Считать состоянии кнопки \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t GPIO\+\_\+\+PIN\+\_\+X, uint8\+\_\+t LED\+\_\+\+On\+\_\+\+State) \begin{DoxyCompactList}\small\item\em Инициализировать светодиод (структуру светодиода) \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led) \begin{DoxyCompactList}\small\item\em Включить светодиод \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led) \begin{DoxyCompactList}\small\item\em Выключить светодиод \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint8\+\_\+t led\+\_\+state) \begin{DoxyCompactList}\small\item\em Выставить светодиод по переменной \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint32\+\_\+t period) \begin{DoxyCompactList}\small\item\em Активировать моргание светодиодом \end{DoxyCompactList}\item HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint32\+\_\+t period) \begin{DoxyCompactList}\small\item\em Активировать моргание светодиодом \end{DoxyCompactList}\item 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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led) \begin{DoxyCompactList}\small\item\em Управление динамическими режимами свечения светодиода \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} Заголовочный файл для модуля инициализации портов. Definition in file \mbox{\hyperlink{general__gpio_8h_source}{general\+\_\+gpio.\+h}}.