501 lines
22 KiB
TeX
501 lines
22 KiB
TeX
\hypertarget{classbsp___i_i_c}{}\doxysection{bsp\+\_\+\+IIC类 参考}
|
|
\label{classbsp___i_i_c}\index{bsp\_IIC@{bsp\_IIC}}
|
|
|
|
|
|
IIC的基础实现方法 留下三个保护性接口需要实现,分别是控制时钟,控制数据,延时函数
|
|
|
|
|
|
|
|
|
|
{\ttfamily \#include $<$bscpp\+\_\+\+IIC.\+h$>$}
|
|
|
|
|
|
|
|
类 bsp\+\_\+\+IIC 继承关系图\+:
|
|
\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=322pt]{classbsp___i_i_c__inherit__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
\doxysubsection*{Public 成员函数}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
void \mbox{\hyperlink{classbsp___i_i_c_a9f4cdf777e69f407b155ffdba5b9e7c8}{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{classbsp___i_i_c_a9effd40b26cbf6f321d0f0db3e2f09c3}{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{classbsp___i_i_c_a9d5d55340f9c43998763ecd0fb67b88c}{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{classbsp___i_i_c_aae8c08f59f3fce9dce27f9f04beda683}{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{classbsp___i_i_c_a97ad38a37ad0140987ba79d878f0d9e9}{IIC\+\_\+\+Start}} (void)
|
|
\begin{DoxyCompactList}\small\item\em 发送\+IIC开始信号 \end{DoxyCompactList}\item
|
|
void \mbox{\hyperlink{classbsp___i_i_c_ae513e1a05cbbae2a6f37e6cbb3bb63e2}{IIC\+\_\+\+Stop}} (void)
|
|
\begin{DoxyCompactList}\small\item\em 发送\+IIC停止信号 \end{DoxyCompactList}\item
|
|
void \mbox{\hyperlink{classbsp___i_i_c_a684793afa5c26e6d123ff6ad083342c8}{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{classbsp___i_i_c_a3f14f230b5876c529380d4f51a9c9c12}{IIC\+\_\+\+Wait\+Ack}} (void)
|
|
\begin{DoxyCompactList}\small\item\em 等待应答信号 \end{DoxyCompactList}\item
|
|
void \mbox{\hyperlink{classbsp___i_i_c_ae2e78aae0c89a4d6063d8ba60752acd5}{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{classbsp___i_i_c_a15201c6a6bd1affde8da0fc642f62272}{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{classbsp___i_i_c_a9c71db14d666983ab15621f119bdc171}{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{classbsp___i_i_c_adf1ba1196ef163ab1958747744dd8a14}{IIC\+\_\+\+SDA}} (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} var)=0
|
|
\begin{DoxyCompactList}\small\item\em 控制\+SDA管脚口 \end{DoxyCompactList}\item
|
|
virtual void \mbox{\hyperlink{classbsp___i_i_c_ad3d17035a8d19842ccabbf743a4405f4}{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{classbsp___i_i_c_ad3d17035a8d19842ccabbf743a4405f4}\label{classbsp___i_i_c_ad3d17035a8d19842ccabbf743a4405f4}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_Delay@{IIC\_Delay}}
|
|
\index{IIC\_Delay@{IIC\_Delay}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Delay()}{IIC\_Delay()}}
|
|
{\footnotesize\ttfamily virtual void bsp\+\_\+\+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{classbsp___i_i_c___s_t_m32_ab76c882803b30793f39b8a3fe4fdef2c}{bsp\+\_\+\+IIC\+\_\+\+STM32}} 内被实现.
|
|
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_ad3d17035a8d19842ccabbf743a4405f4_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_aae8c08f59f3fce9dce27f9f04beda683}\label{classbsp___i_i_c_aae8c08f59f3fce9dce27f9f04beda683}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_Read@{IIC\_Read}}
|
|
\index{IIC\_Read@{IIC\_Read}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Read()}{IIC\_Read()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00197}{197}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_aae8c08f59f3fce9dce27f9f04beda683_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=334pt]{classbsp___i_i_c_aae8c08f59f3fce9dce27f9f04beda683_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a9effd40b26cbf6f321d0f0db3e2f09c3}\label{classbsp___i_i_c_a9effd40b26cbf6f321d0f0db3e2f09c3}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_ReadOneByte@{IIC\_ReadOneByte}}
|
|
\index{IIC\_ReadOneByte@{IIC\_ReadOneByte}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_ReadOneByte()}{IIC\_ReadOneByte()}}
|
|
{\footnotesize\ttfamily \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bsp\+\_\+\+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_l00152}{152}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9effd40b26cbf6f321d0f0db3e2f09c3_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9effd40b26cbf6f321d0f0db3e2f09c3_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a15201c6a6bd1affde8da0fc642f62272}\label{classbsp___i_i_c_a15201c6a6bd1affde8da0fc642f62272}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_RecByte@{IIC\_RecByte}}
|
|
\index{IIC\_RecByte@{IIC\_RecByte}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_RecByte()}{IIC\_RecByte()}}
|
|
{\footnotesize\ttfamily \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bsp\+\_\+\+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_l00113}{113}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=321pt]{classbsp___i_i_c_a15201c6a6bd1affde8da0fc642f62272_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a15201c6a6bd1affde8da0fc642f62272_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a9c71db14d666983ab15621f119bdc171}\label{classbsp___i_i_c_a9c71db14d666983ab15621f119bdc171}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_SCK@{IIC\_SCK}}
|
|
\index{IIC\_SCK@{IIC\_SCK}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SCK()}{IIC\_SCK()}}
|
|
{\footnotesize\ttfamily virtual \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bsp\+\_\+\+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{classbsp___i_i_c___s_t_m32_a14ca3a4cbeb0122d88391d9f37e1fe27}{bsp\+\_\+\+IIC\+\_\+\+STM32}} 内被实现.
|
|
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9c71db14d666983ab15621f119bdc171_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_adf1ba1196ef163ab1958747744dd8a14}\label{classbsp___i_i_c_adf1ba1196ef163ab1958747744dd8a14}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_SDA@{IIC\_SDA}}
|
|
\index{IIC\_SDA@{IIC\_SDA}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SDA()}{IIC\_SDA()}}
|
|
{\footnotesize\ttfamily virtual \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bsp\+\_\+\+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{classbsp___i_i_c___s_t_m32_a8e703fab0f20578492ff23cb185b1a8d}{bsp\+\_\+\+IIC\+\_\+\+STM32}} 内被实现.
|
|
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_adf1ba1196ef163ab1958747744dd8a14_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a684793afa5c26e6d123ff6ad083342c8}\label{classbsp___i_i_c_a684793afa5c26e6d123ff6ad083342c8}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_SendAck@{IIC\_SendAck}}
|
|
\index{IIC\_SendAck@{IIC\_SendAck}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SendAck()}{IIC\_SendAck()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00070}{70}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=323pt]{classbsp___i_i_c_a684793afa5c26e6d123ff6ad083342c8_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a684793afa5c26e6d123ff6ad083342c8_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_ae2e78aae0c89a4d6063d8ba60752acd5}\label{classbsp___i_i_c_ae2e78aae0c89a4d6063d8ba60752acd5}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_SendByte@{IIC\_SendByte}}
|
|
\index{IIC\_SendByte@{IIC\_SendByte}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_SendByte()}{IIC\_SendByte()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00097}{97}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=326pt]{classbsp___i_i_c_ae2e78aae0c89a4d6063d8ba60752acd5_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_ae2e78aae0c89a4d6063d8ba60752acd5_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a97ad38a37ad0140987ba79d878f0d9e9}\label{classbsp___i_i_c_a97ad38a37ad0140987ba79d878f0d9e9}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_Start@{IIC\_Start}}
|
|
\index{IIC\_Start@{IIC\_Start}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Start()}{IIC\_Start()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00046}{46}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=304pt]{classbsp___i_i_c_a97ad38a37ad0140987ba79d878f0d9e9_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a97ad38a37ad0140987ba79d878f0d9e9_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_ae513e1a05cbbae2a6f37e6cbb3bb63e2}\label{classbsp___i_i_c_ae513e1a05cbbae2a6f37e6cbb3bb63e2}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_Stop@{IIC\_Stop}}
|
|
\index{IIC\_Stop@{IIC\_Stop}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Stop()}{IIC\_Stop()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00058}{58}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=304pt]{classbsp___i_i_c_ae513e1a05cbbae2a6f37e6cbb3bb63e2_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_ae513e1a05cbbae2a6f37e6cbb3bb63e2_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a3f14f230b5876c529380d4f51a9c9c12}\label{classbsp___i_i_c_a3f14f230b5876c529380d4f51a9c9c12}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_WaitAck@{IIC\_WaitAck}}
|
|
\index{IIC\_WaitAck@{IIC\_WaitAck}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_WaitAck()}{IIC\_WaitAck()}}
|
|
{\footnotesize\ttfamily \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} bsp\+\_\+\+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_l00084}{84}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=321pt]{classbsp___i_i_c_a3f14f230b5876c529380d4f51a9c9c12_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a3f14f230b5876c529380d4f51a9c9c12_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a9d5d55340f9c43998763ecd0fb67b88c}\label{classbsp___i_i_c_a9d5d55340f9c43998763ecd0fb67b88c}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_Write@{IIC\_Write}}
|
|
\index{IIC\_Write@{IIC\_Write}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_Write()}{IIC\_Write()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00176}{176}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9d5d55340f9c43998763ecd0fb67b88c_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9d5d55340f9c43998763ecd0fb67b88c_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
\mbox{\Hypertarget{classbsp___i_i_c_a9f4cdf777e69f407b155ffdba5b9e7c8}\label{classbsp___i_i_c_a9f4cdf777e69f407b155ffdba5b9e7c8}}
|
|
\index{bsp\_IIC@{bsp\_IIC}!IIC\_WriteOneByte@{IIC\_WriteOneByte}}
|
|
\index{IIC\_WriteOneByte@{IIC\_WriteOneByte}!bsp\_IIC@{bsp\_IIC}}
|
|
\doxysubsubsection{\texorpdfstring{IIC\_WriteOneByte()}{IIC\_WriteOneByte()}}
|
|
{\footnotesize\ttfamily void bsp\+\_\+\+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_l00135}{135}} 行定义.
|
|
|
|
函数调用图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9f4cdf777e69f407b155ffdba5b9e7c8_cgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
这是这个函数的调用关系图\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{classbsp___i_i_c_a9f4cdf777e69f407b155ffdba5b9e7c8_icgraph}
|
|
\end{center}
|
|
\end{figure}
|
|
|
|
|
|
该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
|
|
\item
|
|
C\+:/\+Users/\+Xeroly\+Skinner/\+Desktop/bscpp/bscpp\+\_\+\+Device/\mbox{\hyperlink{bscpp___i_i_c_8h}{bscpp\+\_\+\+IIC.\+h}}\item
|
|
C\+:/\+Users/\+Xeroly\+Skinner/\+Desktop/bscpp/bscpp\+\_\+\+Device/\mbox{\hyperlink{bscpp___i_i_c_8cpp}{bscpp\+\_\+\+IIC.\+cpp}}\end{DoxyCompactItemize}
|