80 lines
5.3 KiB
TeX
80 lines
5.3 KiB
TeX
\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}}.
|
||
|