Чет работает

This commit is contained in:
2025-12-16 17:57:59 +03:00
commit 260a6416ad
2906 changed files with 982301 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
LATEX_CMD?=pdflatex
MKIDX_CMD?=makeindex
BIBTEX_CMD?=bibtex
LATEX_COUNT?=8
MANUAL_FILE?=refman
all: $(MANUAL_FILE).pdf
pdf: $(MANUAL_FILE).pdf
$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi
$(MKIDX_CMD) $(MANUAL_FILE).idx
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi
latex_count=$(LATEX_COUNT) ; \
while grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\
do \
echo "Rerunning latex...." ;\
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi; \
latex_count=`expr $$latex_count - 1` ;\
done
$(MKIDX_CMD) $(MANUAL_FILE).idx
$(LATEX_CMD) $(MANUAL_FILE) || \
if [ $$? != 0 ] ; then \
\echo "Please consult $(MANUAL_FILE).log to see the error messages" ; \
false; \
fi
clean:
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf

View File

@@ -0,0 +1,198 @@
\doxysection{\+\_\+\+\_\+general\+\_\+flash.\+c}
\hypertarget{____general__flash_8c_source}{}\label{____general__flash_8c_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/\_\_general\_flash.c@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/\_\_general\_flash.c}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00001}00001\ \textcolor{preprocessor}{\#include\ "{}\_\_general\_flash.h"{}}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00002}00002\ FLASH\_EraseInitTypeDef\ EraseInitStruct;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00003}00003\ \textcolor{keyword}{extern}\ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00004}00004\ \textcolor{keywordtype}{unsigned}\ CRC\_Update;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00005}00005\ \textcolor{comment}{//uint32\_t\ PAGE\_OFFSET\ =\ ((uint32\_t)((4-\/1)\ *\ 0x0400));}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00006}00006\ uint32\_t\ PAGE\_NUMB\ =\ 127;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00007}00007\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00008}00008\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00009}00009\ \textcolor{comment}{/*\ Записать\ в\ память\ данные,\ произвольного\ размера\ */}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00010}00010\ HAL\_StatusTypeDef\ FLASH\_Write\_Data(uint32\_t*\ Address,\ uint8\_t*\ Data,\ \textcolor{keywordtype}{int}\ Data\_size)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00011}00011\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00012}00012\ \ \ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00013}00013\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00014}00014\ \ \ \textcolor{keywordtype}{int}\ data\_cnt\ =\ 0;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00015}00015\ \ \ uint32\_t\ adr;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00016}00016\ \ \ uint32\_t\ word\_data;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00017}00017\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00018}00018\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00019}00019\ \ \ res\_hal\ =\ HAL\_FLASH\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00020}00020\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00021}00021\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00022}00022\ \ \ \textcolor{keywordflow}{for}\ (adr\ =\ *Address;\ adr\ <\ *Address\ +\ Data\_size;\ adr\ =\ adr\ +\ 4)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00023}00023\ \ \ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00024}00024\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00025}00025\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00026}00026\ \ \ \ \ word\_data\ =\ (}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00027}00027\ \ \ \ \ \ \ Data[data\_cnt]\ |}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00028}00028\ \ \ \ \ \ \ Data[data\_cnt\ +\ 1]\ <<\ 8\ |}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00029}00029\ \ \ \ \ \ \ Data[data\_cnt\ +\ 2]\ <<\ 16\ |}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00030}00030\ \ \ \ \ \ \ Data[data\_cnt\ +\ 3]\ <<\ 24);}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00031}00031\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00032}00032\ \ \ \ \ res\_hal\ =\ HAL\_FLASH\_Program(FLASH\_TYPEPROGRAM\_WORD,\ adr,\ word\_data);}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00033}00033\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00034}00034\ \ \ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00035}00035\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00036}00036\ \ \ \ \ data\_cnt\ +=\ 4;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00037}00037\ \ \ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00038}00038\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00039}00039\ \ \ *Address\ +=\ Data\_size;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00040}00040\ \ \ res\_hal\ =\ HAL\_FLASH\_Lock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00041}00041\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00042}00042\ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00043}00043\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00044}00044\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00045}00045\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00046}00046\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00047}00047\ HAL\_StatusTypeDef\ FLASH\_Enable\_DualBankMode(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00048}00048\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00049}00049\ \ \ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00050}00050\ \ \ FLASH\_AdvOBProgramInitTypeDef\ OB\_DualBank;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00051}00051\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00052}00052\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00053}00053\ \ \ res\_hal\ =\ HAL\_FLASH\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00054}00054\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00055}00055\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00056}00056\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00057}00057\ \ \ res\_hal\ =\ HAL\_FLASH\_OB\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00058}00058\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00059}00059\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00060}00060\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00061}00061\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00062}00062\ \ \ FLASH-\/>OPTCR\ |=\ FLASH\_OPTCR\_DB1M;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00063}00063\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00064}00064\ \ \ res\_hal\ =\ HAL\_FLASH\_OB\_Launch();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00065}00065\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00066}00066\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00067}00067\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00068}00068\ \ \ res\_hal\ =\ HAL\_FLASH\_OB\_Lock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00069}00069\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00070}00070\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00071}00071\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00072}00072\ \ \ res\_hal\ =\ HAL\_FLASH\_Lock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00073}00073\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00074}00074\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00075}00075\ \ \ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00076}00076\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00077}00077\ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00078}00078\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00079}00079\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00080}00080\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00081}00081\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00082}00082\ \textcolor{comment}{/*\ Убрать\ защиту\ */}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00083}00083\ HAL\_StatusTypeDef\ FLASH\_WriteProtection(uint32\_t\ BankN,\ uint32\_t\ WriteProtection)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00084}00084\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00085}00085\ \ \ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00086}00086\ \ \ FLASH\_OBProgramInitTypeDef\ OBInit;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00087}00087\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00088}00088\ \ \ \ \ \textcolor{comment}{//\ Очистка\ всех\ возможных\ ошибок}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00089}00089\ \ \ FLASH-\/>SR\ |=\ FLASH\_FLAG\_WRPERR\ \ \textcolor{comment}{//\ Write\ Protection\ Error}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00090}00090\ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ FLASH\_FLAG\_PGSERR\ \ \textcolor{comment}{//\ Programming\ Sequence\ Error}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00091}00091\ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ FLASH\_FLAG\_PGAERR\ \ \textcolor{comment}{//\ Programming\ Alignment\ Error}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00092}00092\ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ FLASH\_FLAG\_OPERR;\ \ \textcolor{comment}{//\ Operation\ Error}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00093}00093\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00094}00094\ \ \ res\_hal\ =\ HAL\_FLASH\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00095}00095\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00096}00096\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00097}00097\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00098}00098\ \ \ res\_hal\ =\ HAL\_FLASH\_OB\_Unlock();\ \textcolor{comment}{//\ Разблокировка\ Option\ Bytes}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00099}00099\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00100}00100\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00101}00101\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00102}00102\ \ \ \textcolor{comment}{//\ Считываем\ текущую\ конфигурацию\ Option\ Bytes}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00103}00103\ \ \ HAL\_FLASHEx\_OBGetConfig(\&OBInit);}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00104}00104\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00105}00105\ \ \ \textcolor{comment}{//\ Отключаем\ защиту\ на\ всех\ секторах\ второго\ банка}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00106}00106\ \ \ OBInit.OptionType\ =\ OPTIONBYTE\_WRP;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00107}00107\ \ \ OBInit.WRPState\ =\ WriteProtection;\ \textcolor{comment}{//\ Снять\ защиту}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00108}00108\ \ \ OBInit.WRPSector\ =\ OB\_WRP\_SECTOR\_12;\ \textcolor{comment}{//\ Снять\ защиту}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00109}00109\ \ \ OBInit.Banks\ =\ BankN;\ \textcolor{comment}{//\ Указываем\ второй\ банк}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00110}00110\ \ \ res\_hal\ =\ HAL\_FLASHEx\_OBProgram(\&OBInit);}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00111}00111\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00112}00112\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00113}00113\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00114}00114\ \ \ \textcolor{comment}{//\ Записываем\ изменения\ и\ перезагружаем\ чип}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00115}00115\ \ \ res\_hal\ =\ HAL\_FLASH\_OB\_Launch();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00116}00116\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00117}00117\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00118}00118\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00119}00119\ \ \ \textcolor{comment}{//\ Считываем\ текущую\ конфигурацию\ Option\ Bytes}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00120}00120\ \ \ HAL\_FLASHEx\_OBGetConfig(\&OBInit);}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00121}00121\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00122}00122\ \textcolor{comment}{//\ Блокировка\ Option\ Bytes}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00123}00123\ \ \ res\_hal\ =\ HAL\_FLASH\_OB\_Lock();\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00124}00124\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00125}00125\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00126}00126\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00127}00127\ \ \ res\_hal\ =\ HAL\_FLASH\_Lock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00128}00128\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00129}00129\ \ \ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00130}00130\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00131}00131\ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00132}00132\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00133}00133\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/ELEMENTARY\ FUNCTIONS-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00134}00134\ \textcolor{comment}{/*\ functions\ for\ reading\ bytes/halswords/words\ */}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00135}00135\ uint8\_t\ FLASH\_Read\_Byte(uint32\_t\ add)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00136}00136\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00137}00137\ \ \ \textcolor{keywordflow}{return}\ (*(\_\_IO\ uint8\_t*)(add));}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00138}00138\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00139}00139\ uint16\_t\ FLASH\_Read\_HalfWord(uint32\_t\ add)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00140}00140\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00141}00141\ \ \ \textcolor{keywordflow}{return}\ (*(\_\_IO\ uint16\_t*)(add));}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00142}00142\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00143}00143\ uint32\_t\ FLASH\_Read\_Word(uint32\_t\ add)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00144}00144\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00145}00145\ \ \ \textcolor{keywordflow}{return}\ (*(\_\_IO\ uint32\_t*)(add));}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00146}00146\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00147}00147\ \textcolor{comment}{/*\ functions\ for\ writing\ bytes/halswords/words\ */}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00148}00148\ HAL\_StatusTypeDef\ FLASH\_Write\_Byte(uint32\_t\ Address,\ uint8\_t\ Data)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00149}00149\ \{\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00150}00150\ \ \ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00151}00151\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00152}00152\ \ \ res\_hal\ =\ HAL\_FLASH\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00153}00153\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00154}00154\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00155}00155\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00156}00156\ \ \ res\_hal\ =\ HAL\_FLASH\_Program(FLASH\_TYPEPROGRAM\_BYTE,\ Address,\ (uint8\_t)(Data));}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00157}00157\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00158}00158\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00159}00159\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00160}00160\ \ \ res\_hal\ =\ HAL\_FLASH\_Lock();\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00161}00161\ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00162}00162\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00163}00163\ HAL\_StatusTypeDef\ FLASH\_Write\_HalfWord(uint32\_t\ Address,\ uint16\_t\ Data)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00164}00164\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00165}00165\ \ \ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00166}00166\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00167}00167\ \ \ res\_hal\ =\ HAL\_FLASH\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00168}00168\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00169}00169\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00170}00170\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00171}00171\ \ \ res\_hal\ =\ HAL\_FLASH\_Program(FLASH\_TYPEPROGRAM\_HALFWORD,\ Address,\ (uint16\_t)(Data));}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00172}00172\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00173}00173\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00174}00174\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00175}00175\ \ \ res\_hal\ =\ HAL\_FLASH\_Lock();\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00176}00176\ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00177}00177\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00178}00178\ HAL\_StatusTypeDef\ FLASH\_Write\_Word(uint32\_t\ Address,\ uint32\_t\ Data)}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00179}00179\ \{}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00180}00180\ \ \ HAL\_StatusTypeDef\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00181}00181\ \ \ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00182}00182\ \ \ res\_hal\ =\ HAL\_FLASH\_Unlock();}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00183}00183\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00184}00184\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00185}00185\ \ \ res\_hal\ =\ HAL\_FLASH\_Program(FLASH\_TYPEPROGRAM\_WORD,\ Address,\ (uint32\_t)(Data));\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00186}00186\ \ \ \textcolor{keywordflow}{if}\ (res\_hal\ !=\ HAL\_OK)\ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00187}00187\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00188}00188\ \ \ res\_hal\ =\ HAL\_FLASH\_Lock();\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00189}00189\ \ \ \textcolor{keywordflow}{return}\ res\_hal;}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00190}00190\ \}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00191}00191\ \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{____general__flash_8c_source_l00192}00192\ }
\end{DoxyCode}

View File

@@ -0,0 +1,50 @@
\doxysection{\+\_\+\+\_\+general\+\_\+flash.\+h}
\hypertarget{____general__flash_8h_source}{}\label{____general__flash_8h_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/\_\_general\_flash.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/\_\_general\_flash.h}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00001}00001\ \textcolor{comment}{/**************************************************************************}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00002}00002\ \textcolor{comment}{*\ @file\ general\_flash.h}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00003}00003\ \textcolor{comment}{*\ @brief\ Заголовочны\ файл\ модуля\ работы\ с\ FLASH.}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00004}00004\ \textcolor{comment}{*************************************************************************/}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00005}00005\ \textcolor{preprocessor}{\#ifndef\ \_\_FLASH\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00006}00006\ \textcolor{preprocessor}{\#define\ \_\_FLASH\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00007}00007\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00008}00008\ \textcolor{comment}{//////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00009}00009\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00010}00010\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00011}00011\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00012}00012\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00013}00013\ \textcolor{preprocessor}{\#include\ "{}mylibs\_defs.h"{}}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00014}00014\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00015}00015\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00016}00016\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00017}00017\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00018}00018\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00019}00019\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00020}00020\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00021}00021\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00022}00022\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00023}00023\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00024}00024\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00025}00025\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00026}00026\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00027}00027\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00028}00028\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00029}00029\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00030}00030\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00031}00031\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00032}00032\ HAL\_StatusTypeDef\ FLASH\_Enable\_DualBankMode(\textcolor{keywordtype}{void});}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00033}00033\ HAL\_StatusTypeDef\ FLASH\_WriteProtection(uint32\_t\ BankN,\ uint32\_t\ WriteProtection);}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00034}00034\ \textcolor{comment}{/*\ functions\ for\ reading\ bytes/halswords/words\ */}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00035}00035\ uint8\_t\ FLASH\_Read\_Byte(uint32\_t\ add);}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00036}00036\ uint16\_t\ FLASH\_Read\_HalfWord(uint32\_t\ add);}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00037}00037\ uint32\_t\ FLASH\_Read\_Word(uint32\_t\ add);}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00038}00038\ \textcolor{comment}{/*\ functions\ for\ writing\ bytes/halswords/words\ */}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00039}00039\ HAL\_StatusTypeDef\ FLASH\_Write\_Byte(uint32\_t\ Address,\ uint8\_t\ Data);}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00040}00040\ HAL\_StatusTypeDef\ FLASH\_Write\_HalfWord(uint32\_t\ Address,\ uint16\_t\ Data);}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00041}00041\ HAL\_StatusTypeDef\ FLASH\_Write\_Word(uint32\_t\ Address,\ uint32\_t\ Data);\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00042}00042\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00043}00043\ }
\DoxyCodeLine{\Hypertarget{____general__flash_8h_source_l00044}00044\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_FLASH\_GENERAL\_H\_}}
\end{DoxyCode}

View File

