500 lines
22 KiB
TeX
500 lines
22 KiB
TeX
|
|
\hypertarget{classbscpp___i_i_c}{}\doxysection{bscpp\+\_\+\+IIC类 参考}
|
||
|
|
\label{classbscpp___i_i_c}\index{bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
|
||
|
|
|
||
|
|
IIC的基础实现方法 留下三个保护性接口需要实现,分别是控制时钟,控制数据,延时函数
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
{\ttfamily \#include $<$bscpp\+\_\+\+IIC.\+h$>$}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
类 bscpp\+\_\+\+IIC 继承关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=332pt]{classbscpp___i_i_c__inherit__graph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\doxysubsection*{Public 成员函数}
|
||
|
|
\begin{DoxyCompactItemize}
|
||
|
|
\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_acf6c71a5be44ec8367873501413c4a46}{IIC\+\_\+\+Write\+One\+Byte}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} id, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} dat)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 使用总线发送一个字节数据 \end{DoxyCompactList}\item
|
||
|
|
\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbscpp___i_i_c_a9fa6332b7a0449f9c539bb783030c29e}{IIC\+\_\+\+Read\+One\+Byte}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} id, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 使用总线接收一个字节数据 \end{DoxyCompactList}\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_a90560b42df225b0af3b0a8c7eef1f6c1}{IIC\+\_\+\+Write}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} id, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} $\ast$dat, \mbox{\hyperlink{varint_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}} len)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 使用总线发送定长数据 \end{DoxyCompactList}\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_aa012a136b05989578a3f1240baadda3d}{IIC\+\_\+\+Read}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} id, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} $\ast$dat, \mbox{\hyperlink{varint_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}} len)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 使用总线接收定长数据 \end{DoxyCompactList}\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_afd0d1de6960b3c063d76bad5ca6706ad}{IIC\+\_\+\+Start}} (void)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 发送\+IIC开始信号 \end{DoxyCompactList}\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_a9b34db5312bee0c9decafc3e12231e65}{IIC\+\_\+\+Stop}} (void)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 发送\+IIC停止信号 \end{DoxyCompactList}\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_a8b3c4c55982c4e07426003dac660ee30}{IIC\+\_\+\+Send\+Ack}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} ackbit)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 发送\+IIC应答信号 \end{DoxyCompactList}\item
|
||
|
|
\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbscpp___i_i_c_aa1dd077b2e7f83735b2b57edd1aae7a0}{IIC\+\_\+\+Wait\+Ack}} (void)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 等待应答信号 \end{DoxyCompactList}\item
|
||
|
|
void \mbox{\hyperlink{classbscpp___i_i_c_ac7a376c17d9188557c5016213180d628}{IIC\+\_\+\+Send\+Byte}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} byt)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 发送\+IIC一个字节信号 \end{DoxyCompactList}\item
|
||
|
|
\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbscpp___i_i_c_abba11573786999e740a6291c048bdc2d}{IIC\+\_\+\+Rec\+Byte}} (void)
|
||
|
|
\begin{DoxyCompactList}\small\item\em 接收\+IIC一个字节信号 \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||
|
|
\doxysubsection*{Protected 成员函数}
|
||
|
|
\begin{DoxyCompactItemize}
|
||
|
|
\item
|
||
|
|
virtual \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbscpp___i_i_c_a1dfe20de93d00a928e82f087c1f26100}{IIC\+\_\+\+SCK}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} var)=0
|
||
|
|
\begin{DoxyCompactList}\small\item\em 控制\+SCK管脚口 \end{DoxyCompactList}\item
|
||
|
|
virtual \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbscpp___i_i_c_a03b0f1f860d09779d5491c9035fd4c32}{IIC\+\_\+\+SDA}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} var)=0
|
||
|
|
\begin{DoxyCompactList}\small\item\em 控制\+SDA管脚口 \end{DoxyCompactList}\item
|
||
|
|
virtual void \mbox{\hyperlink{classbscpp___i_i_c_a9ecb52cad582a9fbf6969fb1869437da}{IIC\+\_\+\+Delay}} (void)=0
|
||
|
|
\begin{DoxyCompactList}\small\item\em 时序中的延时 在此处短暂延时 \end{DoxyCompactList}\end{DoxyCompactItemize}
|
||
|
|
|
||
|
|
|
||
|
|
\doxysubsection{详细描述}
|
||
|
|
IIC的基础实现方法 留下三个保护性接口需要实现,分别是控制时钟,控制数据,延时函数
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8h_source}{bscpp\+\_\+\+IIC.\+h}} 第 \mbox{\hyperlink{bscpp___i_i_c_8h_source_l00056}{56}} 行定义.
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
\doxysubsection{成员函数说明}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a9ecb52cad582a9fbf6969fb1869437da}\label{classbscpp___i_i_c_a9ecb52cad582a9fbf6969fb1869437da}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_Delay@{IIC\_Delay}}
|
||
|
|
\index{IIC\_Delay@{IIC\_Delay}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Delay()}{IIC\_Delay()}}
|
||
|
|
{\footnotesize\ttfamily virtual void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Delay (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
时序中的延时 在此处短暂延时
|
||
|
|
|
||
|
|
\begin{DoxyRefDesc}{待办事项}
|
||
|
|
\item[\mbox{\hyperlink{todo__todo000003}{待办事项}}]需要为其实现才可使用软件\+IIC \end{DoxyRefDesc}
|
||
|
|
|
||
|
|
|
||
|
|
在 \mbox{\hyperlink{classbscpp___s_t_m32___a_t24_c00_a1ee5f08945e4fa185735bf25418d7b55}{bscpp\+\_\+\+STM32\+\_\+\+AT24\+C00}} , 以及 \mbox{\hyperlink{classbscpp___i_i_c___s_t_m32_a73f7f6eecdc6d099ba43940faa31c7bf}{bscpp\+\_\+\+IIC\+\_\+\+STM32}} 内被实现.
|
||
|
|
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a9ecb52cad582a9fbf6969fb1869437da_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_aa012a136b05989578a3f1240baadda3d}\label{classbscpp___i_i_c_aa012a136b05989578a3f1240baadda3d}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_Read@{IIC\_Read}}
|
||
|
|
\index{IIC\_Read@{IIC\_Read}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Read()}{IIC\_Read()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Read (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{id, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{addr, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} $\ast$}]{dat, }\item[{\mbox{\hyperlink{varint_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}}}]{len }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
使用总线接收定长数据
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em id} & 接收的器件地址,如0x68(\+MPU6050) \\
|
||
|
|
\hline
|
||
|
|
{\em addr} & 需要接收的寄存器地址起始 \\
|
||
|
|
\hline
|
||
|
|
{\em dat} & 改写的数据指针 \\
|
||
|
|
\hline
|
||
|
|
{\em len} & 数据数目 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
无返回值
|
||
|
|
\end{DoxyReturn}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00198}{198}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_aa012a136b05989578a3f1240baadda3d_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_aa012a136b05989578a3f1240baadda3d_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a9fa6332b7a0449f9c539bb783030c29e}\label{classbscpp___i_i_c_a9fa6332b7a0449f9c539bb783030c29e}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_ReadOneByte@{IIC\_ReadOneByte}}
|
||
|
|
\index{IIC\_ReadOneByte@{IIC\_ReadOneByte}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_ReadOneByte()}{IIC\_ReadOneByte()}}
|
||
|
|
{\footnotesize\ttfamily \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Read\+One\+Byte (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{id, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{addr }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
使用总线接收一个字节数据
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em id} & 接收的器件地址,如0x68(\+MPU6050) \\
|
||
|
|
\hline
|
||
|
|
{\em addr} & 需要获取数据的寄存器地址 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
返回该寄存器内的数据
|
||
|
|
\end{DoxyReturn}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00153}{153}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a9fa6332b7a0449f9c539bb783030c29e_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a9fa6332b7a0449f9c539bb783030c29e_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_abba11573786999e740a6291c048bdc2d}\label{classbscpp___i_i_c_abba11573786999e740a6291c048bdc2d}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_RecByte@{IIC\_RecByte}}
|
||
|
|
\index{IIC\_RecByte@{IIC\_RecByte}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_RecByte()}{IIC\_RecByte()}}
|
||
|
|
{\footnotesize\ttfamily \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Rec\+Byte (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
接收\+IIC一个字节信号
|
||
|
|
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
接收到的一个字节信号
|
||
|
|
\end{DoxyReturn}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00114}{114}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=342pt]{classbscpp___i_i_c_abba11573786999e740a6291c048bdc2d_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_abba11573786999e740a6291c048bdc2d_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a1dfe20de93d00a928e82f087c1f26100}\label{classbscpp___i_i_c_a1dfe20de93d00a928e82f087c1f26100}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_SCK@{IIC\_SCK}}
|
||
|
|
\index{IIC\_SCK@{IIC\_SCK}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SCK()}{IIC\_SCK()}}
|
||
|
|
{\footnotesize\ttfamily virtual \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+SCK (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{var }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
控制\+SCK管脚口
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em var} & 此处有三个状态,IIC\+\_\+\+SET置位管脚,IIC\+\_\+\+RESET复位管脚 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
当var为\+IIC\+\_\+\+READ时返回管脚状态
|
||
|
|
\end{DoxyReturn}
|
||
|
|
\begin{DoxyRefDesc}{待办事项}
|
||
|
|
\item[\mbox{\hyperlink{todo__todo000001}{待办事项}}]需要为其实现才可使用软件\+IIC \end{DoxyRefDesc}
|
||
|
|
|
||
|
|
|
||
|
|
在 \mbox{\hyperlink{classbscpp___i_i_c___s_t_m32_a842dd2f04bece850c49e9c2573256ea2}{bscpp\+\_\+\+IIC\+\_\+\+STM32}} 内被实现.
|
||
|
|
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a1dfe20de93d00a928e82f087c1f26100_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a03b0f1f860d09779d5491c9035fd4c32}\label{classbscpp___i_i_c_a03b0f1f860d09779d5491c9035fd4c32}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_SDA@{IIC\_SDA}}
|
||
|
|
\index{IIC\_SDA@{IIC\_SDA}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SDA()}{IIC\_SDA()}}
|
||
|
|
{\footnotesize\ttfamily virtual \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+SDA (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{var }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
控制\+SDA管脚口
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em var} & 此处有三个状态,IIC\+\_\+\+SET置位管脚,IIC\+\_\+\+RESET复位管脚 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
当var为\+IIC\+\_\+\+READ时返回管脚状态
|
||
|
|
\end{DoxyReturn}
|
||
|
|
\begin{DoxyRefDesc}{待办事项}
|
||
|
|
\item[\mbox{\hyperlink{todo__todo000002}{待办事项}}]需要为其实现才可使用软件\+IIC \end{DoxyRefDesc}
|
||
|
|
|
||
|
|
|
||
|
|
在 \mbox{\hyperlink{classbscpp___i_i_c___s_t_m32_a8b92885b85d7254ec833c5bd938223b1}{bscpp\+\_\+\+IIC\+\_\+\+STM32}} 内被实现.
|
||
|
|
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a03b0f1f860d09779d5491c9035fd4c32_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a8b3c4c55982c4e07426003dac660ee30}\label{classbscpp___i_i_c_a8b3c4c55982c4e07426003dac660ee30}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_SendAck@{IIC\_SendAck}}
|
||
|
|
\index{IIC\_SendAck@{IIC\_SendAck}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SendAck()}{IIC\_SendAck()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Send\+Ack (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{ackbit }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
发送\+IIC应答信号
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em ackbit} & 0为应答,1位非应答 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00071}{71}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=345pt]{classbscpp___i_i_c_a8b3c4c55982c4e07426003dac660ee30_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a8b3c4c55982c4e07426003dac660ee30_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_ac7a376c17d9188557c5016213180d628}\label{classbscpp___i_i_c_ac7a376c17d9188557c5016213180d628}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_SendByte@{IIC\_SendByte}}
|
||
|
|
\index{IIC\_SendByte@{IIC\_SendByte}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SendByte()}{IIC\_SendByte()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Send\+Byte (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{byt }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
发送\+IIC一个字节信号
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em byt} & 发送的字节 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00098}{98}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=348pt]{classbscpp___i_i_c_ac7a376c17d9188557c5016213180d628_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_ac7a376c17d9188557c5016213180d628_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_afd0d1de6960b3c063d76bad5ca6706ad}\label{classbscpp___i_i_c_afd0d1de6960b3c063d76bad5ca6706ad}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_Start@{IIC\_Start}}
|
||
|
|
\index{IIC\_Start@{IIC\_Start}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Start()}{IIC\_Start()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Start (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
发送\+IIC开始信号
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00047}{47}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=326pt]{classbscpp___i_i_c_afd0d1de6960b3c063d76bad5ca6706ad_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_afd0d1de6960b3c063d76bad5ca6706ad_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a9b34db5312bee0c9decafc3e12231e65}\label{classbscpp___i_i_c_a9b34db5312bee0c9decafc3e12231e65}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_Stop@{IIC\_Stop}}
|
||
|
|
\index{IIC\_Stop@{IIC\_Stop}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Stop()}{IIC\_Stop()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Stop (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
发送\+IIC停止信号
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00059}{59}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=325pt]{classbscpp___i_i_c_a9b34db5312bee0c9decafc3e12231e65_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a9b34db5312bee0c9decafc3e12231e65_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_aa1dd077b2e7f83735b2b57edd1aae7a0}\label{classbscpp___i_i_c_aa1dd077b2e7f83735b2b57edd1aae7a0}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_WaitAck@{IIC\_WaitAck}}
|
||
|
|
\index{IIC\_WaitAck@{IIC\_WaitAck}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_WaitAck()}{IIC\_WaitAck()}}
|
||
|
|
{\footnotesize\ttfamily \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Wait\+Ack (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
等待应答信号
|
||
|
|
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
返回是否有回应
|
||
|
|
\end{DoxyReturn}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00085}{85}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=342pt]{classbscpp___i_i_c_aa1dd077b2e7f83735b2b57edd1aae7a0_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_aa1dd077b2e7f83735b2b57edd1aae7a0_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_a90560b42df225b0af3b0a8c7eef1f6c1}\label{classbscpp___i_i_c_a90560b42df225b0af3b0a8c7eef1f6c1}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_Write@{IIC\_Write}}
|
||
|
|
\index{IIC\_Write@{IIC\_Write}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Write()}{IIC\_Write()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Write (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{id, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{addr, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} $\ast$}]{dat, }\item[{\mbox{\hyperlink{varint_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}}}]{len }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
使用总线发送定长数据
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em id} & 发送的器件地址,如0x68(\+MPU6050) \\
|
||
|
|
\hline
|
||
|
|
{\em addr} & 需要改写的寄存器地址起始 \\
|
||
|
|
\hline
|
||
|
|
{\em dat} & 改写的数据指针 \\
|
||
|
|
\hline
|
||
|
|
{\em len} & 数据数目 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
无返回值
|
||
|
|
\end{DoxyReturn}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00177}{177}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a90560b42df225b0af3b0a8c7eef1f6c1_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_a90560b42df225b0af3b0a8c7eef1f6c1_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
\mbox{\Hypertarget{classbscpp___i_i_c_acf6c71a5be44ec8367873501413c4a46}\label{classbscpp___i_i_c_acf6c71a5be44ec8367873501413c4a46}}
|
||
|
|
\index{bscpp\_IIC@{bscpp\_IIC}!IIC\_WriteOneByte@{IIC\_WriteOneByte}}
|
||
|
|
\index{IIC\_WriteOneByte@{IIC\_WriteOneByte}!bscpp\_IIC@{bscpp\_IIC}}
|
||
|
|
\doxysubsubsection{\texorpdfstring{IIC\_WriteOneByte()}{IIC\_WriteOneByte()}}
|
||
|
|
{\footnotesize\ttfamily void bscpp\+\_\+\+IIC\+::\+IIC\+\_\+\+Write\+One\+Byte (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{id, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{addr, }\item[{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}]{dat }\end{DoxyParamCaption})}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
使用总线发送一个字节数据
|
||
|
|
|
||
|
|
|
||
|
|
\begin{DoxyParams}{参数}
|
||
|
|
{\em id} & 发送的器件地址,如0x68(\+MPU6050) \\
|
||
|
|
\hline
|
||
|
|
{\em addr} & 需要改写的寄存器地址 \\
|
||
|
|
\hline
|
||
|
|
{\em dat} & 改写的数据 \\
|
||
|
|
\hline
|
||
|
|
\end{DoxyParams}
|
||
|
|
\begin{DoxyReturn}{返回}
|
||
|
|
无返回值
|
||
|
|
\end{DoxyReturn}
|
||
|
|
|
||
|
|
|
||
|
|
在文件 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source}{bscpp\+\_\+\+IIC.\+cpp}} 第 \mbox{\hyperlink{bscpp___i_i_c_8cpp_source_l00136}{136}} 行定义.
|
||
|
|
|
||
|
|
函数调用图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_acf6c71a5be44ec8367873501413c4a46_cgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
||
|
|
\begin{figure}[H]
|
||
|
|
\begin{center}
|
||
|
|
\leavevmode
|
||
|
|
\includegraphics[width=350pt]{classbscpp___i_i_c_acf6c71a5be44ec8367873501413c4a46_icgraph}
|
||
|
|
\end{center}
|
||
|
|
\end{figure}
|
||
|
|
|
||
|
|
|
||
|
|
该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
|
||
|
|
\item
|
||
|
|
D\+:/gitt/\+Microchip\+For32/bscpp\+\_\+\+Device/\mbox{\hyperlink{bscpp___i_i_c_8h}{bscpp\+\_\+\+IIC.\+h}}\item
|
||
|
|
D\+:/gitt/\+Microchip\+For32/bscpp\+\_\+\+Device/\mbox{\hyperlink{bscpp___i_i_c_8cpp}{bscpp\+\_\+\+IIC.\+cpp}}\end{DoxyCompactItemize}
|