корр. gitignore
This commit is contained in:
52
Doc/latex/_s_p_i__usage__example-example.tex
Normal file
52
Doc/latex/_s_p_i__usage__example-example.tex
Normal file
@@ -0,0 +1,52 @@
|
||||
\doxysection{SPI\+\_\+\+Usage\+\_\+\+Example}
|
||||
\hypertarget{_s_p_i__usage__example-example}{}\label{_s_p_i__usage__example-example}Пример использования SPI\+\_\+\+Base\+\_\+\+Init.
|
||||
|
||||
Пример использования SPI\+\_\+\+Base\+\_\+\+Init. Инициализация SPI1 с базовыми настройками\+:
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__spi_8h}{general\_spi.h}}"{}}}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}}\ mySPI;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\textcolor{keywordtype}{void}\ SPI1\_Init(\textcolor{keywordtype}{void})}
|
||||
\DoxyCodeLine{\{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ SPI1}}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Instance\ =\ SPI1;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.Mode\ =\ SPI\_MODE\_MASTER;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.Direction\ =\ SPI\_DIRECTION\_2LINES;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.DataSize\ =\ SPI\_DATASIZE\_8BIT;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.CLKPolarity\ =\ SPI\_POLARITY\_LOW;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.CLKPhase\ =\ SPI\_PHASE\_1EDGE;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.NSS\ =\ SPI\_NSS\_SOFT;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.BaudRatePrescaler\ =\ SPI\_BAUDRATEPRESCALER\_16;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.FirstBit\ =\ SPI\_FIRSTBIT\_MSB;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.TIMode\ =\ SPI\_TIMODE\_DISABLE;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.CRCCalculation\ =\ SPI\_CRCCALCULATION\_DISABLE;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ GPIO\ для\ SPI}}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a6a15d48eccf92959de3a086031fdc979}{CLK\_GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3bcb1ed12da3544e02e6d36493669bdc}{CLK\_PIN}}\ =\ GPIO\_PIN\_5;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3f3748103a0b7861f6700042fd691ba1}{CLK\_GPIO\_AlternageFunc}}\ =\ GPIO\_AF5\_SPI1;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0d55a2941854f61934487f3d209cfa95}{MISO\_GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3366c654d7ec6dd41c6a0b504dc8509a}{MISO\_PIN}}\ =\ GPIO\_PIN\_6;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_aecd7a5c6e205335b8ed229d74cd35d14}{MISO\_GPIO\_AlternageFunc}}\ =\ GPIO\_AF5\_SPI1;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0af3bdb273818ff97eb4ff3cff918820}{MOSI\_GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a961208869faf4a7369aaf4edde75f176}{MOSI\_PIN}}\ =\ GPIO\_PIN\_7;}
|
||||
\DoxyCodeLine{\ \ \ \ mySPI.\mbox{\hyperlink{struct_s_p_i___settings_type_def_afbe75a1c36650a4a9b41fa706a4c7eab}{MOSI\_GPIO\_AlternageFunc}}\ =\ GPIO\_AF5\_SPI1;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ SPI}}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_y___l_i_b_s___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}{SPI\_Base\_Init}}(\&mySPI)\ !=\ HAL\_OK)}
|
||||
\DoxyCodeLine{\ \ \ \ \{}
|
||||
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Обработка\ ошибки}}
|
||||
\DoxyCodeLine{\ \ \ \ \}}
|
||||
\DoxyCodeLine{\}}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
|
||||
|
||||
\begin{DoxyCodeInclude}{0}
|
||||
|
||||
\end{DoxyCodeInclude}
|
||||
|
||||
4
Doc/latex/examples.tex
Normal file
4
Doc/latex/examples.tex
Normal file
@@ -0,0 +1,4 @@
|
||||
\doxysection{Examples}
|
||||
Here is a list of all examples\+:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\mbox{\hyperlink{_s_p_i__usage__example-example}{SPI\+\_\+\+Usage\+\_\+\+Example}}\end{DoxyCompactItemize}
|
||||
79
Doc/latex/general__spi_8c.tex
Normal file
79
Doc/latex/general__spi_8c.tex
Normal file
@@ -0,0 +1,79 @@
|
||||
\doxysection{E\+:/.WORK/\+STM32/\+STM32\+\_\+\+Extended\+Libs/\+My\+Libs\+General/\+Src/general\+\_\+spi.c File Reference}
|
||||
\hypertarget{general__spi_8c}{}\label{general__spi_8c}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Src/general\_spi.c@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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}}.
|
||||
|
||||
1
Doc/latex/general__spi_8c__incl.md5
Normal file
1
Doc/latex/general__spi_8c__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
2ef78bca7433c0859e5f0181551ac011
|
||||
BIN
Doc/latex/general__spi_8c__incl.pdf
Normal file
BIN
Doc/latex/general__spi_8c__incl.pdf
Normal file
Binary file not shown.
290
Doc/latex/general__spi_8c_source.tex
Normal file
290
Doc/latex/general__spi_8c_source.tex
Normal file
File diff suppressed because one or more lines are too long
58
Doc/latex/general__spi_8h.tex
Normal file
58
Doc/latex/general__spi_8h.tex
Normal file
@@ -0,0 +1,58 @@
|
||||
\doxysection{E\+:/.WORK/\+STM32/\+STM32\+\_\+\+Extended\+Libs/\+My\+Libs\+General/\+Inc/general\+\_\+spi.h File Reference}
|
||||
\hypertarget{general__spi_8h}{}\label{general__spi_8h}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_spi.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/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=229pt]{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=229pt]{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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\doxysubsubsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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}}.
|
||||
|
||||
1
Doc/latex/general__spi_8h__dep__incl.md5
Normal file
1
Doc/latex/general__spi_8h__dep__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
fea888aee51476403223144bb4236fba
|
||||
BIN
Doc/latex/general__spi_8h__dep__incl.pdf
Normal file
BIN
Doc/latex/general__spi_8h__dep__incl.pdf
Normal file
Binary file not shown.
1
Doc/latex/general__spi_8h__incl.md5
Normal file
1
Doc/latex/general__spi_8h__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
8a3d826e5468561d84d56e799c52cb0a
|
||||
BIN
Doc/latex/general__spi_8h__incl.pdf
Normal file
BIN
Doc/latex/general__spi_8h__incl.pdf
Normal file
Binary file not shown.
176
Doc/latex/general__spi_8h_source.tex
Normal file
176
Doc/latex/general__spi_8h_source.tex
Normal file
@@ -0,0 +1,176 @@
|
||||
\doxysection{general\+\_\+spi.\+h}
|
||||
\hypertarget{general__spi_8h_source}{}\label{general__spi_8h_source}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_spi.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/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\ MY\_LIBS\_SPI\ \ \ \ \ \ SPI\ Tools}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00007}00007\ \textcolor{comment}{*\ @ingroup\ \ MYLIBS\_PERIPHERAL}}
|
||||
\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\ Init\ defines}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00071}00071\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MY\_LIBS\_SPI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00072}00072\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Настройка\ SPI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00073}00073\ \textcolor{comment}{\ \ *\ @\{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00074}00074\ \textcolor{comment}{\ \ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00075}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga8ad4712bf4add56892d057778e826e0c}{00075}}\ \textcolor{preprocessor}{\#define\ HAL\_SPI\_MODULE\_ENABLED\ \ \ }\textcolor{comment}{///<\ Включение\ HAL\ SPI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00076}00076\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00077}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga2fe0c8aeb2c61679f32836fef479eedf}{00077}}\ \textcolor{preprocessor}{\#define\ USE\_SPI1\ \ \ \ }\textcolor{comment}{///<\ Включить\ SPI1\ в\ @ref\ SPI\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00078}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga53687cddb8e39e76a79b8ffaa152fb2b}{00078}}\ \textcolor{preprocessor}{\#define\ USE\_SPI2\ \ \ \ }\textcolor{comment}{///<\ Включить\ SPI2\ в\ @ref\ SPI\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00079}\mbox{\hyperlink{group___s_p_i___i_n_i_t_ga5fdd6e5934a8005ef05b80f6d95883dc}{00079}}\ \textcolor{preprocessor}{\#define\ USE\_SPI3\ \ \ \ }\textcolor{comment}{///<\ Включить\ SPI3\ в\ @ref\ SPI\_MspInit}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00080}00080\ \textcolor{comment}{/**\ SPI\_INIT}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00081}00081\ \textcolor{comment}{\ \ *\ @\}}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00082}00082\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00083}00083\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00084}00084\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{mylibs__defs_8h}{mylibs\_defs.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00085}00085\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00086}00086\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00087}00087\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00088}00088\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00089}00089\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00090}00090\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00091}00091\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00092}00092\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00093}00093\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00094}00094\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00095}00095\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00096}00096\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00097}00097\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00098}00098\ \textcolor{comment}{/**}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00099}00099\ \textcolor{comment}{\ \ *\ @brief\ Структура\ настроек\ SPI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00100}00100\ \textcolor{comment}{\ \ *\ @details\ Содержит\ все\ необходимые\ параметры\ для\ инициализации\ SPI,}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00101}00101\ \textcolor{comment}{\ \ *\ включая\ GPIO\ и\ DMA.}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00102}00102\ \textcolor{comment}{\ \ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00103}\mbox{\hyperlink{struct_s_p_i___settings_type_def}{00103}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00104}00104\ \{}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00105}\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{00105}}\ \ \ SPI\_HandleTypeDef\ \mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ HAL\ handle\ SPI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00106}00106\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00107}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a6a15d48eccf92959de3a086031fdc979}{00107}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a6a15d48eccf92959de3a086031fdc979}{CLK\_GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ CLK}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00108}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3bcb1ed12da3544e02e6d36493669bdc}{00108}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a3bcb1ed12da3544e02e6d36493669bdc}{CLK\_PIN}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ CLK}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00109}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3f3748103a0b7861f6700042fd691ba1}{00109}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a3f3748103a0b7861f6700042fd691ba1}{CLK\_GPIO\_AlternageFunc}};\ \ \ \textcolor{comment}{///<\ Альтернативная\ функция\ для\ CLK}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00110}00110\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00111}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0d55a2941854f61934487f3d209cfa95}{00111}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0d55a2941854f61934487f3d209cfa95}{MISO\_GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ MISO}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00112}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3366c654d7ec6dd41c6a0b504dc8509a}{00112}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a3366c654d7ec6dd41c6a0b504dc8509a}{MISO\_PIN}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ MISO}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00113}\mbox{\hyperlink{struct_s_p_i___settings_type_def_aecd7a5c6e205335b8ed229d74cd35d14}{00113}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_aecd7a5c6e205335b8ed229d74cd35d14}{MISO\_GPIO\_AlternageFunc}};\ \ \textcolor{comment}{///<\ Альтернативная\ функция\ для\ MISO}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00114}00114\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00115}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0af3bdb273818ff97eb4ff3cff918820}{00115}}\ \ \ GPIO\_TypeDef\ \ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0af3bdb273818ff97eb4ff3cff918820}{MOSI\_GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ MOSI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00116}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a961208869faf4a7369aaf4edde75f176}{00116}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_a961208869faf4a7369aaf4edde75f176}{MOSI\_PIN}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ MOSI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00117}\mbox{\hyperlink{struct_s_p_i___settings_type_def_afbe75a1c36650a4a9b41fa706a4c7eab}{00117}}\ \ \ uint32\_t\ \ \ \ \ \ \mbox{\hyperlink{struct_s_p_i___settings_type_def_afbe75a1c36650a4a9b41fa706a4c7eab}{MOSI\_GPIO\_AlternageFunc}};\ \ \textcolor{comment}{///<\ Альтернативная\ функция\ для\ MOSI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00118}00118\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00119}\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3cfd9469b0617a68bbd2a161ba06bb95}{00119}}\ \ \ DMA\_Stream\_TypeDef\ *\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3cfd9469b0617a68bbd2a161ba06bb95}{DMAChannel}};\ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Канал\ DMA\ (NULL\ если\ не\ нужен)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00120}\mbox{\hyperlink{struct_s_p_i___settings_type_def_aa0edaa145076d2383b3e0095d156d474}{00120}}\ \ \ 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_l00121}00121\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00122}00122\ \}\ \mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}};\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00123}00123\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00124}00124\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00125}00125\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00126}00126\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00127}00127\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00128}00128\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00129}00129\ \textcolor{comment}{/*\ Инициализация\ SPI\ с\ использованием\ структуры\ настроек\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00130}00130\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y___l_i_b_s___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_l00131}00131\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00132}00132\ \textcolor{comment}{/*\ Проверка\ корректности\ структуры\ настроек\ SPI\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00133}00133\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y___l_i_b_s___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_l00134}00134\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00135}00135\ \textcolor{comment}{/*\ Инициализация\ тактирования\ и\ прерываний\ для\ выбранного\ SPI\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00136}00136\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\_MspInit}}(SPI\_HandleTypeDef\ *hspi);}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00137}00137\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00138}00138\ \textcolor{comment}{/*\ Деинициализация\ тактирования\ и\ прерываний\ для\ выбранного\ SPI\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00139}00139\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_y___l_i_b_s___s_p_i_gac279cc3eaa35541edfe330a1844a85e4}{SPI\_MspDeInit}}(SPI\_HandleTypeDef\ *hspi);}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00140}00140\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00141}00141\ \ \ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00142}00142\ \textcolor{comment}{/**\ }}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00143}00143\ \textcolor{comment}{\ *\ @cond\ SPI\_INTERNAL}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00144}00144\ \textcolor{comment}{\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00145}00145\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00146}00146\ \textcolor{comment}{/*\ Настройка\ GPIO\ для\ SPI\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00147}00147\ \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_l00148}00148\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00149}00149\ \textcolor{comment}{/*\ Настройка\ DMA\ для\ SPI\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00150}00150\ \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_l00151}00151\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00152}00152\ \textcolor{preprocessor}{\#ifndef\ \_\_USER\_LINKDMA}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00153}00153\ \textcolor{comment}{/**\ \ }}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00154}00154\ \textcolor{comment}{\ \ *\ @brief\ \ Аналог\ HAL\ макроса\ для\ привязки\ DMA\ к\ UART.}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00155}00155\ \textcolor{comment}{\ \ *\ @note\ \ \ @ref\ \_\_HAL\_LINKDMA.}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00156}00156\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00157}00157\ \textcolor{preprocessor}{\#define\ \_\_USER\_LINKDMA(\_\_HANDLE\_\_,\ \_\_PPP\_DMA\_FIELD\_\_,\ \_\_DMA\_HANDLE\_\_)\ \ \ \(\backslash\)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00158}00158\ \textcolor{preprocessor}{do\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00159}00159\ \textcolor{preprocessor}{(\_\_HANDLE\_\_)-\/>\_\_PPP\_DMA\_FIELD\_\_\ =\ (\_\_DMA\_HANDLE\_\_);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00160}00160\ \textcolor{preprocessor}{(\_\_DMA\_HANDLE\_\_)-\/>Parent\ =\ (\_\_HANDLE\_\_);\}\ while(0U)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00161}00161\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00162}00162\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00163}00163\ \textcolor{comment}{/**\ @endcond\ */}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00164}00164\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00165}00165\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00166}00166\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_SPI\_GENERAL\_H\_}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00167}00167\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00168}00168\ \textcolor{comment}{/**\ MY\_LIBS\_SPI}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00169}00169\ \textcolor{comment}{\ \ *\ @\}}}
|
||||
\DoxyCodeLine{\Hypertarget{general__spi_8h_source_l00170}00170\ \textcolor{comment}{\ \ */}}
|
||||
|
||||
\end{DoxyCode}
|
||||
99
Doc/latex/general__uart_8c.tex
Normal file
99
Doc/latex/general__uart_8c.tex
Normal file
@@ -0,0 +1,99 @@
|
||||
\doxysection{E\+:/.WORK/\+STM32/\+STM32\+\_\+\+Extended\+Libs/\+My\+Libs\+General/\+Src/general\+\_\+uart.c File Reference}
|
||||
\hypertarget{general__uart_8c}{}\label{general__uart_8c}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Src/general\_uart.c@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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}}.
|
||||
|
||||
1
Doc/latex/general__uart_8c__incl.md5
Normal file
1
Doc/latex/general__uart_8c__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
aca5aa942ee268e1ecf62cd6f36f940b
|
||||
BIN
Doc/latex/general__uart_8c__incl.pdf
Normal file
BIN
Doc/latex/general__uart_8c__incl.pdf
Normal file
Binary file not shown.
389
Doc/latex/general__uart_8c_source.tex
Normal file
389
Doc/latex/general__uart_8c_source.tex
Normal file
File diff suppressed because one or more lines are too long
64
Doc/latex/general__uart_8h.tex
Normal file
64
Doc/latex/general__uart_8h.tex
Normal file
@@ -0,0 +1,64 @@
|
||||
\doxysection{E\+:/.WORK/\+STM32/\+STM32\+\_\+\+Extended\+Libs/\+My\+Libs\+General/\+Inc/general\+\_\+uart.h File Reference}
|
||||
\hypertarget{general__uart_8h}{}\label{general__uart_8h}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_uart.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/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=229pt]{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=229pt]{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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\doxysubsubsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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}}.
|
||||
|
||||
1
Doc/latex/general__uart_8h__dep__incl.md5
Normal file
1
Doc/latex/general__uart_8h__dep__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
7baa47c3e07d62541ed2b703b2008261
|
||||
BIN
Doc/latex/general__uart_8h__dep__incl.pdf
Normal file
BIN
Doc/latex/general__uart_8h__dep__incl.pdf
Normal file
Binary file not shown.
1
Doc/latex/general__uart_8h__incl.md5
Normal file
1
Doc/latex/general__uart_8h__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
7d0dbc4788a1c22d3b92320c194dfaad
|
||||
BIN
Doc/latex/general__uart_8h__incl.pdf
Normal file
BIN
Doc/latex/general__uart_8h__incl.pdf
Normal file
Binary file not shown.
162
Doc/latex/general__uart_8h_source.tex
Normal file
162
Doc/latex/general__uart_8h_source.tex
Normal file
@@ -0,0 +1,162 @@
|
||||
\doxysection{general\+\_\+uart.\+h}
|
||||
\hypertarget{general__uart_8h_source}{}\label{general__uart_8h_source}\index{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/Inc/general\_uart.h@{E:/.WORK/STM32/STM32\_ExtendedLibs/MyLibsGeneral/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\ MY\_LIBS\_UART\ \ \ \ \ \ UART\ Tools}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00007}00007\ \textcolor{comment}{*\ @ingroup\ \ MYLIBS\_PERIPHERAL}}
|
||||
\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\ Init\ defines}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00061}00061\ \textcolor{comment}{\ \ *\ @ingroup\ \ \ \ MY\_LIBS\_UART}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00062}00062\ \textcolor{comment}{\ \ *\ @brief\ \ \ \ \ \ Настройка\ UART}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00063}00063\ \textcolor{comment}{\ \ *\ @\{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00064}00064\ \textcolor{comment}{\ \ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00065}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga167269406e73327b95c3bb7b9cfe6d89}{00065}}\ \textcolor{preprocessor}{\#define\ HAL\_UART\_MODULE\_ENABLED\ \ \ }\textcolor{comment}{///<\ Включение\ HAL\ UART}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00066}00066\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00067}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gace54f148bb1d72f13bf397d096d38d1b}{00067}}\ \textcolor{preprocessor}{\#define\ USE\_USART1\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART1\ в\ @ref\ UART\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00068}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gaacb3968508217a0d8b3f64aa0c8aa07d}{00068}}\ \textcolor{preprocessor}{\#define\ USE\_USART2\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART2\ в\ @ref\ UART\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00069}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga6dadd967b428aade24008ec060009976}{00069}}\ \textcolor{preprocessor}{\#define\ USE\_USART3\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART3\ в\ @ref\ UART\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00070}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga779530e93e7aa1f25eb13045ec42b8e7}{00070}}\ \textcolor{preprocessor}{\#define\ USE\_UART4\ \ \ \ \ }\textcolor{comment}{///<\ Включить\ UART4\ в\ @ref\ UART\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00071}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_ga592c6bf4a6496d6806ba0838cdfa2340}{00071}}\ \textcolor{preprocessor}{\#define\ USE\_UART5\ \ \ \ \ }\textcolor{comment}{///<\ Включить\ UART5\ в\ @ref\ UART\_MspInit}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00072}\mbox{\hyperlink{group___u_a_r_t___i_n_i_t_gafaeb8bdd4aa7fb1987505530daa90868}{00072}}\ \textcolor{preprocessor}{\#define\ USE\_USART6\ \ \ \ }\textcolor{comment}{///<\ Включить\ USART6\ в\ @ref\ UART\_MspInit}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00073}00073\ \textcolor{comment}{/**\ UART\_INIT}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00074}00074\ \textcolor{comment}{\ \ *\ @\}}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00075}00075\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00076}00076\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00077}00077\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{mylibs__defs_8h}{mylibs\_defs.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00078}00078\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00079}00079\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00080}00080\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00081}00081\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00082}00082\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00083}00083\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00084}00084\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00085}00085\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00086}00086\ \textcolor{comment}{////////////////////////////-\/-\/-\/DEFINES-\/-\/-\/////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00087}00087\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00088}00088\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00089}00089\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00090}00090\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00091}00091\ \textcolor{comment}{/**}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00092}00092\ \textcolor{comment}{\ \ *\ @brief\ Структура\ настроек\ UART}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00093}00093\ \textcolor{comment}{\ \ *\ @details\ Содержит\ все\ необходимые\ параметры\ для\ инициализации\ UART,}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00094}00094\ \textcolor{comment}{\ \ *\ включая\ GPIO\ и\ DMA.}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00095}00095\ \textcolor{comment}{\ \ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00096}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{00096}}\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00097}00097\ \{}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00098}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{00098}}\ \ \ 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_l00099}00099\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00100}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_af6f9910d065bae715cdb4a1024143a8f}{00100}}\ \ \ GPIO\_TypeDef\ *\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_af6f9910d065bae715cdb4a1024143a8f}{GPIOx}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Порт\ для\ UART}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00101}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a3fba2b52788fe453348b5d92ed52ba49}{00101}}\ \ \ uint16\_t\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a3fba2b52788fe453348b5d92ed52ba49}{GPIO\_PIN\_RX}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ приема}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00102}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a5f1babfcfb436cd77f5614253c0a5bef}{00102}}\ \ \ uint16\_t\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a5f1babfcfb436cd77f5614253c0a5bef}{GPIO\_PIN\_TX}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{///<\ Пин\ передачи}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00103}00103\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00104}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a1ecc9ac6a1d2747ade56770cbab6a613}{00104}}\ \ \ 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_l00105}\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a15ce92b03f7f189bfbe1ab88a5f94d19}{00105}}\ \ \ 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_l00106}00106\ \ \ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00107}00107\ \}\ \mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\_SettingsTypeDef}};}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00108}00108\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00109}00109\ \textcolor{comment}{///////////////////////-\/-\/-\/STRUCTURES\ \&\ ENUMS-\/-\/-\///////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00110}00110\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00111}00111\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00112}00112\ \textcolor{comment}{/////////////////////////////////////////////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00113}00113\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00114}00114\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00115}00115\ \textcolor{comment}{/*\ Инициализация\ UART\ с\ использованием\ структуры\ настроек\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00116}00116\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y___l_i_b_s___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_l00117}00117\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00118}00118\ \textcolor{comment}{/*\ Проверка\ корректности\ структуры\ настроек\ UART\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00119}00119\ HAL\_StatusTypeDef\ \mbox{\hyperlink{group___m_y___l_i_b_s___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_l00120}00120\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00121}00121\ \textcolor{comment}{/*\ Инициализация\ тактирования\ и\ прерываний\ для\ выбранного\ UART\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00122}00122\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\_MspInit}}(UART\_HandleTypeDef\ *huart);}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00123}00123\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00124}00124\ \textcolor{comment}{/*\ Деинициализация\ тактирования\ и\ прерываний\ для\ выбранного\ UART\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00125}00125\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group___m_y___l_i_b_s___u_a_r_t_ga93ed6ceef4e3b5e7885786125cce93bc}{UART\_MspDeInit}}(UART\_HandleTypeDef\ *huart);}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00126}00126\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00127}00127\ \ \ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00128}00128\ \textcolor{comment}{/**\ }}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00129}00129\ \textcolor{comment}{\ *\ @cond\ UART\_INTERNAL}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00130}00130\ \textcolor{comment}{\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00131}00131\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00132}00132\ \textcolor{comment}{/*\ Настройка\ GPIO\ для\ UART\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00133}00133\ \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_l00134}00134\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00135}00135\ \textcolor{comment}{/*\ Настройка\ DMA\ для\ UART\ */}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00136}00136\ \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_l00137}00137\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00138}00138\ \textcolor{preprocessor}{\#ifndef\ \_\_USER\_LINKDMA}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00139}00139\ \textcolor{comment}{/**\ \ }}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00140}00140\ \textcolor{comment}{\ \ *\ @brief\ \ Аналог\ HAL\ макроса\ для\ привязки\ DMA\ к\ UART.}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00141}00141\ \textcolor{comment}{\ \ *\ @note\ \ \ @ref\ \_\_HAL\_LINKDMA.}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00142}00142\ \textcolor{comment}{\ \ */}\textcolor{preprocessor}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00143}00143\ \textcolor{preprocessor}{\#define\ \_\_USER\_LINKDMA(\_\_HANDLE\_\_,\ \_\_PPP\_DMA\_FIELD\_\_,\ \_\_DMA\_HANDLE\_\_)\ \ \ \(\backslash\)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00144}00144\ \textcolor{preprocessor}{do\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00145}00145\ \textcolor{preprocessor}{(\_\_HANDLE\_\_)-\/>\_\_PPP\_DMA\_FIELD\_\_\ =\ (\_\_DMA\_HANDLE\_\_);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00146}00146\ \textcolor{preprocessor}{(\_\_DMA\_HANDLE\_\_)-\/>Parent\ =\ (\_\_HANDLE\_\_);\}\ while(0U)}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00147}00147\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00148}00148\ \ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00149}00149\ \textcolor{comment}{/**\ @endcond\ */}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00150}00150\ \textcolor{comment}{///////////////////////////-\/-\/-\/FUNCTIONS-\/-\/-\////////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00151}00151\ }
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00152}00152\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_UART\_GENERAL\_H\_}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00153}00153\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00154}00154\ \textcolor{comment}{/**\ MY\_LIBS\_UART}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00155}00155\ \textcolor{comment}{\ \ *\ @\}}}
|
||||
\DoxyCodeLine{\Hypertarget{general__uart_8h_source_l00156}00156\ \textcolor{comment}{\ \ */}}
|
||||
|
||||
\end{DoxyCode}
|
||||
1
Doc/latex/group___m_y___l_i_b_s___s_p_i.md5
Normal file
1
Doc/latex/group___m_y___l_i_b_s___s_p_i.md5
Normal file
@@ -0,0 +1 @@
|
||||
b9d2d820e20d54c87d46b9628c5b5f42
|
||||
BIN
Doc/latex/group___m_y___l_i_b_s___s_p_i.pdf
Normal file
BIN
Doc/latex/group___m_y___l_i_b_s___s_p_i.pdf
Normal file
Binary file not shown.
195
Doc/latex/group___m_y___l_i_b_s___s_p_i.tex
Normal file
195
Doc/latex/group___m_y___l_i_b_s___s_p_i.tex
Normal file
@@ -0,0 +1,195 @@
|
||||
\doxysubsubsection{SPI Tools }
|
||||
\hypertarget{group___m_y___l_i_b_s___s_p_i}{}\label{group___m_y___l_i_b_s___s_p_i}\index{SPI Tools@{SPI Tools}}
|
||||
|
||||
|
||||
Функции и макросы для удобной работы с SPI.
|
||||
|
||||
|
||||
Collaboration diagram for SPI Tools\+:\nopagebreak
|
||||
\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[width=334pt]{group___m_y___l_i_b_s___s_p_i}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\doxysubsubsubsubsection*{Topics}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\mbox{\hyperlink{group___s_p_i___i_n_i_t}{Init defines}}
|
||||
\begin{DoxyCompactList}\small\item\em Настройка SPI. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\doxysubsubsubsubsection*{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}
|
||||
\doxysubsubsubsubsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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}
|
||||
|
||||
|
||||
\doxysubsubsubsection{Detailed Description}
|
||||
Функции и макросы для удобной работы с SPI.
|
||||
|
||||
Модуль предоставляет функции для базовой инициализации SPI
|
||||
|
||||
\begin{DoxyParagraph}{Пример использования\+:}
|
||||
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{\textcolor{comment}{//\ Структура\ настроек\ SPI}}
|
||||
\DoxyCodeLine{\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\_SettingsTypeDef}}\ spi1Settings;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\textcolor{keywordtype}{void}\ SPI1\_Init(\textcolor{keywordtype}{void})}
|
||||
\DoxyCodeLine{\{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ SPI1\ как\ Master,\ 8\ бит,\ полный\ дуплекс}}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Instance\ =\ SPI1;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.Mode\ =\ SPI\_MODE\_MASTER;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.Direction\ =\ SPI\_DIRECTION\_2LINES;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.DataSize\ =\ SPI\_DATASIZE\_8BIT;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.CLKPolarity\ =\ SPI\_POLARITY\_LOW;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.CLKPhase\ =\ SPI\_PHASE\_1EDGE;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.NSS\ =\ SPI\_NSS\_SOFT;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.BaudRatePrescaler\ =\ SPI\_BAUDRATEPRESCALER\_16;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.FirstBit\ =\ SPI\_FIRSTBIT\_MSB;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.TIMode\ =\ SPI\_TIMODE\_DISABLE;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_ad203d8b8d67e4f477d002d15b03ba422}{hspi}}.Init.CRCCalculation\ =\ SPI\_CRCCALCULATION\_DISABLE;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ GPIO}}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a6a15d48eccf92959de3a086031fdc979}{CLK\_GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3bcb1ed12da3544e02e6d36493669bdc}{CLK\_PIN}}\ =\ GPIO\_PIN\_5;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3f3748103a0b7861f6700042fd691ba1}{CLK\_GPIO\_AlternageFunc}}\ =\ GPIO\_AF5\_SPI1;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0d55a2941854f61934487f3d209cfa95}{MISO\_GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a3366c654d7ec6dd41c6a0b504dc8509a}{MISO\_PIN}}\ =\ GPIO\_PIN\_6;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_aecd7a5c6e205335b8ed229d74cd35d14}{MISO\_GPIO\_AlternageFunc}}\ =\ GPIO\_AF5\_SPI1;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a0af3bdb273818ff97eb4ff3cff918820}{MOSI\_GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_a961208869faf4a7369aaf4edde75f176}{MOSI\_PIN}}\ =\ GPIO\_PIN\_7;}
|
||||
\DoxyCodeLine{\ \ \ \ spi1Settings.\mbox{\hyperlink{struct_s_p_i___settings_type_def_afbe75a1c36650a4a9b41fa706a4c7eab}{MOSI\_GPIO\_AlternageFunc}}\ =\ GPIO\_AF5\_SPI1;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ SPI}}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_y___l_i_b_s___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}{SPI\_Base\_Init}}(\&spi1Settings)\ !=\ HAL\_OK)}
|
||||
\DoxyCodeLine{\ \ \ \ \{}
|
||||
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Обработка\ ошибки}}
|
||||
\DoxyCodeLine{\ \ \ \ \ \ \ \ Error\_Handler();}
|
||||
\DoxyCodeLine{\ \ \ \ \}}
|
||||
\DoxyCodeLine{\}}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
\end{DoxyParagraph}
|
||||
\begin{DoxyNote}{Note}
|
||||
Требуется подключение модуля SPI в библиотеке HAL
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ HAL\_SPI\_MODULE\_ENABLED}}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
\label{doc-func-members}
|
||||
\Hypertarget{group___m_y___l_i_b_s___s_p_i_doc-func-members}
|
||||
\doxysubsubsubsection{Function Documentation}
|
||||
\Hypertarget{group___m_y___l_i_b_s___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}\index{SPI Tools@{SPI Tools}!SPI\_Base\_Init@{SPI\_Base\_Init}}
|
||||
\index{SPI\_Base\_Init@{SPI\_Base\_Init}!SPI Tools@{SPI Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{SPI\_Base\_Init()}{SPI\_Base\_Init()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___s_p_i_ga0e177e3c57a8fcdc73b5602e72ec66ba}
|
||||
HAL\+\_\+\+Status\+Type\+Def SPI\+\_\+\+Base\+\_\+\+Init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{sspi}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Инициализация SPI с помощью структуры \doxylink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em sspi} & Указатель на структуру с настройками SPI. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
HAL status.
|
||||
\end{DoxyReturn}
|
||||
~\newline
|
||||
Инициализирует SPI и его GPIO. Настройка аналогична HAL\+\_\+\+SPI\+\_\+\+Init
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{suart.hspi.Init...}
|
||||
|
||||
\end{DoxyCode}
|
||||
но дополнительно надо прописать пины CLK/\+MISO/\+MOSI \doxylink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8c_source_l00028}{28}} of file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y___l_i_b_s___s_p_i_ga333dd251bc878931086d48aa932b1a5f}\index{SPI Tools@{SPI Tools}!SPI\_Check\_Init\_Struct@{SPI\_Check\_Init\_Struct}}
|
||||
\index{SPI\_Check\_Init\_Struct@{SPI\_Check\_Init\_Struct}!SPI Tools@{SPI Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{SPI\_Check\_Init\_Struct()}{SPI\_Check\_Init\_Struct()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___s_p_i_ga333dd251bc878931086d48aa932b1a5f}
|
||||
HAL\+\_\+\+Status\+Type\+Def SPI\+\_\+\+Check\+\_\+\+Init\+\_\+\+Struct (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_s_p_i___settings_type_def}{SPI\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{sspi}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Проверка корректности структуры инициализации SPI.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em sspi} & Указатель на структуру с настройками SPI. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
HAL status.
|
||||
\end{DoxyReturn}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8c_source_l00246}{246}} of file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}\index{SPI Tools@{SPI Tools}!SPI\_MspInit@{SPI\_MspInit}}
|
||||
\index{SPI\_MspInit@{SPI\_MspInit}!SPI Tools@{SPI Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{SPI\_MspInit()}{SPI\_MspInit()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}
|
||||
void SPI\+\_\+\+Msp\+Init (\begin{DoxyParamCaption}\item[{SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{hspi}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Настройка тактирования и прерываний SPI.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em hspi} & Указатель на хендл SPI. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyNote}{Note}
|
||||
Чтобы не генерировать функцию с иницилизацией неиспользуемых SPI, дефайнами \doxylink{group___s_p_i___i_n_i_t}{Init defines} в \doxylink{general__spi_8h}{general\+\_\+spi.\+h} определяются используемые SPI.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8c_source_l00127}{127}} of file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y___l_i_b_s___s_p_i_gac279cc3eaa35541edfe330a1844a85e4}\index{SPI Tools@{SPI Tools}!SPI\_MspDeInit@{SPI\_MspDeInit}}
|
||||
\index{SPI\_MspDeInit@{SPI\_MspDeInit}!SPI Tools@{SPI Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{SPI\_MspDeInit()}{SPI\_MspDeInit()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___s_p_i_gac279cc3eaa35541edfe330a1844a85e4}
|
||||
void SPI\+\_\+\+Msp\+De\+Init (\begin{DoxyParamCaption}\item[{SPI\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{hspi}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Деинициализация тактирования и прерываний SPI.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em hspi} & Указатель на хендл SPI. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyNote}{Note}
|
||||
Чтобы не генерировать функцию с иницилизацией неиспользуемых SPI, дефайнами \doxylink{group___s_p_i___i_n_i_t}{Init defines} в \doxylink{general__spi_8h}{general\+\_\+spi.\+h} определяются используемые SPI.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8c_source_l00191}{191}} of file \mbox{\hyperlink{general__spi_8c_source}{general\+\_\+spi.\+c}}.
|
||||
|
||||
\input{group___s_p_i___i_n_i_t}
|
||||
1
Doc/latex/group___m_y___l_i_b_s___u_a_r_t.md5
Normal file
1
Doc/latex/group___m_y___l_i_b_s___u_a_r_t.md5
Normal file
@@ -0,0 +1 @@
|
||||
5475854d3a1c20af70a164c6fe76463e
|
||||
BIN
Doc/latex/group___m_y___l_i_b_s___u_a_r_t.pdf
Normal file
BIN
Doc/latex/group___m_y___l_i_b_s___u_a_r_t.pdf
Normal file
Binary file not shown.
193
Doc/latex/group___m_y___l_i_b_s___u_a_r_t.tex
Normal file
193
Doc/latex/group___m_y___l_i_b_s___u_a_r_t.tex
Normal file
@@ -0,0 +1,193 @@
|
||||
\doxysubsubsection{UART Tools }
|
||||
\hypertarget{group___m_y___l_i_b_s___u_a_r_t}{}\label{group___m_y___l_i_b_s___u_a_r_t}\index{UART Tools@{UART Tools}}
|
||||
|
||||
|
||||
Функции и макросы для удобной работы с UART.
|
||||
|
||||
|
||||
Collaboration diagram for UART Tools\+:\nopagebreak
|
||||
\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[width=344pt]{group___m_y___l_i_b_s___u_a_r_t}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\doxysubsubsubsubsection*{Topics}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\mbox{\hyperlink{group___u_a_r_t___i_n_i_t}{Init defines}}
|
||||
\begin{DoxyCompactList}\small\item\em Настройка UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\doxysubsubsubsubsection*{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}
|
||||
\doxysubsubsubsubsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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}
|
||||
|
||||
|
||||
\doxysubsubsubsection{Detailed Description}
|
||||
Функции и макросы для удобной работы с UART.
|
||||
|
||||
Модуль предоставляет функции для базовой инициализации UART
|
||||
|
||||
\begin{DoxyParagraph}{Пример использования\+:}
|
||||
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{\textcolor{comment}{//\ Структура\ настроек\ UART}}
|
||||
\DoxyCodeLine{\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\_SettingsTypeDef}}\ uart2Settings;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\textcolor{keywordtype}{void}\ UART2\_Init(\textcolor{keywordtype}{void})}
|
||||
\DoxyCodeLine{\{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ UART2\ с\ 115200\ бод,\ 8\ бит,\ 1\ стоп-\/бит,\ без\ паритета}}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Instance\ =\ USART2;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.BaudRate\ =\ 115200;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.WordLength\ =\ UART\_WORDLENGTH\_8B;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.StopBits\ =\ UART\_STOPBITS\_1;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.Parity\ =\ UART\_PARITY\_NONE;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.Mode\ =\ UART\_MODE\_TX\_RX;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.HwFlowCtl\ =\ UART\_HWCONTROL\_NONE;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_accf2c9448a3ea8eb3b8c25a569276fea}{huart}}.Init.OverSampling\ =\ UART\_OVERSAMPLING\_16;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Настройка\ GPIO}}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_af6f9910d065bae715cdb4a1024143a8f}{GPIOx}}\ =\ GPIOA;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a5f1babfcfb436cd77f5614253c0a5bef}{GPIO\_PIN\_TX}}\ =\ GPIO\_PIN\_2;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a3fba2b52788fe453348b5d92ed52ba49}{GPIO\_PIN\_RX}}\ =\ GPIO\_PIN\_3;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ DMA\ не\ используется\ в\ этом\ примере}}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a1ecc9ac6a1d2747ade56770cbab6a613}{DMAChannel}}\ =\ NULL;}
|
||||
\DoxyCodeLine{\ \ \ \ uart2Settings.\mbox{\hyperlink{struct_u_a_r_t___settings_type_def_a15ce92b03f7f189bfbe1ab88a5f94d19}{DMA\_CHANNEL\_X}}\ =\ 0;}
|
||||
\DoxyCodeLine{}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{//\ Инициализация\ UART}}
|
||||
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{if}(\mbox{\hyperlink{group___m_y___l_i_b_s___u_a_r_t_gab9f07396b778505c934143e89953e154}{UART\_Base\_Init}}(\&uart2Settings)\ !=\ HAL\_OK)}
|
||||
\DoxyCodeLine{\ \ \ \ \{}
|
||||
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{comment}{//\ Обработка\ ошибки}}
|
||||
\DoxyCodeLine{\ \ \ \ \ \ \ \ Error\_Handler();}
|
||||
\DoxyCodeLine{\ \ \ \ \}}
|
||||
\DoxyCodeLine{\}}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
\end{DoxyParagraph}
|
||||
\begin{DoxyNote}{Note}
|
||||
Требуется подключение модуля UART в библиотеке HAL
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ HAL\_UART\_MODULE\_ENABLED}}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
\label{doc-func-members}
|
||||
\Hypertarget{group___m_y___l_i_b_s___u_a_r_t_doc-func-members}
|
||||
\doxysubsubsubsection{Function Documentation}
|
||||
\Hypertarget{group___m_y___l_i_b_s___u_a_r_t_gab9f07396b778505c934143e89953e154}\index{UART Tools@{UART Tools}!UART\_Base\_Init@{UART\_Base\_Init}}
|
||||
\index{UART\_Base\_Init@{UART\_Base\_Init}!UART Tools@{UART Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{UART\_Base\_Init()}{UART\_Base\_Init()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___u_a_r_t_gab9f07396b778505c934143e89953e154}
|
||||
HAL\+\_\+\+Status\+Type\+Def UART\+\_\+\+Base\+\_\+\+Init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{suart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Инициализация UART с помощью структуры \doxylink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em suart} & Указатель на структуру с настройками UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
HAL status.
|
||||
\end{DoxyReturn}
|
||||
~\newline
|
||||
Инициализирует UART и его GPIO и при необходимости DMA. Настройка аналогична HAL\+\_\+\+UART\+\_\+\+Init
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{suart.huart.Init...}
|
||||
|
||||
\end{DoxyCode}
|
||||
но дополнительно надо прописать пины RX/\+TX \doxylink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}
|
||||
\begin{DoxyCode}{0}
|
||||
\DoxyCodeLine{suart-\/>GPIOx,\ suart-\/>GPIO\_PIN\_RX,\ suart-\/>GPIO\_PIN\_TX}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00032}{32}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y___l_i_b_s___u_a_r_t_ga2a22e46ecb9e04b2ce197a0e9c09044a}\index{UART Tools@{UART Tools}!UART\_Check\_Init\_Struct@{UART\_Check\_Init\_Struct}}
|
||||
\index{UART\_Check\_Init\_Struct@{UART\_Check\_Init\_Struct}!UART Tools@{UART Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{UART\_Check\_Init\_Struct()}{UART\_Check\_Init\_Struct()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___u_a_r_t_ga2a22e46ecb9e04b2ce197a0e9c09044a}
|
||||
HAL\+\_\+\+Status\+Type\+Def UART\+\_\+\+Check\+\_\+\+Init\+\_\+\+Struct (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{suart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Проверка корректности структуры инициализации UART.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em suart} & Указатель на структуру с настройками UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
HAL status.
|
||||
\end{DoxyReturn}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00364}{364}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}\index{UART Tools@{UART Tools}!UART\_MspInit@{UART\_MspInit}}
|
||||
\index{UART\_MspInit@{UART\_MspInit}!UART Tools@{UART Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{UART\_MspInit()}{UART\_MspInit()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}
|
||||
void UART\+\_\+\+Msp\+Init (\begin{DoxyParamCaption}\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Настройка тактирования и прерываний UART.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em huart} & Указатель на хендл UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyNote}{Note}
|
||||
Чтобы не генерировать функцию с иницилизацией неиспользуемых UART, дефайнами \doxylink{group___u_a_r_t___i_n_i_t}{Init defines} в \doxylink{general__uart_8h}{general\+\_\+uart.\+h} определяются используемые UART.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00146}{146}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y___l_i_b_s___u_a_r_t_ga93ed6ceef4e3b5e7885786125cce93bc}\index{UART Tools@{UART Tools}!UART\_MspDeInit@{UART\_MspDeInit}}
|
||||
\index{UART\_MspDeInit@{UART\_MspDeInit}!UART Tools@{UART Tools}}
|
||||
\doxysubsubsubsubsection{\texorpdfstring{UART\_MspDeInit()}{UART\_MspDeInit()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y___l_i_b_s___u_a_r_t_ga93ed6ceef4e3b5e7885786125cce93bc}
|
||||
void UART\+\_\+\+Msp\+De\+Init (\begin{DoxyParamCaption}\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Деинициализация тактирования и прерываний UART.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em huart} & Указатель на хендл UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyNote}{Note}
|
||||
Чтобы не генерировать функцию с деиницилизацией неиспользуемых UART, дефайнами \doxylink{group___u_a_r_t___i_n_i_t}{Init defines} в \doxylink{general__uart_8h}{general\+\_\+uart.\+h} определяются используемые UART.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00267}{267}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\input{group___u_a_r_t___i_n_i_t}
|
||||
@@ -0,0 +1 @@
|
||||
e6d1f13a7d892bfe12b1137f7c4b33fa
|
||||
BIN
Doc/latex/group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l.pdf
Normal file
BIN
Doc/latex/group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l.pdf
Normal file
Binary file not shown.
136
Doc/latex/group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l.tex
Normal file
136
Doc/latex/group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l.tex
Normal file
@@ -0,0 +1,136 @@
|
||||
\doxysubsubsubsection{General tools }
|
||||
\hypertarget{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l}{}\label{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l}\index{General tools@{General tools}}
|
||||
|
||||
|
||||
Функции для базовой инициализации UART.
|
||||
|
||||
|
||||
Collaboration diagram for General tools\+:
|
||||
\nopagebreak
|
||||
\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[width=350pt]{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\doxysubsubsubsubsubsection*{Topics}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\mbox{\hyperlink{group___u_a_r_t___i_n_i_t}{Init defines}}
|
||||
\begin{DoxyCompactList}\small\item\em Настройка UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\doxysubsubsubsubsubsection*{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}
|
||||
\doxysubsubsubsubsubsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
HAL\+\_\+\+Status\+Type\+Def \mbox{\hyperlink{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_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___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gac9c27133622dfaf1f43683f4edf0ff65}{Check\+\_\+\+UART\+\_\+\+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___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart)
|
||||
\begin{DoxyCompactList}\small\item\em Настройка тактирования и прерываний UART. \end{DoxyCompactList}\item
|
||||
void \mbox{\hyperlink{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_ga93ed6ceef4e3b5e7885786125cce93bc}{UART\+\_\+\+Msp\+De\+Init}} (UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}huart)
|
||||
\begin{DoxyCompactList}\small\item\em Deinitialize UART \& DMA clock and interrupt. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\doxysubsubsubsubsection{Detailed Description}
|
||||
Функции для базовой инициализации UART.
|
||||
|
||||
|
||||
|
||||
\label{doc-func-members}
|
||||
\Hypertarget{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_doc-func-members}
|
||||
\doxysubsubsubsubsection{Function Documentation}
|
||||
\Hypertarget{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gab9f07396b778505c934143e89953e154}\index{General tools@{General tools}!UART\_Base\_Init@{UART\_Base\_Init}}
|
||||
\index{UART\_Base\_Init@{UART\_Base\_Init}!General tools@{General tools}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{UART\_Base\_Init()}{UART\_Base\_Init()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gab9f07396b778505c934143e89953e154}
|
||||
HAL\+\_\+\+Status\+Type\+Def UART\+\_\+\+Base\+\_\+\+Init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{suart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Инициализация UART с помощью структуры \doxylink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em suart} & Указатель на структуру с настройками UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
HAL status.
|
||||
\end{DoxyReturn}
|
||||
~\newline
|
||||
Инициализирует UART и при необходимости его GPIO и DMA.
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00024}{24}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gac9c27133622dfaf1f43683f4edf0ff65}\index{General tools@{General tools}!Check\_UART\_Init\_Struct@{Check\_UART\_Init\_Struct}}
|
||||
\index{Check\_UART\_Init\_Struct@{Check\_UART\_Init\_Struct}!General tools@{General tools}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{Check\_UART\_Init\_Struct()}{Check\_UART\_Init\_Struct()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gac9c27133622dfaf1f43683f4edf0ff65}
|
||||
HAL\+\_\+\+Status\+Type\+Def Check\+\_\+\+UART\+\_\+\+Init\+\_\+\+Struct (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_u_a_r_t___settings_type_def}{UART\+\_\+\+Settings\+Type\+Def}} \texorpdfstring{$\ast$}{*}}]{suart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Проверка корректности структуры инициализации UART.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em suart} & Указатель на структуру с настройками UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
HAL status.
|
||||
\end{DoxyReturn}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00356}{356}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gab9313fd2f9fc6873ca6bfbc5b96edbbb}\index{General tools@{General tools}!UART\_MspInit@{UART\_MspInit}}
|
||||
\index{UART\_MspInit@{UART\_MspInit}!General tools@{General tools}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{UART\_MspInit()}{UART\_MspInit()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_gab9313fd2f9fc6873ca6bfbc5b96edbbb}
|
||||
void UART\+\_\+\+Msp\+Init (\begin{DoxyParamCaption}\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Настройка тактирования и прерываний UART.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em huart} & Указатель на хендл UART. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyNote}{Note}
|
||||
Чтобы не генерировать функцию с иницилизацией неиспользуемых UART, дефайнами \doxylink{group___u_a_r_t___i_n_i_t}{Init defines} в \doxylink{general__uart_8h}{general\+\_\+uart.\+h} определяются используемые UART.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00138}{138}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\Hypertarget{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_ga93ed6ceef4e3b5e7885786125cce93bc}\index{General tools@{General tools}!UART\_MspDeInit@{UART\_MspDeInit}}
|
||||
\index{UART\_MspDeInit@{UART\_MspDeInit}!General tools@{General tools}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{UART\_MspDeInit()}{UART\_MspDeInit()}}
|
||||
{\footnotesize\ttfamily \label{group___m_y_l_i_b_s___u_a_r_t___g_e_n_e_r_a_l_ga93ed6ceef4e3b5e7885786125cce93bc}
|
||||
void UART\+\_\+\+Msp\+De\+Init (\begin{DoxyParamCaption}\item[{UART\+\_\+\+Handle\+Type\+Def \texorpdfstring{$\ast$}{*}}]{huart}{}\end{DoxyParamCaption})}
|
||||
|
||||
|
||||
|
||||
Deinitialize UART \& DMA clock and interrupt.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
{\em huart} & -\/ указатель на хендл UART для деинициализации. \\
|
||||
\hline
|
||||
\end{DoxyParams}
|
||||
\begin{DoxyNote}{Note}
|
||||
Чтобы не генерировать функцию с деиницилизацией неиспользуемых UART, дефайнами \doxylink{group___u_a_r_t___i_n_i_t}{Init defines} в \doxylink{general__uart_8h}{general\+\_\+uart.\+h} определяются используемые UART.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8c_source_l00259}{259}} of file \mbox{\hyperlink{general__uart_8c_source}{general\+\_\+uart.\+c}}.
|
||||
|
||||
\input{group___u_a_r_t___i_n_i_t}
|
||||
1
Doc/latex/group___s_p_i___i_n_i_t.md5
Normal file
1
Doc/latex/group___s_p_i___i_n_i_t.md5
Normal file
@@ -0,0 +1 @@
|
||||
a5fee9e01f339403bf93347eac092de0
|
||||
BIN
Doc/latex/group___s_p_i___i_n_i_t.pdf
Normal file
BIN
Doc/latex/group___s_p_i___i_n_i_t.pdf
Normal file
Binary file not shown.
91
Doc/latex/group___s_p_i___i_n_i_t.tex
Normal file
91
Doc/latex/group___s_p_i___i_n_i_t.tex
Normal file
@@ -0,0 +1,91 @@
|
||||
\doxysubsubsubsection{Init defines }
|
||||
\hypertarget{group___s_p_i___i_n_i_t}{}\label{group___s_p_i___i_n_i_t}\index{Init defines@{Init defines}}
|
||||
|
||||
|
||||
Настройка SPI.
|
||||
|
||||
|
||||
Collaboration diagram for Init defines\+:\nopagebreak
|
||||
\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[width=238pt]{group___s_p_i___i_n_i_t}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\doxysubsubsubsubsubsection*{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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\doxysubsubsubsubsection{Detailed Description}
|
||||
Настройка SPI.
|
||||
|
||||
|
||||
|
||||
\label{doc-define-members}
|
||||
\Hypertarget{group___s_p_i___i_n_i_t_doc-define-members}
|
||||
\doxysubsubsubsubsection{Macro Definition Documentation}
|
||||
\Hypertarget{group___s_p_i___i_n_i_t_ga8ad4712bf4add56892d057778e826e0c}\index{Init defines@{Init defines}!HAL\_SPI\_MODULE\_ENABLED@{HAL\_SPI\_MODULE\_ENABLED}}
|
||||
\index{HAL\_SPI\_MODULE\_ENABLED@{HAL\_SPI\_MODULE\_ENABLED}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_SPI\_MODULE\_ENABLED}{HAL\_SPI\_MODULE\_ENABLED}}
|
||||
{\footnotesize\ttfamily \label{group___s_p_i___i_n_i_t_ga8ad4712bf4add56892d057778e826e0c}
|
||||
\#define HAL\+\_\+\+SPI\+\_\+\+MODULE\+\_\+\+ENABLED}
|
||||
|
||||
|
||||
|
||||
Включение HAL SPI.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8h_source_l00075}{75}} of file \mbox{\hyperlink{general__spi_8h_source}{general\+\_\+spi.\+h}}.
|
||||
|
||||
\Hypertarget{group___s_p_i___i_n_i_t_ga2fe0c8aeb2c61679f32836fef479eedf}\index{Init defines@{Init defines}!USE\_SPI1@{USE\_SPI1}}
|
||||
\index{USE\_SPI1@{USE\_SPI1}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_SPI1}{USE\_SPI1}}
|
||||
{\footnotesize\ttfamily \label{group___s_p_i___i_n_i_t_ga2fe0c8aeb2c61679f32836fef479eedf}
|
||||
\#define USE\+\_\+\+SPI1}
|
||||
|
||||
|
||||
|
||||
Включить SPI1 в \doxylink{group___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8h_source_l00077}{77}} of file \mbox{\hyperlink{general__spi_8h_source}{general\+\_\+spi.\+h}}.
|
||||
|
||||
\Hypertarget{group___s_p_i___i_n_i_t_ga53687cddb8e39e76a79b8ffaa152fb2b}\index{Init defines@{Init defines}!USE\_SPI2@{USE\_SPI2}}
|
||||
\index{USE\_SPI2@{USE\_SPI2}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_SPI2}{USE\_SPI2}}
|
||||
{\footnotesize\ttfamily \label{group___s_p_i___i_n_i_t_ga53687cddb8e39e76a79b8ffaa152fb2b}
|
||||
\#define USE\+\_\+\+SPI2}
|
||||
|
||||
|
||||
|
||||
Включить SPI2 в \doxylink{group___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8h_source_l00078}{78}} of file \mbox{\hyperlink{general__spi_8h_source}{general\+\_\+spi.\+h}}.
|
||||
|
||||
\Hypertarget{group___s_p_i___i_n_i_t_ga5fdd6e5934a8005ef05b80f6d95883dc}\index{Init defines@{Init defines}!USE\_SPI3@{USE\_SPI3}}
|
||||
\index{USE\_SPI3@{USE\_SPI3}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_SPI3}{USE\_SPI3}}
|
||||
{\footnotesize\ttfamily \label{group___s_p_i___i_n_i_t_ga5fdd6e5934a8005ef05b80f6d95883dc}
|
||||
\#define USE\+\_\+\+SPI3}
|
||||
|
||||
|
||||
|
||||
Включить SPI3 в \doxylink{group___m_y___l_i_b_s___s_p_i_gab9f13318daf02bc5b5f302ae392dccac}{SPI\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__spi_8h_source_l00079}{79}} of file \mbox{\hyperlink{general__spi_8h_source}{general\+\_\+spi.\+h}}.
|
||||
|
||||
1
Doc/latex/group___u_a_r_t___i_n_i_t.md5
Normal file
1
Doc/latex/group___u_a_r_t___i_n_i_t.md5
Normal file
@@ -0,0 +1 @@
|
||||
a6be7d8c2d212183934faf5551879d8d
|
||||
BIN
Doc/latex/group___u_a_r_t___i_n_i_t.pdf
Normal file
BIN
Doc/latex/group___u_a_r_t___i_n_i_t.pdf
Normal file
Binary file not shown.
139
Doc/latex/group___u_a_r_t___i_n_i_t.tex
Normal file
139
Doc/latex/group___u_a_r_t___i_n_i_t.tex
Normal file
@@ -0,0 +1,139 @@
|
||||
\doxysubsubsubsection{Init defines }
|
||||
\hypertarget{group___u_a_r_t___i_n_i_t}{}\label{group___u_a_r_t___i_n_i_t}\index{Init defines@{Init defines}}
|
||||
|
||||
|
||||
Настройка UART.
|
||||
|
||||
|
||||
Collaboration diagram for Init defines\+:\nopagebreak
|
||||
\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[width=249pt]{group___u_a_r_t___i_n_i_t}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\doxysubsubsubsubsubsection*{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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___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___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\doxysubsubsubsubsection{Detailed Description}
|
||||
Настройка UART.
|
||||
|
||||
|
||||
|
||||
\label{doc-define-members}
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_doc-define-members}
|
||||
\doxysubsubsubsubsection{Macro Definition Documentation}
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_ga167269406e73327b95c3bb7b9cfe6d89}\index{Init defines@{Init defines}!HAL\_UART\_MODULE\_ENABLED@{HAL\_UART\_MODULE\_ENABLED}}
|
||||
\index{HAL\_UART\_MODULE\_ENABLED@{HAL\_UART\_MODULE\_ENABLED}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_UART\_MODULE\_ENABLED}{HAL\_UART\_MODULE\_ENABLED}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_ga167269406e73327b95c3bb7b9cfe6d89}
|
||||
\#define HAL\+\_\+\+UART\+\_\+\+MODULE\+\_\+\+ENABLED}
|
||||
|
||||
|
||||
|
||||
Включение HAL UART.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00065}{65}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_gace54f148bb1d72f13bf397d096d38d1b}\index{Init defines@{Init defines}!USE\_USART1@{USE\_USART1}}
|
||||
\index{USE\_USART1@{USE\_USART1}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_USART1}{USE\_USART1}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_gace54f148bb1d72f13bf397d096d38d1b}
|
||||
\#define USE\+\_\+\+USART1}
|
||||
|
||||
|
||||
|
||||
Включить USART1 в \doxylink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00067}{67}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_gaacb3968508217a0d8b3f64aa0c8aa07d}\index{Init defines@{Init defines}!USE\_USART2@{USE\_USART2}}
|
||||
\index{USE\_USART2@{USE\_USART2}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_USART2}{USE\_USART2}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_gaacb3968508217a0d8b3f64aa0c8aa07d}
|
||||
\#define USE\+\_\+\+USART2}
|
||||
|
||||
|
||||
|
||||
Включить USART2 в \doxylink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00068}{68}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_ga6dadd967b428aade24008ec060009976}\index{Init defines@{Init defines}!USE\_USART3@{USE\_USART3}}
|
||||
\index{USE\_USART3@{USE\_USART3}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_USART3}{USE\_USART3}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_ga6dadd967b428aade24008ec060009976}
|
||||
\#define USE\+\_\+\+USART3}
|
||||
|
||||
|
||||
|
||||
Включить USART3 в \doxylink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00069}{69}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_ga779530e93e7aa1f25eb13045ec42b8e7}\index{Init defines@{Init defines}!USE\_UART4@{USE\_UART4}}
|
||||
\index{USE\_UART4@{USE\_UART4}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_UART4}{USE\_UART4}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_ga779530e93e7aa1f25eb13045ec42b8e7}
|
||||
\#define USE\+\_\+\+UART4}
|
||||
|
||||
|
||||
|
||||
Включить UART4 в \doxylink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00070}{70}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_ga592c6bf4a6496d6806ba0838cdfa2340}\index{Init defines@{Init defines}!USE\_UART5@{USE\_UART5}}
|
||||
\index{USE\_UART5@{USE\_UART5}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_UART5}{USE\_UART5}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_ga592c6bf4a6496d6806ba0838cdfa2340}
|
||||
\#define USE\+\_\+\+UART5}
|
||||
|
||||
|
||||
|
||||
Включить UART5 в \doxylink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00071}{71}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
\Hypertarget{group___u_a_r_t___i_n_i_t_gafaeb8bdd4aa7fb1987505530daa90868}\index{Init defines@{Init defines}!USE\_USART6@{USE\_USART6}}
|
||||
\index{USE\_USART6@{USE\_USART6}!Init defines@{Init defines}}
|
||||
\doxysubsubsubsubsubsection{\texorpdfstring{USE\_USART6}{USE\_USART6}}
|
||||
{\footnotesize\ttfamily \label{group___u_a_r_t___i_n_i_t_gafaeb8bdd4aa7fb1987505530daa90868}
|
||||
\#define USE\+\_\+\+USART6}
|
||||
|
||||
|
||||
|
||||
Включить USART6 в \doxylink{group___m_y___l_i_b_s___u_a_r_t_gab9313fd2f9fc6873ca6bfbc5b96edbbb}{UART\+\_\+\+Msp\+Init}.
|
||||
|
||||
|
||||
|
||||
Definition at line \mbox{\hyperlink{general__uart_8h_source_l00072}{72}} of file \mbox{\hyperlink{general__uart_8h_source}{general\+\_\+uart.\+h}}.
|
||||
|
||||
Reference in New Issue
Block a user