@@ -0,0 +1,9 @@
\doxysection{Class List}
Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList}
\item\contentsline{section}{\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\+\_\+\+LEDType\+Def}} \\*Структура светодиода }{\pageref{struct_g_p_i_o___l_e_d_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\+\_\+\+Switch\+Type\+Def}} \\*Структура кнопки }{\pageref{struct_g_p_i_o___switch_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \\*Структура настроек SPI }{\pageref{struct_s_p_i___settings_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \\*Структура инициализации енкодера }{\pageref{struct_t_i_m___encoder_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_t_i_m___settings_type_def}{TIM\+\_\+\+Settings\+Type\+Def}} \\*Структура инициализации таймера }{\pageref{struct_t_i_m___settings_type_def}}{}
\item\contentsline{section}{\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \\*Структура настроек UART }{\pageref{struct_u_a_r_t___settings_type_def}}{}
\end{DoxyCompactList}

View File

@@ -0,0 +1,745 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{doxygen}
% Packages used by this style file
\RequirePackage{alltt}
%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package
\RequirePackage{calc}
\RequirePackage{float}
%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package
\RequirePackage{verbatim}
\RequirePackage[table]{xcolor}
\RequirePackage{longtable_doxygen}
\RequirePackage{tabu_doxygen}
\RequirePackage{fancyvrb}
\RequirePackage{tabularx}
\RequirePackage{multicol}
\RequirePackage{multirow}
\RequirePackage{hanging}
\RequirePackage{ifpdf}
\RequirePackage{adjustbox}
\RequirePackage{amssymb}
\RequirePackage{stackengine}
\RequirePackage{enumitem}
\RequirePackage{alphalph}
\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis
%---------- Internal commands used in this style file ----------------
\newcommand{\ensurespace}[1]{%
\begingroup%
\setlength{\dimen@}{#1}%
\vskip\z@\@plus\dimen@%
\penalty -100\vskip\z@\@plus -\dimen@%
\vskip\dimen@%
\penalty 9999%
\vskip -\dimen@%
\vskip\z@skip% hide the previous |\vskip| from |\addvspace|
\endgroup%
}
\newcommand{\DoxyHorRuler}[1]{%
\setlength{\parskip}{0ex plus 0ex minus 0ex}%
\ifthenelse{#1=0}%
{%
\hrule%
}%
{%
\hrulefilll%
}%
}
\newcommand{\DoxyLabelFont}{}
\newcommand{\entrylabel}[1]{%
{%
\parbox[b]{\labelwidth-4pt}{%
\makebox[0pt][l]{\DoxyLabelFont#1}%
\vspace{1.5\baselineskip}%
}%
}%
}
\newenvironment{DoxyDesc}[1]{%
\ensurespace{4\baselineskip}%
\begin{list}{}{%
\settowidth{\labelwidth}{20pt}%
%\setlength{\parsep}{0pt}%
\setlength{\itemsep}{0pt}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\renewcommand{\makelabel}{\entrylabel}%
}%
\item[#1]%
}{%
\end{list}%
}
\newsavebox{\xrefbox}
\newlength{\xreflength}
\newcommand{\xreflabel}[1]{%
\sbox{\xrefbox}{#1}%
\setlength{\xreflength}{\wd\xrefbox}%
\ifthenelse{\xreflength>\labelwidth}{%
\begin{minipage}{\textwidth}%
\setlength{\parindent}{0pt}%
\hangindent=15pt\bfseries #1\vspace{1.2\itemsep}%
\end{minipage}%
}{%
\parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}%
}%
}
%---------- Commands used by doxygen LaTeX output generator ----------
% Used by <pre> ... </pre>
\newenvironment{DoxyPre}{%
\small%
\begin{alltt}%
}{%
\end{alltt}%
\normalsize%
}
% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output.
\newlength{\CodeWidthChar}
\newlength{\CodeHeightChar}
\settowidth{\CodeWidthChar}{?}
\settoheight{\CodeHeightChar}{?}
% Necessary for hanging indent
\newlength{\DoxyCodeWidth}
\newcommand\DoxyCodeLine[1]{
\ifthenelse{\equal{\detokenize{#1}}{}}
{
\vspace*{\baselineskip}
}
{
\hangpara{\DoxyCodeWidth}{1}{#1}\par
}
}
\newcommand\NiceSpace{%
\discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}%
}
% Used by @code ... @endcode
\newenvironment{DoxyCode}[1]{%
\par%
\vspace{2pt}%
\scriptsize%
\normalfont\ttfamily%
\rightskip0pt plus 1fil%
\settowidth{\DoxyCodeWidth}{000000}%
\settowidth{\CodeWidthChar}{?}%
\settoheight{\CodeHeightChar}{?}%
\setlength{\parskip}{0ex plus 0ex minus 0ex}%
\ifthenelse{\equal{#1}{0}}%
{%
{\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces%
}%
{%
{\lccode`~32 \lowercase{\global\let~}}\obeyspaces%
}%
\vspace{2pt}%
}{%
\normalfont%
\normalsize%
\settowidth{\CodeWidthChar}{?}%
\settoheight{\CodeHeightChar}{?}%
}
% Redefining not defined characters, i.e. "Replacement Character" in tex output.
\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{%
\textcolor{white}{\sffamily\bfseries\small ?}}{%
\rotatebox{45}{$\blacksquare$}}}}
% Used by @example, @include, @includelineno and @dontinclude
\newenvironment{DoxyCodeInclude}[1]{%
\DoxyCode{#1}%
}{%
\endDoxyCode%
}
% Used by @verbatim ... @endverbatim
\newenvironment{DoxyVerb}{%
\par%
\footnotesize%
\verbatim%
}{%
\endverbatim%
\normalsize%
}
% Used by @verbinclude
\newenvironment{DoxyVerbInclude}{%
\DoxyVerb%
}{%
\endDoxyVerb%
}
% Used by numbered lists (using '-#' or <ol> ... </ol>)
\setlistdepth{12}
\newlist{DoxyEnumerate}{enumerate}{12}
\setlist[DoxyEnumerate,1]{label=\arabic*.}
\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)}
\setlist[DoxyEnumerate,3]{label=\roman*.}
\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.}
\setlist[DoxyEnumerate,5]{label=\arabic*.}
\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)}
\setlist[DoxyEnumerate,7]{label=\roman*.}
\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.}
\setlist[DoxyEnumerate,9]{label=\arabic*.}
\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)}
\setlist[DoxyEnumerate,11]{label=\roman*.}
\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.}
% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)
\setlistdepth{12}
\newlist{DoxyItemize}{itemize}{12}
\setlist[DoxyItemize]{label=\textperiodcentered}
\setlist[DoxyItemize,1]{label=\textbullet}
\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash}
\setlist[DoxyItemize,3]{label=\textasteriskcentered}
\setlist[DoxyItemize,4]{label=\textperiodcentered}
% Used for check boxes
\newcommand{\DoxyUnchecked}{$\square$}
\newcommand{\DoxyChecked}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\tiny \checkmark}}$\square$}
% Used by description lists (using <dl> ... </dl>)
\newenvironment{DoxyDescription}{%
\description%
}{%
\enddescription%
}
% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
% (only if caption is specified)
\newenvironment{DoxyImage}{%
\begin{figure}[H]%
\centering%
}{%
\end{figure}%
}
% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
% (only if no caption is specified)
\newenvironment{DoxyImageNoCaption}{%
\begin{center}%
}{%
\end{center}%
}
% Used by @image
% (only if inline is specified)
\newenvironment{DoxyInlineImage}{%
}{%
}
% Used by @attention
\newenvironment{DoxyAttention}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @important
\newenvironment{DoxyImportant}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @author and @authors
\newenvironment{DoxyAuthor}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @date
\newenvironment{DoxyDate}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @invariant
\newenvironment{DoxyInvariant}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @note
\newenvironment{DoxyNote}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @post
\newenvironment{DoxyPostcond}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @pre
\newenvironment{DoxyPrecond}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @copyright
\newenvironment{DoxyCopyright}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @remark
\newenvironment{DoxyRemark}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @return and @returns
\newenvironment{DoxyReturn}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @since
\newenvironment{DoxySince}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @see
\newenvironment{DoxySeeAlso}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @version
\newenvironment{DoxyVersion}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @warning
\newenvironment{DoxyWarning}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by @par and @paragraph
\newenvironment{DoxyParagraph}[1]{%
\begin{DoxyDesc}{#1}%
}{%
\end{DoxyDesc}%
}
% Used by parameter lists
\newenvironment{DoxyParams}[2][]{%
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
{\ifthenelse{\equal{#1}{1}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
}
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for fields of simple structs
\newenvironment{DoxyFields}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}%
\multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for fields simple class style enums
\newenvironment{DoxyEnumFields}[2][]{%
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{2}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,r]|X[-1,l]|}}% with init value
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for parameters within a detailed function description
\newenvironment{DoxyParamCaption}{%
\renewcommand{\item}[3][]{\\ \hspace*{2.0cm} ##1 {\em ##2}##3}%
}{%
}
% Used by return value lists
\newenvironment{DoxyRetVals}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used by exception lists
\newenvironment{DoxyExceptions}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used by template parameter lists
\newenvironment{DoxyTemplParams}[1]{%
\tabulinesep=1mm%
\par%
\begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
% Used for member lists
\newenvironment{DoxyCompactItemize}{%
\begin{itemize}%
\setlength{\itemsep}{-3pt}%
\setlength{\parsep}{0pt}%
\setlength{\topsep}{0pt}%
\setlength{\partopsep}{0pt}%
}{%
\end{itemize}%
}
% Used for member descriptions
\newenvironment{DoxyCompactList}{%
\begin{list}{}{%
\setlength{\leftmargin}{0.5cm}%
\setlength{\itemsep}{0pt}%
\setlength{\parsep}{0pt}%
\setlength{\topsep}{0pt}%
\renewcommand{\makelabel}{\hfill}%
}%
}{%
\end{list}%
}
% Used for reference lists (@bug, @deprecated, @todo, etc.)
\newenvironment{DoxyRefList}{%
\begin{list}{}{%
\setlength{\labelwidth}{10pt}%
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\xreflabel}%
}%
}{%
\end{list}%
}
% Used by @bug, @deprecated, @todo, etc.
\newenvironment{DoxyRefDesc}[1]{%
\begin{list}{}{%
\renewcommand\makelabel[1]{\textbf{##1}}%
\settowidth\labelwidth{\makelabel{#1}}%
\setlength\leftmargin{\labelwidth+\labelsep}%
}%
}{%
\end{list}%
}
% Used by parameter lists and simple sections
\newenvironment{Desc}
{\begin{list}{}{%
\settowidth{\labelwidth}{20pt}%
\setlength{\parsep}{0pt}%
\setlength{\itemsep}{0pt}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\renewcommand{\makelabel}{\entrylabel}%
}
}{%
\end{list}%
}
% Used by tables
\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}%
\newenvironment{TabularC}[1]%
{\tabulinesep=1mm
\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}%
{\end{longtabu*}\par}%
\newenvironment{TabularNC}[1]%
{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}%
{\end{tabu}\par}%
% Used for member group headers
\newenvironment{Indent}{%
\begin{list}{}{%
\setlength{\leftmargin}{0.5cm}%
}%
\item[]\ignorespaces%
}{%
\unskip%
\end{list}%
}
% Used when hyperlinks are turned on
\newcommand{\doxylink}[2]{%
\mbox{\hyperlink{#1}{#2}}%
}
% Used for the cite command
\newcommand{\DoxyCite}[3]{%
\ifthenelse{#3=1}% 1 with square parenthesis
{
\ifthenelse{\equal{#2}{number}}%
{ \cite{#1} }%
{%
\ifthenelse{\equal{#2}{shortauthor}}%
{ \citetext{\citeauthor{#1}} }%
{%
\ifthenelse{\equal{#2}{year}}%
{ \citeyearpar{#1} }%
{}%
}%
}%
}%
{%
\ifthenelse{\equal{#2}{number}}%
{ \citealp{#1} }%
{%
\ifthenelse{\equal{#2}{shortauthor}}%
{ \citeauthor{#1} }%
{%
\ifthenelse{\equal{#2}{year}}%
{ \citeyear{#1} }%
{}%
}%
}%
}%
}
% Used when hyperlinks are turned on
% Third argument is the SectionType, see the doxygen internal
% documentation for the values (relevant: Page ... Subsubsection).
\newcommand{\doxysectlink}[3]{%
\mbox{\hyperlink{#1}{#2}}%
}
% Used when hyperlinks are turned off
\newcommand{\doxyref}[3]{%
\textbf{#1} (\textnormal{#2}\,\pageref{#3})%
}
% Used when hyperlinks are turned off
% Fourth argument is the SectionType, see the doxygen internal
% documentation for the values (relevant: Page ... Subsubsection).
\newcommand{\doxysectref}[4]{%
\textbf{#1} (\textnormal{#2}\,\pageref{#3})%
}
% Used to link to a table when hyperlinks are turned on
\newcommand{\doxytablelink}[2]{%
\ref{#1}%
}
% Used to link to a table when hyperlinks are turned off
\newcommand{\doxytableref}[3]{%
\ref{#3}%
}
% Used by @addindex
\newcommand{\lcurly}{\{}
\newcommand{\rcurly}{\}}
% Colors used for syntax highlighting
\definecolor{comment}{rgb}{0.5,0.0,0.0}
\definecolor{keyword}{rgb}{0.0,0.5,0.0}
\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}
\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}
\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}
\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}
\definecolor{charliteral}{rgb}{0.0,0.5,0.5}
\definecolor{xmlcdata}{rgb}{0.0,0.0,0.0}
\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}
\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}
\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}
\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}
% Color used for table heading
\newcommand{\tableheadbgcolor}{lightgray}%
% Version of hypertarget with correct landing location
\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}}
% possibility to have sections etc. be within the margins
% unfortunately had to copy part of book.cls and add \raggedright
\makeatletter
\newcounter{subsubsubsection}[subsubsection]
\newcounter{subsubsubsubsection}[subsubsubsection]
\newcounter{subsubsubsubsubsection}[subsubsubsubsection]
\newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection]
\renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}}
\renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}}
\renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}}
\newcommand{\subsubsubsectionmark}[1]{}
\newcommand{\subsubsubsubsectionmark}[1]{}
\newcommand{\subsubsubsubsubsectionmark}[1]{}
\newcommand{\subsubsubsubsubsubsectionmark}[1]{}
\def\toclevel@subsubsubsection{4}
\def\toclevel@subsubsubsubsection{5}
\def\toclevel@subsubsubsubsubsection{6}
\def\toclevel@subsubsubsubsubsubsection{7}
\def\toclevel@paragraph{8}
\def\toclevel@subparagraph{9}
\newcommand\doxysection{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\raggedright\normalfont\Large\bfseries}}
\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\large\bfseries}}
\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedright\normalfont\normalsize\bfseries}}
\newcommand\l@subsubsubsection{\@dottedtocline{4}{10.0em}{7.8em}}
\newcommand\l@subsubsubsubsection{\@dottedtocline{5}{13.0em}{9.4em}}
\newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{15.0em}{11em}}
\newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{18.0em}{12.6em}}
\renewcommand\l@paragraph{\@dottedtocline{8}{21.0em}{14.2em}}
\renewcommand\l@subparagraph{\@dottedtocline{9}{24.0em}{15.8em}}
\makeatother
% the sectsty doesn't look to be maintained but gives, in our case, some warning like:
% LaTeX Warning: Command \underline has changed.
% Check if current package is valid.
% unfortunately had to copy the relevant part
\newcommand*{\doxypartfont} [1]
{\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1}
\gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}}
\newcommand*{\doxychapterfont} [1]
{\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1}
\gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}}
\newcommand*{\doxysectionfont} [1]
{\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxysubsectionfont} [1]
{\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxysubsubsectionfont} [1]
{\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxyparagraphfont} [1]
{\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxysubparagraphfont} [1]
{\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}}
\newcommand*{\doxyminisecfont} [1]
{\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}}
\newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}%
\doxychapterfont{#1}%
\doxysectionfont{#1}%
\doxysubsectionfont{#1}%
\doxysubsubsectionfont{#1}%
\doxyparagraphfont{#1}%
\doxysubparagraphfont{#1}%
\doxyminisecfont{#1}}%
% Define caption that is also suitable in a table
% for usage with hyperlinks
\makeatletter
\def\doxyfigcaption{%
\H@refstepcounter{figure}%
\@dblarg{\@caption{figure}}}
% for usage without hyperlinks
\def\doxyfigcaptionnolink{%
\refstepcounter{figure}%
\@dblarg{\@caption{figure}}}
\makeatother
% Define alpha enumarative names for counters > 26
\makeatletter
\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname}
\def\@enumalphalphcnt#1{\alphalph{#1}}
\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname}
\def\@enumAlphAlphcnt#1{\AlphAlph{#1}}
\makeatother
\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa}
\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA}

View File

@@ -0,0 +1,2178 @@
%%
%% This is file etoc_doxygen.sty
%%
%% Apart from this header notice and the renaming from etoc to
%% etoc_doxygen (also in \ProvidesPackage) it is an identical
%% copy of
%%
%% etoc.sty
%%
%% at version 1.2b of 2023/07/01.
%%
%% This file has been provided to Doxygen team courtesy of the
%% author for benefit of users having a LaTeX installation not
%% yet providing version 1.2a or later of etoc, whose
%% deeplevels feature is required.
%%
%% The original source etoc.dtx (only of the latest version at
%% any given time) is available at
%%
%% https://ctan.org/pkg/etoc
%%
%% and contains the terms for copying and modification as well
%% as author contact information.
%%
%% In brief any modified versions of this file must be renamed
%% with new filenames distinct from etoc.sty.
%%
%% Package: etoc
%% Version: 1.2b
%% License: LPPL 1.3c
%% Copyright (C) 2012-2023 Jean-Francois B. <user jfbu at github>
\NeedsTeXFormat{LaTeX2e}[2003/12/01]
\ProvidesPackage{etoc_doxygen}[2023/07/01 v1.2b Completely customisable TOCs (JFB)]
\newif\ifEtoc@oldLaTeX
\@ifl@t@r\fmtversion{2020/10/01}
{}
{\Etoc@oldLaTeXtrue
\PackageInfo{etoc}{Old LaTeX (\fmtversion) detected!\MessageBreak
Since 1.1a (2023/01/14), etoc prefers LaTeX at least\MessageBreak
as recent as 2020-10-01, for reasons of the .toc file,\MessageBreak
and used to require it (from 1.1a to 1.2).\MessageBreak
This etoc (1.2b) does not *require* it, but has not been\MessageBreak
tested thoroughly on old LaTeX (especially if document\MessageBreak
does not use hyperref) and retrofitting was done only\MessageBreak
on basis of author partial remembrances of old context.\MessageBreak
Reported}}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{prefix=Etoc@}
\newif\ifEtoc@lof
\DeclareVoidOption{lof}{\Etoc@loftrue
\PackageInfo{etoc}{Experimental support for \string\locallistoffigures.\MessageBreak
Barely tested, use at own risk}%
}
\newif\ifEtoc@lot
\DeclareVoidOption{lot}{\Etoc@lottrue
\PackageInfo{etoc}{Experimental support for \string\locallistoftables.\MessageBreak
Barely tested, use at own risk}%
}
\@ifclassloaded{memoir}{
\PackageInfo{etoc}
{As this is with memoir class, all `...totoc' options\MessageBreak
are set true by default. Reported}
\DeclareBoolOption[true]{maintoctotoc}
\DeclareBoolOption[true]{localtoctotoc}
\DeclareBoolOption[true]{localloftotoc}
\DeclareBoolOption[true]{locallottotoc}
}{
\DeclareBoolOption[false]{maintoctotoc}
\DeclareBoolOption[false]{localtoctotoc}
\DeclareBoolOption[false]{localloftotoc}
\DeclareBoolOption[false]{locallottotoc}
}
\DeclareBoolOption[true]{ouroboros}
\DeclareBoolOption[false]{deeplevels}
\DeclareDefaultOption{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
\ProcessKeyvalOptions*
\DisableKeyvalOption[action=error,package=etoc]{etoc}{lof}
\DisableKeyvalOption[action=error,package=etoc]{etoc}{lot}
\DisableKeyvalOption[action=error,package=etoc]{etoc}{deeplevels}
\def\etocsetup#1{\setkeys{etoc}{#1}}
\def\etocifmaintoctotoc{\ifEtoc@maintoctotoc
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\def\etociflocaltoctotoc{\ifEtoc@localtoctotoc
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\def\etociflocalloftotoc{\ifEtoc@localloftotoc
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\def\etociflocallottotoc{\ifEtoc@locallottotoc
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\RequirePackage{multicol}
\def\etoc@{\etoc@}
\long\def\Etoc@gobtoetoc@ #1\etoc@{}
\newtoks\Etoc@toctoks
\def\Etoc@par{\par}
\def\etocinline{\def\Etoc@par{}}
\let\etocnopar\etocinline
\def\etocdisplay{\def\Etoc@par{\par}}
\let\Etoc@global\@empty
\def\etocglobaldefs{\let\Etoc@global\global\let\tof@global\global}
\def\etoclocaldefs {\let\Etoc@global\@empty\let\tof@global\@empty}
\newif\ifEtoc@numbered
\newif\ifEtoc@hyperref
\newif\ifEtoc@parskip
\newif\ifEtoc@tocwithid
\newif\ifEtoc@standardlines
\newif\ifEtoc@etocstyle
\newif\ifEtoc@classstyle
\newif\ifEtoc@keeporiginaltoc
\newif\ifEtoc@skipprefix
\newif\ifEtoc@isfirst
\newif\ifEtoc@localtoc
\newif\ifEtoc@skipthisone
\newif\ifEtoc@stoptoc
\newif\ifEtoc@notactive
\newif\ifEtoc@mustclosegroup
\newif\ifEtoc@isemptytoc
\newif\ifEtoc@checksemptiness
\def\etocchecksemptiness {\Etoc@checksemptinesstrue }
\def\etocdoesnotcheckemptiness {\Etoc@checksemptinessfalse }
\newif\ifEtoc@notocifnotoc
\def\etocnotocifnotoc {\Etoc@checksemptinesstrue\Etoc@notocifnotoctrue }
\newcounter{etoc@tocid}
\def\Etoc@tocext{toc}
\def\Etoc@lofext{lof}
\def\Etoc@lotext{lot}
\let\Etoc@currext\Etoc@tocext
\def\etocifislocal{\ifEtoc@localtoc\expandafter\@firstoftwo\else
\expandafter\@secondoftwo\fi
}
\def\etocifislocaltoc{\etocifislocal{\ifx\Etoc@currext\Etoc@tocext
\expandafter\@firstoftwo\else
\expandafter\@secondoftwo\fi}%
{\@secondoftwo}%
}
\def\etocifislocallof{\etocifislocal{\ifx\Etoc@currext\Etoc@lofext
\expandafter\@firstoftwo\else
\expandafter\@secondoftwo\fi}%
{\@secondoftwo}%
}
\def\etocifislocallot{\etocifislocal{\ifx\Etoc@currext\Etoc@lotext
\expandafter\@firstoftwo\else
\expandafter\@secondoftwo\fi}%
{\@secondoftwo}%
}
\expandafter\def\csname Etoc@-3@@\endcsname {-\thr@@}
\expandafter\def\csname Etoc@-2@@\endcsname {-\tw@}
\expandafter\let\csname Etoc@-1@@\endcsname \m@ne
\expandafter\let\csname Etoc@0@@\endcsname \z@
\expandafter\let\csname Etoc@1@@\endcsname \@ne
\expandafter\let\csname Etoc@2@@\endcsname \tw@
\expandafter\let\csname Etoc@3@@\endcsname \thr@@
\expandafter\chardef\csname Etoc@4@@\endcsname 4
\expandafter\chardef\csname Etoc@5@@\endcsname 5
\expandafter\chardef\csname Etoc@6@@\endcsname 6
\ifEtoc@deeplevels
\expandafter\chardef\csname Etoc@7@@\endcsname 7
\expandafter\chardef\csname Etoc@8@@\endcsname 8
\expandafter\chardef\csname Etoc@9@@\endcsname 9
\expandafter\chardef\csname Etoc@10@@\endcsname 10
\expandafter\chardef\csname Etoc@11@@\endcsname 11
\expandafter\chardef\csname Etoc@12@@\endcsname 12
\fi
\expandafter\let\expandafter\Etoc@maxlevel
\csname Etoc@\ifEtoc@deeplevels12\else6\fi @@\endcsname
\edef\etocthemaxlevel{\number\Etoc@maxlevel}
\@ifclassloaded{memoir}{\def\Etoc@minf{-\thr@@}}{\def\Etoc@minf{-\tw@}}
\let\Etoc@none@@ \Etoc@minf
\expandafter\let\expandafter\Etoc@all@@
\csname Etoc@\ifEtoc@deeplevels11\else5\fi @@\endcsname
\let\Etoc@dolevels\@empty
\def\Etoc@newlevel #1{\expandafter\def\expandafter\Etoc@dolevels\expandafter
{\Etoc@dolevels\Etoc@do{#1}}}
\ifdefined\expanded
\def\etocsetlevel#1#2{\expanded{\noexpand\etoc@setlevel{#1}{#2}}}%
\else
\def\etocsetlevel#1#2{{\edef\Etoc@tmp{\noexpand\etoc@setlevel{#1}{#2}}\expandafter}\Etoc@tmp}%
\fi
\def\etoc@setlevel#1#2{%
\edef\Etoc@tmp{\the\numexpr#2}%
\if1\ifnum\Etoc@tmp>\Etoc@maxlevel0\fi\unless\ifnum\Etoc@minf<\Etoc@tmp;\fi1%
\ifEtoc@deeplevels
\in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,%
.7,.8,.9,.10,.11,.12,}%
\else
\in@{.#1,}{.none,.all,.figure,.table,.-3,.-2,.-1,.0,.1,.2,.3,.4,.5,.6,}%
\fi
\ifin@\else\if\@car#1\@nil @\in@true\fi\fi
\ifin@
\PackageWarning{etoc}
{Sorry, but `#1' is forbidden as level name.\MessageBreak
\if\@car#1\@nil @%
(because of the @ as first character)\MessageBreak\fi
Reported}%
\else
\etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}%
\expandafter\let\csname Etoc@#1@@\expandafter\endcsname
\csname Etoc@\Etoc@tmp @@\endcsname
\expandafter\edef\csname Etoc@@#1@@\endcsname
{\expandafter\noexpand\csname Etoc@#1@@\endcsname}%
\expandafter\edef\csname toclevel@@#1\endcsname
{\expandafter\noexpand\csname toclevel@#1\endcsname}%
\fi
\else
\PackageWarning{etoc}
{Argument `\detokenize{#2}' of \string\etocsetlevel\space should
represent one of\MessageBreak
\ifnum\Etoc@minf=-\thr@@-2, \fi-1, 0, 1, 2, \ifEtoc@deeplevels ...\else3, 4\fi,
\the\numexpr\Etoc@maxlevel-1, or \number\Etoc@maxlevel\space
but evaluates to \Etoc@tmp.\MessageBreak
The level of `#1' will be set to \number\Etoc@maxlevel.\MessageBreak
Tables of contents will ignore `#1' as long\MessageBreak
as its level is \number\Etoc@maxlevel\space (=\string\etocthemaxlevel).%
\MessageBreak
Reported}%
\etocifunknownlevelTF{#1}{\Etoc@newlevel{#1}}{}%
\expandafter\let\csname Etoc@#1@@\endcsname\Etoc@maxlevel
\fi
}
\def\etoclevel#1{\csname Etoc@#1@@\endcsname}
\def\etocthelevel#1{\number\csname Etoc@#1@@\endcsname}
\def\etocifunknownlevelTF#1{\@ifundefined{Etoc@#1@@}}
\@ifclassloaded{memoir}{\etocsetlevel{book}{-2}}{}
\etocsetlevel{part}{-1}
\etocsetlevel{chapter}{0}
\etocsetlevel{section}{1}
\etocsetlevel{subsection}{2}
\etocsetlevel{subsubsection}{3}
\etocsetlevel{paragraph}{4}
\etocsetlevel{subparagraph}{5}
\ifdefined\c@chapter
\etocsetlevel{appendix}{0}
\else
\etocsetlevel{appendix}{1}
\fi
\def\Etoc@do#1{\@namedef{l@@#1}{\csname l@#1\endcsname}}
\Etoc@dolevels
\let\Etoc@figure@@\Etoc@maxlevel
\let\Etoc@table@@ \Etoc@maxlevel
\let\Etoc@gobblethreeorfour\@gobblefour
\ifdefined\@gobblethree
\let\Etoc@gobblethree\@gobblethree
\else
\long\def\Etoc@gobblethree#1#2#3{}%
\fi
\AtBeginDocument{%
\@ifpackageloaded{parskip}{\Etoc@parskiptrue}{}%
\@ifpackageloaded{hyperref}
{\Etoc@hyperreftrue}
{\ifEtoc@oldLaTeX
\let\Etoc@gobblethreeorfour\Etoc@gobblethree
\let\Etoc@etoccontentsline@fourargs\Etoc@etoccontentsline@
\long\def\Etoc@etoccontentsline@#1#2#3{%
\Etoc@etoccontentsline@fourargs{#1}{#2}{#3}{}%
}%
\fi
}%
}
\def\etocskipfirstprefix {\global\Etoc@skipprefixtrue }
\def\Etoc@updatestackofends#1\etoc@{\gdef\Etoc@stackofends{#1}}
\def\Etoc@stackofends{{-3}{}}
\def\Etoc@doendsandbegin{%
\expandafter\Etoc@traversestackofends\Etoc@stackofends\etoc@
}
\def\Etoc@traversestackofends#1{%
\ifnum#1>\Etoc@level
\csname Etoc@end@#1\endcsname
\expandafter\Etoc@traversestackofends
\else
\Etoc@traversestackofends@done{#1}%
\fi
}
\def\Etoc@traversestackofends@done#1#2{#2%
\ifnum#1<\Etoc@level
\csname Etoc@begin@\the\numexpr\Etoc@level\endcsname
\Etoc@global\Etoc@isfirsttrue
\edef\Etoc@tmp{{\the\numexpr\Etoc@level}}%
\else
\Etoc@global\Etoc@isfirstfalse
\let\Etoc@tmp\@empty
\fi
\expandafter\Etoc@updatestackofends\Etoc@tmp{#1}%
}
\def\Etoc@etoccontentsline #1{%
\let\Etoc@next\Etoc@gobblethreeorfour
\ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel
\else
\Etoc@skipthisonefalse
\global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname
\if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi
\ifEtoc@localtoc
\ifEtoc@stoptoc
\Etoc@skipthisonetrue
\else
\ifEtoc@notactive
\Etoc@skipthisonetrue
\else
\unless\ifnum\Etoc@level>\etoclocaltop
\Etoc@skipthisonetrue
\global\Etoc@stoptoctrue
\fi
\fi
\fi
\fi
\ifEtoc@skipthisone
\else
\unless\ifnum\Etoc@level>\c@tocdepth
\ifEtoc@standardlines
\let\Etoc@next\Etoc@savedcontentsline
\else
\let\Etoc@next\Etoc@etoccontentsline@
\fi
\fi
\fi
\fi
\Etoc@next{#1}%
}
\def\Etoc@etoccontentsline@ #1#2#3#4{%
\Etoc@doendsandbegin
\Etoc@global\edef\Etoc@prefix {\expandafter\noexpand
\csname Etoc@prefix@\the\numexpr\Etoc@level\endcsname }%
\Etoc@global\edef\Etoc@contents{\expandafter\noexpand
\csname Etoc@contents@\the\numexpr\Etoc@level\endcsname }%
\ifEtoc@skipprefix \Etoc@global\def\Etoc@prefix{\@empty}\fi
\global\Etoc@skipprefixfalse
\Etoc@lxyz{#2}{#3}{#4}%
\Etoc@prefix
\Etoc@contents
}
\def\Etoc@lxyz #1#2#3{%
\ifEtoc@hyperref
\Etoc@global\def\etocthelink##1{\hyperlink{#3}{##1}}%
\else
\Etoc@global\let\etocthelink\@firstofone
\fi
\Etoc@global\def\etocthepage {#2}%
\ifEtoc@hyperref
\ifx\etocthepage\@empty
\Etoc@global\let\etocthelinkedpage\@empty
\else
\Etoc@global\def\etocthelinkedpage{\hyperlink {#3}{#2}}%
\fi
\else
\Etoc@global\let\etocthelinkedpage\etocthepage
\fi
\Etoc@global\def\etocthename{#1}%
\futurelet\Etoc@getnb@token\Etoc@@getnb #1\hspace\etoc@
\ifEtoc@hyperref
\def\Etoc@tmp##1##2{\Etoc@global\def##2{\hyperlink{#3}{##1}}}%
\expandafter\Etoc@tmp\expandafter{\etocthename}\etocthelinkedname
\ifEtoc@numbered
\expandafter\Etoc@tmp\expandafter{\etocthenumber}\etocthelinkednumber
\else
\Etoc@global\let\etocthelinkednumber\@empty
\fi
\else
\Etoc@global\let\etocthelinkedname \etocthename
\Etoc@global\let\etocthelinkednumber\etocthenumber
\fi
\Etoc@global\expandafter\let\csname etoclink \endcsname \etocthelink
\Etoc@global\expandafter\let\csname etocname \endcsname \etocthename
\Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthenumber
\Etoc@global\expandafter\let\csname etocpage \endcsname \etocthepage
\ifEtoc@hyperref
\Etoc@lxyz@linktoc
\fi
}
\def\Etoc@lxyz@linktoc{%
\ifcase\Hy@linktoc
\or
\Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname
\Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber
\or % page
\Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage
\else % all
\Etoc@global\expandafter\let\csname etocname \endcsname\etocthelinkedname
\Etoc@global\expandafter\let\csname etocnumber \endcsname\etocthelinkednumber
\Etoc@global\expandafter\let\csname etocpage \endcsname\etocthelinkedpage
\fi
}
\def\Etoc@@getnb {%
\let\Etoc@next\Etoc@getnb
\ifx\Etoc@getnb@token\@sptoken\let\Etoc@next\Etoc@getnb@nonbr\fi
\ifx\Etoc@getnb@token\bgroup \let\Etoc@next\Etoc@getnb@nonbr\fi
\Etoc@next
}
\def\Etoc@getnb #1{%
\in@{#1}{\numberline\chapternumberline\partnumberline\booknumberline}%
\ifin@
\let\Etoc@next\Etoc@getnb@nmbrd
\else
\ifnum\Etoc@level=\m@ne
\let\Etoc@next\Etoc@@getit
\else
\let\Etoc@next\Etoc@getnb@nonbr
\fi
\in@{#1}{\nonumberline}%
\ifin@
\let\Etoc@next\Etoc@getnb@nonumberline
\fi
\fi
\Etoc@next #1%
}
\def\Etoc@getnb@nmbrd #1#2{%
\Etoc@global\Etoc@numberedtrue
\Etoc@global\def\etocthenumber {#2}%
\Etoc@getnb@nmbrd@getname\@empty
}%
\def\Etoc@getnb@nmbrd@getname #1\hspace\etoc@ {%
\Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}%
}
\def\Etoc@getnb@nonbr #1\etoc@ {%
\Etoc@global\Etoc@numberedfalse
\Etoc@global\let\etocthenumber \@empty
}
\def\Etoc@getnb@nonumberline #1\hspace\etoc@ {%
\Etoc@global\Etoc@numberedfalse
\Etoc@global\let\etocthenumber \@empty
\Etoc@global\expandafter\def\expandafter\etocthename\expandafter{\@gobble#1}%
}
\def\Etoc@@getit #1\hspace#2{%
\ifx\etoc@#2%
\Etoc@global\Etoc@numberedfalse
\Etoc@global\let\etocthenumber \@empty
\else
\Etoc@global\Etoc@numberedtrue
\Etoc@global\def\etocthenumber {#1}%
\expandafter\Etoc@getit@getname \expandafter\@empty
\fi
}
\def\Etoc@getit@getname #1\hspace\etoc@ {%
\Etoc@global\expandafter\def\expandafter\etocthename\expandafter{#1}%
}
\let\etocthename \@empty
\let\etocthenumber \@empty
\let\etocthepage \@empty
\let\etocthelinkedname \@empty
\let\etocthelinkednumber \@empty
\let\etocthelinkedpage \@empty
\let\etocthelink \@firstofone
\DeclareRobustCommand*{\etocname} {}
\DeclareRobustCommand*{\etocnumber}{}
\DeclareRobustCommand*{\etocpage} {}
\DeclareRobustCommand*{\etoclink} {\@firstofone}
\DeclareRobustCommand*{\etocifnumbered}
{\ifEtoc@numbered\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
\expandafter\let\expandafter\etocxifnumbered\csname etocifnumbered \endcsname
\DeclareRobustCommand*{\etociffirst}
{\ifEtoc@isfirst\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
\expandafter\let\expandafter\etocxiffirst\csname etociffirst \endcsname
\def\Etoc@readtoc {%
\ifeof \Etoc@tf
\else
\read \Etoc@tf to \Etoc@buffer
\Etoc@toctoks=\expandafter\expandafter\expandafter
{\expandafter\the\expandafter\Etoc@toctoks\Etoc@buffer}%
\expandafter\Etoc@readtoc
\fi
}
\Etoc@toctoks {}% (superfluous, but for clarity)
\AtBeginDocument{\IfFileExists{\jobname.toc}
{{\endlinechar=\m@ne
\makeatletter
\newread\Etoc@tf
\openin\Etoc@tf\@filef@und
\Etoc@readtoc
\global\Etoc@toctoks=\expandafter{\the\Etoc@toctoks}%
\closein\Etoc@tf}}
{\typeout{No file \jobname.toc.}}}
\def\Etoc@openouttoc{%
\ifEtoc@hyperref
\ifx\hyper@last\@undefined
\IfFileExists{\jobname .toc}
{\Hy@WarningNoLine
{old toc file detected; run LaTeX again (cheers from `etoc')}%
\global\Etoc@toctoks={}%
}
{}%
\fi
\fi
\if@filesw
\newwrite \tf@toc
\immediate \openout \tf@toc \jobname .toc\relax
\fi
\global\let\Etoc@openouttoc\empty
}
\def\Etoc@toctoc{%
\gdef\Etoc@stackofends{{-3}{}}%
\global\let\Etoc@level\Etoc@minf
\global\let\Etoc@virtualtop\Etoc@minf
\the\Etoc@toctoks
\ifEtoc@notactive
\else
\gdef\Etoc@level{-\thr@@}%
\Etoc@doendsandbegin
\fi
}
\def\Etoc@@startlocaltoc#1#2{%
\ifEtoc@localtoc
\ifnum #1=#2\relax
\global\let\etoclocaltop\Etoc@virtualtop
\Etoc@@startlocaltochook
\etoclocaltableofcontentshook
\ifEtoc@etocstyle
\etocetoclocaltocmaketitle
\fi
\ifx\Etoc@aftertitlehook\@empty
\else
\ifEtoc@localtoctotoc
\ifEtoc@ouroboros
\else
\let\Etoc@tmp\contentsline
\def\contentsline{\let\contentsline\Etoc@tmp\Etoc@gobblethreeorfour}%
\fi
\fi
\fi
\global\Etoc@notactivefalse
\fi
\fi
}
\let\etoc@startlocaltoc\@gobble
\let\Etoc@@startlocaltoc@toc\Etoc@@startlocaltoc
\let\Etoc@@startlocaltochook\@empty
\unless\ifEtoc@deeplevels
\def\etocdivisionnameatlevel#1{%
\ifcase\numexpr#1\relax
\ifdefined\c@chapter chapter\else section\fi%
\or section%
\or subsection%
\or subsubsection%
\or paragraph%
\or subparagraph%
\or empty%
\else\ifnum\numexpr#1<\m@ne
book%
\else
part%
\fi
\fi
}
\else
\def\etocdivisionnameatlevel#1{%
\ifcase\numexpr#1\relax
\ifdefined\c@chapter chapter\else section\fi%
\or section%
\or subsection%
\or subsubsection%
\or subsubsubsection%
\or subsubsubsubsection%
\or subsubsubsubsubsection%
\or subsubsubsubsubsubsection%
\or paragraph%
\or subparagraph%
\else\ifnum\numexpr#1>\z@
empty%
\else\ifnum\numexpr#1=\m@ne
part%
\else
book%
\fi\fi
\fi
}
\fi
\def\etoclocalheadtotoc#1#2{\addcontentsline{toc}{@#1}{#2}}
\def\etocglobalheadtotoc{\addcontentsline{toc}}
\providecommand*\UseName{\@nameuse}
\def\etocetoclocaltocmaketitle{%
\UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\localcontentsname}%
\if@noskipsec\leavevmode\par\fi
\etociflocaltoctotoc
{\etocifisstarred
{}% star variant, do not add to toc
{\etoclocalheadtotoc
{\etocdivisionnameatlevel{\etoclocaltop+1}}%
{\localcontentsname}%
}%
}%
{}%
}%
\def\localcontentsname {\contentsname}%
\let\etoclocaltableofcontentshook\@empty
\if1\ifEtoc@lof0\fi\ifEtoc@lot0\fi1%
\else
\AtBeginDocument{%
\let\Etoc@originaladdcontentsline\addcontentsline
\def\addcontentsline{\Etoc@hackedaddcontentsline}%
}%
\fi
\ifEtoc@lof
\ifEtoc@lot
\def\Etoc@hackedaddcontentsline#1{%
\expanded{\noexpand\in@{.#1,}}{.lof,.lot,}%
\ifin@\expandafter\Etoc@hackedaddcontentsline@i
\else\expandafter\Etoc@originaladdcontentsline
\fi {#1}}
\else
\def\Etoc@hackedaddcontentsline#1{%
\expanded{\noexpand\in@{.#1,}}{.lof,}%
\ifin@\expandafter\Etoc@hackedaddcontentsline@i
\else\expandafter\Etoc@originaladdcontentsline
\fi {#1}}
\fi
\else
\def\Etoc@hackedaddcontentsline#1{%
\expanded{\noexpand\in@{.#1,}}{.lot,}%
\ifin@\expandafter\Etoc@hackedaddcontentsline@i
\else\expandafter\Etoc@originaladdcontentsline
\fi {#1}}
\fi
\def\Etoc@hackedaddcontentsline@i#1#2#3{%
\expanded{\noexpand\in@{.#1;#2,}}{.lof;figure,.lot;table,}%
\ifin@
\addtocontents {toc}{%
\protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}%
\ifdefined\protected@file@percent\protected@file@percent\fi
}%
\fi
\Etoc@originaladdcontentsline{#1}{#2}{#3}%
}
\unless\ifdefined\expanded
\def\Etoc@hackedaddcontentsline#1{%
{\edef\Etoc@tmp{\noexpand\in@{.#1,}{\ifEtoc@lof.lof,\fi\ifEtoc@lot.lot,\fi}}\expandafter}%
\Etoc@tmp
\ifin@\expandafter\Etoc@hackedaddcontentsline@i
\else\expandafter\Etoc@originaladdcontentsline
\fi {#1}%
}
\def\Etoc@hackedaddcontentsline@i#1#2#3{%
{\edef\Etoc@tmp{\noexpand\in@{.#1;#2,}}\expandafter}%
\Etoc@tmp{.lof;figure,.lot;table,}%
\ifin@
\addtocontents {toc}{%
\protect\contentsline{#2}{#3}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}%
\ifdefined\protected@file@percent\protected@file@percent\fi
}%
\fi
\Etoc@originaladdcontentsline{#1}{#2}{#3}%
}
\fi
\def\Etoc@@startlocallistof#1#2#3{%
\ifEtoc@localtoc
\ifnum #2=#3\relax
\global\let\etoclocaltop\Etoc@virtualtop
\global\Etoc@notactivefalse
\Etoc@@startlocaltochook
\csname etoclocallistof#1shook\endcsname
\ifEtoc@etocstyle
\csname etocetoclistof#1smaketitle\endcsname
\fi
\fi
\fi
}
\def\Etoc@@startlocallistof@setlevels#1{%
\ifnum\etoclocaltop<\z@
\expandafter\let\csname Etoc@#1@@\endcsname\@ne
\else
\expandafter\let\csname Etoc@#1@@\expandafter\endcsname
\csname Etoc@\the\numexpr\etoclocaltop+\@ne @@\endcsname
\fi
\def\Etoc@do##1{%
\ifnum\etoclevel{##1}>\etoclocaltop
\expandafter\let\csname Etoc@##1@@\endcsname\Etoc@maxlevel
\fi}%
\Etoc@dolevels
}
\def\etoclocallistoffigureshook{\etocstandardlines}
\def\etoclocallistoftableshook {\etocstandardlines}
\def\locallistfigurename{\listfigurename}
\def\locallisttablename {\listtablename}
\def\etocetoclistoffiguresmaketitle{%
\UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallistfigurename}%
\ifnum\etoclocaltop>\tw@\mbox{}\par\fi
\etociflocalloftotoc
{\etocifisstarred
{}% star variant, do not add to toc
{\etoclocalheadtotoc
{\etocdivisionnameatlevel{\etoclocaltop+1}}%
{\locallistfigurename}%
}%
}%
{}%
}%
\def\etocetoclistoftablesmaketitle{%
\UseName{\etocdivisionnameatlevel{\etoclocaltop+1}}*{\locallisttablename}%
\ifnum\etoclocaltop>\tw@\mbox{}\par\fi
\etociflocallottotoc
{\etocifisstarred
{}% star variant, do not add to toc
{\etoclocalheadtotoc
{\etocdivisionnameatlevel{\etoclocaltop+1}}%
{\locallisttablename}%
}%
}%
{}%
}%
\let\Etoc@listofreset\@empty
\ifEtoc@lof
\def\locallistoffigures{%
\def\Etoc@listofreset{%
\let\Etoc@currext\Etoc@tocext
\let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc
\let\Etoc@@startlocaltochook\@empty
\let\Etoc@listofreset\@empty
\let\Etoc@listofhook\@empty
}%
\let\Etoc@currext\Etoc@lofext
\def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{figure}}%
\def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{figure}}%
\def\Etoc@listofhook{%
\def\Etoc@do####1{%
\expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel
}%
\Etoc@dolevels
}%
\localtableofcontents
}
\else
\def\locallistoffigures{%
\PackageError{etoc}{%
\string\locallistoffigures \on@line\space but\MessageBreak
package was loaded without `lof' option}%
{Try again with \string\usepackage[lof]{etoc}}%
}
\fi
\ifEtoc@lot
\def\locallistoftables{%
\def\Etoc@listofreset{%
\let\Etoc@currext\Etoc@tocext
\let\Etoc@@startlocaltoc\Etoc@@startlocaltoc@toc
\let\Etoc@@startlocaltochook\@empty
\let\Etoc@listofreset\@empty
\let\Etoc@listofhook\@empty
}%
\let\Etoc@currext\Etoc@lotext
\def\Etoc@@startlocaltoc{\Etoc@@startlocallistof{table}}%
\def\Etoc@@startlocaltochook{\Etoc@@startlocallistof@setlevels{table}}%
\def\Etoc@listofhook{%
\def\Etoc@do####1{%
\expandafter\let\csname Etoc@@####1@@\endcsname\Etoc@maxlevel
}%
\Etoc@dolevels
}%
\localtableofcontents
}
\else
\def\locallistoftables{%
\PackageError{etoc}{%
\string\locallistoftable \on@line\space but\MessageBreak
package was loaded without `lot' option}%
{Try again with \string\usepackage[lot]{etoc}}%
}
\fi
\def\Etoc@checkifempty {%
\global\Etoc@isemptytoctrue
\global\Etoc@stoptocfalse
\global\let\Etoc@level\Etoc@minf
\global\let\Etoc@virtualtop\Etoc@minf
\gdef\Etoc@stackofends{{-3}{}}%
\begingroup
\ifEtoc@localtoc
\def\etoc@startlocaltoc##1{%
\ifnum##1=\Etoc@tocid\relax
\global\let\etoclocaltop\Etoc@virtualtop
\Etoc@@startlocaltochook
\global\Etoc@notactivefalse
\fi
}%
\let\contentsline\Etoc@testingcontentslinelocal
\else
\let\contentsline\Etoc@testingcontentsline
\fi
\Etoc@storetocdepth
\let\Etoc@setlocaltop@doendsandbegin\@empty
\the\Etoc@toctoks
\Etoc@restoretocdepth
\endgroup
}
\DeclareRobustCommand*\etocifwasempty
{\ifEtoc@isemptytoc\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi }
\expandafter\let\expandafter\etocxifwasempty\csname etocifwasempty \endcsname
\def\Etoc@testingcontentslinelocal #1{%
\ifEtoc@stoptoc
\else
\ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel
\else
\global\expandafter\let\expandafter\Etoc@level\csname Etoc@#1@@\endcsname
\if @\@car#1\@nil\else\global\let\Etoc@virtualtop\Etoc@level\fi
\ifEtoc@notactive
\else
\ifnum\Etoc@level>\etoclocaltop
\unless\ifnum\Etoc@level>\c@tocdepth
\global\Etoc@isemptytocfalse
\global\Etoc@stoptoctrue
\fi
\else
\global\Etoc@stoptoctrue
\fi
\fi
\fi
\fi
\Etoc@gobblethreeorfour{}%
}
\def\Etoc@testingcontentsline #1{%
\ifEtoc@stoptoc
\else
\ifnum\csname Etoc@#1@@\endcsname=\Etoc@maxlevel
\else
\unless\ifnum\csname Etoc@#1@@\endcsname>\c@tocdepth
\global\Etoc@isemptytocfalse
\global\Etoc@stoptoctrue
\fi
\fi
\fi
\Etoc@gobblethreeorfour{}%
}
\def\Etoc@localtableofcontents#1{%
\gdef\etoclocaltop{-\@m}%
\Etoc@localtoctrue
\global\Etoc@isemptytocfalse
\edef\Etoc@tocid{#1}%
\ifnum\Etoc@tocid<\@ne
\setbox0\hbox{\ref{Unknown toc ref \@secondoftwo#1. \space Rerun LaTeX}}%
\global\Etoc@stoptoctrue
\gdef\etoclocaltop{-\thr@@}%
\Etoc@tableofcontents
\expandafter\Etoc@gobtoetoc@
\fi
\global\Etoc@notactivetrue
\ifEtoc@checksemptiness
\Etoc@checkifempty
\fi
\ifEtoc@isemptytoc
\ifEtoc@notactive
\setbox0\hbox{\ref{Unknown toc ID \number\Etoc@tocid. \space Rerun LaTeX}}%
\global\Etoc@isemptytocfalse
\global\Etoc@stoptoctrue
\gdef\etoclocaltop{-\thr@@}%
\Etoc@tableofcontents
\expandafter\expandafter\expandafter\Etoc@gobtoetoc@
\fi
\else
\global\Etoc@stoptocfalse
\global\Etoc@notactivetrue
\edef\etoc@startlocaltoc##1%
{\noexpand\Etoc@@startlocaltoc{##1}{\Etoc@tocid}}%
\Etoc@tableofcontents
\fi
\@gobble\etoc@
\endgroup\ifEtoc@mustclosegroup\endgroup\fi
\Etoc@tocdepthreset
\Etoc@listofreset
\etocaftertochook
}% \Etoc@localtableofcontents
\def\Etoc@getref #1{%
\@ifundefined{r@#1}
{0}
{\expandafter\Etoc@getref@i\romannumeral-`0%
\expandafter\expandafter\expandafter
\@car\csname r@#1\endcsname0\@nil\@etoc
}%
}
\def\Etoc@getref@i#1#2\@etoc{\ifnum9<1\string#1 #1#2\else 0\fi}
\def\Etoc@ref#1{\Etoc@localtableofcontents{\Etoc@getref{#1}}}
\def\Etoc@label#1{\label{#1}\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
\@firstofone{\def\Etoc@again} {\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
\def\Etoc@dothis #1#2\etoc@ {\fi #1}
\def\Etoc@t@bleofcontents{%
\gdef\etoclocaltop{-\@M}%
\ifx\Etoc@nexttoken\label\Etoc@dothis{\expandafter\Etoc@label\@gobble}\fi
\ifx\Etoc@nexttoken\@sptoken\Etoc@dothis{\Etoc@again}\fi
\ifx\Etoc@nexttoken\ref\Etoc@dothis{\expandafter\Etoc@ref\@gobble}\fi
\ifEtoc@tocwithid\Etoc@dothis{\Etoc@localtableofcontents{\c@etoc@tocid}}\fi
\global\Etoc@isemptytocfalse
\ifEtoc@checksemptiness\Etoc@checkifempty\fi
\ifEtoc@isemptytoc
\ifEtoc@notocifnotoc
\expandafter\expandafter\expandafter\@gobble
\fi
\fi
\Etoc@tableofcontents
\endgroup
\ifEtoc@mustclosegroup\endgroup\fi
\Etoc@tocdepthreset
\Etoc@listofreset
\etocaftertochook
\@gobble\etoc@
}% \Etoc@t@bleofcontents
\def\Etoc@table@fcontents{%
\refstepcounter{etoc@tocid}%
\Etoc@tocwithidfalse
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents
}
\def\Etoc@localtable@fcontents{%
\refstepcounter{etoc@tocid}%
\addtocontents{toc}{\string\etoc@startlocaltoc{\the\c@etoc@tocid}}%
\Etoc@tocwithidtrue
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents
}
\def\etoctableofcontents{%
\Etoc@openouttoc
\Etoc@tocdepthset
\begingroup
\@ifstar
{\let\Etoc@aftertitlehook\@empty\Etoc@table@fcontents}
{\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@table@fcontents}%
}% \etoctableofcontents
\def\etocifisstarred{\ifx\Etoc@aftertitlehook\@empty
\expandafter\@firstoftwo\else
\expandafter\@secondoftwo
\fi}
\let\etocoriginaltableofcontents\tableofcontents
\let\tableofcontents\etoctableofcontents
\let\Etoc@listofhook\@empty
\newcommand*\localtableofcontents{%
\Etoc@openouttoc
\Etoc@tocdepthset
\begingroup
\Etoc@listofhook
\@ifstar
{\let\Etoc@aftertitlehook\@empty\Etoc@localtable@fcontents}
{\def\Etoc@aftertitlehook{\etocaftertitlehook}\Etoc@localtable@fcontents}%
}% \localtableofcontents
\newcommand*\localtableofcontentswithrelativedepth[1]{%
\def\Etoc@@startlocaltochook{%
\global\c@tocdepth\numexpr\etoclocaltop+#1\relax
}%
\def\Etoc@listofreset{\let\Etoc@@startlocaltochook\@empty
\let\Etoc@listofreset\@empty}%
\localtableofcontents
}% \localtableofcontentswithrelativedepth
\newcommand\etocsettocstyle[2]{%
\Etoc@etocstylefalse
\Etoc@classstylefalse
\def\Etoc@tableofcontents@user@before{#1}%
\def\Etoc@tableofcontents@user@after {#2}%
}%
\def\etocstoretocstyleinto#1{%
%% \@ifdefinable#1{%
\edef#1{\noexpand\Etoc@etocstylefalse\noexpand\Etoc@classstylefalse
\def\noexpand\Etoc@tableofcontents@user@before{%
\unexpanded\expandafter{\Etoc@tableofcontents@user@before}%
}%
\def\noexpand\Etoc@tableofcontents@user@after{%
\unexpanded\expandafter{\Etoc@tableofcontents@user@after}%
}%
}%
%% }%
}%
\def\Etoc@tableofcontents {%
\Etoc@tableofcontents@etoc@before
\ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi
\Etoc@tableofcontents@user@before
\Etoc@tableofcontents@contents
\ifEtoc@localtoc\ifEtoc@etocstyle\expandafter\expandafter\expandafter\@gobble\fi\fi
\Etoc@tableofcontents@user@after
\Etoc@tableofcontents@etoc@after
\@gobble\etoc@
}
\def\Etoc@tableofcontents@etoc@before{%
\ifnum\c@tocdepth>\Etoc@minf
\else
\expandafter\Etoc@gobtoetoc@
\fi
\Etoc@par
\Etoc@beforetitlehook
\etocbeforetitlehook
\Etoc@storetocdepth
\let\Etoc@savedcontentsline\contentsline
\let\contentsline\Etoc@etoccontentsline
\ifEtoc@standardlines
\else
\def\Etoc@do##1{%
\expandafter\def\csname etocsaved##1tocline\endcsname
{\PackageError{etoc}{%
\expandafter\string\csname etocsaved##1tocline\endcsname\space
has been deprecated\MessageBreak
at 1.1a and is removed at 1.2.\MessageBreak
Use \expandafter\string\csname l@##1\endcsname\space directly.\MessageBreak
Reported \on@line}%
{I will use \expandafter\string
\csname l@##1\endcsname\space myself for this time.%
}%
\csname l@##1\endcsname
}%
}%
\Etoc@dolevels
\fi
}%
\def\Etoc@tableofcontents@contents{%
\Etoc@tocdepthset
\ifEtoc@parskip\parskip\z@skip\fi
\Etoc@aftertitlehook
\gdef\etoclocaltop{-\thr@@}%
\Etoc@toctoc
\etocaftercontentshook
}%
\def\Etoc@tableofcontents@etoc@after{%
\@nobreakfalse
\Etoc@restoretocdepth
\ifx\Etoc@global\global
\@ifundefined{tof@finish}
{}
{\ifx\tof@finish\@empty
\else
\global\let\contentsline\Etoc@savedcontentsline
\fi
}%
\fi
}
\def\etocsetstyle#1{\ifcsname Etoc@#1@@\endcsname
\expandafter\Etoc@setstyle@a
\else
\expandafter\Etoc@setstyle@error
\fi {#1}%
}
\def\Etoc@setstyle@error #1{%
\PackageWarning{etoc}{`#1' is unknown to etoc. \space Did you\MessageBreak
forget some \string\etocsetlevel{#1}{<level>}?\MessageBreak
Reported}%
\@gobblefour
}
\def\Etoc@setstyle@a #1{%
\edef\Etoc@tmp{\the\numexpr\csname Etoc@#1@@\endcsname}%
\if1\unless\ifnum\Etoc@tmp<\Etoc@maxlevel 0\fi
\unless\ifnum\Etoc@tmp>\Etoc@minf 0\fi1%
\Etoc@standardlinesfalse
\expandafter\Etoc@setstyle@b\expandafter\Etoc@tmp
\else
\ifnum\Etoc@tmp=\Etoc@maxlevel
\in@{.#1,}{.figure,.table,}%
\ifin@
\PackageWarning{etoc}
{You can not use \string\etocsetstyle\space with `#1'.\MessageBreak
Check the package documentation (in particular about\MessageBreak
\string\etoclocallistoffigureshook/\string\etoclocallistoftableshook)%
\MessageBreak on how to customize
figure and table entries in local\MessageBreak lists. Reported}%
\else
\PackageInfo{etoc}
{Attempt to set the style of `#1',\MessageBreak
whose level is currently the maximal one \etocthemaxlevel,\MessageBreak
which is never displayed. \space This will be ignored\MessageBreak
but note that we do quit compatibility mode.\MessageBreak
Reported}%
\Etoc@standardlinesfalse
\fi
\else
\PackageWarning{etoc}{This should not happen. Reported}%
\fi
\expandafter\@gobblefour
\fi
}
\long\def\Etoc@setstyle@b#1#2#3#4#5{%
\expandafter\def\csname Etoc@begin@#1\endcsname {#2}%
\expandafter\def\csname Etoc@prefix@#1\endcsname {#3}%
\expandafter\def\csname Etoc@contents@#1\endcsname {#4}%
\expandafter\def\csname Etoc@end@#1\endcsname {#5}%
}
\def\Etoc@setstyle@e#1{%
\expandafter\let\csname Etoc@begin@#1\endcsname \@empty
\expandafter\let\csname Etoc@prefix@#1\endcsname \@empty
\expandafter\let\csname Etoc@contents@#1\endcsname \@empty
\expandafter\let\csname Etoc@end@#1\endcsname \@empty
}
\def\Etoc@storelines@a#1{%
\noexpand\Etoc@setstyle@b{#1}%
{\expandafter\Etoc@expandonce\csname Etoc@begin@#1\endcsname}%
{\expandafter\Etoc@expandonce\csname Etoc@prefix@#1\endcsname}%
{\expandafter\Etoc@expandonce\csname Etoc@contents@#1\endcsname}%
{\expandafter\Etoc@expandonce\csname Etoc@end@#1\endcsname}%
}
\def\Etoc@expandonce#1{\unexpanded\expandafter{#1}}
\def\etocstorelinestylesinto#1{%
\edef#1{\Etoc@storelines@a{-2}\Etoc@storelines@a{-1}\Etoc@storelines@a{0}%
\Etoc@storelines@a {1}\Etoc@storelines@a {2}\Etoc@storelines@a{3}%
\Etoc@storelines@a {4}\Etoc@storelines@a {5}%
\ifEtoc@deeplevels
\Etoc@storelines@a{6}\Etoc@storelines@a{7}\Etoc@storelines@a{8}%
\Etoc@storelines@a{9}\Etoc@storelines@a{10}\Etoc@storelines@a{11}%
\fi
}%
}
\def\etocstorethislinestyleinto#1#2{%
\edef#2{\expandafter\Etoc@storelines@a\expandafter{\number\etoclevel{#1}}}%
}%
\def\etocfontminustwo {\normalfont \LARGE \bfseries}
\def\etocfontminusone {\normalfont \large \bfseries}
\def\etocfontzero {\normalfont \large \bfseries}
\def\etocfontone {\normalfont \normalsize \bfseries}
\def\etocfonttwo {\normalfont \normalsize}
\def\etocfontthree {\normalfont \footnotesize}
\def\etocsepminustwo {4ex \@plus .5ex \@minus .5ex}
\def\etocsepminusone {4ex \@plus .5ex \@minus .5ex}
\def\etocsepzero {2.5ex \@plus .4ex \@minus .4ex}
\def\etocsepone {1.5ex \@plus .3ex \@minus .3ex}
\def\etocseptwo {.5ex \@plus .1ex \@minus .1ex}
\def\etocsepthree {.25ex \@plus .05ex \@minus .05ex}
\def\etocbaselinespreadminustwo {1}
\def\etocbaselinespreadminusone {1}
\def\etocbaselinespreadzero {1}
\def\etocbaselinespreadone {1}
\def\etocbaselinespreadtwo {1}
\def\etocbaselinespreadthree {.9}
\def\etocminustwoleftmargin {1.5em plus 0.5fil}
\def\etocminustworightmargin {1.5em plus -0.5fil}
\def\etocminusoneleftmargin {1em}
\def\etocminusonerightmargin {1em}
\def\etoctoclineleaders
{\hbox{\normalfont\normalsize\hb@xt@2ex {\hss.\hss}}}
\def\etocabbrevpagename {p.~}
\def\etocpartname {Part}
\def\etocbookname {Book}
\def\etocdefaultlines{%
\Etoc@standardlinesfalse
\etocdefaultlines@setbook
\etocdefaultlines@setpart
\etocdefaultlines@setchapter
\etocdefaultlines@setsection
\etocdefaultlines@setsubsection
\etocdefaultlines@setsubsubsection
\etocdefaultlines@setdeeperones
}
\def\etocnoprotrusion{\leavevmode\kern-\p@\kern\p@}
\@ifclassloaded{memoir}{%
\def\etocdefaultlines@setbook{%
\Etoc@setstyle@b
{-2}%
{\addpenalty\@M\etocskipfirstprefix}
{\addpenalty\@secpenalty}
{\begingroup
\etocfontminustwo
\addvspace{\etocsepminustwo}%
\parindent \z@
\leftskip \etocminustwoleftmargin
\rightskip \etocminustworightmargin
\parfillskip \@flushglue
\vbox{\etocifnumbered{\etoclink{\etocbookname\enspace\etocthenumber:\quad}}{}%
\etocname
\baselineskip\etocbaselinespreadminustwo\baselineskip
\par}%
\addpenalty\@M\addvspace{\etocsepminusone}%
\endgroup}
{}%
}
}{\let\etocdefaultlines@setbook\@empty}
\def\etocdefaultlines@setpart{%
\Etoc@setstyle@b
{-1}%
{\addpenalty\@M\etocskipfirstprefix}
{\addpenalty\@secpenalty}
{\begingroup
\etocfontminusone
\addvspace{\etocsepminusone}%
\parindent \z@
\leftskip \etocminusoneleftmargin
\rightskip \etocminusonerightmargin
\parfillskip \@flushglue
\vbox{\etocifnumbered{\etoclink{\etocpartname\enspace\etocthenumber.\quad}}{}%
\etocname
\baselineskip\etocbaselinespreadminusone\baselineskip
\par}%
\addpenalty\@M\addvspace{\etocsepzero}%
\endgroup}
{}%
}
\def\etocdefaultlines@setchapter{%
\Etoc@setstyle@b
{0}%
{\addpenalty\@M\etocskipfirstprefix}
{\addpenalty\@itempenalty}
{\begingroup
\etocfontzero
\addvspace{\etocsepzero}%
\parindent \z@ \parfillskip \@flushglue
\vbox{\etocifnumbered{\etocnumber.\enspace}{}\etocname
\baselineskip\etocbaselinespreadzero\baselineskip
\par}%
\endgroup}
{\addpenalty{-\@highpenalty}\addvspace{\etocsepminusone}}%
}
\def\etocdefaultlines@setsection{%
\Etoc@setstyle@b
{1}%
{\addpenalty\@M\etocskipfirstprefix}
{\addpenalty\@itempenalty}
{\begingroup
\etocfontone
\addvspace{\etocsepone}%
\parindent \z@ \parfillskip \z@
\setbox\z@\vbox{\parfillskip\@flushglue
\etocname\par
\setbox\tw@\lastbox
\global\setbox\@ne\hbox{\unhbox\tw@\ }}%
\dimen\z@=\wd\@ne
\setbox\z@=\etoctoclineleaders
\advance\dimen\z@\wd\z@
\etocifnumbered
{\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}}
{\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}%
\advance\dimen\z@\wd\tw@
\ifdim\dimen\z@ < \linewidth
\vbox{\etocname~%
\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadone\baselineskip
\par}%
\else
\vbox{\etocname~%
\leaders\copy\z@\hfil\break
\hbox{}\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadone\baselineskip
\par}%
\fi
\endgroup}
{\addpenalty\@secpenalty\addvspace{\etocsepzero}}%
}
\def\etocdefaultlines@setsubsection{%
\Etoc@setstyle@b
{2}%
{\addpenalty\@medpenalty\etocskipfirstprefix}
{\addpenalty\@itempenalty}
{\begingroup
\etocfonttwo
\addvspace{\etocseptwo}%
\parindent \z@ \parfillskip \z@
\setbox\z@\vbox{\parfillskip\@flushglue
\etocname\par\setbox\tw@\lastbox
\global\setbox\@ne\hbox{\unhbox\tw@}}%
\dimen\z@=\wd\@ne
\setbox\z@=\etoctoclineleaders
\advance\dimen\z@\wd\z@
\etocifnumbered
{\setbox\tw@\hbox{\etocnumber, \etocabbrevpagename\etocpage\etocnoprotrusion}}
{\setbox\tw@\hbox{\etocabbrevpagename\etocpage\etocnoprotrusion}}%
\advance\dimen\z@\wd\tw@
\ifdim\dimen\z@ < \linewidth
\vbox{\etocname~%
\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadtwo\baselineskip
\par}%
\else
\vbox{\etocname~%
\leaders\copy\z@\hfil\break
\hbox{}\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadtwo\baselineskip
\par}%
\fi
\endgroup}
{\addpenalty\@secpenalty\addvspace{\etocsepone}}%
}
\def\etocdefaultlines@setsubsubsection{%
\Etoc@setstyle@b
{3}%
{\addpenalty\@M
\etocfontthree
\vspace{\etocsepthree}%
\noindent
\etocskipfirstprefix}
{\allowbreak\,--\,}
{\etocname}
{.\hfil
\begingroup
\baselineskip\etocbaselinespreadthree\baselineskip
\par
\endgroup
\addpenalty{-\@highpenalty}}
}
\def\etocdefaultlines@setdeeperones{%
\Etoc@setstyle@e{4}%
\Etoc@setstyle@e{5}%
\ifEtoc@deeplevels
\Etoc@setstyle@e{6}%
\Etoc@setstyle@e{7}%
\Etoc@setstyle@e{8}%
\Etoc@setstyle@e{9}%
\Etoc@setstyle@e{10}%
\Etoc@setstyle@e{11}%
\fi
}
\def\etocabovetocskip{3.5ex \@plus 1ex \@minus .2ex}
\def\etocbelowtocskip{3.5ex \@plus 1ex \@minus .2ex}
\def\etoccolumnsep{2em}
\def\etocmulticolsep{0ex}
\def\etocmulticolpretolerance{-1}
\def\etocmulticoltolerance{200}
\def\etocdefaultnbcol{2}
\def\etocinnertopsep{2ex}
\newcommand\etocmulticolstyle[2][\etocdefaultnbcol]{%
\etocsettocstyle
{\let\etocoldpar\par
\addvspace{\etocabovetocskip}%
\ifnum #1>\@ne
\expandafter\@firstoftwo
\else \expandafter\@secondoftwo
\fi
{\multicolpretolerance\etocmulticolpretolerance
\multicoltolerance\etocmulticoltolerance
\setlength{\columnsep}{\etoccolumnsep}%
\setlength{\multicolsep}{\etocmulticolsep}%
\begin{multicols}{#1}[#2\etocoldpar\addvspace{\etocinnertopsep}]}
{#2\ifvmode\else\begingroup\interlinepenalty\@M\parskip\z@skip
\@@par\endgroup
\fi
\nobreak\addvspace{\etocinnertopsep}%
\pretolerance\etocmulticolpretolerance
\tolerance\etocmulticoltolerance}%
}%
{\ifnum #1>\@ne
\expandafter\@firstofone
\else \expandafter\@gobble
\fi
{\end{multicols}}%
\addvspace{\etocbelowtocskip}}%
}
\def\etocinnerbottomsep{3.5ex}
\def\etocinnerleftsep{2em}
\def\etocinnerrightsep{2em}
\def\etoctoprule{\hrule}
\def\etocleftrule{\vrule}
\def\etocrightrule{\vrule}
\def\etocbottomrule{\hrule}
\def\etoctoprulecolorcmd{\relax}
\def\etocbottomrulecolorcmd{\relax}
\def\etocleftrulecolorcmd{\relax}
\def\etocrightrulecolorcmd{\relax}
\def\etoc@ruledheading #1{%
\hb@xt@\linewidth{\color@begingroup
\hss #1\hss\hskip-\linewidth
\etoctoprulecolorcmd\leaders\etoctoprule\hss
\phantom{#1}%
\leaders\etoctoprule\hss\color@endgroup}%
\nointerlineskip\nobreak\vskip\etocinnertopsep}
\newcommand*\etocruledstyle[2][\etocdefaultnbcol]{%
\etocsettocstyle
{\addvspace{\etocabovetocskip}%
\ifnum #1>\@ne
\expandafter\@firstoftwo
\else \expandafter\@secondoftwo
\fi
{\multicolpretolerance\etocmulticolpretolerance
\multicoltolerance\etocmulticoltolerance
\setlength{\columnsep}{\etoccolumnsep}%
\setlength{\multicolsep}{\etocmulticolsep}%
\begin{multicols}{#1}[\etoc@ruledheading{#2}]}
{\etoc@ruledheading{#2}%
\pretolerance\etocmulticolpretolerance
\tolerance\etocmulticoltolerance}}
{\ifnum #1>\@ne\expandafter\@firstofone
\else \expandafter\@gobble
\fi
{\end{multicols}}%
\addvspace{\etocbelowtocskip}}}
\def\etocframedmphook{\relax}
\long\def\etocbkgcolorcmd{\relax}
\long\def\Etoc@relax{\relax}
\newbox\etoc@framed@titlebox
\newbox\etoc@framed@contentsbox
\newcommand*\etocframedstyle[2][\etocdefaultnbcol]{%
\etocsettocstyle{%
\addvspace{\etocabovetocskip}%
\sbox\z@{#2}%
\dimen\z@\dp\z@
\ifdim\wd\z@<\linewidth \dp\z@\z@ \else \dimen\z@\z@ \fi
\setbox\etoc@framed@titlebox=\hb@xt@\linewidth{\color@begingroup
\hss
\ifx\etocbkgcolorcmd\Etoc@relax
\else
\sbox\tw@{\color{white}%
\vrule\@width\wd\z@\@height\ht\z@\@depth\dimen\z@}%
\ifdim\wd\z@<\linewidth \dp\tw@\z@\fi
\box\tw@
\hskip-\wd\z@
\fi
\copy\z@
\hss
\hskip-\linewidth
\etoctoprulecolorcmd\leaders\etoctoprule\hss
\hskip\wd\z@
\etoctoprulecolorcmd\leaders\etoctoprule\hss\color@endgroup}%
\setbox\z@\hbox{\etocleftrule\etocrightrule}%
\dimen\tw@\linewidth\advance\dimen\tw@-\wd\z@
\advance\dimen\tw@-\etocinnerleftsep
\advance\dimen\tw@-\etocinnerrightsep
\setbox\etoc@framed@contentsbox=\vbox\bgroup
\hsize\dimen\tw@
\kern\dimen\z@
\vskip\etocinnertopsep
\hbox\bgroup
\begin{minipage}{\hsize}%
\etocframedmphook
\ifnum #1>\@ne
\expandafter\@firstoftwo
\else \expandafter\@secondoftwo
\fi
{\multicolpretolerance\etocmulticolpretolerance
\multicoltolerance\etocmulticoltolerance
\setlength{\columnsep}{\etoccolumnsep}%
\setlength{\multicolsep}{\etocmulticolsep}%
\begin{multicols}{#1}}
{\pretolerance\etocmulticolpretolerance
\tolerance\etocmulticoltolerance}}
{\ifnum #1>\@ne\expandafter\@firstofone
\else \expandafter\@gobble
\fi
{\end{multicols}\unskip }%
\end{minipage}%
\egroup
\vskip\etocinnerbottomsep
\egroup
\vbox{\hsize\linewidth
\ifx\etocbkgcolorcmd\Etoc@relax
\else
\kern\ht\etoc@framed@titlebox
\kern\dp\etoc@framed@titlebox
\hb@xt@\linewidth{\color@begingroup
\etocleftrulecolorcmd\etocleftrule
\etocbkgcolorcmd
\leaders\vrule
\@height\ht\etoc@framed@contentsbox
\@depth\dp\etoc@framed@contentsbox
\hss
\etocrightrulecolorcmd\etocrightrule
\color@endgroup}\nointerlineskip
\vskip-\dp\etoc@framed@contentsbox
\vskip-\ht\etoc@framed@contentsbox
\vskip-\dp\etoc@framed@titlebox
\vskip-\ht\etoc@framed@titlebox
\fi
\box\etoc@framed@titlebox\nointerlineskip
\hb@xt@\linewidth{\color@begingroup
{\etocleftrulecolorcmd\etocleftrule}%
\hss\box\etoc@framed@contentsbox\hss
\etocrightrulecolorcmd\etocrightrule\color@endgroup}
\nointerlineskip
\vskip\ht\etoc@framed@contentsbox
\vskip\dp\etoc@framed@contentsbox
\hb@xt@\linewidth{\color@begingroup\etocbottomrulecolorcmd
\leaders\etocbottomrule\hss\color@endgroup}}
\addvspace{\etocbelowtocskip}}}
\newcommand\etoc@multicoltoc[2][\etocdefaultnbcol]{%
\etocmulticolstyle[#1]{#2}%
\tableofcontents}
\newcommand\etoc@multicoltoci[2][\etocdefaultnbcol]{%
\etocmulticolstyle[#1]{#2}%
\tableofcontents*}
\newcommand\etoc@local@multicoltoc[2][\etocdefaultnbcol]{%
\etocmulticolstyle[#1]{#2}%
\localtableofcontents}
\newcommand\etoc@local@multicoltoci[2][\etocdefaultnbcol]{%
\etocmulticolstyle[#1]{#2}%
\localtableofcontents*}
\newcommand*\etoc@ruledtoc[2][\etocdefaultnbcol]{%
\etocruledstyle[#1]{#2}%
\tableofcontents}
\newcommand*\etoc@ruledtoci[2][\etocdefaultnbcol]{%
\etocruledstyle[#1]{#2}%
\tableofcontents*}
\newcommand*\etoc@local@ruledtoc[2][\etocdefaultnbcol]{%
\etocruledstyle[#1]{#2}%
\localtableofcontents}
\newcommand*\etoc@local@ruledtoci[2][\etocdefaultnbcol]{%
\etocruledstyle[#1]{#2}%
\localtableofcontents*}
\newcommand*\etoc@framedtoc[2][\etocdefaultnbcol]{%
\etocframedstyle[#1]{#2}%
\tableofcontents}
\newcommand*\etoc@framedtoci[2][\etocdefaultnbcol]{%
\etocframedstyle[#1]{#2}%
\tableofcontents*}
\newcommand*\etoc@local@framedtoc[2][\etocdefaultnbcol]{%
\etocframedstyle[#1]{#2}%
\localtableofcontents}
\newcommand*\etoc@local@framedtoci[2][\etocdefaultnbcol]{%
\etocframedstyle[#1]{#2}%
\localtableofcontents*}
\def\etocmulticol{\begingroup
\Etoc@mustclosegrouptrue
\@ifstar
{\etoc@multicoltoci}
{\etoc@multicoltoc}}
\def\etocruled{\begingroup
\Etoc@mustclosegrouptrue
\@ifstar
{\etoc@ruledtoci}
{\etoc@ruledtoc}}
\def\etocframed{\begingroup
\Etoc@mustclosegrouptrue
\@ifstar
{\etoc@framedtoci}
{\etoc@framedtoc}}
\def\etoclocalmulticol{\begingroup
\Etoc@mustclosegrouptrue
\@ifstar
{\etoc@local@multicoltoci}
{\etoc@local@multicoltoc}}
\def\etoclocalruled{\begingroup
\Etoc@mustclosegrouptrue
\@ifstar
{\etoc@local@ruledtoci}
{\etoc@local@ruledtoc}}
\def\etoclocalframed{\begingroup
\Etoc@mustclosegrouptrue
\@ifstar
{\etoc@local@framedtoci}
{\etoc@local@framedtoc}}
\def\etocmemoirtoctotocfmt #1#2{%
\PackageWarning{etoc}
{\string\etocmemoirtoctotocfmt\space is deprecated.\MessageBreak
Use in its place \string\etocsettoclineforclasstoc,\MessageBreak
and \string\etocsettoclineforclasslistof{toc} (or {lof}, {lot}).
I will do this now.\MessageBreak
Reported}%
\etocsettoclineforclasstoc{#1}{#2}%
\etocsettoclineforclasslistof{toc}{#1}{#2}%
}
\def\etocsettoclineforclasstoc #1#2{%
\def\etocclassmaintocaddtotoc{\etocglobalheadtotoc{#1}{#2}}%
}
\def\etocsettoclineforclasslistof #1#2#3{%
\@namedef{etocclasslocal#1addtotoc}{\etoclocalheadtotoc{#2}{#3}}%
}
\let\etocclasslocaltocaddtotoc\@empty
\let\etocclasslocallofaddtotoc\@empty
\let\etocclasslocallotaddtotoc\@empty
\ifdefined\c@chapter
\def\etocclasslocaltocmaketitle{\section*{\localcontentsname}}
\def\etocclasslocallofmaketitle{\section*{\locallistfigurename}}
\def\etocclasslocallotmaketitle{\section*{\locallisttablename}}
\etocsettoclineforclasstoc {chapter}{\contentsname}
\etocsettoclineforclasslistof{toc}{section}{\localcontentsname}
\etocsettoclineforclasslistof{lof}{section}{\locallistfigurename}
\etocsettoclineforclasslistof{lot}{section}{\locallisttablename}
\else
\def\etocclasslocaltocmaketitle{\subsection*{\localcontentsname}}%
\def\etocclasslocallofmaketitle{\subsection*{\locallistfigurename}}%
\def\etocclasslocallotmaketitle{\subsection*{\locallisttablename}}%
\etocsettoclineforclasstoc {section}{\contentsname}
\etocsettoclineforclasslistof{toc}{subsection}{\localcontentsname}
\etocsettoclineforclasslistof{lof}{subsection}{\locallistfigurename}
\etocsettoclineforclasslistof{lot}{subsection}{\locallisttablename}
\fi
\def\etocclasslocalperhapsaddtotoc #1{%
\etocifisstarred
{}
{\csname ifEtoc@local#1totoc\endcsname
\csname etocclasslocal#1addtotoc\endcsname
\fi
}%
}
\def\etocarticlestyle{%
\etocsettocstyle
{\ifEtoc@localtoc
\@nameuse{etocclasslocal\Etoc@currext maketitle}%
\etocclasslocalperhapsaddtotoc\Etoc@currext
\else
\section *{\contentsname
\@mkboth {\MakeUppercase \contentsname}
{\MakeUppercase \contentsname}}%
\etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}%
\fi
}
{}%
}
\def\etocarticlestylenomarks{%
\etocsettocstyle
{\ifEtoc@localtoc
\@nameuse{etocclasslocal\Etoc@currext maketitle}%
\etocclasslocalperhapsaddtotoc\Etoc@currext
\else
\section *{\contentsname}%
\etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}%
\fi
}
{}%
}
\def\etocbookstyle{%
\etocsettocstyle
{\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi
\ifEtoc@localtoc
\@nameuse{etocclasslocal\Etoc@currext maketitle}%
\etocclasslocalperhapsaddtotoc\Etoc@currext
\else
\chapter *{\contentsname
\@mkboth {\MakeUppercase \contentsname}
{\MakeUppercase \contentsname}}%
\etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}%
\fi
}%
{\if@restonecol \twocolumn \fi}%
}
\def\etocbookstylenomarks{%
\etocsettocstyle
{\if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi
\ifEtoc@localtoc
\@nameuse{etocclasslocal\Etoc@currext maketitle}%
\etocclasslocalperhapsaddtotoc\Etoc@currext
\else
\chapter *{\contentsname}%
\etocifisstarred{}{\etocifmaintoctotoc{\etocclassmaintocaddtotoc}{}}%
\fi
}%
{\if@restonecol \twocolumn \fi}%
}
\let\etocreportstyle\etocbookstyle
\let\etocreportstylenomarks\etocbookstylenomarks
\def\etocmemoirstyle{%
\etocsettocstyle
{\ensureonecol \par \begingroup \phantomsection
\ifx\Etoc@aftertitlehook\@empty
\else
\ifmem@em@starred@listof
\else
\ifEtoc@localtoc
\etocclasslocalperhapsaddtotoc\Etoc@currext
\else
\ifEtoc@maintoctotoc
\etocclassmaintocaddtotoc
\fi
\fi
\fi
\fi
\ifEtoc@localtoc
\@namedef{@\Etoc@currext maketitle}{%
\@nameuse{etocclasslocal\Etoc@currext maketitle}%
}%
\fi
\@nameuse {@\Etoc@currext maketitle} %<< space token here from memoir code
\ifx\Etoc@aftertitlehook\@empty
\else
\Etoc@aftertitlehook \let \Etoc@aftertitlehook \relax
\fi
\parskip \cftparskip \@nameuse {cft\Etoc@currext beforelisthook}%
}%
{\@nameuse {cft\Etoc@currext afterlisthook}%
\endgroup\restorefromonecol
}%
}
\let\Etoc@beforetitlehook\@empty
\if1\@ifclassloaded{scrartcl}0{\@ifclassloaded{scrbook}0{\@ifclassloaded{scrreprt}01}}%
\expandafter\@gobble
\else
\ifdefined\setuptoc
\def\Etoc@beforetitlehook{%
\ifEtoc@localtoc
\etocclasslocalperhapsaddtotoc\Etoc@currext
\setuptoc{\Etoc@currext}{leveldown}%
\else
\etocifisstarred{}{\etocifmaintoctotoc{\setuptoc{toc}{totoc}}}%
\fi
}%
\fi
\expandafter\@firstofone
\fi
{\def\etocclasslocalperhapsaddtotoc #1{%
\etocifisstarred
{}%
{\csname ifEtoc@local#1totoc\endcsname
\setuptoc{\Etoc@currext}{totoc}%
\fi
}%
}%
}
\ifdefined\Iftocfeature
\def\etoc@Iftocfeature{\Iftocfeature}%
\else
\def\etoc@Iftocfeature{\iftocfeature}%
\fi
\def\etocscrartclstyle{%
\etocsettocstyle
{\ifx\Etoc@currext\Etoc@tocext
\expandafter\@firstofone
\else
\expandafter\@gobble
\fi
{\let\if@dynlist\if@tocleft}%
\edef\@currext{\Etoc@currext}%
\@ifundefined{listof\@currext name}%
{\def\list@fname{\listofname~\@currext}}%
{\expandafter\let\expandafter\list@fname
\csname listof\@currext name\endcsname}%
\etoc@Iftocfeature {\@currext}{onecolumn}
{\etoc@Iftocfeature {\@currext}{leveldown}
{}
{\if@twocolumn \aftergroup \twocolumn \onecolumn \fi }}
{}%
\etoc@Iftocfeature {\@currext}{numberline}%
{\def \nonumberline {\numberline {}}}{}%
\expandafter\tocbasic@listhead\expandafter {\list@fname}%
\begingroup \expandafter \expandafter \expandafter
\endgroup \expandafter
\ifx
\csname microtypesetup\endcsname \relax
\else
\etoc@Iftocfeature {\@currext}{noprotrusion}{}
{\microtypesetup {protrusion=false}%
\PackageInfo {tocbasic}%
{character protrusion at \@currext\space deactivated}}%
\fi
\etoc@Iftocfeature{\@currext}{noparskipfake}{}{%
\ifvmode \@tempskipa\lastskip \vskip-\lastskip
\addtolength{\@tempskipa}{\parskip}\vskip\@tempskipa\fi
}%
\setlength {\parskip }{\z@ }%
\setlength {\parindent }{\z@ }%
\setlength {\parfillskip }{\z@ \@plus 1fil}%
\csname tocbasic@@before@hook\endcsname
\csname tb@\@currext @before@hook\endcsname
}% end of before_toc
{% start of after_toc
\providecommand\tocbasic@end@toc@file{}\tocbasic@end@toc@file
\edef\@currext{\Etoc@currext}%
\csname tb@\@currext @after@hook\endcsname
\csname tocbasic@@after@hook\endcsname
}% end of after_toc
}
\let\etocscrbookstyle\etocscrartclstyle
\let\etocscrreprtstyle\etocscrartclstyle
\def\etocclasstocstyle{\etocarticlestyle}
\newcommand*\etocmarkboth[1]{%
\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}
\newcommand*\etocmarkbothnouc[1]{\@mkboth{#1}{#1}}
\newcommand\etoctocstyle[3][section]{\etocmulticolstyle[#2]%
{\csname #1\endcsname *{#3}}}
\newcommand\etoctocstylewithmarks[4][section]{\etocmulticolstyle[#2]%
{\csname #1\endcsname *{#3\etocmarkboth{#4}}}}
\newcommand\etoctocstylewithmarksnouc[4][section]{\etocmulticolstyle[#2]%
{\csname #1\endcsname *{#3\etocmarkbothnouc{#4}}}}
\def\Etoc@redefetocstylesforchapters{%
\renewcommand\etoctocstylewithmarks[4][chapter]{%
\etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkboth{##4}}}%
}
\renewcommand\etoctocstylewithmarksnouc[4][chapter]{%
\etocmulticolstyle[##2]{\csname ##1\endcsname *{##3\etocmarkbothnouc{##4}}}%
}
\renewcommand\etoctocstyle[3][chapter]{%
\etocmulticolstyle[##2]{\csname ##1\endcsname *{##3}}
}
}
\@ifclassloaded{scrartcl}
{\renewcommand*\etocclasstocstyle{\etocscrartclstyle}}{}
\@ifclassloaded{book}
{\renewcommand*\etocfontone{\normalfont\normalsize}
\renewcommand*\etocclasstocstyle{\etocbookstyle}
\Etoc@redefetocstylesforchapters}{}
\@ifclassloaded{report}
{\renewcommand*\etocfontone{\normalfont\normalsize}
\renewcommand*\etocclasstocstyle{\etocreportstyle}
\Etoc@redefetocstylesforchapters}{}
\@ifclassloaded{scrbook}
{\renewcommand*\etocfontone{\normalfont\normalsize}
\renewcommand*\etocclasstocstyle{\etocscrbookstyle}
\Etoc@redefetocstylesforchapters}{}
\@ifclassloaded{scrreprt}
{\renewcommand*\etocfontone{\normalfont\normalsize}
\renewcommand*\etocclasstocstyle{\etocscrreprtstyle}
\Etoc@redefetocstylesforchapters}{}
\@ifclassloaded{memoir}
{\renewcommand*\etocfontone{\normalfont\normalsize}
\renewcommand*\etocclasstocstyle{\etocmemoirstyle}
\Etoc@redefetocstylesforchapters}{}
\def\etoctocloftstyle {%
\etocsettocstyle{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\cftparskip
\@nameuse{@cftmake\Etoc@currext title}%
\ifEtoc@localtoc
\etoctocloftlocalperhapsaddtotoc\Etoc@currext
\else
\etocifisstarred {}{\ifEtoc@maintoctotoc\@cftdobibtoc\fi}%
\fi
}%
{%
\endgroup
\@cfttocfinish
}%
}
\def\etoctocloftlocalperhapsaddtotoc#1{%
\etocifisstarred
{}%
{\csname ifEtoc@local#1totoc\endcsname
\ifdefined\c@chapter\def\@tocextra{@section}\else\def\@tocextra{@subsection}\fi
\csname @cftdobib#1\endcsname
\fi
}%
}
\def\etoctocbibindstyle {%
\etocsettocstyle {%
\toc@start
\ifEtoc@localtoc
\@nameuse{etocclasslocal\Etoc@currext maketitle}%
\etocclasslocalperhapsaddtotoc\Etoc@currext
\else
\etoc@tocbibind@dotoctitle
\fi
}%
{\toc@finish}%
}
\def\etoc@tocbibind@dotoctitle {%
\if@bibchapter
\etocifisstarred
{\chapter*{\contentsname}\prw@mkboth{\contentsname} % id.
}%
{\ifEtoc@maintoctotoc
\toc@chapter{\contentsname} %<-space from original
\else
\chapter*{\contentsname}\prw@mkboth{\contentsname} % id.
\fi
}%
\else
\etocifisstarred
{\@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} %<-space
}
{\ifEtoc@maintoctotoc
\toc@section{\@tocextra}{\contentsname} %<-space from original
\else
\@nameuse{\@tocextra}*{\contentsname\prw@mkboth{\contentsname}} % id.
\fi
}%
\fi
}%
\@ifclassloaded{memoir}
{}
{% memoir not loaded
\@ifpackageloaded{tocloft}
{\if@cftnctoc\else
\ifEtoc@keeporiginaltoc
\else
\AtBeginDocument{\let\tableofcontents\etoctableofcontents}%
\fi
\fi }
{\AtBeginDocument
{\@ifpackageloaded{tocloft}
{\if@cftnctoc\else
\PackageWarningNoLine {etoc}
{Package `tocloft' was loaded after `etoc'.\MessageBreak
To prevent it from overwriting \protect\tableofcontents, it will\MessageBreak
be tricked into believing to have been loaded with its\MessageBreak
option `titles'. \space But this will cause the `tocloft'\MessageBreak
customization of the titles of the main list of figures\MessageBreak
and list of tables to not apply either.\MessageBreak
You should load `tocloft' before `etoc'.}%
\AtEndDocument{\PackageWarning{etoc}
{Please load `tocloft' before `etoc'!\@gobbletwo}}%
\fi
\@cftnctoctrue }%
{}%
}%
}%
}
\@ifclassloaded{memoir}
{}
{% memoir not loaded
\AtBeginDocument{%
\@ifpackageloaded{tocloft}
{%
\def\etocclasstocstyle{%
\etoctocloftstyle
\Etoc@classstyletrue
}%
\ifEtoc@etocstyle
\ifEtoc@classstyle
\etocclasstocstyle
\Etoc@etocstyletrue
\fi
\else
\ifEtoc@classstyle
\etocclasstocstyle
\fi
\fi
}%
{% no tocloft
\@ifpackageloaded {tocbibind}
{\if@dotoctoc
\def\etocclasstocstyle{%
\etoctocbibindstyle
\Etoc@classstyletrue
}%
\ifEtoc@etocstyle
\ifEtoc@classstyle
\etocclasstocstyle
\Etoc@etocstyletrue
\fi
\else
\ifEtoc@classstyle
\etocclasstocstyle
\fi
\fi
\ifEtoc@keeporiginaltoc
\else
\let\tableofcontents\etoctableofcontents
\fi
}%
{}%
}%
\@ifpackageloaded{tocbibind}
{% tocbibind, perhaps with tocloft
\if@dotoctoc
\ifEtoc@keeporiginaltoc
\else
\let\tableofcontents\etoctableofcontents
\fi
\etocsetup{maintoctotoc,localtoctotoc}%
\PackageInfo{etoc}{%
Setting (or re-setting) the options `maintoctotoc' and\MessageBreak
`localtoctotoc' to true as tocbibind was detected and\MessageBreak
found to be configured for `TOC to toc'.\MessageBreak
Reported at begin document}%
\fi
\if@dotoclof
\ifEtoc@lof
\etocsetup{localloftotoc}%
\PackageInfo{etoc}{%
Setting (or re-setting) `localloftotoc=true' as the\MessageBreak
package tocbibind was detected and is configured for\MessageBreak
`LOF to toc'. Reported at begin document}%
\fi
\fi
\if@dotoclot
\ifEtoc@lot
\etocsetup{locallottotoc}%
\PackageInfo{etoc}{%
Setting (or re-setting) `locallottotoc=true' as the\MessageBreak
package tocbibind was detected and is configured for\MessageBreak
`LOT to toc'. Reported at begin document}%
\fi
\fi
}% end of tocbibind branch
{}%
}% end of at begin document
}% end of not with memoir branch
\def\Etoc@addtocontents #1#2{%
\addtocontents {toc}{%
\protect\contentsline{#1}{#2}{\thepage}{\ifEtoc@hyperref\@currentHref\fi}%
\ifdefined\protected@file@percent\protected@file@percent\fi
}%
}
\def\Etoc@addcontentsline@ #1#2#3{%
\@namedef{toclevel@#1}{#3}\addcontentsline {toc}{#1}{#2}%
}
\DeclareRobustCommand*{\etoctoccontentsline}
{\@ifstar{\Etoc@addcontentsline@}{\Etoc@addtocontents}}
\def\Etoc@addtocontents@immediately#1#2{%
\begingroup
\let\Etoc@originalwrite\write
\def\write{\immediate\Etoc@originalwrite}%
\Etoc@addtocontents{#1}{#2}%
\endgroup
}
\def\Etoc@addcontentsline@@immediately#1#2#3{%
\begingroup
\let\Etoc@originalwrite\write
\def\write{\immediate\Etoc@originalwrite}%
\Etoc@addcontentsline@{#1}{#2}{#3}%
\endgoroup
}
\DeclareRobustCommand*{\etocimmediatetoccontentsline}
{\@ifstar{\Etoc@addcontentsline@@immediately}{\Etoc@addtocontents@immediately}}
\def\Etoc@storetocdepth {\xdef\Etoc@savedtocdepth{\number\c@tocdepth}}
\def\Etoc@restoretocdepth {\global\c@tocdepth\Etoc@savedtocdepth\relax}
\def\etocobeytoctocdepth {\def\etoc@settocdepth
{\afterassignment\Etoc@@nottoodeep \global\c@tocdepth}}
\def\Etoc@@nottoodeep {\ifnum\Etoc@savedtocdepth<\c@tocdepth
\global\c@tocdepth\Etoc@savedtocdepth\relax\fi }
\def\etocignoretoctocdepth {\let\etoc@settocdepth\@gobble }
\def\etocsettocdepth {\futurelet\Etoc@nexttoken\Etoc@set@tocdepth }
\def\Etoc@set@tocdepth {\ifx\Etoc@nexttoken\bgroup
\expandafter\Etoc@set@tocdepth@
\else\expandafter\Etoc@set@toctocdepth
\fi }
\def\Etoc@set@tocdepth@ #1{\@ifundefined {Etoc@#1@@}
{\PackageWarning{etoc}
{Unknown sectioning unit #1, \protect\etocsettocdepth\space ignored}}
{\global\c@tocdepth\csname Etoc@#1@@\endcsname}%
}
\def\Etoc@set@toctocdepth #1#{\Etoc@set@toctocdepth@ }
\def\Etoc@set@toctocdepth@ #1{%
\@ifundefined{Etoc@#1@@}%
{\PackageWarning{etoc}
{Unknown sectioning depth #1, \protect\etocsettocdepth.toc ignored}}%
{\addtocontents {toc}
{\protect\etoc@settocdepth\expandafter\protect\csname Etoc@#1@@\endcsname}}%
}
\def\etocimmediatesettocdepth #1#{\Etoc@set@toctocdepth@immediately}
\def\Etoc@set@toctocdepth@immediately #1{%
\@ifundefined{Etoc@#1@@}%
{\PackageWarning{etoc}
{Unknown sectioning depth #1, \protect\etocimmediatesettocdepth.toc ignored}}%
{\begingroup
\let\Etoc@originalwrite\write
\def\write{\immediate\Etoc@originalwrite}%
\addtocontents {toc}
{\protect\etoc@settocdepth\expandafter\protect
\csname Etoc@#1@@\endcsname}%
\endgroup
}%
}
\def\etocdepthtag #1#{\Etoc@depthtag }
\def\Etoc@depthtag #1{\addtocontents {toc}{\protect\etoc@depthtag {#1}}}
\def\etocimmediatedepthtag #1#{\Etoc@depthtag@immediately }
\def\Etoc@depthtag@immediately #1{%
\begingroup
\let\Etoc@originalwrite\write
\def\write{\immediate\Etoc@originalwrite}%
\addtocontents {toc}{\protect\etoc@depthtag {#1}}%
\endgroup
}
\def\etocignoredepthtags {\let\etoc@depthtag \@gobble }
\def\etocobeydepthtags {\let\etoc@depthtag \Etoc@depthtag@ }
\def\Etoc@depthtag@ #1{\@ifundefined{Etoc@depthof@#1}%
{}% ignore in silence if tag has no associated depth
{\afterassignment\Etoc@@nottoodeep
\global\c@tocdepth\csname Etoc@depthof@#1\endcsname}%
}
\def\etocsettagdepth #1#2{\@ifundefined{Etoc@#2@@}%
{\PackageWarning{etoc}
{Unknown sectioning depth #2, \protect\etocsettagdepth\space ignored}}%
{\@namedef{Etoc@depthof@#1}{\@nameuse{Etoc@#2@@}}}%
}
\def\Etoc@tocvsec@err #1{\PackageError {etoc}
{The command \protect#1\space is incompatible with `etoc'}
{Use \protect\etocsettocdepth.toc as replacement}%
}%
\AtBeginDocument {%
\@ifclassloaded{memoir}
{\PackageInfo {etoc}
{Regarding `memoir' class command \protect\settocdepth, consider\MessageBreak
\protect\etocsettocdepth.toc as a drop-in replacement with more\MessageBreak
capabilities (see `etoc' manual). \space
Also, \protect\etocsettocdepth\MessageBreak
and \protect\etocsetnexttocdepth\space should be used in place of\MessageBreak
`memoir' command \protect\maxtocdepth\@gobble}%
}%
{\@ifpackageloaded {tocvsec2}{%
\def\maxtocdepth #1{\Etoc@tocvsec@err \maxtocdepth }%
\def\settocdepth #1{\Etoc@tocvsec@err \settocdepth }%
\def\resettocdepth {\@ifstar {\Etoc@tocvsec@err \resettocdepth }%
{\Etoc@tocvsec@err \resettocdepth }%
}%
\def\save@tocdepth #1#2#3{}%
\let\reset@tocdepth\relax
\let\remax@tocdepth\relax
\let\tableofcontents\etoctableofcontents
\PackageWarningNoLine {etoc}
{Package `tocvsec2' detected and its modification of\MessageBreak
\protect\tableofcontents\space reverted. \space Use
\protect\etocsettocdepth.toc\MessageBreak as a replacement
for `tocvsec2' toc-related commands}%
}% tocvsec2 loaded
{}% tocvsec2 not loaded
}%
}%
\def\invisibletableofcontents {\etocsetnexttocdepth {-3}\tableofcontents }%
\def\invisiblelocaltableofcontents
{\etocsetnexttocdepth {-3}\localtableofcontents }%
\def\etocsetnexttocdepth #1{%
\@ifundefined{Etoc@#1@@}
{\PackageWarning{etoc}
{Unknown sectioning unit #1, \protect\etocsetnextocdepth\space ignored}}
{\Etoc@setnexttocdepth{\csname Etoc@#1@@\endcsname}}%
}%
\def\Etoc@setnexttocdepth#1{%
\def\Etoc@tocdepthset{%
\Etoc@tocdepthreset
\edef\Etoc@tocdepthreset {%
\global\c@tocdepth\the\c@tocdepth\space
\global\let\noexpand\Etoc@tocdepthreset\noexpand\@empty
}%
\global\c@tocdepth#1%
\global\let\Etoc@tocdepthset\@empty
}%
}%
\let\Etoc@tocdepthreset\@empty
\let\Etoc@tocdepthset \@empty
\def\etocsetlocaltop #1#{\Etoc@set@localtop}%
\def\Etoc@set@localtop #1{%
\@ifundefined{Etoc@#1@@}%
{\PackageWarning{etoc}
{Unknown sectioning depth #1, \protect\etocsetlocaltop.toc ignored}}%
{\addtocontents {toc}
{\protect\etoc@setlocaltop\expandafter\protect\csname Etoc@#1@@\endcsname}}%
}%
\def\etocimmediatesetlocaltop #1#{\Etoc@set@localtop@immediately}%
\def\Etoc@set@localtop@immediately #1{%
\@ifundefined{Etoc@#1@@}%
{\PackageWarning{etoc}
{Unknown sectioning depth #1, \protect\etocimmediatesetlocaltop.toc ignored}}%
{\begingroup
\let\Etoc@originalwrite\write
\def\write{\immediate\Etoc@originalwrite}%
\addtocontents {toc}
{\protect\etoc@setlocaltop\expandafter\protect
\csname Etoc@#1@@\endcsname}%
\endgroup
}%
}%
\def\etoc@setlocaltop #1{%
\ifnum#1=\Etoc@maxlevel
\Etoc@skipthisonetrue
\else
\Etoc@skipthisonefalse
\global\let\Etoc@level #1%
\global\let\Etoc@virtualtop #1%
\ifEtoc@localtoc
\ifEtoc@stoptoc
\Etoc@skipthisonetrue
\else
\ifEtoc@notactive
\Etoc@skipthisonetrue
\else
\unless\ifnum\Etoc@level>\etoclocaltop
\Etoc@skipthisonetrue
\global\Etoc@stoptoctrue
\fi
\fi
\fi
\fi
\fi
\let\Etoc@next\@empty
\ifEtoc@skipthisone
\else
\ifnum\Etoc@level>\c@tocdepth
\else
\ifEtoc@standardlines
\else
\let\Etoc@next\Etoc@setlocaltop@doendsandbegin
\fi
\fi
\fi
\Etoc@next
}%
\def\Etoc@setlocaltop@doendsandbegin{%
\Etoc@doendsandbegin
\global\Etoc@skipprefixfalse
}
\addtocontents {toc}{\protect\@ifundefined{etoctocstyle}%
{\let\protect\etoc@startlocaltoc\protect\@gobble
\let\protect\etoc@settocdepth\protect\@gobble
\let\protect\etoc@depthtag\protect\@gobble
\let\protect\etoc@setlocaltop\protect\@gobble}{}}%
\def\etocstandardlines {\Etoc@standardlinestrue}
\def\etoctoclines {\Etoc@standardlinesfalse}
\etocdefaultlines
\etocstandardlines
\def\etocstandarddisplaystyle{%
\PackageWarningNoLine{etoc}{%
\string\etocstandarddisplaystyle \on@line\MessageBreak
is deprecated. \space Please use \string\etocclasstocstyle}%
}
\expandafter\def\expandafter\etocclasstocstyle\expandafter{%
\etocclasstocstyle
\Etoc@classstyletrue
}
\def\etocetoclocaltocstyle{\Etoc@etocstyletrue}
\def\etocusertocstyle{\Etoc@etocstylefalse}
\etocclasstocstyle
\etocetoclocaltocstyle
\etocobeytoctocdepth
\etocobeydepthtags
\let\etocbeforetitlehook \@empty
\let\etocaftertitlehook \@empty
\let\etocaftercontentshook \@empty
\let\etocaftertochook \@empty
\def\etockeeporiginaltableofcontents
{\Etoc@keeporiginaltoctrue\let\tableofcontents\etocoriginaltableofcontents}%
\endinput
%%
%% End of file `etoc.sty'.

View File

@@ -0,0 +1,13 @@
\doxysection{File List}
Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/\mbox{\hyperlink{____general__flash_8h_source}{\+\_\+\+\_\+general\+\_\+flash.\+h}} }{\pageref{____general__flash_8h_source}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/\mbox{\hyperlink{general__gpio_8h}{general\+\_\+gpio.\+h}} \\*Заголовочный файл для модуля инициализации портов и работы с ними }{\pageref{general__gpio_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/\mbox{\hyperlink{general__spi_8h}{general\+\_\+spi.\+h}} \\*Заголовочный файл для модуля инициализации SPI }{\pageref{general__spi_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/\mbox{\hyperlink{general__tim_8h}{general\+\_\+tim.\+h}} \\*Заголовочный файл для модуля инициализации таймеров и работы с ними }{\pageref{general__tim_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/\mbox{\hyperlink{general__uart_8h}{general\+\_\+uart.\+h}} \\*Заголовочный файл для модуля инициализации UART }{\pageref{general__uart_8h}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/\mbox{\hyperlink{____general__flash_8c_source}{\+\_\+\+\_\+general\+\_\+flash.\+c}} }{\pageref{____general__flash_8c_source}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/\mbox{\hyperlink{general__gpio_8c}{general\+\_\+gpio.\+c}} \\*Модуль для инициализации портов и работы с ними }{\pageref{general__gpio_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/\mbox{\hyperlink{general__spi_8c}{general\+\_\+spi.\+c}} \\*Модуль для инициализации SPI }{\pageref{general__spi_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/\mbox{\hyperlink{general__tim_8c}{general\+\_\+tim.\+c}} \\*Модуль для инициализации таймеров и работы с ними }{\pageref{general__tim_8c}}{}
\item\contentsline{section}{E\+:/.\+WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/\mbox{\hyperlink{general__uart_8c}{general\+\_\+uart.\+c}} \\*Модуль для инициализации UART }{\pageref{general__uart_8c}}{}
\end{DoxyCompactList}

View File

@@ -0,0 +1,53 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/general\+\_\+gpio.c File Reference}
\hypertarget{general__gpio_8c}{}\label{general__gpio_8c}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_gpio.c@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_gpio.c}}
Модуль для инициализации портов и работы с ними.
{\ttfamily \#include "{}general\+\_\+gpio.\+h"{}}\newline
Include dependency graph for general\+\_\+gpio.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__gpio_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx)
\begin{DoxyCompactList}\small\item\em Включить тактирование порта GPIO. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t GPIO\+\_\+\+PIN\+\_\+X, uint8\+\_\+t LED\+\_\+\+Active\+Level)
\begin{DoxyCompactList}\small\item\em Инициализировать светодиод (структуру светодиода) \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led)
\begin{DoxyCompactList}\small\item\em Включить светодиод \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led)
\begin{DoxyCompactList}\small\item\em Выключить светодиод \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint8\+\_\+t led\+\_\+state)
\begin{DoxyCompactList}\small\item\em Выставить светодиод по переменной \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint32\+\_\+t period)
\begin{DoxyCompactList}\small\item\em Активировать моргание светодиодом \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint32\+\_\+t period)
\begin{DoxyCompactList}\small\item\em Активировать моргание светодиодом \end{DoxyCompactList}\item
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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led)
\begin{DoxyCompactList}\small\item\em Управление динамическими режимами свечения светодиода \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+Switch\+Type\+Def}} \texorpdfstring{$\ast$}{*}sw, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t GPIO\+\_\+\+PIN\+\_\+X, uint8\+\_\+t SW\+\_\+\+Active\+Level)
\begin{DoxyCompactList}\small\item\em Инициализировать кнопку (структуру кнопки) \end{DoxyCompactList}\item
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\+\_\+\+Switch\+Type\+Def}} \texorpdfstring{$\ast$}{*}sw)
\begin{DoxyCompactList}\small\item\em Считать состоянии кнопки \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Модуль для инициализации портов и работы с ними.
Реализация функций для работы с GPIO\+:
\begin{DoxyItemize}
\item Включение тактирования портов
\item Инициализация светодиодов и кнопок
\item Управление светодиодами\+: включение, выключение, моргание, плавное затухание
\item Чтение состояния кнопок с фильтром от дребезга
\end{DoxyItemize}
Definition in file \mbox{\hyperlink{general__gpio_8c_source}{general\+\_\+gpio.\+c}}.

View File

@@ -0,0 +1 @@
3d6438a8335228c1ca033e723e13d4a9

View File

@@ -0,0 +1,332 @@
\doxysection{general\+\_\+gpio.\+c}
\hypertarget{general__gpio_8c_source}{}\label{general__gpio_8c_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_gpio.c@{E:/.WORK/STM32/STM\_Libs/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}(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}(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}(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}(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}(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}(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}(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}(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___g_p_i_o___i_n_i_t_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___g_p_i_o___i_n_i_t_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}(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}(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___g_p_i_o___i_n_i_t_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___g_p_i_o___i_n_i_t_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}

View File

@@ -0,0 +1,85 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/general\+\_\+gpio.h File Reference}
\hypertarget{general__gpio_8h}{}\label{general__gpio_8h}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_gpio.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_gpio.h}}
Заголовочный файл для модуля инициализации портов и работы с ними.
{\ttfamily \#include "{}mylibs\+\_\+defs.\+h"{}}\newline
Include dependency graph for general\+\_\+gpio.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__gpio_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{general__gpio_8h__dep__incl}
\end{center}
\end{figure}
\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_ga9c853b02c22f26023c34d1d404b6d653}{local\+\_\+time}}()
\begin{DoxyCompactList}\small\item\em Локальное время \end{DoxyCompactList}\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}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item
enum \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{GPIO\+\_\+\+LEDState\+Type\+Def}} \{ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{LED\+\_\+\+IS\+\_\+\+OFF}} = 0
, \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{LED\+\_\+\+IS\+\_\+\+ON}} = 1
, \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{LED\+\_\+\+IS\+\_\+\+BLINKING}} = 2
, \mbox{\hyperlink{group___m_y_l_i_b_s___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___m_y_l_i_b_s___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___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\+\_\+\+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
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\+\_\+\+Switch\+Type\+Def}} \texorpdfstring{$\ast$}{*}swstart)
\begin{DoxyCompactList}\small\item\em Считать состоянии кнопки \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+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___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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led)
\begin{DoxyCompactList}\small\item\em Включить светодиод \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led)
\begin{DoxyCompactList}\small\item\em Выключить светодиод \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint8\+\_\+t led\+\_\+state)
\begin{DoxyCompactList}\small\item\em Выставить светодиод по переменной \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint32\+\_\+t period)
\begin{DoxyCompactList}\small\item\em Активировать моргание светодиодом \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \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\+\_\+\+LEDType\+Def}} \texorpdfstring{$\ast$}{*}led, uint32\+\_\+t period)
\begin{DoxyCompactList}\small\item\em Активировать моргание светодиодом \end{DoxyCompactList}\item
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\+\_\+\+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}}.

View File

@@ -0,0 +1 @@
18e746ec7466057e145ae212809aff82

View File

@@ -0,0 +1 @@
22dd8233ad55f1bd540759cc1612345c

View File

@@ -0,0 +1,244 @@
\doxysection{general\+\_\+gpio.\+h}
\hypertarget{general__gpio_8h_source}{}\label{general__gpio_8h_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_gpio.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/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\ GENERAL\_GPIO\ \ \ \ \ \ GPIO\ Tools}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00007}00007\ \textcolor{comment}{*\ @ingroup\ \ STM32\_GENERAL}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00008}00008\ \textcolor{comment}{*\ @brief\ \ \ \ Функции\ и\ макросы\ для\ удобной\ работы\ с\ GPIO.}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00009}00009\ \textcolor{comment}{*\ @details}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00010}00010\ \textcolor{comment}{Модуль\ предоставляет\ универсальные\ инструменты\ для\ работы\ с\ GPIO):}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00011}00011\ \textcolor{comment}{\ \ -\/\ @ref\ \ MYLIBS\_GPIO\_GENERAL\ —\ инициализация\ и\ общие\ функции\ работы\ с\ портами.}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00012}00012\ \textcolor{comment}{\ \ -\/\ @ref\ \ MYLIBS\_GPIO\_SWITCH\ —\ работа\ с\ GPIO\ как\ с\ кнопкой:\ чтение\ состояния,\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00013}00013\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ фильтрация\ дребезга,\ настройка\ активного\ уровня.}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00014}00014\ \textcolor{comment}{\ \ -\/\ @ref\ \ MYLIBS\_GPIO\_LEDS\ —\ работа\ с\ GPIO\ как\ со\ светодиодом:\ включение,\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00015}00015\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ выключение,\ моргание\ и\ плавное\ затухание.}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00016}00016\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00017}00017\ \textcolor{comment}{*************************************************************************/}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00018}00018\ \textcolor{preprocessor}{\#ifndef\ \_\_GPIO\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00019}00019\ \textcolor{preprocessor}{\#define\ \_\_GPIO\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00020}00020\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00021}00021\ \textcolor{preprocessor}{\#include\ "{}mylibs\_defs.h"{}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00022}00022\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00023}00023\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00024}00024\ \textcolor{comment}{\ \ *\ @addtogroup\ GPIO\_INIT\ GPIO\ Init\ defines}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00025}00025\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MYLIBS\_GPIO\_GENERAL}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00026}00026\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_CONFIGS\ Конфигурации\ STM32\ General}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00027}00027\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Настройка\ состояний\ кнопок\ и\ количества\ тиков\ в\ периоде\ ШИМ}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00028}00028\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00029}00029\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00030}00030\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00031}00031\ \textcolor{preprocessor}{\#ifndef\ local\_time}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00032}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga9c853b02c22f26023c34d1d404b6d653}{00032}}\ \textcolor{preprocessor}{\#define\ local\_time()\ \ HAL\_GetTick()\ }\textcolor{comment}{///<\ Локальное\ время}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00033}00033\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00034}00034\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00035}00035\ \textcolor{preprocessor}{\#ifndef\ LED\_PWM\_TICKS}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00036}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga1d42e219765ec526d99e306638ac0023}{00036}}\ \textcolor{preprocessor}{\#define\ LED\_PWM\_TICKS\ 15\ }\textcolor{comment}{///<\ Количество\ тиков\ в\ периоде\ ШИМ}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00037}00037\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00038}00038\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00039}00039\ \textcolor{preprocessor}{\#ifndef\ LED\_ON}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00040}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_gaf2e697ac60e05813d45ea2c9c9e79c25}{00040}}\ \textcolor{preprocessor}{\#define\ LED\_ON\ 1\ \ }\textcolor{comment}{///<\ Состояние\ пина\ для\ включения\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00041}00041\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00042}00042\ \textcolor{preprocessor}{\#ifndef\ LED\_OFF}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00043}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga80700bb63bd56ebabbb4728aa433fd29}{00043}}\ \textcolor{preprocessor}{\#define\ LED\_OFF\ 0\ }\textcolor{comment}{///<\ Состояние\ пина\ для\ выключения\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00044}00044\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00045}00045\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00046}00046\ \textcolor{preprocessor}{\#ifndef\ SW\_ON}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00047}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_ga19d9e3aced311179a2914e0c9b13d0f9}{00047}}\ \textcolor{preprocessor}{\#define\ SW\_ON\ 1\ \ \ }\textcolor{comment}{///<\ Состояние\ пина\ при\ нажатой\ кнопке}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00048}00048\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00049}00049\ \textcolor{preprocessor}{\#ifndef\ SW\_OFF}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00050}\mbox{\hyperlink{group___g_p_i_o___i_n_i_t_gacd8900c9ec0efde1da3253b718574067}{00050}}\ \textcolor{preprocessor}{\#define\ SW\_OFF\ 0\ \ }\textcolor{comment}{///<\ Состояние\ пина\ при\ отжатой\ кнопке}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00051}00051\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00052}00052\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00053}00053\ \textcolor{comment}{/**\ GPIO\_INIT}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00054}00054\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00055}00055\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00056}00056\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00057}00057\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00058}00058\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00059}00059\ \textcolor{comment}{\ \ *\ @brief\ Режимы\ работы\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00060}00060\ \textcolor{comment}{\ \ *\ @ingroup\ \ MYLIBS\_GPIO\_LEDS}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00061}00061\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00062}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{00062}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{enum}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00063}00063\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00064}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{00064}}\ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a74276cd2464314e422e8a144483f74ae}{LED\_IS\_OFF}}\ =\ 0,\ \ \ \ \ \ \ \textcolor{comment}{///<\ Светодиод\ выключен}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00065}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{00065}}\ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1af6abfb9c5b95abbdb239590f2cd245ea}{LED\_IS\_ON}}\ =\ 1,\ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Светодиод\ включен}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00066}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{00066}}\ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1a2445895bed5dcbedc82ea3ef02bec6fb}{LED\_IS\_BLINKING}}\ =\ 2,\ \ \textcolor{comment}{///<\ Моргание\ светодиодом}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00067}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{00067}}\ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_ggaac2b90d8b8c9579b6aa5d3bbda9b1ff1aa610f6df44c939aa7d45e318036fa03b}{LED\_IS\_FADING}}\ =\ 3,\ \ \ \ \textcolor{comment}{///<\ Плавное\ моргание\ светодиодом}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00068}00068\ \}\mbox{\hyperlink{group___m_y_l_i_b_s___g_p_i_o___l_e_d_s_gaac2b90d8b8c9579b6aa5d3bbda9b1ff1}{GPIO\_LEDStateTypeDef}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00069}00069\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00070}00070\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00071}00071\ \textcolor{comment}{\ \ *\ @brief\ Структура\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00072}00072\ \textcolor{comment}{\ \ *\ @ingroup\ \ MYLIBS\_GPIO\_LEDS}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00073}00073\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00074}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{00074}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00075}00075\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00076}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_ad28d93023a00e3c5669bd3deda122435}{00076}}\ \ \ \mbox{\hyperlink{group___m_y_l_i_b_s___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_l00077}00077\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00078}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a831923d4d157267ecc2f1add1c49adcf}{00078}}\ \ \ 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_l00079}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a684ff60e4c94daf2221524cdc6fcc978}{00079}}\ \ \ 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_l00080}00080\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00081}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_abe9aadc0b28d042267f7155e187a1816}{00081}}\ \ \ 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_l00082}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def_a6cc026931a4681732f9a329ae03098ec}{00082}}\ \ \ 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_l00083}00083\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00084}00084\ \ \ uint32\_t\ \ \ \ \ \ tickprev;}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00085}00085\ \}\mbox{\hyperlink{struct_g_p_i_o___l_e_d_type_def}{GPIO\_LEDTypeDef}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00086}00086\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00087}00087\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00088}00088\ \textcolor{comment}{\ \ *\ @brief\ Структура\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00089}00089\ \textcolor{comment}{\ \ *\ @ingroup\ \ MYLIBS\_GPIO\_SWITCH}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00090}00090\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00091}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{00091}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00092}00092\ \{}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00093}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{00093}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_afb369df75a6065fd89ac4ba97d98ab1a}{Sw\_Port}};\ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ GPIO\ порт\ ножки\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00094}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{00094}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a63d58d9cba49a5823175585ef2996032}{Sw\_Pin}};\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ GPIO\ пин\ ножки\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00095}00095\ \ \ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00096}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{00096}}\ \ \ uint8\_t\ \ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a4fadf5ead3ebccad521a52c064eeb405}{Sw\_ActiveLvl}};\ \ \ \ \ \textcolor{comment}{///<\ Активный\ уровень\ ножки\ (при\ котором\ кнопка\ нажата)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00097}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a245f1dc811279ce5d4598582db979a89}{00097}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a245f1dc811279ce5d4598582db979a89}{Sw\_PrevState}};\ \ \ \ \ \textcolor{comment}{///<\ Предыдущее\ состояние\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00098}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a2600e599a961af2e280c721894df4c06}{00098}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_g_p_i_o___switch_type_def_a2600e599a961af2e280c721894df4c06}{Sw\_FilterDelay}};\ \ \ \textcolor{comment}{///<\ Фильтр\ от\ дребезга\ (в\ мс)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00099}00099\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00100}00100\ \ \ uint32\_t\ \ \ \ \ \ tickprev;\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00101}00101\ \}\mbox{\hyperlink{struct_g_p_i_o___switch_type_def}{GPIO\_SwitchTypeDef}};}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00102}00102\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00103}00103\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00104}00104\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00105}00105\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00106}00106\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00107}00107\ \textcolor{comment}{\ \ *\ @addtogroup\ MYLIBS\_GPIO\_GENERAL\ \ General\ tools}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00108}00108\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00109}00109\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Общие\ функции/макросы\ для\ работы\ с\ GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00110}00110\ \textcolor{comment}{\ \ *\ @par\ Пример\ использования:}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00111}00111\ \textcolor{comment}{\ \ \ \ @code}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00112}00112\ \textcolor{comment}{\ \ \ \ //\ Включаем\ тактирование\ порта\ GPIOA}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00113}00113\ \textcolor{comment}{\ \ \ \ GPIO\_Clock\_Enable(GPIOA);}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00114}00114\ \textcolor{comment}{\ \ \ \ @endcode}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00115}00115\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00116}00116\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00117}00117\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00118}00118\ 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_8h_source_l00119}00119\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00120}00120\ \textcolor{comment}{/**\ MYLIBS\_GPIO\_GENERAL}}
\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\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00124}00124\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00125}00125\ \textcolor{comment}{\ \ *\ @addtogroup\ MYLIBS\_GPIO\_SWITCH\ \ Switch\ tools}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00126}00126\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00127}00127\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Функции\ для\ работы\ с\ GPIO,\ как\ с\ кнопкой}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00128}00128\ \textcolor{comment}{\ \ *\ @par\ Пример\ использования:}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00129}00129\ \textcolor{comment}{\ \ \ \ @code}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00130}00130\ \textcolor{comment}{\ \ \ \ MX\_GPIO\_Init();\ //\ инициализация\ пина\ аппаратная}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00131}00131\ \textcolor{comment}{\ \ \ \ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00132}00132\ \textcolor{comment}{\ \ \ \ //\ Инициализация\ кнопки\ на\ порте\ GPIOB,\ пин\ 0,\ активный\ уровень\ 1}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00133}00133\ \textcolor{comment}{\ \ \ \ GPIO\_SwitchTypeDef\ sw1;}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00134}00134\ \textcolor{comment}{\ \ \ \ GPIO\_Switch\_Init(\&sw1,\ GPIOB,\ GPIO\_PIN\_0,\ 1);\ //\ или\ дефайн\ SW\_ON/SW\_OFF}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00135}00135\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00136}00136\ \textcolor{comment}{\ \ \ \ //\ Считываем\ состояние\ кнопки}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00137}00137\ \textcolor{comment}{\ \ \ \ if(GPIO\_Read\_Switch(\&sw1))}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00138}00138\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00139}00139\ \textcolor{comment}{\ \ \ \ \ \ \ \ //\ Кнопка\ нажата}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00140}00140\ \textcolor{comment}{\ \ \ \ \ \ \ \ LED\_ON();}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00141}00141\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00142}00142\ \textcolor{comment}{\ \ \ \ else}}
\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\ \textcolor{comment}{\ \ \ \ \ \ \ \ LED\_OFF();}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00146}00146\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00147}00147\ \textcolor{comment}{\ \ \ \ @endcode}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00148}00148\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00149}00149\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00150}00150\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00151}00151\ \textcolor{comment}{/*\ Инициализировать\ кнопку\ (структуру\ кнопки)\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00152}00152\ 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\_On\_State);}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00153}00153\ \textcolor{comment}{/*\ Считать\ состоянии\ кнопки\ запуска\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00154}00154\ \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}}\ *swstart);}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00155}00155\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00156}00156\ \textcolor{comment}{/**\ MYLIBS\_GPIO\_SWITCH}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00157}00157\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00158}00158\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00159}00159\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00160}00160\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00161}00161\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00162}00162\ \textcolor{comment}{\ \ *\ @addtogroup\ MYLIBS\_GPIO\_LEDS\ \ LED\ tools}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00163}00163\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00164}00164\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Функции\ для\ работы\ с\ GPIO,\ для\ управления\ светодиодом}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00165}00165\ \textcolor{comment}{\ \ *\ @par\ Пример\ использования:}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00166}00166\ \textcolor{comment}{\ \ \ \ @code}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00167}00167\ \textcolor{comment}{\ \ \ \ MX\_GPIO\_Init();\ //\ инициализация\ пина\ аппаратная}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00168}00168\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00169}00169\ \textcolor{comment}{\ \ \ \ //\ Инициализация\ светодиода\ на\ порте\ GPIOA,\ пин\ 5,\ активный\ уровень\ 0}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00170}00170\ \textcolor{comment}{\ \ \ \ GPIO\_LEDTypeDef\ led;}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00171}00171\ \textcolor{comment}{\ \ \ \ GPIO\_LED\_Init(\&led,\ GPIOA,\ GPIO\_PIN\_5,\ 0);\ //\ или\ дефайн\ LED\_ON/LED\_OFF}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00172}00172\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00173}00173\ \textcolor{comment}{\ \ \ \ //\ Включение\ светодиода}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00174}00174\ \textcolor{comment}{\ \ \ \ GPIO\_LED\_On(\&led);}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00175}00175\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00176}00176\ \textcolor{comment}{\ \ \ \ //\ Запуск\ моргания}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00177}00177\ \textcolor{comment}{\ \ \ \ GPIO\_LED\_Blink\_Start(\&led,\ 500);\ //\ Период\ 500\ мс}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00178}00178\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00179}00179\ \textcolor{comment}{\ \ \ \ //\ В\ основном\ цикле}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00180}00180\ \textcolor{comment}{\ \ \ \ while\ (1)\ \{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00181}00181\ \textcolor{comment}{\ \ \ \ \ \ GPIO\_LED\_Dynamic\_Handle(\&led);}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00182}00182\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00183}00183\ \textcolor{comment}{\ \ \ \ @endcode}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00184}00184\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00185}00185\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00186}00186\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00187}00187\ \textcolor{comment}{/*\ Инициализировать\ светодиод\ (структуру\ светодиода)\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00188}00188\ 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\_On\_State);}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00189}00189\ \textcolor{comment}{/*\ Включить\ светодиод\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00190}00190\ 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_8h_source_l00191}00191\ \textcolor{comment}{/*\ Выключить\ светодиод\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00192}00192\ 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_8h_source_l00193}00193\ \textcolor{comment}{/*\ Выставить\ светодиод\ по\ переменной\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00194}00194\ 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_8h_source_l00195}00195\ \textcolor{comment}{/*\ Активировать\ моргание\ светодиодом\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00196}00196\ 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_8h_source_l00197}00197\ \textcolor{comment}{/*\ Активировать\ моргание\ светодиодом\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00198}00198\ 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_8h_source_l00199}00199\ \textcolor{comment}{/*\ Управление\ динамическими\ режимами\ свечения\ светодиода\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00200}00200\ \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_8h_source_l00201}00201\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00202}00202\ \textcolor{comment}{/**\ MYLIBS\_GPIO\_LEDS}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00203}00203\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00204}00204\ \textcolor{comment}{\ \ */}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00205}00205\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00206}00206\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00207}00207\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00208}00208\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00209}00209\ \textcolor{comment}{\ *\ @cond\ GPIO\_INTERNAL}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00210}00210\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00211}00211\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00212}00212\ \textcolor{comment}{//\ /**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00213}00213\ \textcolor{comment}{//\ \ \ *\ @brief\ Маппинг\ альтернативной\ функции\ SPI\ между\ GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00214}00214\ \textcolor{comment}{//\ \ \ *\ @ingroup\ \ MYLIBS\_GPIO\_GENERAL}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00215}00215\ \textcolor{comment}{//\ \ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00216}00216\ \textcolor{comment}{//\ \#define\ SPI\_Alternate\_Mapping(INSTANCE)\ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00217}00217\ \textcolor{comment}{//\ ((((INSTANCE)\ ==\ TIM1)\ \ ||\ ((INSTANCE)\ ==\ TIM2))?\ \ \ \ \ GPIO\_AF1\_TIM1:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00218}00218\ \textcolor{comment}{//\ (((INSTANCE)\ ==\ TIM3)\ \ \ ||\ ((INSTANCE)\ ==\ TIM4)\ \ \ ||\ ((INSTANCE)\ ==\ TIM5))?\ GPIO\_AF2\_TIM3:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00219}00219\ \textcolor{comment}{//\ (((INSTANCE)\ ==\ TIM8)\ \ \ ||\ ((INSTANCE)\ ==\ TIM9)\ \ \ ||\ ((INSTANCE)\ ==\ TIM10)\ ||\ ((INSTANCE)\ ==\ TIM11))?\ GPIO\_AF3\_TIM8:\ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00220}00220\ \textcolor{comment}{//\ (((INSTANCE)\ ==\ TIM12)\ \ ||\ ((INSTANCE)\ ==\ TIM13)\ \ ||\ ((INSTANCE)\ ==\ TIM14))?\ GPIO\_AF9\_TIM12:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00221}00221\ \textcolor{comment}{//\ (0))}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00222}00222\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00223}00223\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00224}00224\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00225}00225\ \textcolor{comment}{\ \ *\ @brief\ Маппинг\ альтернативной\ функции\ TIM\ между\ GPIO}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00226}00226\ \textcolor{comment}{\ \ *\ @ingroup\ \ MYLIBS\_GPIO\_GENERAL}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00227}00227\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00228}00228\ \textcolor{preprocessor}{\#define\ GPIO\_TIM\_Alternate\_Mapping(INSTANCE)\ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00229}00229\ \textcolor{preprocessor}{((((INSTANCE)\ ==\ TIM1)\ \ ||\ ((INSTANCE)\ ==\ TIM2))?\ GPIO\_AF1\_TIM1:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00230}00230\ \textcolor{preprocessor}{(((INSTANCE)\ ==\ TIM3)\ \ \ ||\ ((INSTANCE)\ ==\ TIM4)\ \ \ ||\ ((INSTANCE)\ ==\ TIM5))?\ GPIO\_AF2\_TIM3:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00231}00231\ \textcolor{preprocessor}{(((INSTANCE)\ ==\ TIM8)\ \ \ ||\ ((INSTANCE)\ ==\ TIM9)\ \ \ ||\ ((INSTANCE)\ ==\ TIM10)\ ||\ ((INSTANCE)\ ==\ TIM11))?\ GPIO\_AF3\_TIM8:\ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00232}00232\ \textcolor{preprocessor}{(((INSTANCE)\ ==\ TIM12)\ \ ||\ ((INSTANCE)\ ==\ TIM13)\ \ ||\ ((INSTANCE)\ ==\ TIM14))?\ GPIO\_AF9\_TIM12:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00233}00233\ \textcolor{preprocessor}{(0))}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00234}00234\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00235}00235\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00236}00236\ \textcolor{comment}{/**\ @endcond\ */}}
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00237}00237\ }
\DoxyCodeLine{\Hypertarget{general__gpio_8h_source_l00238}00238\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_GPIO\_GENERAL\_H\_}}
\end{DoxyCode}

