62 lines
11 KiB
TeX
62 lines
11 KiB
TeX
|
|
\hypertarget{bsp___i_i_c_8h_source}{}\doxysection{bsp\+\_\+\+IIC.\+h}
|
||
|
|
\label{bsp___i_i_c_8h_source}\index{D:/gitt/MicrochipFor32/bsp\_Device/bsp\_IIC.h@{D:/gitt/MicrochipFor32/bsp\_Device/bsp\_IIC.h}}
|
||
|
|
\mbox{\hyperlink{bsp___i_i_c_8h}{浏览该文件的文档.}}
|
||
|
|
\begin{DoxyCode}{0}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00001}00001 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00002}00002 \textcolor{comment}{ \#}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00003}00003 \textcolor{comment}{ \# Copyright (c) 2022 Yuankang Liang(XerolySkinner)}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00004}00004 \textcolor{comment}{ \#}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00005}00005 \textcolor{comment}{ \# 本软件按原样提供,无任何明示或暗示}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00006}00006 \textcolor{comment}{ \# 在任何情况下,作者都不承担任何损害赔偿责任}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00007}00007 \textcolor{comment}{ \#}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00008}00008 \textcolor{comment}{ \# 使用的许可声明:}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00009}00009 \textcolor{comment}{ \# 1. 不得歪曲本软件的来源,你不能声称你编写了原始软件.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00010}00010 \textcolor{comment}{ \# 2. 免费授予以任何目的,前提是版权声明出现在所有副本中.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00011}00011 \textcolor{comment}{ \# 并且版权声明和许可声明同时出现.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00012}00012 \textcolor{comment}{ \# 3. 你有使用,复制,修改,分发,和销售本软件的许可.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00013}00013 \textcolor{comment}{ \# 4. 如果你在产品中使用,产品文档中的声明是赞赏的但不是必须的.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00014}00014 \textcolor{comment}{ \# 5. 本通知不得从任何来源删除或更改.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00015}00015 \textcolor{comment}{ \#}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00016}00016 \textcolor{comment}{ \# Yuankang Liang(XerolySkinner)}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00017}00017 \textcolor{comment}{ \# E-\/mail:zabbcccbbaz@163.com}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00018}00018 \textcolor{comment}{ \# QQ:2715099320}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00019}00019 \textcolor{comment}{ \# Mobile Phone:13005636215}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00020}00020 \textcolor{comment}{ \#}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00021}00021 \textcolor{comment}{ \# All rights reserved.}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00022}00022 \textcolor{comment}{ */}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00023}00023 }
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00035}00035 \textcolor{preprocessor}{\#ifdef \_\_cplusplus}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00036}00036 \textcolor{preprocessor}{\#pragma once}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00037}00037 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{varint_8h}{varint.h}}"{}}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00039}00039 \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00040}00040 \textcolor{comment}{// 枚举头}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00044}00044 \textcolor{comment}{}\textcolor{keyword}{enum} \{}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00045}\mbox{\hyperlink{bsp___i_i_c_8h_adf764cbdea00d65edcd07bb9953ad2b7a048bbf954430bbc34fa11280165ed534}{00045}} \mbox{\hyperlink{bsp___i_i_c_8h_adf764cbdea00d65edcd07bb9953ad2b7a048bbf954430bbc34fa11280165ed534}{IIC\_RESET}}, }
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00046}\mbox{\hyperlink{bsp___i_i_c_8h_adf764cbdea00d65edcd07bb9953ad2b7a9e128b73c7beb33be6b4e953a7fddc66}{00046}} \mbox{\hyperlink{bsp___i_i_c_8h_adf764cbdea00d65edcd07bb9953ad2b7a9e128b73c7beb33be6b4e953a7fddc66}{IIC\_SET}}, }
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00047}00047 \mbox{\hyperlink{bsp___i_i_c_8h_adf764cbdea00d65edcd07bb9953ad2b7ae4ead84d2c3bbc3f2403d9a5157a3f94}{IIC\_READ}} }
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00048}\mbox{\hyperlink{bsp___i_i_c_8h_adf764cbdea00d65edcd07bb9953ad2b7ae4ead84d2c3bbc3f2403d9a5157a3f94}{00048}} \};}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00050}00050 \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00051}00051 \textcolor{comment}{// 类目}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00056}\mbox{\hyperlink{classbsp___i_i_c}{00056}} \textcolor{comment}{}\textcolor{keyword}{class }\mbox{\hyperlink{classbsp___i_i_c}{bsp\_IIC}}\{}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00057}00057 \textcolor{keyword}{public}:}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00058}00058 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_a9f4cdf777e69f407b155ffdba5b9e7c8}{IIC\_WriteOneByte}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \textcolor{keywordtype}{id}, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} dat);}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00059}00059 \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbsp___i_i_c_a9effd40b26cbf6f321d0f0db3e2f09c3}{IIC\_ReadOneByte}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \textcolor{keywordtype}{id}, \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr);}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00060}00060 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_a9d5d55340f9c43998763ecd0fb67b88c}{IIC\_Write}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \textcolor{keywordtype}{id},\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr,\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}* dat,\mbox{\hyperlink{varint_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}} len);}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00061}00061 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_aae8c08f59f3fce9dce27f9f04beda683}{IIC\_Read}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \textcolor{keywordtype}{id},\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} addr,\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}* dat,\mbox{\hyperlink{varint_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}} len);}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00062}00062 \textcolor{keyword}{public}:}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00063}00063 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_a97ad38a37ad0140987ba79d878f0d9e9}{IIC\_Start}}(\textcolor{keywordtype}{void});}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00064}00064 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_ae513e1a05cbbae2a6f37e6cbb3bb63e2}{IIC\_Stop}}(\textcolor{keywordtype}{void});}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00065}00065 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_a684793afa5c26e6d123ff6ad083342c8}{IIC\_SendAck}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} ackbit);}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00066}00066 \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbsp___i_i_c_a3f14f230b5876c529380d4f51a9c9c12}{IIC\_WaitAck}}(\textcolor{keywordtype}{void});}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00067}00067 \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_ae2e78aae0c89a4d6063d8ba60752acd5}{IIC\_SendByte}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} byt);}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00068}00068 \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbsp___i_i_c_a15201c6a6bd1affde8da0fc642f62272}{IIC\_RecByte}}(\textcolor{keywordtype}{void});}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00069}00069 \textcolor{keyword}{protected}:}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00077}\mbox{\hyperlink{classbsp___i_i_c_a9c71db14d666983ab15621f119bdc171}{00077}} \textcolor{keyword}{virtual} \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbsp___i_i_c_a9c71db14d666983ab15621f119bdc171}{IIC\_SCK}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} var) = 0;}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00085}\mbox{\hyperlink{classbsp___i_i_c_adf1ba1196ef163ab1958747744dd8a14}{00085}} \textcolor{keyword}{virtual} \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} \mbox{\hyperlink{classbsp___i_i_c_adf1ba1196ef163ab1958747744dd8a14}{IIC\_SDA}}(\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} var) = 0;}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00091}\mbox{\hyperlink{classbsp___i_i_c_ad3d17035a8d19842ccabbf743a4405f4}{00091}} \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} \mbox{\hyperlink{classbsp___i_i_c_ad3d17035a8d19842ccabbf743a4405f4}{IIC\_Delay}}(\textcolor{keywordtype}{void}) = 0;}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00092}00092 \};}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00094}00094 \textcolor{preprocessor}{\#endif}}
|
||
|
|
\DoxyCodeLine{\Hypertarget{bsp___i_i_c_8h_source_l00095}00095 }
|
||
|
|
|
||
|
|
\end{DoxyCode}
|