View File

@@ -0,0 +1,79 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/general\+\_\+spi.c File Reference}
\hypertarget{general__spi_8c}{}\label{general__spi_8c}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_spi.c@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_spi.c}}
Модуль для инициализации SPI.
{\ttfamily \#include "{}general\+\_\+spi.\+h"{}}\newline
{\ttfamily \#include "{}general\+\_\+gpio.\+h"{}}\newline
Include dependency graph for general\+\_\+spi.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=250pt]{general__spi_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}{SPI\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}sspi)
\begin{DoxyCompactList}\small\item\em Инициализация SPI с помощью структуры \doxylink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}. \end{DoxyCompactList}\item
void \mbox{\hyperlink{general__spi_8c_ae80d21e5cab86571709a2619442733b5}{SPI\+\_\+\+GPIO\+\_\+\+Init}} (\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}sspi)
\begin{DoxyCompactList}\small\item\em Инициализация GPIO для SPI. \end{DoxyCompactList}\item
void \mbox{\hyperlink{general__spi_8c_abb78b8bd5303e88f969694e6fe03c411}{SPI\+\_\+\+DMA\+\_\+\+Init}} (SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hspi, DMA\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hdma\+\_\+rx, DMA\+\_\+\+Stream\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}DMAChannel, uint32\+\_\+t DMA\+\_\+\+CHANNEL\+\_\+X)
\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}} (SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hspi)
\begin{DoxyCompactList}\small\item\em Настройка тактирования и прерываний SPI. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_gac279cc3eaa35541edfe330a1844a85e4}{SPI\+\_\+\+Msp\+De\+Init}} (SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hspi)
\begin{DoxyCompactList}\small\item\em Деинициализация тактирования и прерываний SPI. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_ga333dd251bc878931086d48aa932b1a5f}{SPI\+\_\+\+Check\+\_\+\+Init\+\_\+\+Struct}} (\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}sspi)
\begin{DoxyCompactList}\small\item\em Проверка корректности структуры инициализации SPI. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Модуль для инициализации SPI.
Реализация функций для работы с SPI\+:
\begin{DoxyItemize}
\item Инициализация SPI и его линий CLK/\+MISO/\+MOSI
\item Настройка GPIO для SPI
\item Настройка NVIC и тактирования SPI
\end{DoxyItemize}
Definition in file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.
\label{doc-func-members}
\Hypertarget{general__spi_8c_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{general__spi_8c_ae80d21e5cab86571709a2619442733b5}\index{general\_spi.c@{general\_spi.c}!SPI\_GPIO\_Init@{SPI\_GPIO\_Init}}
\index{SPI\_GPIO\_Init@{SPI\_GPIO\_Init}!general\_spi.c@{general\_spi.c}}
\doxysubsubsection{\texorpdfstring{SPI\_GPIO\_Init()}{SPI\_GPIO\_Init()}}
{\footnotesize\ttfamily \label{general__spi_8c_ae80d21e5cab86571709a2619442733b5}
void SPI\+\_\+\+GPIO\+\_\+\+Init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{sspi}{}\end{DoxyParamCaption})}
Инициализация GPIO для SPI.
\begin{DoxyParams}{Parameters}
{\em sspi} & Указатель на структуру с настройками SPI. \\
\hline
\end{DoxyParams}
Definition at line \mbox{\hyperlink{general__spi_8c_source_l00058}{58}} of file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.
\Hypertarget{general__spi_8c_abb78b8bd5303e88f969694e6fe03c411}\index{general\_spi.c@{general\_spi.c}!SPI\_DMA\_Init@{SPI\_DMA\_Init}}
\index{SPI\_DMA\_Init@{SPI\_DMA\_Init}!general\_spi.c@{general\_spi.c}}
\doxysubsubsection{\texorpdfstring{SPI\_DMA\_Init()}{SPI\_DMA\_Init()}}
{\footnotesize\ttfamily \label{general__spi_8c_abb78b8bd5303e88f969694e6fe03c411}
void SPI\+\_\+\+DMA\+\_\+\+Init (\begin{DoxyParamCaption}\item[{SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{hspi}{, }\item[{DMA\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{hdma\+\_\+rx}{, }\item[{DMA\+\_\+\+Stream\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}}]{DMAChannel}{, }\item[{uint32\+\_\+t}]{DMA\+\_\+\+CHANNEL\+\_\+X}{}\end{DoxyParamCaption})}
Definition at line \mbox{\hyperlink{general__spi_8c_source_l00089}{89}} of file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.

View File

@@ -0,0 +1 @@
b6ed71193901be4f48b3523dbb935568

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,58 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/general\+\_\+spi.h File Reference}
\hypertarget{general__spi_8h}{}\label{general__spi_8h}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_spi.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_spi.h}}
Заголовочный файл для модуля инициализации SPI.
{\ttfamily \#include "{}mylibs\+\_\+defs.\+h"{}}\newline
Include dependency graph for general\+\_\+spi.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__spi_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__spi_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура настроек SPI. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___s_p_i___i_n_i_t_ga8ad4712bf4add56892d057778e826e0c}{HAL\+\_\+\+SPI\+\_\+\+MODULE\+\_\+\+ENABLED}}
\begin{DoxyCompactList}\small\item\em Включение HAL SPI. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___s_p_i___i_n_i_t_ga2fe0c8aeb2c61679f32836fef479eedf}{USE\+\_\+\+SPI1}}
\begin{DoxyCompactList}\small\item\em Включить SPI1 в \doxylink{group___g_e_n_e_r_a_l___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___s_p_i___i_n_i_t_ga53687cddb8e39e76a79b8ffaa152fb2b}{USE\+\_\+\+SPI2}}
\begin{DoxyCompactList}\small\item\em Включить SPI2 в \doxylink{group___g_e_n_e_r_a_l___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___s_p_i___i_n_i_t_ga5fdd6e5934a8005ef05b80f6d95883dc}{USE\+\_\+\+SPI3}}
\begin{DoxyCompactList}\small\item\em Включить SPI3 в \doxylink{group___g_e_n_e_r_a_l___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}{SPI\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}sspi)
\begin{DoxyCompactList}\small\item\em Инициализация SPI с помощью структуры \doxylink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_ga333dd251bc878931086d48aa932b1a5f}{SPI\+\_\+\+Check\+\_\+\+Init\+\_\+\+Struct}} (\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}sspi)
\begin{DoxyCompactList}\small\item\em Проверка корректности структуры инициализации SPI. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}} (SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hspi)
\begin{DoxyCompactList}\small\item\em Настройка тактирования и прерываний SPI. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_gac279cc3eaa35541edfe330a1844a85e4}{SPI\+\_\+\+Msp\+De\+Init}} (SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hspi)
\begin{DoxyCompactList}\small\item\em Деинициализация тактирования и прерываний SPI. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Заголовочный файл для модуля инициализации SPI.
Definition in file \mbox{\hyperlink{general__spi_8h_source}{general\+\_\+spi.\+h}}.

View File

@@ -0,0 +1 @@
048ce4bd2d099fe77f43aaff2442a331

View File

@@ -0,0 +1 @@
e75f00a92afa1cd83d57b4f11f695fbd

View File

@@ -0,0 +1,177 @@
\doxysection{general\+\_\+spi.\+h}
\hypertarget{general__spi_8h_source}{}\label{general__spi_8h_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_spi.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_spi.h}}
\mbox{\hyperlink{general__spi_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00001}00001\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00002}00002\ \textcolor{comment}{**************************************************************************}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ general\_spi.h}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Заголовочный\ файл\ для\ модуля\ инициализации\ SPI.}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00005}00005\ \textcolor{comment}{**************************************************************************}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00006}00006\ \textcolor{comment}{*\ @defgroup\ GENERAL\_SPI\ \ \ \ \ \ SPI\ Tools}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00007}00007\ \textcolor{comment}{*\ @ingroup\ \ STM32\_GENERAL}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00008}00008\ \textcolor{comment}{*\ @brief\ \ \ \ Функции\ и\ макросы\ для\ удобной\ работы\ с\ SPI.}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00009}00009\ \textcolor{comment}{*\ @details}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00010}00010\ \textcolor{comment}{Модуль\ предоставляет\ функции\ для\ базовой\ инициализации\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00011}00011\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00012}00012\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00013}00013\ \textcolor{comment}{@par\ Пример\ использования:}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00014}00014\ \textcolor{comment}{@code}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00015}00015\ \textcolor{comment}{//\ Структура\ настроек\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00016}00016\ \textcolor{comment}{SPI\_SettingsTypeDef\ spi1Settings;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00017}00017\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00018}00018\ \textcolor{comment}{void\ SPI1\_Init(void)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00019}00019\ \textcolor{comment}{\{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00020}00020\ \textcolor{comment}{\ \ \ \ //\ Настройка\ SPI1\ как\ Master,\ 8\ бит,\ полный\ дуплекс}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00021}00021\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Instance\ =\ SPI1;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00022}00022\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.Mode\ =\ SPI\_MODE\_MASTER;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00023}00023\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.Direction\ =\ SPI\_DIRECTION\_2LINES;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00024}00024\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.DataSize\ =\ SPI\_DATASIZE\_8BIT;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00025}00025\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.CLKPolarity\ =\ SPI\_POLARITY\_LOW;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00026}00026\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.CLKPhase\ =\ SPI\_PHASE\_1EDGE;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00027}00027\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.NSS\ =\ SPI\_NSS\_SOFT;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00028}00028\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.BaudRatePrescaler\ =\ SPI\_BAUDRATEPRESCALER\_16;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00029}00029\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.FirstBit\ =\ SPI\_FIRSTBIT\_MSB;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00030}00030\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.TIMode\ =\ SPI\_TIMODE\_DISABLE;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00031}00031\ \textcolor{comment}{\ \ \ \ spi1Settings.hspi.Init.CRCCalculation\ =\ SPI\_CRCCALCULATION\_DISABLE;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00032}00032\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00033}00033\ \textcolor{comment}{\ \ \ \ //\ Настройка\ GPIO}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00034}00034\ \textcolor{comment}{\ \ \ \ spi1Settings.CLK\_GPIOx\ =\ GPIOA;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00035}00035\ \textcolor{comment}{\ \ \ \ spi1Settings.CLK\_PIN\ =\ GPIO\_PIN\_5;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00036}00036\ \textcolor{comment}{\ \ \ \ spi1Settings.CLK\_GPIO\_AlternageFunc\ =\ GPIO\_AF5\_SPI1;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00037}00037\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00038}00038\ \textcolor{comment}{\ \ \ \ spi1Settings.MISO\_GPIOx\ =\ GPIOA;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00039}00039\ \textcolor{comment}{\ \ \ \ spi1Settings.MISO\_PIN\ =\ GPIO\_PIN\_6;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00040}00040\ \textcolor{comment}{\ \ \ \ spi1Settings.MISO\_GPIO\_AlternageFunc\ =\ GPIO\_AF5\_SPI1;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00041}00041\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00042}00042\ \textcolor{comment}{\ \ \ \ spi1Settings.MOSI\_GPIOx\ =\ GPIOA;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00043}00043\ \textcolor{comment}{\ \ \ \ spi1Settings.MOSI\_PIN\ =\ GPIO\_PIN\_7;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00044}00044\ \textcolor{comment}{\ \ \ \ spi1Settings.MOSI\_GPIO\_AlternageFunc\ =\ GPIO\_AF5\_SPI1;}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00045}00045\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00046}00046\ \textcolor{comment}{\ \ \ \ //\ Инициализация\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00047}00047\ \textcolor{comment}{\ \ \ \ if(SPI\_Base\_Init(\&spi1Settings)\ !=\ HAL\_OK)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00048}00048\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00049}00049\ \textcolor{comment}{\ \ \ \ \ \ \ \ //\ Обработка\ ошибки}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00050}00050\ \textcolor{comment}{\ \ \ \ \ \ \ \ Error\_Handler();}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00051}00051\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00052}00052\ \textcolor{comment}{\}}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00053}00053\ \textcolor{comment}{@endcode}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00054}00054\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00055}00055\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00056}00056\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00057}00057\ \textcolor{comment}{*\ \ @note\ Требуется\ подключение\ модуля\ SPI\ в\ библиотеке\ HAL\ }}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00058}00058\ \textcolor{comment}{@code\ }}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00059}00059\ \textcolor{comment}{\#define\ HAL\_SPI\_MODULE\_ENABLED}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00060}00060\ \textcolor{comment}{@endcode}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00061}00061\ \textcolor{comment}{*\ @\{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00062}00062\ \textcolor{comment}{*************************************************************************/}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00063}00063\ \textcolor{preprocessor}{\#ifndef\ \_\_SPI\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00064}00064\ \textcolor{preprocessor}{\#define\ \_\_SPI\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00065}00065\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00066}00066\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00067}00067\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00068}00068\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00069}00069\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00070}00070\ \textcolor{comment}{\ \ *\ @addtogroup\ SPI\_INIT\ SPI\ Init\ defines}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00071}00071\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00072}00072\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_CONFIGS\ Конфигурации\ STM32\ General}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00073}00073\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Настройка\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00074}00074\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00075}00075\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00076}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga8ad4712bf4add56892d057778e826e0c}{00076}}\ \textcolor{preprocessor}{\#define\ HAL\_SPI\_MODULE\_ENABLED\ \ \ }\textcolor{comment}{///<\ Включение\ HAL\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00077}00077\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00078}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga2fe0c8aeb2c61679f32836fef479eedf}{00078}}\ \textcolor{preprocessor}{\#define\ USE\_SPI1\ \ \ \ }\textcolor{comment}{///<\ Включить\ SPI1\ в\ @ref\ SPI\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00079}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga53687cddb8e39e76a79b8ffaa152fb2b}{00079}}\ \textcolor{preprocessor}{\#define\ USE\_SPI2\ \ \ \ }\textcolor{comment}{///<\ Включить\ SPI2\ в\ @ref\ SPI\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00080}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga5fdd6e5934a8005ef05b80f6d95883dc}{00080}}\ \textcolor{preprocessor}{\#define\ USE\_SPI3\ \ \ \ }\textcolor{comment}{///<\ Включить\ SPI3\ в\ @ref\ SPI\_MspInit}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00081}00081\ \textcolor{comment}{/**\ SPI\_INIT}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00082}00082\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00083}00083\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00084}00084\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00085}00085\ \textcolor{preprocessor}{\#include\ "{}mylibs\_defs.h"{}}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00086}00086\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00087}00087\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00088}00088\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00089}00089\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00090}00090\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00091}00091\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00092}00092\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00093}00093\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00094}00094\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00095}00095\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00096}00096\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00097}00097\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00098}00098\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00099}00099\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00100}00100\ \textcolor{comment}{\ \ *\ @brief\ Структура\ настроек\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00101}00101\ \textcolor{comment}{\ \ *\ @details\ Содержит\ все\ необходимые\ параметры\ для\ инициализации\ SPI,}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00102}00102\ \textcolor{comment}{\ \ *\ включая\ GPIO\ и\ DMA.}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00103}00103\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00104}\mbox{\hyperlink{struct_s_p_i___settings_type_def}{00104}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00105}00105\ \{}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00106}\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{00106}}\ \ \ SPI\_HandleTypeDef\ \mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ HAL\ handle\ SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00107}00107\ \ \ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00108}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a6a15d48eccf92959de3a086031fdc979}{00108}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a6a15d48eccf92959de3a086031fdc979}{CLK\_GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ CLK}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00109}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3bcb1ed12da3544e02e6d36493669bdc}{00109}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a3bcb1ed12da3544e02e6d36493669bdc}{CLK\_PIN}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ CLK}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00110}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3f3748103a0b7861f6700042fd691ba1}{00110}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a3f3748103a0b7861f6700042fd691ba1}{CLK\_GPIO\_AlternageFunc}};\ \ \ \textcolor{comment}{///<\ Альтернативная\ функция\ для\ CLK}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00111}00111\ \ \ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00112}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0d55a2941854f61934487f3d209cfa95}{00112}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0d55a2941854f61934487f3d209cfa95}{MISO\_GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ MISO}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00113}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3366c654d7ec6dd41c6a0b504dc8509a}{00113}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a3366c654d7ec6dd41c6a0b504dc8509a}{MISO\_PIN}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ MISO}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00114}\mbox{\hyperlink{struct_s_p_i___settings_type_def_aecd7a5c6e205335b8ed229d74cd35d14}{00114}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_aecd7a5c6e205335b8ed229d74cd35d14}{MISO\_GPIO\_AlternageFunc}};\ \ \textcolor{comment}{///<\ Альтернативная\ функция\ для\ MISO}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00115}00115\ \ \ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00116}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0af3bdb273818ff97eb4ff3cff918820}{00116}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0af3bdb273818ff97eb4ff3cff918820}{MOSI\_GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ MOSI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00117}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a961208869faf4a7369aaf4edde75f176}{00117}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a961208869faf4a7369aaf4edde75f176}{MOSI\_PIN}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ MOSI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00118}\mbox{\hyperlink{struct_s_p_i___settings_type_def_afbe75a1c36650a4a9b41fa706a4c7eab}{00118}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_afbe75a1c36650a4a9b41fa706a4c7eab}{MOSI\_GPIO\_AlternageFunc}};\ \ \textcolor{comment}{///<\ Альтернативная\ функция\ для\ MOSI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00119}00119\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00120}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3cfd9469b0617a68bbd2a161ba06bb95}{00120}}\ \ \ DMA\_Stream\_TypeDef\ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3cfd9469b0617a68bbd2a161ba06bb95}{DMAChannel}};\ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Канал\ DMA\ (NULL\ если\ не\ нужен)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00121}\mbox{\hyperlink{struct_s_p_i___settings_type_def_aa0edaa145076d2383b3e0095d156d474}{00121}}\ \ \ uint32\_t\ \mbox{\hyperlink{struct_s_p_i___settings_type_def_aa0edaa145076d2383b3e0095d156d474}{DMA\_CHANNEL\_X}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Номер\ канала\ DMA\ (0\ если\ не\ нужен)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00122}00122\ \ \ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00123}00123\ \}\ \mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00124}00124\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00125}00125\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00126}00126\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00127}00127\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00128}00128\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00129}00129\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00130}00130\ \textcolor{comment}{/*\ Инициализация\ SPI\ с\ использованием\ структуры\ настроек\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00131}00131\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}{SPI\_Base\_Init}}(\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}}\ *sspi);}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00132}00132\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00133}00133\ \textcolor{comment}{/*\ Проверка\ корректности\ структуры\ настроек\ SPI\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00134}00134\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_ga333dd251bc878931086d48aa932b1a5f}{SPI\_Check\_Init\_Struct}}(\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}}\ *sspi);}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00135}00135\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00136}00136\ \textcolor{comment}{/*\ Инициализация\ тактирования\ и\ прерываний\ для\ выбранного\ SPI\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00137}00137\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\_MspInit}}(SPI\_HandleTypeDef\ *hspi);}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00138}00138\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00139}00139\ \textcolor{comment}{/*\ Деинициализация\ тактирования\ и\ прерываний\ для\ выбранного\ SPI\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00140}00140\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___s_p_i_gac279cc3eaa35541edfe330a1844a85e4}{SPI\_MspDeInit}}(SPI\_HandleTypeDef\ *hspi);}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00141}00141\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00142}00142\ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00143}00143\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00144}00144\ \textcolor{comment}{\ *\ @cond\ SPI\_INTERNAL}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00145}00145\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00146}00146\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00147}00147\ \textcolor{comment}{/*\ Настройка\ GPIO\ для\ SPI\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00148}00148\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{general__spi_8c_ae80d21e5cab86571709a2619442733b5}{SPI\_GPIO\_Init}}(\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}}\ *sspi);}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00149}00149\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00150}00150\ \textcolor{comment}{/*\ Настройка\ DMA\ для\ SPI\ */}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00151}00151\ \textcolor{keywordtype}{void}\ SPI\_DMA\_Init(SPI\_HandleTypeDef\ *hspi,\ DMA\_HandleTypeDef\ *hdma\_rx,\ DMA\_Stream\_TypeDef\ *DMAChannel,\ uint32\_t\ DMA\_CHANNEL\_X);}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00152}00152\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00153}00153\ \textcolor{preprocessor}{\#ifndef\ \_\_USER\_LINKDMA}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00154}00154\ \textcolor{comment}{/**\ \ }}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00155}00155\ \textcolor{comment}{\ \ *\ @brief\ \ Аналог\ HAL\ макроса\ для\ привязки\ DMA\ к\ UART.}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00156}00156\ \textcolor{comment}{\ \ *\ @note\ \ \ @ref\ \_\_HAL\_LINKDMA.}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00157}00157\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00158}00158\ \textcolor{preprocessor}{\#define\ \_\_USER\_LINKDMA(\_\_HANDLE\_\_,\ \_\_PPP\_DMA\_FIELD\_\_,\ \_\_DMA\_HANDLE\_\_)\ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00159}00159\ \textcolor{preprocessor}{do\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00160}00160\ \textcolor{preprocessor}{(\_\_HANDLE\_\_)-\/>\_\_PPP\_DMA\_FIELD\_\_\ =\ (\_\_DMA\_HANDLE\_\_);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00161}00161\ \textcolor{preprocessor}{(\_\_DMA\_HANDLE\_\_)-\/>Parent\ =\ (\_\_HANDLE\_\_);\}\ while(0U)}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00162}00162\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00163}00163\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00164}00164\ \textcolor{comment}{/**\ @endcond\ */}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00165}00165\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00166}00166\ }
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00167}00167\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_SPI\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00168}00168\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00169}00169\ \textcolor{comment}{/**\ GENERAL\_SPI}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00170}00170\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00171}00171\ \textcolor{comment}{\ \ */}}
\end{DoxyCode}

View File

@@ -0,0 +1,54 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/general\+\_\+tim.c File Reference}
\hypertarget{general__tim_8c}{}\label{general__tim_8c}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_tim.c@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_tim.c}}
Модуль для инициализации таймеров и работы с ними.
{\ttfamily \#include "{}general\+\_\+tim.\+h"{}}\newline
Include dependency graph for general\+\_\+tim.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=214pt]{general__tim_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga7044214f24a9868ba7e1650b55e639ec}{TIM\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_t_i_m___settings_type_def}{TIM\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}stim)
\begin{DoxyCompactList}\small\item\em Инициализация таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_ga8d16c3b7e7c6decc54c5c3d1a8bf0fbc}{TIM\+\_\+\+Encoder\+\_\+\+Init}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc, TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Инициализация режима энкодер у таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gadb2f465d89f609e035867e980c3a29c6}{TIM\+\_\+\+Output\+\_\+\+PWM\+\_\+\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, TIM\+\_\+\+OC\+\_\+\+Init\+Type\+Def \texorpdfstring{$\ast$}{*}s\+Config\+OC, uint32\+\_\+t TIM\+\_\+\+CHANNEL, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t GPIO\+\_\+\+PIN)
\begin{DoxyCompactList}\small\item\em Инициализация выхода ШИМ таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gae2608ca8023e9a0713af0b4fbfbc1889}{TIM\+\_\+\+OC\+\_\+\+Comparator\+\_\+\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint32\+\_\+t TIM\+\_\+\+CHANNEL)
\begin{DoxyCompactList}\small\item\em Инициализация OC компаратора таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_gac3bc6525f88c275e47eb864e6d567501}{TIM\+\_\+\+Encoder\+\_\+\+Read}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc)
\begin{DoxyCompactList}\small\item\em Считать энкодер. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_ga117b795017e9e3a357ddefe323412761}{TIM\+\_\+\+Encoder\+\_\+\+Read\+Switch}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc)
\begin{DoxyCompactList}\small\item\em Считать кнопку энкодера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga88c552a133cb6e3015453cccab74c07e}{TIM\+\_\+\+Delay}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint16\+\_\+t delay)
\begin{DoxyCompactList}\small\item\em Задержка в тиках таймера (блокирующая). \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga4c0dfde4e15f677600605348b4e97834}{TIM\+\_\+\+Delay\+\_\+\+Start}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Начать отсчет неблокирующей задержки. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga108637af414bff3373059273b815ce9b}{TIM\+\_\+\+Delay\+\_\+\+Non\+Blocking}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint16\+\_\+t delay)
\begin{DoxyCompactList}\small\item\em Задержка в тиках таймера (неблокирующая). \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaeb611874216a4661fb83366b99b9e787}{TIM\+\_\+\+ITMode\+Type\+Def}} it\+\_\+mode)
\begin{DoxyCompactList}\small\item\em Инициализация CLK и NVIC таймеров. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga879e3f1c919c02990736730275367115}{TIM\+\_\+\+Base\+\_\+\+Msp\+De\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Деинициализация CLK и NVIC таймеров. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Модуль для инициализации таймеров и работы с ними.
Реализация функций для работы с TIM\+:
\begin{DoxyItemize}
\item Инициализация таймера и его каналов
\item Формирование задержек через таймеры
\item Считывание энкодера
\end{DoxyItemize}
Definition in file \mbox{\hyperlink{general__tim_8c_source}{general\+\_\+tim.\+c}}.

View File

@@ -0,0 +1 @@
bdeb54554710242ead0de83d18f0da10

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,144 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/general\+\_\+tim.h File Reference}
\hypertarget{general__tim_8h}{}\label{general__tim_8h}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_tim.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_tim.h}}
Заголовочный файл для модуля инициализации таймеров и работы с ними.
{\ttfamily \#include "{}mylibs\+\_\+defs.\+h"{}}\newline
{\ttfamily \#include "{}general\+\_\+gpio.\+h"{}}\newline
Include dependency graph for general\+\_\+tim.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=214pt]{general__tim_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__tim_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_t_i_m___settings_type_def}{TIM\+\_\+\+Settings\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура инициализации таймера \end{DoxyCompactList}\item
struct \mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура инициализации енкодера \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga23382b8f04b3e6db2c59dfa1ef5ea4a2}{HAL\+\_\+\+TIM\+\_\+\+MODULE\+\_\+\+ENABLED}}
\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga54a98c21365e0bc45b81555d2b101f2b}{USE\+\_\+\+TIM1}}
\begin{DoxyCompactList}\small\item\em Включить TIM1 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga72535a44955b43cbcd56e25039ab32eb}{USE\+\_\+\+TIM2}}
\begin{DoxyCompactList}\small\item\em Включить TIM2 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga5b5685a43273b6e37242a4aba3ee0617}{USE\+\_\+\+TIM3}}
\begin{DoxyCompactList}\small\item\em Включить TIM3 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga1493b39c9214501180b81b4c892f9be0}{USE\+\_\+\+TIM4}}
\begin{DoxyCompactList}\small\item\em Включить TIM4 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga252f4fba93fc265110e83760e0590af3}{USE\+\_\+\+TIM5}}
\begin{DoxyCompactList}\small\item\em Включить TIM5 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga8fe31b98160627d19038222910be3f46}{USE\+\_\+\+TIM6}}
\begin{DoxyCompactList}\small\item\em Включить TIM6 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga7cdc54cc8cbbb6e9f60001f1e3e6ec67}{USE\+\_\+\+TIM7}}
\begin{DoxyCompactList}\small\item\em Включить TIM7 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga28ba33d7c6bf22821dafa5bcee4854be}{USE\+\_\+\+TIM8}}
\begin{DoxyCompactList}\small\item\em Включить TIM8 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_gaac627c0e98c9594cc41b1b46eb39e44a}{USE\+\_\+\+TIM9}}
\begin{DoxyCompactList}\small\item\em Включить TIM9 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga98c0691052d1da2c4053dd3586ff7ce9}{USE\+\_\+\+TIM10}}
\begin{DoxyCompactList}\small\item\em Включить TIM10 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga176c97f06ebcf14e06e5c5bdbfac44c2}{USE\+\_\+\+TIM11}}
\begin{DoxyCompactList}\small\item\em Включить TIM11 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga4e2b0e6cdf9eed74581b575c3fd9516b}{USE\+\_\+\+TIM12}}
\begin{DoxyCompactList}\small\item\em Включить TIM12 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_gaf48ef87650517652ddec039a189507ac}{USE\+\_\+\+TIM13}}
\begin{DoxyCompactList}\small\item\em Включить TIM13 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___t_i_m___i_n_i_t_ga9ae40be31d5271abe3e49f896d916d5c}{USE\+\_\+\+TIM14}}
\begin{DoxyCompactList}\small\item\em Включить TIM14 в \doxylink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{general__tim_8h_a867308f75c1be4f2090bcda3bcd900c9}{TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos}}~0
\item
\#define \mbox{\hyperlink{general__tim_8h_a8c43257cbfd6ac70b6eb0839e47bbd07}{TIM\+\_\+\+IT\+\_\+\+CONF}}~(1$<$$<$(TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos))
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item
enum \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaeb611874216a4661fb83366b99b9e787}{TIM\+\_\+\+ITMode\+Type\+Def}} \{ \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaeb611874216a4661fb83366b99b9e787ab0869828a4dfd62eaa44868ca27835f8}{TIM\+\_\+\+DEFAULT}} = 0
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaeb611874216a4661fb83366b99b9e787a89ecf1ef6d45ead2efcb7dd30396114c}{TIM\+\_\+\+IT\+\_\+\+MODE}} = TIM\+\_\+\+IT\+\_\+\+CONF
\}
\begin{DoxyCompactList}\small\item\em Режим прерываний таймера \end{DoxyCompactList}\item
enum \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaa0a51c870325217ac099881f09dd0800}{TIM\+\_\+\+MHz\+Tick\+Base\+Type\+Def}} \{ \newline
\mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800ae838122c0e83bc57ad31b546bf2f00e5}{TIM\+\_\+\+Base\+\_\+\+Disable}} = 0
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a63df3123d0ddc592b189ed1594456ea2}{TIM\+\_\+\+Tick\+Base\+\_\+1\+US}} = 1
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a060b01e890891fd17c8f95b55a94139f}{TIM\+\_\+\+Tick\+Base\+\_\+10\+US}} = 10
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a096ef0ab67788487f69d8877c6d89b30}{TIM\+\_\+\+Tick\+Base\+\_\+100\+US}} = 100
, \newline
\mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a6a66c5ed1d966c9e30f0219b664d2b25}{TIM\+\_\+\+Tick\+Base\+\_\+1\+MS}} = 1000
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a7421a08abd119e71aa99eea5ab5d6daa}{TIM\+\_\+\+Tick\+Base\+\_\+10\+MS}} = 10000
, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ggaa0a51c870325217ac099881f09dd0800a18527a2d781eb4365aecd9a3184fc1da}{TIM\+\_\+\+Tick\+Base\+\_\+100\+MS}} = 100000
\}
\begin{DoxyCompactList}\small\item\em Длительность тика таймера (частота тактирования таймера) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga7044214f24a9868ba7e1650b55e639ec}{TIM\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_t_i_m___settings_type_def}{TIM\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}stim)
\begin{DoxyCompactList}\small\item\em Инициализация таймера. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaad47337be7ba2f6c0777c40d7278c931}{TIM\+\_\+\+Base\+\_\+\+Msp\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_gaeb611874216a4661fb83366b99b9e787}{TIM\+\_\+\+ITMode\+Type\+Def}} it\+\_\+mode)
\begin{DoxyCompactList}\small\item\em Инициализация CLK и NVIC таймеров. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___g_e_n_e_r_a_l_ga879e3f1c919c02990736730275367115}{TIM\+\_\+\+Base\+\_\+\+Msp\+De\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Деинициализация CLK и NVIC таймеров. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga4c0dfde4e15f677600605348b4e97834}{TIM\+\_\+\+Delay\+\_\+\+Start}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Начать отсчет неблокирующей задержки. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga88c552a133cb6e3015453cccab74c07e}{TIM\+\_\+\+Delay}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint16\+\_\+t delay)
\begin{DoxyCompactList}\small\item\em Задержка в тиках таймера (блокирующая). \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___d_e_l_a_y_ga108637af414bff3373059273b815ce9b}{TIM\+\_\+\+Delay\+\_\+\+Non\+Blocking}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint16\+\_\+t delay)
\begin{DoxyCompactList}\small\item\em Задержка в тиках таймера (неблокирующая). \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gadb2f465d89f609e035867e980c3a29c6}{TIM\+\_\+\+Output\+\_\+\+PWM\+\_\+\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, TIM\+\_\+\+OC\+\_\+\+Init\+Type\+Def \texorpdfstring{$\ast$}{*}s\+Config\+OC, uint32\+\_\+t TIM\+\_\+\+CHANNEL, GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint32\+\_\+t PWM\+\_\+\+PIN)
\begin{DoxyCompactList}\small\item\em Инициализация выхода ШИМ таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___o_c_gae2608ca8023e9a0713af0b4fbfbc1889}{TIM\+\_\+\+OC\+\_\+\+Comparator\+\_\+\+Init}} (TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim, uint32\+\_\+t TIM\+\_\+\+CHANNEL)
\begin{DoxyCompactList}\small\item\em Инициализация OC компаратора таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_ga8d16c3b7e7c6decc54c5c3d1a8bf0fbc}{TIM\+\_\+\+Encoder\+\_\+\+Init}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc1, TIM\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}htim)
\begin{DoxyCompactList}\small\item\em Инициализация режима энкодер у таймера. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_gac3bc6525f88c275e47eb864e6d567501}{TIM\+\_\+\+Encoder\+\_\+\+Read}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc)
\begin{DoxyCompactList}\small\item\em Считать энкодер. \end{DoxyCompactList}\item
int \mbox{\hyperlink{group___m_y_l_i_b_s___t_i_m___e_n_c_o_d_e_r_ga117b795017e9e3a357ddefe323412761}{TIM\+\_\+\+Encoder\+\_\+\+Read\+Switch}} (\mbox{\hyperlink{struct_t_i_m___encoder_type_def}{TIM\+\_\+\+Encoder\+Type\+Def}} \texorpdfstring{$\ast$}{*}henc)
\begin{DoxyCompactList}\small\item\em Считать кнопку энкодера. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Заголовочный файл для модуля инициализации таймеров и работы с ними.
Definition in file \mbox{\hyperlink{general__tim_8h_source}{general\+\_\+tim.\+h}}.
\label{doc-define-members}
\Hypertarget{general__tim_8h_doc-define-members}
\doxysubsection{Macro Definition Documentation}
\Hypertarget{general__tim_8h_a867308f75c1be4f2090bcda3bcd900c9}\index{general\_tim.h@{general\_tim.h}!TIM\_IT\_CONF\_Pos@{TIM\_IT\_CONF\_Pos}}
\index{TIM\_IT\_CONF\_Pos@{TIM\_IT\_CONF\_Pos}!general\_tim.h@{general\_tim.h}}
\doxysubsubsection{\texorpdfstring{TIM\_IT\_CONF\_Pos}{TIM\_IT\_CONF\_Pos}}
{\footnotesize\ttfamily \label{general__tim_8h_a867308f75c1be4f2090bcda3bcd900c9}
\#define TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos~0}
Definition at line \mbox{\hyperlink{general__tim_8h_source_l00058}{58}} of file \mbox{\hyperlink{general__tim_8h_source}{general\+\_\+tim.\+h}}.
\Hypertarget{general__tim_8h_a8c43257cbfd6ac70b6eb0839e47bbd07}\index{general\_tim.h@{general\_tim.h}!TIM\_IT\_CONF@{TIM\_IT\_CONF}}
\index{TIM\_IT\_CONF@{TIM\_IT\_CONF}!general\_tim.h@{general\_tim.h}}
\doxysubsubsection{\texorpdfstring{TIM\_IT\_CONF}{TIM\_IT\_CONF}}
{\footnotesize\ttfamily \label{general__tim_8h_a8c43257cbfd6ac70b6eb0839e47bbd07}
\#define TIM\+\_\+\+IT\+\_\+\+CONF~(1$<$$<$(TIM\+\_\+\+IT\+\_\+\+CONF\+\_\+\+Pos))}
Definition at line \mbox{\hyperlink{general__tim_8h_source_l00065}{65}} of file \mbox{\hyperlink{general__tim_8h_source}{general\+\_\+tim.\+h}}.

View File

@@ -0,0 +1 @@
14f61c9b62fbfc946bfe7c42f49acae2

View File

@@ -0,0 +1 @@
e71808e8c11f07d6097219cb8d26f349

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,99 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Src/general\+\_\+uart.c File Reference}
\hypertarget{general__uart_8c}{}\label{general__uart_8c}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_uart.c@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Src/general\_uart.c}}
Модуль для инициализации UART.
{\ttfamily \#include "{}general\+\_\+uart.\+h"{}}\newline
{\ttfamily \#include "{}general\+\_\+gpio.\+h"{}}\newline
Include dependency graph for general\+\_\+uart.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=254pt]{general__uart_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_gab9f07396b778505c934143e89953e154}{UART\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}suart)
\begin{DoxyCompactList}\small\item\em Инициализация UART с помощью структуры \doxylink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}. \end{DoxyCompactList}\item
void \mbox{\hyperlink{general__uart_8c_a3abae05bbde5f3b402bf18ca13dc6a0b}{UART\+\_\+\+GPIO\+\_\+\+Init}} (GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}GPIOx, uint16\+\_\+t GPIO\+\_\+\+PIN\+\_\+\+RX, uint16\+\_\+t GPIO\+\_\+\+PIN\+\_\+\+TX)
\begin{DoxyCompactList}\small\item\em Инициализация GPIO для UART. \end{DoxyCompactList}\item
void \mbox{\hyperlink{general__uart_8c_ad82d0cbd19151675135fd75dad315d05}{UART\+\_\+\+DMA\+\_\+\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart, DMA\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}hdma\+\_\+rx, DMA\+\_\+\+Stream\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}DMAChannel, uint32\+\_\+t DMA\+\_\+\+CHANNEL\+\_\+X)
\begin{DoxyCompactList}\small\item\em Инициализация DMA для UART. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart)
\begin{DoxyCompactList}\small\item\em Настройка тактирования и прерываний UART. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_ga93ed6ceef4e3b5e7885786125cce93bc}{UART\+\_\+\+Msp\+De\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart)
\begin{DoxyCompactList}\small\item\em Деинициализация тактирования и прерываний UART. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_ga2a22e46ecb9e04b2ce197a0e9c09044a}{UART\+\_\+\+Check\+\_\+\+Init\+\_\+\+Struct}} (\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}suart)
\begin{DoxyCompactList}\small\item\em Проверка корректности структуры инициализации UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Модуль для инициализации UART.
Реализация функций для работы с UART\+:
\begin{DoxyItemize}
\item Инициализация UART и его линий RX/\+TX
\item Настройка DMA для UART
\item Настройка GPIO для UART
\item Настройка NVIC и тактирования UART
\end{DoxyItemize}
Definition in file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
\label{doc-func-members}
\Hypertarget{general__uart_8c_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{general__uart_8c_a3abae05bbde5f3b402bf18ca13dc6a0b}\index{general\_uart.c@{general\_uart.c}!UART\_GPIO\_Init@{UART\_GPIO\_Init}}
\index{UART\_GPIO\_Init@{UART\_GPIO\_Init}!general\_uart.c@{general\_uart.c}}
\doxysubsubsection{\texorpdfstring{UART\_GPIO\_Init()}{UART\_GPIO\_Init()}}
{\footnotesize\ttfamily \label{general__uart_8c_a3abae05bbde5f3b402bf18ca13dc6a0b}
void UART\+\_\+\+GPIO\+\_\+\+Init (\begin{DoxyParamCaption}\item[{GPIO\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}}]{GPIOx}{, }\item[{uint16\+\_\+t}]{GPIO\+\_\+\+PIN\+\_\+\+RX}{, }\item[{uint16\+\_\+t}]{GPIO\+\_\+\+PIN\+\_\+\+TX}{}\end{DoxyParamCaption})}
Инициализация GPIO для UART.
\begin{DoxyParams}{Parameters}
{\em GPIOx} & Порт для настройки. \\
\hline
{\em GPIO\+\_\+\+PIN\+\_\+\+RX} & Пин для приема. \\
\hline
{\em GPIO\+\_\+\+PIN\+\_\+\+TX} & Пин для передачи. \\
\hline
\end{DoxyParams}
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00069}{69}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
\Hypertarget{general__uart_8c_ad82d0cbd19151675135fd75dad315d05}\index{general\_uart.c@{general\_uart.c}!UART\_DMA\_Init@{UART\_DMA\_Init}}
\index{UART\_DMA\_Init@{UART\_DMA\_Init}!general\_uart.c@{general\_uart.c}}
\doxysubsubsection{\texorpdfstring{UART\_DMA\_Init()}{UART\_DMA\_Init()}}
{\footnotesize\ttfamily \label{general__uart_8c_ad82d0cbd19151675135fd75dad315d05}
void UART\+\_\+\+DMA\+\_\+\+Init (\begin{DoxyParamCaption}\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{, }\item[{DMA\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{hdma\+\_\+rx}{, }\item[{DMA\+\_\+\+Stream\+\_\+\+Type\+Def \texorpdfstring{$\ast$}{*}}]{DMAChannel}{, }\item[{uint32\+\_\+t}]{DMA\+\_\+\+CHANNEL\+\_\+X}{}\end{DoxyParamCaption})}
Инициализация DMA для UART.
\begin{DoxyParams}{Parameters}
{\em huart} & Указатель на хендл UART. \\
\hline
{\em hdma\+\_\+rx} & Указатель на хендл DMA для линии приема UART. \\
\hline
{\em DMAChannel} & Указатель на канал DMA/поток DMA в STM32\+F407. \\
\hline
{\em DMA\+\_\+\+CHANNEL\+\_\+X} & Канал DMA. \\
\hline
\end{DoxyParams}
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00109}{109}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.

View File

@@ -0,0 +1 @@
73551e2f9e2a1b4e70f1fc75e08e7ede

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,64 @@
\doxysection{E\+:/.WORK/\+STM32/\+STM\+\_\+\+Libs/\+STM32\+\_\+\+General/\+Inc/general\+\_\+uart.h File Reference}
\hypertarget{general__uart_8h}{}\label{general__uart_8h}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_uart.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_uart.h}}
Заголовочный файл для модуля инициализации UART.
{\ttfamily \#include "{}mylibs\+\_\+defs.\+h"{}}\newline
Include dependency graph for general\+\_\+uart.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__uart_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{general__uart_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}}
\begin{DoxyCompactList}\small\item\em Структура настроек UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga167269406e73327b95c3bb7b9cfe6d89}{HAL\+\_\+\+UART\+\_\+\+MODULE\+\_\+\+ENABLED}}
\begin{DoxyCompactList}\small\item\em Включение HAL UART. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gace54f148bb1d72f13bf397d096d38d1b}{USE\+\_\+\+USART1}}
\begin{DoxyCompactList}\small\item\em Включить USART1 в \doxylink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gaacb3968508217a0d8b3f64aa0c8aa07d}{USE\+\_\+\+USART2}}
\begin{DoxyCompactList}\small\item\em Включить USART2 в \doxylink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga6dadd967b428aade24008ec060009976}{USE\+\_\+\+USART3}}
\begin{DoxyCompactList}\small\item\em Включить USART3 в \doxylink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga779530e93e7aa1f25eb13045ec42b8e7}{USE\+\_\+\+UART4}}
\begin{DoxyCompactList}\small\item\em Включить UART4 в \doxylink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga592c6bf4a6496d6806ba0838cdfa2340}{USE\+\_\+\+UART5}}
\begin{DoxyCompactList}\small\item\em Включить UART5 в \doxylink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\item
\#define \mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gafaeb8bdd4aa7fb1987505530daa90868}{USE\+\_\+\+USART6}}
\begin{DoxyCompactList}\small\item\em Включить USART6 в \doxylink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_gab9f07396b778505c934143e89953e154}{UART\+\_\+\+Base\+\_\+\+Init}} (\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}suart)
\begin{DoxyCompactList}\small\item\em Инициализация UART с помощью структуры \doxylink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}. \end{DoxyCompactList}\item
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_ga2a22e46ecb9e04b2ce197a0e9c09044a}{UART\+\_\+\+Check\+\_\+\+Init\+\_\+\+Struct}} (\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}suart)
\begin{DoxyCompactList}\small\item\em Проверка корректности структуры инициализации UART. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart)
\begin{DoxyCompactList}\small\item\em Настройка тактирования и прерываний UART. \end{DoxyCompactList}\item
void \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_ga93ed6ceef4e3b5e7885786125cce93bc}{UART\+\_\+\+Msp\+De\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart)
\begin{DoxyCompactList}\small\item\em Деинициализация тактирования и прерываний UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Заголовочный файл для модуля инициализации UART.
Definition in file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.

View File

@@ -0,0 +1 @@
3fb58d30f0272cdb1f584473a2620857

View File

@@ -0,0 +1 @@
e723b33bcae9ec70bc034152e4221f62

View File

@@ -0,0 +1,163 @@
\doxysection{general\+\_\+uart.\+h}
\hypertarget{general__uart_8h_source}{}\label{general__uart_8h_source}\index{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_uart.h@{E:/.WORK/STM32/STM\_Libs/STM32\_General/Inc/general\_uart.h}}
\mbox{\hyperlink{general__uart_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00001}00001\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00002}00002\ \textcolor{comment}{**************************************************************************}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00003}00003\ \textcolor{comment}{*\ @file\ general\_uart.h}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00004}00004\ \textcolor{comment}{*\ @brief\ Заголовочный\ файл\ для\ модуля\ инициализации\ UART.}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00005}00005\ \textcolor{comment}{**************************************************************************}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00006}00006\ \textcolor{comment}{*\ @defgroup\ GENERAL\_UART\ \ \ \ \ \ UART\ Tools}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00007}00007\ \textcolor{comment}{*\ @ingroup\ \ STM32\_GENERAL}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00008}00008\ \textcolor{comment}{*\ @brief\ \ \ \ Функции\ и\ макросы\ для\ удобной\ работы\ с\ UART.}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00009}00009\ \textcolor{comment}{*\ @details}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00010}00010\ \textcolor{comment}{Модуль\ предоставляет\ функции\ для\ базовой\ инициализации\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00011}00011\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00012}00012\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00013}00013\ \textcolor{comment}{@par\ Пример\ использования:}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00014}00014\ \textcolor{comment}{@code}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00015}00015\ \textcolor{comment}{//\ Структура\ настроек\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00016}00016\ \textcolor{comment}{UART\_SettingsTypeDef\ uart2Settings;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00017}00017\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00018}00018\ \textcolor{comment}{void\ UART2\_Init(void)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00019}00019\ \textcolor{comment}{\{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00020}00020\ \textcolor{comment}{\ \ \ \ //\ Настройка\ UART2\ с\ 115200\ бод,\ 8\ бит,\ 1\ стоп-\/бит,\ без\ паритета}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00021}00021\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Instance\ =\ USART2;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00022}00022\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.BaudRate\ =\ 115200;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00023}00023\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.WordLength\ =\ UART\_WORDLENGTH\_8B;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00024}00024\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.StopBits\ =\ UART\_STOPBITS\_1;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00025}00025\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.Parity\ =\ UART\_PARITY\_NONE;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00026}00026\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.Mode\ =\ UART\_MODE\_TX\_RX;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00027}00027\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.HwFlowCtl\ =\ UART\_HWCONTROL\_NONE;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00028}00028\ \textcolor{comment}{\ \ \ \ uart2Settings.huart.Init.OverSampling\ =\ UART\_OVERSAMPLING\_16;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00029}00029\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00030}00030\ \textcolor{comment}{\ \ \ \ //\ Настройка\ GPIO}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00031}00031\ \textcolor{comment}{\ \ \ \ uart2Settings.GPIOx\ =\ GPIOA;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00032}00032\ \textcolor{comment}{\ \ \ \ uart2Settings.GPIO\_PIN\_TX\ =\ GPIO\_PIN\_2;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00033}00033\ \textcolor{comment}{\ \ \ \ uart2Settings.GPIO\_PIN\_RX\ =\ GPIO\_PIN\_3;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00034}00034\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00035}00035\ \textcolor{comment}{\ \ \ \ //\ DMA\ не\ используется\ в\ этом\ примере}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00036}00036\ \textcolor{comment}{\ \ \ \ uart2Settings.DMAChannel\ =\ NULL;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00037}00037\ \textcolor{comment}{\ \ \ \ uart2Settings.DMA\_CHANNEL\_X\ =\ 0;}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00038}00038\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00039}00039\ \textcolor{comment}{\ \ \ \ //\ Инициализация\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00040}00040\ \textcolor{comment}{\ \ \ \ if(UART\_Base\_Init(\&uart2Settings)\ !=\ HAL\_OK)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00041}00041\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00042}00042\ \textcolor{comment}{\ \ \ \ \ \ \ \ //\ Обработка\ ошибки}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00043}00043\ \textcolor{comment}{\ \ \ \ \ \ \ \ Error\_Handler();}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00044}00044\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00045}00045\ \textcolor{comment}{\}}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00046}00046\ \textcolor{comment}{@endcode}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00047}00047\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00048}00048\ \textcolor{comment}{*\ \ @note\ Требуется\ подключение\ модуля\ UART\ в\ библиотеке\ HAL\ }}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00049}00049\ \textcolor{comment}{@code\ }}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00050}00050\ \textcolor{comment}{\#define\ HAL\_UART\_MODULE\_ENABLED}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00051}00051\ \textcolor{comment}{@endcode}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00052}00052\ \textcolor{comment}{*\ @\{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00053}00053\ \textcolor{comment}{*************************************************************************/}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00054}00054\ \textcolor{preprocessor}{\#ifndef\ \_\_UART\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00055}00055\ \textcolor{preprocessor}{\#define\ \_\_UART\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00056}00056\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00057}00057\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00058}00058\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00059}00059\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00060}00060\ \textcolor{comment}{\ \ *\ @addtogroup\ UART\_INIT\ UART\ Init\ defines}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00061}00061\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00062}00062\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ GENERAL\_CONFIGS\ Конфигурации\ STM32\ General}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00063}00063\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Настройка\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00064}00064\ \textcolor{comment}{\ \ *\ @\{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00065}00065\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00066}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga167269406e73327b95c3bb7b9cfe6d89}{00066}}\ \textcolor{preprocessor}{\#define\ HAL\_UART\_MODULE\_ENABLED\ \ \ }\textcolor{comment}{///<\ Включение\ HAL\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00067}00067\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00068}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gace54f148bb1d72f13bf397d096d38d1b}{00068}}\ \textcolor{preprocessor}{\#define\ USE\_USART1\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART1\ в\ @ref\ UART\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00069}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gaacb3968508217a0d8b3f64aa0c8aa07d}{00069}}\ \textcolor{preprocessor}{\#define\ USE\_USART2\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART2\ в\ @ref\ UART\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00070}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga6dadd967b428aade24008ec060009976}{00070}}\ \textcolor{preprocessor}{\#define\ USE\_USART3\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART3\ в\ @ref\ UART\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00071}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga779530e93e7aa1f25eb13045ec42b8e7}{00071}}\ \textcolor{preprocessor}{\#define\ USE\_UART4\ \ \ \ \ }\textcolor{comment}{///<\ Включить\ UART4\ в\ @ref\ UART\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00072}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga592c6bf4a6496d6806ba0838cdfa2340}{00072}}\ \textcolor{preprocessor}{\#define\ USE\_UART5\ \ \ \ \ }\textcolor{comment}{///<\ Включить\ UART5\ в\ @ref\ UART\_MspInit}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00073}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gafaeb8bdd4aa7fb1987505530daa90868}{00073}}\ \textcolor{preprocessor}{\#define\ USE\_USART6\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART6\ в\ @ref\ UART\_MspInit}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00074}00074\ \textcolor{comment}{/**\ UART\_INIT}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00075}00075\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00076}00076\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00077}00077\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00078}00078\ \textcolor{preprocessor}{\#include\ "{}mylibs\_defs.h"{}}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00079}00079\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00080}00080\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00081}00081\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00082}00082\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00083}00083\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00084}00084\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00085}00085\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00086}00086\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00087}00087\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00088}00088\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00089}00089\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00090}00090\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00091}00091\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00092}00092\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00093}00093\ \textcolor{comment}{\ \ *\ @brief\ Структура\ настроек\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00094}00094\ \textcolor{comment}{\ \ *\ @details\ Содержит\ все\ необходимые\ параметры\ для\ инициализации\ UART,}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00095}00095\ \textcolor{comment}{\ \ *\ включая\ GPIO\ и\ DMA.}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00096}00096\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00097}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{00097}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00098}00098\ \{}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00099}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{00099}}\ \ \ UART\_HandleTypeDef\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ HAL\ handle\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00100}00100\ \ \ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00101}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_af6f9910d065bae715cdb4a1024143a8f}{00101}}\ \ \ GPIO\_TypeDef\ *\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_af6f9910d065bae715cdb4a1024143a8f}{GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ для\ UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00102}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a3fba2b52788fe453348b5d92ed52ba49}{00102}}\ \ \ uint16\_t\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a3fba2b52788fe453348b5d92ed52ba49}{GPIO\_PIN\_RX}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ приема}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00103}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a5f1babfcfb436cd77f5614253c0a5bef}{00103}}\ \ \ uint16\_t\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a5f1babfcfb436cd77f5614253c0a5bef}{GPIO\_PIN\_TX}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ передачи}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00104}00104\ \ \ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00105}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a1ecc9ac6a1d2747ade56770cbab6a613}{00105}}\ \ \ DMA\_Stream\_TypeDef\ *\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a1ecc9ac6a1d2747ade56770cbab6a613}{DMAChannel}};\ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Канал\ DMA\ (NULL\ если\ не\ нужен)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00106}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a15ce92b03f7f189bfbe1ab88a5f94d19}{00106}}\ \ \ uint32\_t\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a15ce92b03f7f189bfbe1ab88a5f94d19}{DMA\_CHANNEL\_X}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Номер\ канала\ DMA\ (0\ если\ не\ нужен)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00107}00107\ \ \ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00108}00108\ \}\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\_SettingsTypeDef}};}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00109}00109\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00110}00110\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00111}00111\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00112}00112\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00113}00113\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00114}00114\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00115}00115\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00116}00116\ \textcolor{comment}{/*\ Инициализация\ UART\ с\ использованием\ структуры\ настроек\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00117}00117\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_gab9f07396b778505c934143e89953e154}{UART\_Base\_Init}}(\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\_SettingsTypeDef}}\ *suart);}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00118}00118\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00119}00119\ \textcolor{comment}{/*\ Проверка\ корректности\ структуры\ настроек\ UART\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00120}00120\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_ga2a22e46ecb9e04b2ce197a0e9c09044a}{UART\_Check\_Init\_Struct}}(\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\_SettingsTypeDef}}\ *suart);}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00121}00121\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00122}00122\ \textcolor{comment}{/*\ Инициализация\ тактирования\ и\ прерываний\ для\ выбранного\ UART\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00123}00123\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\_MspInit}}(UART\_HandleTypeDef\ *huart);}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00124}00124\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00125}00125\ \textcolor{comment}{/*\ Деинициализация\ тактирования\ и\ прерываний\ для\ выбранного\ UART\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00126}00126\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___g_e_n_e_r_a_l___u_a_r_t_ga93ed6ceef4e3b5e7885786125cce93bc}{UART\_MspDeInit}}(UART\_HandleTypeDef\ *huart);}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00127}00127\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00128}00128\ \ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00129}00129\ \textcolor{comment}{/**\ }}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00130}00130\ \textcolor{comment}{\ *\ @cond\ UART\_INTERNAL}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00131}00131\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00132}00132\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00133}00133\ \textcolor{comment}{/*\ Настройка\ GPIO\ для\ UART\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00134}00134\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{general__uart_8c_a3abae05bbde5f3b402bf18ca13dc6a0b}{UART\_GPIO\_Init}}(GPIO\_TypeDef\ *GPIOx,\ uint16\_t\ GPIO\_PIN\_RX,\ uint16\_t\ GPIO\_PIN\_TX);}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00135}00135\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00136}00136\ \textcolor{comment}{/*\ Настройка\ DMA\ для\ UART\ */}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00137}00137\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{general__uart_8c_ad82d0cbd19151675135fd75dad315d05}{UART\_DMA\_Init}}(UART\_HandleTypeDef\ *huart,\ DMA\_HandleTypeDef\ *hdma\_rx,\ DMA\_Stream\_TypeDef\ *DMAChannel,\ uint32\_t\ DMA\_CHANNEL\_X);}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00138}00138\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00139}00139\ \textcolor{preprocessor}{\#ifndef\ \_\_USER\_LINKDMA}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00140}00140\ \textcolor{comment}{/**\ \ }}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00141}00141\ \textcolor{comment}{\ \ *\ @brief\ \ Аналог\ HAL\ макроса\ для\ привязки\ DMA\ к\ UART.}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00142}00142\ \textcolor{comment}{\ \ *\ @note\ \ \ @ref\ \_\_HAL\_LINKDMA.}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00143}00143\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00144}00144\ \textcolor{preprocessor}{\#define\ \_\_USER\_LINKDMA(\_\_HANDLE\_\_,\ \_\_PPP\_DMA\_FIELD\_\_,\ \_\_DMA\_HANDLE\_\_)\ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00145}00145\ \textcolor{preprocessor}{do\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00146}00146\ \textcolor{preprocessor}{(\_\_HANDLE\_\_)-\/>\_\_PPP\_DMA\_FIELD\_\_\ =\ (\_\_DMA\_HANDLE\_\_);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00147}00147\ \textcolor{preprocessor}{(\_\_DMA\_HANDLE\_\_)-\/>Parent\ =\ (\_\_HANDLE\_\_);\}\ while(0U)}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00148}00148\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00149}00149\ \ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00150}00150\ \textcolor{comment}{/**\ @endcond\ */}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00151}00151\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00152}00152\ }
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00153}00153\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_UART\_GENERAL\_H\_}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00154}00154\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00155}00155\ \textcolor{comment}{/**\ GENERAL\_UART}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00156}00156\ \textcolor{comment}{\ \ *\ @\}}}
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00157}00157\ \textcolor{comment}{\ \ */}}
\end{DoxyCode}

View File

@@ -0,0 +1 @@
eadcf81c05b9b6f04656fb13d3e1bc6b

View File

@@ -0,0 +1,23 @@
\doxysection{General Configs }
\hypertarget{group___g_e_n_e_r_a_l___c_o_n_f_i_g_s}{}\label{group___g_e_n_e_r_a_l___c_o_n_f_i_g_s}\index{General Configs@{General Configs}}
Collaboration diagram for General Configs\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=297pt]{group___g_e_n_e_r_a_l___c_o_n_f_i_g_s}
\end{center}
\end{figure}
\doxysubsubsection*{Topics}
\begin{DoxyCompactItemize}
\item
\mbox{\hyperlink{group___g_p_i_o___i_n_i_t}{GPIO Init defines}}
\begin{DoxyCompactList}\small\item\em Настройка состояний кнопок и количества тиков в периоде ШИМ \end{DoxyCompactList}\item
\mbox{\hyperlink{group___s_p_i___i_n_i_t}{SPI Init defines}}
\begin{DoxyCompactList}\small\item\em Настройка SPI. \end{DoxyCompactList}\item
\mbox{\hyperlink{group___t_i_m___i_n_i_t}{TIM Init defines}}
\begin{DoxyCompactList}\small\item\em Настройка таймеров \end{DoxyCompactList}\item
\mbox{\hyperlink{group___u_a_r_t___i_n_i_t}{UART Init defines}}
\begin{DoxyCompactList}\small\item\em Настройка UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}

Some files were not shown because too many files have changed in this diff Show More