Files
discoverpixy/group___i2_c.html
2015-05-12 11:12:43 +02:00

1804 lines
90 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>discoverpixy: I2C</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">discoverpixy
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">I2C<div class="ingroups"><a class="el" href="group___s_t_m32_f4xx___std_periph___driver.html">STM32F4xx_StdPeriph_Driver</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>I2C driver modules.
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for I2C:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group___i2_c.png" border="0" alt="" usemap="#group______i2__c"/>
<map name="group______i2__c" id="group______i2__c">
<area shape="rect" id="node1" href="group___i2_c___private___functions.html" title="I2C_Private_Functions" alt="" coords="307,5,457,32"/><area shape="rect" id="node2" href="group___i2_c___exported___constants.html" title="I2C_Exported_Constants" alt="" coords="299,56,465,83"/><area shape="rect" id="node3" href="group___s_t_m32_f4xx___std_periph___driver.html" title="STM32F4xx_StdPeriph\l_Driver" alt="" coords="5,23,161,65"/></map>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group___i2_c___exported___constants"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c___exported___constants.html">I2C_Exported_Constants</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group___i2_c___private___functions"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c___private___functions.html">I2C_Private_Functions</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_i2_c___init_type_def.html">I2C_InitTypeDef</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C Init structure definition. <a href="struct_i2_c___init_type_def.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga8d425258898b4af4ebc820f52635fad8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8d425258898b4af4ebc820f52635fad8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CR1_CLEAR_MASK</b>&#160;&#160;&#160;((uint16_t)0xFBF5) /*&lt;! I2C registers Masks */</td></tr>
<tr class="separator:ga8d425258898b4af4ebc820f52635fad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga890221cb651a3f30f6d1bca0d9b0e13d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga890221cb651a3f30f6d1bca0d9b0e13d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FLAG_MASK</b>&#160;&#160;&#160;((uint32_t)0x00FFFFFF) /*&lt;! I2C FLAG mask */</td></tr>
<tr class="separator:ga890221cb651a3f30f6d1bca0d9b0e13d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0befa8c9e0cb00ab52bd8a8d68718706"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0befa8c9e0cb00ab52bd8a8d68718706"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ITEN_MASK</b>&#160;&#160;&#160;((uint32_t)0x07000000) /*&lt;! I2C Interrupt Enable mask */</td></tr>
<tr class="separator:ga0befa8c9e0cb00ab52bd8a8d68718706"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2ee214364603059ad5d9089f749f5bfd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga2ee214364603059ad5d9089f749f5bfd">I2C_DeInit</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx)</td></tr>
<tr class="memdesc:ga2ee214364603059ad5d9089f749f5bfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitialize the I2Cx peripheral registers to their default reset values. <a href="#ga2ee214364603059ad5d9089f749f5bfd">More...</a><br /></td></tr>
<tr class="separator:ga2ee214364603059ad5d9089f749f5bfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac29465bca70fbc91c2f922ab67bb88e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gaac29465bca70fbc91c2f922ab67bb88e">I2C_Init</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, <a class="el" href="struct_i2_c___init_type_def.html">I2C_InitTypeDef</a> *I2C_InitStruct)</td></tr>
<tr class="memdesc:gaac29465bca70fbc91c2f922ab67bb88e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the I2Cx peripheral according to the specified parameters in the I2C_InitStruct. <a href="#gaac29465bca70fbc91c2f922ab67bb88e">More...</a><br /></td></tr>
<tr class="separator:gaac29465bca70fbc91c2f922ab67bb88e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08582aca6d7d7910cd5cbff0d9def350"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga08582aca6d7d7910cd5cbff0d9def350">I2C_StructInit</a> (<a class="el" href="struct_i2_c___init_type_def.html">I2C_InitTypeDef</a> *I2C_InitStruct)</td></tr>
<tr class="memdesc:ga08582aca6d7d7910cd5cbff0d9def350"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills each I2C_InitStruct member with its default value. <a href="#ga08582aca6d7d7910cd5cbff0d9def350">More...</a><br /></td></tr>
<tr class="separator:ga08582aca6d7d7910cd5cbff0d9def350"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7e1323c9133c2cb424dfb5b10b7d2f0b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7e1323c9133c2cb424dfb5b10b7d2f0b">I2C_Cmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga7e1323c9133c2cb424dfb5b10b7d2f0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C peripheral. <a href="#ga7e1323c9133c2cb424dfb5b10b7d2f0b">More...</a><br /></td></tr>
<tr class="separator:ga7e1323c9133c2cb424dfb5b10b7d2f0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90b0815858cc14266d2957495fd7e105"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga90b0815858cc14266d2957495fd7e105">I2C_DigitalFilterConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint16_t I2C_DigitalFilter)</td></tr>
<tr class="memdesc:ga90b0815858cc14266d2957495fd7e105"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the Digital noise filter of I2C peripheral. <a href="#ga90b0815858cc14266d2957495fd7e105">More...</a><br /></td></tr>
<tr class="separator:ga90b0815858cc14266d2957495fd7e105"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f92bbdb33774b819232d039c73bf1c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7f92bbdb33774b819232d039c73bf1c2">I2C_AnalogFilterCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga7f92bbdb33774b819232d039c73bf1c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the Analog filter of I2C peripheral. <a href="#ga7f92bbdb33774b819232d039c73bf1c2">More...</a><br /></td></tr>
<tr class="separator:ga7f92bbdb33774b819232d039c73bf1c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36c522b471588be9779c878222ccb20f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga36c522b471588be9779c878222ccb20f">I2C_GenerateSTART</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga36c522b471588be9779c878222ccb20f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates I2Cx communication START condition. <a href="#ga36c522b471588be9779c878222ccb20f">More...</a><br /></td></tr>
<tr class="separator:ga36c522b471588be9779c878222ccb20f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c92cb573ca0ae58cc465e5400246561"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga5c92cb573ca0ae58cc465e5400246561">I2C_GenerateSTOP</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga5c92cb573ca0ae58cc465e5400246561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates I2Cx communication STOP condition. <a href="#ga5c92cb573ca0ae58cc465e5400246561">More...</a><br /></td></tr>
<tr class="separator:ga5c92cb573ca0ae58cc465e5400246561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga009fc2a5b2313c36da39ece39a1156a6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga009fc2a5b2313c36da39ece39a1156a6">I2C_Send7bitAddress</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint8_t Address, uint8_t I2C_Direction)</td></tr>
<tr class="memdesc:ga009fc2a5b2313c36da39ece39a1156a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits the address byte to select the slave device. <a href="#ga009fc2a5b2313c36da39ece39a1156a6">More...</a><br /></td></tr>
<tr class="separator:ga009fc2a5b2313c36da39ece39a1156a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bb44e894d68a7991f564c43fb187486"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7bb44e894d68a7991f564c43fb187486">I2C_AcknowledgeConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga7bb44e894d68a7991f564c43fb187486"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C acknowledge feature. <a href="#ga7bb44e894d68a7991f564c43fb187486">More...</a><br /></td></tr>
<tr class="separator:ga7bb44e894d68a7991f564c43fb187486"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7be2cc634a613c8e3539137e897a22df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7be2cc634a613c8e3539137e897a22df">I2C_OwnAddress2Config</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint8_t Address)</td></tr>
<tr class="memdesc:ga7be2cc634a613c8e3539137e897a22df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the specified I2C own address2. <a href="#ga7be2cc634a613c8e3539137e897a22df">More...</a><br /></td></tr>
<tr class="separator:ga7be2cc634a613c8e3539137e897a22df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga02145a333a56e79557d6ef4ea03fc313"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga02145a333a56e79557d6ef4ea03fc313">I2C_DualAddressCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga02145a333a56e79557d6ef4ea03fc313"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C dual addressing mode. <a href="#ga02145a333a56e79557d6ef4ea03fc313">More...</a><br /></td></tr>
<tr class="separator:ga02145a333a56e79557d6ef4ea03fc313"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65c740fc8d7b3b9f15cc432d8699d471"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga65c740fc8d7b3b9f15cc432d8699d471">I2C_GeneralCallCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga65c740fc8d7b3b9f15cc432d8699d471"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C general call feature. <a href="#ga65c740fc8d7b3b9f15cc432d8699d471">More...</a><br /></td></tr>
<tr class="separator:ga65c740fc8d7b3b9f15cc432d8699d471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1289c908aeb882443aba323b459c638b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga1289c908aeb882443aba323b459c638b">I2C_SoftwareResetCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga1289c908aeb882443aba323b459c638b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C software reset. <a href="#ga1289c908aeb882443aba323b459c638b">More...</a><br /></td></tr>
<tr class="separator:ga1289c908aeb882443aba323b459c638b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7459feb3b1dfcd3e4f6574002ca7d3bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7459feb3b1dfcd3e4f6574002ca7d3bd">I2C_StretchClockCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga7459feb3b1dfcd3e4f6574002ca7d3bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C Clock stretching. <a href="#ga7459feb3b1dfcd3e4f6574002ca7d3bd">More...</a><br /></td></tr>
<tr class="separator:ga7459feb3b1dfcd3e4f6574002ca7d3bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa570f76bc34e5b0531b29b1a90af1275"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gaa570f76bc34e5b0531b29b1a90af1275">I2C_FastModeDutyCycleConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint16_t I2C_DutyCycle)</td></tr>
<tr class="memdesc:gaa570f76bc34e5b0531b29b1a90af1275"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selects the specified I2C fast mode duty cycle. <a href="#gaa570f76bc34e5b0531b29b1a90af1275">More...</a><br /></td></tr>
<tr class="separator:gaa570f76bc34e5b0531b29b1a90af1275"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad08ebffc3a234d84e6405ec115bd74f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gad08ebffc3a234d84e6405ec115bd74f1">I2C_NACKPositionConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint16_t I2C_NACKPosition)</td></tr>
<tr class="memdesc:gad08ebffc3a234d84e6405ec115bd74f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selects the specified I2C NACK position in master receiver mode. <a href="#gad08ebffc3a234d84e6405ec115bd74f1">More...</a><br /></td></tr>
<tr class="separator:gad08ebffc3a234d84e6405ec115bd74f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75a810776d9710d2f6d9c5d9e93241c6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga75a810776d9710d2f6d9c5d9e93241c6">I2C_SMBusAlertConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint16_t I2C_SMBusAlert)</td></tr>
<tr class="memdesc:ga75a810776d9710d2f6d9c5d9e93241c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drives the SMBusAlert pin high or low for the specified I2C. <a href="#ga75a810776d9710d2f6d9c5d9e93241c6">More...</a><br /></td></tr>
<tr class="separator:ga75a810776d9710d2f6d9c5d9e93241c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga66d86742bf1be58b17ef8779ffc79d02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga66d86742bf1be58b17ef8779ffc79d02">I2C_ARPCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga66d86742bf1be58b17ef8779ffc79d02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C ARP. <a href="#ga66d86742bf1be58b17ef8779ffc79d02">More...</a><br /></td></tr>
<tr class="separator:ga66d86742bf1be58b17ef8779ffc79d02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bd9e70b8eafde0dd5eb42b0d95fe1a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7bd9e70b8eafde0dd5eb42b0d95fe1a9">I2C_SendData</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint8_t Data)</td></tr>
<tr class="memdesc:ga7bd9e70b8eafde0dd5eb42b0d95fe1a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a data byte through the I2Cx peripheral. <a href="#ga7bd9e70b8eafde0dd5eb42b0d95fe1a9">More...</a><br /></td></tr>
<tr class="separator:ga7bd9e70b8eafde0dd5eb42b0d95fe1a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeaaa4b6f77f50eb57465148c55d27fb2"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gaeaaa4b6f77f50eb57465148c55d27fb2">I2C_ReceiveData</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx)</td></tr>
<tr class="memdesc:gaeaaa4b6f77f50eb57465148c55d27fb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the most recent received data by the I2Cx peripheral. <a href="#gaeaaa4b6f77f50eb57465148c55d27fb2">More...</a><br /></td></tr>
<tr class="separator:gaeaaa4b6f77f50eb57465148c55d27fb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa27d1440290fe601e730b6980999afe3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gaa27d1440290fe601e730b6980999afe3">I2C_TransmitPEC</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gaa27d1440290fe601e730b6980999afe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C PEC transfer. <a href="#gaa27d1440290fe601e730b6980999afe3">More...</a><br /></td></tr>
<tr class="separator:gaa27d1440290fe601e730b6980999afe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d0f939bdd45542502827bf408f24161"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga5d0f939bdd45542502827bf408f24161">I2C_PECPositionConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint16_t I2C_PECPosition)</td></tr>
<tr class="memdesc:ga5d0f939bdd45542502827bf408f24161"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selects the specified I2C PEC position. <a href="#ga5d0f939bdd45542502827bf408f24161">More...</a><br /></td></tr>
<tr class="separator:ga5d0f939bdd45542502827bf408f24161"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae86801251359226c35745e0a258388b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gae86801251359226c35745e0a258388b0">I2C_CalculatePEC</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gae86801251359226c35745e0a258388b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the PEC value calculation of the transferred bytes. <a href="#gae86801251359226c35745e0a258388b0">More...</a><br /></td></tr>
<tr class="separator:gae86801251359226c35745e0a258388b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bf75e7c27c0e1d73e70fc0e1c7cd1dd"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga7bf75e7c27c0e1d73e70fc0e1c7cd1dd">I2C_GetPEC</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx)</td></tr>
<tr class="memdesc:ga7bf75e7c27c0e1d73e70fc0e1c7cd1dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the PEC value for the specified I2C. <a href="#ga7bf75e7c27c0e1d73e70fc0e1c7cd1dd">More...</a><br /></td></tr>
<tr class="separator:ga7bf75e7c27c0e1d73e70fc0e1c7cd1dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38502ce11e5ec923e0f6476aaa35b45c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga38502ce11e5ec923e0f6476aaa35b45c">I2C_DMACmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga38502ce11e5ec923e0f6476aaa35b45c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C DMA requests. <a href="#ga38502ce11e5ec923e0f6476aaa35b45c">More...</a><br /></td></tr>
<tr class="separator:ga38502ce11e5ec923e0f6476aaa35b45c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2e994c5681eb6ec7c26a03ffe1de060"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#gab2e994c5681eb6ec7c26a03ffe1de060">I2C_DMALastTransferCmd</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gab2e994c5681eb6ec7c26a03ffe1de060"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies that the next DMA transfer is the last one. <a href="#gab2e994c5681eb6ec7c26a03ffe1de060">More...</a><br /></td></tr>
<tr class="separator:gab2e994c5681eb6ec7c26a03ffe1de060"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8021dc796d15f997356b0583d6346805"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga8021dc796d15f997356b0583d6346805">I2C_ReadRegister</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint8_t I2C_Register)</td></tr>
<tr class="memdesc:ga8021dc796d15f997356b0583d6346805"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified I2C register and returns its value. <a href="#ga8021dc796d15f997356b0583d6346805">More...</a><br /></td></tr>
<tr class="separator:ga8021dc796d15f997356b0583d6346805"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga58fed146a06cb81d2940604e460de047"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga58fed146a06cb81d2940604e460de047">I2C_ITConfig</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint16_t I2C_IT, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga58fed146a06cb81d2940604e460de047"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified I2C interrupts. <a href="#ga58fed146a06cb81d2940604e460de047">More...</a><br /></td></tr>
<tr class="separator:ga58fed146a06cb81d2940604e460de047"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d5701342f9d4c1f09bf9d3cdcacc326"><td class="memItemLeft" align="right" valign="top">ErrorStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga2d5701342f9d4c1f09bf9d3cdcacc326">I2C_CheckEvent</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint32_t I2C_EVENT)</td></tr>
<tr class="memdesc:ga2d5701342f9d4c1f09bf9d3cdcacc326"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the last I2Cx Event is equal to the one passed as parameter. <a href="#ga2d5701342f9d4c1f09bf9d3cdcacc326">More...</a><br /></td></tr>
<tr class="separator:ga2d5701342f9d4c1f09bf9d3cdcacc326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29237aea9b5a3ead33167e1d027e9f1a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga29237aea9b5a3ead33167e1d027e9f1a">I2C_GetLastEvent</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx)</td></tr>
<tr class="memdesc:ga29237aea9b5a3ead33167e1d027e9f1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last I2Cx Event. <a href="#ga29237aea9b5a3ead33167e1d027e9f1a">More...</a><br /></td></tr>
<tr class="separator:ga29237aea9b5a3ead33167e1d027e9f1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15c95d0ed124f029621a2061b1677ee7"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga15c95d0ed124f029621a2061b1677ee7">I2C_GetFlagStatus</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint32_t I2C_FLAG)</td></tr>
<tr class="memdesc:ga15c95d0ed124f029621a2061b1677ee7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified I2C flag is set or not. <a href="#ga15c95d0ed124f029621a2061b1677ee7">More...</a><br /></td></tr>
<tr class="separator:ga15c95d0ed124f029621a2061b1677ee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d4f8fe9f7232696114b5578b1223963"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga9d4f8fe9f7232696114b5578b1223963">I2C_ClearFlag</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint32_t I2C_FLAG)</td></tr>
<tr class="memdesc:ga9d4f8fe9f7232696114b5578b1223963"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the I2Cx's pending flags. <a href="#ga9d4f8fe9f7232696114b5578b1223963">More...</a><br /></td></tr>
<tr class="separator:ga9d4f8fe9f7232696114b5578b1223963"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga447771fbbd94a56f3570b9f430a069ba"><td class="memItemLeft" align="right" valign="top">ITStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga447771fbbd94a56f3570b9f430a069ba">I2C_GetITStatus</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint32_t I2C_IT)</td></tr>
<tr class="memdesc:ga447771fbbd94a56f3570b9f430a069ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified I2C interrupt has occurred or not. <a href="#ga447771fbbd94a56f3570b9f430a069ba">More...</a><br /></td></tr>
<tr class="separator:ga447771fbbd94a56f3570b9f430a069ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga110dda440fa200b5f77349df19b3e6bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___i2_c.html#ga110dda440fa200b5f77349df19b3e6bb">I2C_ClearITPendingBit</a> (<a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *I2Cx, uint32_t I2C_IT)</td></tr>
<tr class="memdesc:ga110dda440fa200b5f77349df19b3e6bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the I2Cx's interrupt pending bits. <a href="#ga110dda440fa200b5f77349df19b3e6bb">More...</a><br /></td></tr>
<tr class="separator:ga110dda440fa200b5f77349df19b3e6bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>I2C driver modules. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7bb44e894d68a7991f564c43fb187486"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_AcknowledgeConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C acknowledge feature. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C Acknowledgement. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None.</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7f92bbdb33774b819232d039c73bf1c2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_AnalogFilterCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the Analog filter of I2C peripheral. </p>
<dl class="section note"><dt>Note</dt><dd>This function can be used only for STM32F42xxx/STM3243xxx, STM32F401xx and STM32F411xE devices.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the Analog filter. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function should be called before initializing and enabling the I2C Peripheral. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga66d86742bf1be58b17ef8779ffc79d02"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_ARPCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C ARP. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2Cx ARP. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gae86801251359226c35745e0a258388b0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_CalculatePEC </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the PEC value calculation of the transferred bytes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2Cx PEC value calculation. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga2d5701342f9d4c1f09bf9d3cdcacc326"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ErrorStatus I2C_CheckEvent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>I2C_EVENT</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the last I2Cx Event is equal to the one passed as parameter. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_EVENT</td><td>specifies the event to be checked. This parameter can be one of the following values: <ul>
<li>I2C_EVENT_SLAVE_TRANSMITTER_ADDRESS_MATCHED: EV1 </li>
<li>I2C_EVENT_SLAVE_RECEIVER_ADDRESS_MATCHED: EV1 </li>
<li>I2C_EVENT_SLAVE_TRANSMITTER_SECONDADDRESS_MATCHED: EV1 </li>
<li>I2C_EVENT_SLAVE_RECEIVER_SECONDADDRESS_MATCHED: EV1 </li>
<li>I2C_EVENT_SLAVE_GENERALCALLADDRESS_MATCHED: EV1 </li>
<li>I2C_EVENT_SLAVE_BYTE_RECEIVED: EV2 </li>
<li>(I2C_EVENT_SLAVE_BYTE_RECEIVED | I2C_FLAG_DUALF): EV2 </li>
<li>(I2C_EVENT_SLAVE_BYTE_RECEIVED | I2C_FLAG_GENCALL): EV2 </li>
<li>I2C_EVENT_SLAVE_BYTE_TRANSMITTED: EV3 </li>
<li>(I2C_EVENT_SLAVE_BYTE_TRANSMITTED | I2C_FLAG_DUALF): EV3 </li>
<li>(I2C_EVENT_SLAVE_BYTE_TRANSMITTED | I2C_FLAG_GENCALL): EV3 </li>
<li>I2C_EVENT_SLAVE_ACK_FAILURE: EV3_2 </li>
<li>I2C_EVENT_SLAVE_STOP_DETECTED: EV4 </li>
<li>I2C_EVENT_MASTER_MODE_SELECT: EV5 </li>
<li>I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED: EV6 </li>
<li>I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED: EV6 </li>
<li>I2C_EVENT_MASTER_BYTE_RECEIVED: EV7 </li>
<li>I2C_EVENT_MASTER_BYTE_TRANSMITTING: EV8 </li>
<li>I2C_EVENT_MASTER_BYTE_TRANSMITTED: EV8_2 </li>
<li>I2C_EVENT_MASTER_MODE_ADDRESS10: EV9</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>For detailed description of Events, please refer to section I2C_Events in <a class="el" href="stm32f4xx__i2c_8h.html" title="This file contains all the functions prototypes for the I2C firmware library. ">stm32f4xx_i2c.h</a> file.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">An</td><td>ErrorStatus enumeration value:<ul>
<li>SUCCESS: Last event is equal to the I2C_EVENT</li>
<li>ERROR: Last event is different from the I2C_EVENT </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga9d4f8fe9f7232696114b5578b1223963"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_ClearFlag </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>I2C_FLAG</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the I2Cx's pending flags. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_FLAG</td><td>specifies the flag to clear. This parameter can be any combination of the following values: <ul>
<li>I2C_FLAG_SMBALERT: SMBus Alert flag </li>
<li>I2C_FLAG_TIMEOUT: Timeout or Tlow error flag </li>
<li>I2C_FLAG_PECERR: PEC error in reception flag </li>
<li>I2C_FLAG_OVR: Overrun/Underrun flag (Slave mode) </li>
<li>I2C_FLAG_AF: Acknowledge failure flag </li>
<li>I2C_FLAG_ARLO: Arbitration lost flag (Master mode) </li>
<li>I2C_FLAG_BERR: Bus error flag</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>STOPF (STOP detection) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga15c95d0ed124f029621a2061b1677ee7" title="Checks whether the specified I2C flag is set or not. ">I2C_GetFlagStatus()</a>) followed by a write operation to I2C_CR1 register (<a class="el" href="group___i2_c___group1.html#ga7e1323c9133c2cb424dfb5b10b7d2f0b" title="Enables or disables the specified I2C peripheral. ">I2C_Cmd()</a> to re-enable the I2C peripheral). </dd>
<dd>
ADD10 (10-bit header sent) is cleared by software sequence: a read operation to I2C_SR1 (<a class="el" href="group___i2_c___group5.html#ga15c95d0ed124f029621a2061b1677ee7" title="Checks whether the specified I2C flag is set or not. ">I2C_GetFlagStatus()</a>) followed by writing the second byte of the address in DR register. </dd>
<dd>
BTF (Byte Transfer Finished) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga15c95d0ed124f029621a2061b1677ee7" title="Checks whether the specified I2C flag is set or not. ">I2C_GetFlagStatus()</a>) followed by a read/write to I2C_DR register (<a class="el" href="group___i2_c___group2.html#ga7bd9e70b8eafde0dd5eb42b0d95fe1a9" title="Sends a data byte through the I2Cx peripheral. ">I2C_SendData()</a>). </dd>
<dd>
ADDR (Address sent) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga15c95d0ed124f029621a2061b1677ee7" title="Checks whether the specified I2C flag is set or not. ">I2C_GetFlagStatus()</a>) followed by a read operation to I2C_SR2 register ((void)(I2Cx-&gt;SR2)). </dd>
<dd>
SB (Start Bit) is cleared software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga15c95d0ed124f029621a2061b1677ee7" title="Checks whether the specified I2C flag is set or not. ">I2C_GetFlagStatus()</a>) followed by a write operation to I2C_DR register (<a class="el" href="group___i2_c___group2.html#ga7bd9e70b8eafde0dd5eb42b0d95fe1a9" title="Sends a data byte through the I2Cx peripheral. ">I2C_SendData()</a>).</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga110dda440fa200b5f77349df19b3e6bb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_ClearITPendingBit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>I2C_IT</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the I2Cx's interrupt pending bits. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_IT</td><td>specifies the interrupt pending bit to clear. This parameter can be any combination of the following values: <ul>
<li>I2C_IT_SMBALERT: SMBus Alert interrupt </li>
<li>I2C_IT_TIMEOUT: Timeout or Tlow error interrupt </li>
<li>I2C_IT_PECERR: PEC error in reception interrupt </li>
<li>I2C_IT_OVR: Overrun/Underrun interrupt (Slave mode) </li>
<li>I2C_IT_AF: Acknowledge failure interrupt </li>
<li>I2C_IT_ARLO: Arbitration lost interrupt (Master mode) </li>
<li>I2C_IT_BERR: Bus error interrupt</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>STOPF (STOP detection) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga447771fbbd94a56f3570b9f430a069ba" title="Checks whether the specified I2C interrupt has occurred or not. ">I2C_GetITStatus()</a>) followed by a write operation to I2C_CR1 register (<a class="el" href="group___i2_c___group1.html#ga7e1323c9133c2cb424dfb5b10b7d2f0b" title="Enables or disables the specified I2C peripheral. ">I2C_Cmd()</a> to re-enable the I2C peripheral). </dd>
<dd>
ADD10 (10-bit header sent) is cleared by software sequence: a read operation to I2C_SR1 (<a class="el" href="group___i2_c___group5.html#ga447771fbbd94a56f3570b9f430a069ba" title="Checks whether the specified I2C interrupt has occurred or not. ">I2C_GetITStatus()</a>) followed by writing the second byte of the address in I2C_DR register. </dd>
<dd>
BTF (Byte Transfer Finished) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga447771fbbd94a56f3570b9f430a069ba" title="Checks whether the specified I2C interrupt has occurred or not. ">I2C_GetITStatus()</a>) followed by a read/write to I2C_DR register (<a class="el" href="group___i2_c___group2.html#ga7bd9e70b8eafde0dd5eb42b0d95fe1a9" title="Sends a data byte through the I2Cx peripheral. ">I2C_SendData()</a>). </dd>
<dd>
ADDR (Address sent) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga447771fbbd94a56f3570b9f430a069ba" title="Checks whether the specified I2C interrupt has occurred or not. ">I2C_GetITStatus()</a>) followed by a read operation to I2C_SR2 register ((void)(I2Cx-&gt;SR2)). </dd>
<dd>
SB (Start Bit) is cleared by software sequence: a read operation to I2C_SR1 register (<a class="el" href="group___i2_c___group5.html#ga447771fbbd94a56f3570b9f430a069ba" title="Checks whether the specified I2C interrupt has occurred or not. ">I2C_GetITStatus()</a>) followed by a write operation to I2C_DR register (<a class="el" href="group___i2_c___group2.html#ga7bd9e70b8eafde0dd5eb42b0d95fe1a9" title="Sends a data byte through the I2Cx peripheral. ">I2C_SendData()</a>). </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7e1323c9133c2cb424dfb5b10b7d2f0b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_Cmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C peripheral. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2Cx peripheral. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga2ee214364603059ad5d9089f749f5bfd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_DeInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deinitialize the I2Cx peripheral registers to their default reset values. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group___i2_c_ga2ee214364603059ad5d9089f749f5bfd_cgraph.png" border="0" usemap="#group___i2_c_ga2ee214364603059ad5d9089f749f5bfd_cgraph" alt=""/></div>
<map name="group___i2_c_ga2ee214364603059ad5d9089f749f5bfd_cgraph" id="group___i2_c_ga2ee214364603059ad5d9089f749f5bfd_cgraph">
<area shape="rect" id="node2" href="group___r_c_c.html#gab197ae4369c10b92640a733b40ed2801" title="Forces or releases Low Speed APB (APB1) peripheral reset. " alt="" coords="135,5,323,32"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga90b0815858cc14266d2957495fd7e105"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_DigitalFilterConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>I2C_DigitalFilter</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configures the Digital noise filter of I2C peripheral. </p>
<dl class="section note"><dt>Note</dt><dd>This function can be used only for STM32F42xxx/STM3243xxx, STM32F401xx and STM32F411xE devices.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_DigitalFilter</td><td>Coefficient of digital noise filter. This parameter can be a number between 0x00 and 0x0F. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function should be called before initializing and enabling the I2C Peripheral. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga38502ce11e5ec923e0f6476aaa35b45c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_DMACmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C DMA requests. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C DMA transfer. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gab2e994c5681eb6ec7c26a03ffe1de060"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_DMALastTransferCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specifies that the next DMA transfer is the last one. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C DMA last transfer. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga02145a333a56e79557d6ef4ea03fc313"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_DualAddressCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C dual addressing mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C dual addressing mode. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaa570f76bc34e5b0531b29b1a90af1275"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_FastModeDutyCycleConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>I2C_DutyCycle</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Selects the specified I2C fast mode duty cycle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_DutyCycle</td><td>specifies the fast mode duty cycle. This parameter can be one of the following values: <ul>
<li>I2C_DutyCycle_2: I2C fast mode Tlow/Thigh = 2 </li>
<li>I2C_DutyCycle_16_9: I2C fast mode Tlow/Thigh = 16/9 </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga65c740fc8d7b3b9f15cc432d8699d471"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_GeneralCallCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C general call feature. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C General call. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga36c522b471588be9779c878222ccb20f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_GenerateSTART </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generates I2Cx communication START condition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C START condition generation. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None.</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga5c92cb573ca0ae58cc465e5400246561"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_GenerateSTOP </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generates I2Cx communication STOP condition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C STOP condition generation. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None.</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga15c95d0ed124f029621a2061b1677ee7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FlagStatus I2C_GetFlagStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>I2C_FLAG</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the specified I2C flag is set or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_FLAG</td><td>specifies the flag to check. This parameter can be one of the following values: <ul>
<li>I2C_FLAG_DUALF: Dual flag (Slave mode) </li>
<li>I2C_FLAG_SMBHOST: SMBus host header (Slave mode) </li>
<li>I2C_FLAG_SMBDEFAULT: SMBus default header (Slave mode) </li>
<li>I2C_FLAG_GENCALL: General call header flag (Slave mode) </li>
<li>I2C_FLAG_TRA: Transmitter/Receiver flag </li>
<li>I2C_FLAG_BUSY: Bus busy flag </li>
<li>I2C_FLAG_MSL: Master/Slave flag </li>
<li>I2C_FLAG_SMBALERT: SMBus Alert flag </li>
<li>I2C_FLAG_TIMEOUT: Timeout or Tlow error flag </li>
<li>I2C_FLAG_PECERR: PEC error in reception flag </li>
<li>I2C_FLAG_OVR: Overrun/Underrun flag (Slave mode) </li>
<li>I2C_FLAG_AF: Acknowledge failure flag </li>
<li>I2C_FLAG_ARLO: Arbitration lost flag (Master mode) </li>
<li>I2C_FLAG_BERR: Bus error flag </li>
<li>I2C_FLAG_TXE: Data register empty flag (Transmitter) </li>
<li>I2C_FLAG_RXNE: Data register not empty (Receiver) flag </li>
<li>I2C_FLAG_STOPF: Stop detection flag (Slave mode) </li>
<li>I2C_FLAG_ADD10: 10-bit header sent flag (Master mode) </li>
<li>I2C_FLAG_BTF: Byte transfer finished flag </li>
<li>I2C_FLAG_ADDR: Address sent flag (Master mode) "ADSL" Address matched flag (Slave mode)"ENDAD" </li>
<li>I2C_FLAG_SB: Start bit flag (Master mode) </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>new state of I2C_FLAG (SET or RESET). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga447771fbbd94a56f3570b9f430a069ba"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ITStatus I2C_GetITStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>I2C_IT</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the specified I2C interrupt has occurred or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_IT</td><td>specifies the interrupt source to check. This parameter can be one of the following values: <ul>
<li>I2C_IT_SMBALERT: SMBus Alert flag </li>
<li>I2C_IT_TIMEOUT: Timeout or Tlow error flag </li>
<li>I2C_IT_PECERR: PEC error in reception flag </li>
<li>I2C_IT_OVR: Overrun/Underrun flag (Slave mode) </li>
<li>I2C_IT_AF: Acknowledge failure flag </li>
<li>I2C_IT_ARLO: Arbitration lost flag (Master mode) </li>
<li>I2C_IT_BERR: Bus error flag </li>
<li>I2C_IT_TXE: Data register empty flag (Transmitter) </li>
<li>I2C_IT_RXNE: Data register not empty (Receiver) flag </li>
<li>I2C_IT_STOPF: Stop detection flag (Slave mode) </li>
<li>I2C_IT_ADD10: 10-bit header sent flag (Master mode) </li>
<li>I2C_IT_BTF: Byte transfer finished flag </li>
<li>I2C_IT_ADDR: Address sent flag (Master mode) "ADSL" Address matched flag (Slave mode)"ENDAD" </li>
<li>I2C_IT_SB: Start bit flag (Master mode) </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>new state of I2C_IT (SET or RESET). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga29237aea9b5a3ead33167e1d027e9f1a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t I2C_GetLastEvent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the last I2Cx Event. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>For detailed description of Events, please refer to section I2C_Events in <a class="el" href="stm32f4xx__i2c_8h.html" title="This file contains all the functions prototypes for the I2C firmware library. ">stm32f4xx_i2c.h</a> file.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>last event </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7bf75e7c27c0e1d73e70fc0e1c7cd1dd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t I2C_GetPEC </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PEC value for the specified I2C. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>PEC value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaac29465bca70fbc91c2f922ab67bb88e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_Init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_i2_c___init_type_def.html">I2C_InitTypeDef</a> *&#160;</td>
<td class="paramname"><em>I2C_InitStruct</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the I2Cx peripheral according to the specified parameters in the I2C_InitStruct. </p>
<dl class="section note"><dt>Note</dt><dd>To use the I2C at 400 KHz (in fast mode), the PCLK1 frequency (I2C peripheral input clock) must be a multiple of 10 MHz.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_InitStruct</td><td>pointer to a <a class="el" href="struct_i2_c___init_type_def.html" title="I2C Init structure definition. ">I2C_InitTypeDef</a> structure that contains the configuration information for the specified I2C peripheral. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group___i2_c_gaac29465bca70fbc91c2f922ab67bb88e_cgraph.png" border="0" usemap="#group___i2_c_gaac29465bca70fbc91c2f922ab67bb88e_cgraph" alt=""/></div>
<map name="group___i2_c_gaac29465bca70fbc91c2f922ab67bb88e_cgraph" id="group___i2_c_gaac29465bca70fbc91c2f922ab67bb88e_cgraph">
<area shape="rect" id="node2" href="group___r_c_c.html#ga3e9944fd1ed734275222bbb3e3f29993" title="Returns the frequencies of different on chip clocks; SYSCLK, HCLK, PCLK1 and PCLK2. " alt="" coords="119,5,261,32"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga58fed146a06cb81d2940604e460de047"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_ITConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>I2C_IT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C interrupts. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_IT</td><td>specifies the I2C interrupts sources to be enabled or disabled. This parameter can be any combination of the following values: <ul>
<li>I2C_IT_BUF: Buffer interrupt mask </li>
<li>I2C_IT_EVT: Event interrupt mask </li>
<li>I2C_IT_ERR: Error interrupt mask </li>
</ul>
</td></tr>
<tr><td class="paramname">NewState</td><td>new state of the specified I2C interrupts. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gad08ebffc3a234d84e6405ec115bd74f1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_NACKPositionConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>I2C_NACKPosition</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Selects the specified I2C NACK position in master receiver mode. </p>
<dl class="section note"><dt>Note</dt><dd>This function is useful in I2C Master Receiver mode when the number of data to be received is equal to 2. In this case, this function should be called (with parameter I2C_NACKPosition_Next) before data reception starts,as described in the 2-byte reception procedure recommended in Reference Manual in Section: Master receiver. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_NACKPosition</td><td>specifies the NACK position. This parameter can be one of the following values: <ul>
<li>I2C_NACKPosition_Next: indicates that the next byte will be the last received byte. </li>
<li>I2C_NACKPosition_Current: indicates that current byte is the last received byte.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function configures the same bit (POS) as <a class="el" href="group___i2_c___group3.html#ga5d0f939bdd45542502827bf408f24161" title="Selects the specified I2C PEC position. ">I2C_PECPositionConfig()</a> but is intended to be used in I2C mode while <a class="el" href="group___i2_c___group3.html#ga5d0f939bdd45542502827bf408f24161" title="Selects the specified I2C PEC position. ">I2C_PECPositionConfig()</a> is intended to used in SMBUS mode.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7be2cc634a613c8e3539137e897a22df"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_OwnAddress2Config </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Address</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configures the specified I2C own address2. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">Address</td><td>specifies the 7bit I2C own address2. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None.</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga5d0f939bdd45542502827bf408f24161"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_PECPositionConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>I2C_PECPosition</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Selects the specified I2C PEC position. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_PECPosition</td><td>specifies the PEC position. This parameter can be one of the following values: <ul>
<li>I2C_PECPosition_Next: indicates that the next byte is PEC </li>
<li>I2C_PECPosition_Current: indicates that current byte is PEC</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function configures the same bit (POS) as <a class="el" href="group___i2_c___group1.html#gad08ebffc3a234d84e6405ec115bd74f1" title="Selects the specified I2C NACK position in master receiver mode. ">I2C_NACKPositionConfig()</a> but is intended to be used in SMBUS mode while <a class="el" href="group___i2_c___group1.html#gad08ebffc3a234d84e6405ec115bd74f1" title="Selects the specified I2C NACK position in master receiver mode. ">I2C_NACKPositionConfig()</a> is intended to used in I2C mode.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8021dc796d15f997356b0583d6346805"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t I2C_ReadRegister </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>I2C_Register</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads the specified I2C register and returns its value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2C_Register</td><td>specifies the register to read. This parameter can be one of the following values: <ul>
<li>I2C_Register_CR1: CR1 register. </li>
<li>I2C_Register_CR2: CR2 register. </li>
<li>I2C_Register_OAR1: OAR1 register. </li>
<li>I2C_Register_OAR2: OAR2 register. </li>
<li>I2C_Register_DR: DR register. </li>
<li>I2C_Register_SR1: SR1 register. </li>
<li>I2C_Register_SR2: SR2 register. </li>
<li>I2C_Register_CCR: CCR register. </li>
<li>I2C_Register_TRISE: TRISE register. </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>value of the read register. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaeaaa4b6f77f50eb57465148c55d27fb2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t I2C_ReceiveData </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the most recent received data by the I2Cx peripheral. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>value of the received data. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga009fc2a5b2313c36da39ece39a1156a6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_Send7bitAddress </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>I2C_Direction</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Transmits the address byte to select the slave device. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">Address</td><td>specifies the slave address which will be transmitted </td></tr>
<tr><td class="paramname">I2C_Direction</td><td>specifies whether the I2C device will be a Transmitter or a Receiver. This parameter can be one of the following values <ul>
<li>I2C_Direction_Transmitter: Transmitter mode </li>
<li>I2C_Direction_Receiver: Receiver mode </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None.</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7bd9e70b8eafde0dd5eb42b0d95fe1a9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_SendData </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Data</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sends a data byte through the I2Cx peripheral. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">Data</td><td>Byte to be transmitted.. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga75a810776d9710d2f6d9c5d9e93241c6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_SMBusAlertConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>I2C_SMBusAlert</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Drives the SMBusAlert pin high or low for the specified I2C. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">I2C_SMBusAlert</td><td>specifies SMBAlert pin level. This parameter can be one of the following values: <ul>
<li>I2C_SMBusAlert_Low: SMBAlert pin driven low </li>
<li>I2C_SMBusAlert_High: SMBAlert pin driven high </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga1289c908aeb882443aba323b459c638b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_SoftwareResetCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C software reset. </p>
<dl class="section note"><dt>Note</dt><dd>When software reset is enabled, the I2C IOs are released (this can be useful to recover from bus errors). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C software reset. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7459feb3b1dfcd3e4f6574002ca7d3bd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_StretchClockCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C Clock stretching. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2Cx Clock stretching. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga08582aca6d7d7910cd5cbff0d9def350"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_StructInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___init_type_def.html">I2C_InitTypeDef</a> *&#160;</td>
<td class="paramname"><em>I2C_InitStruct</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Fills each I2C_InitStruct member with its default value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2C_InitStruct</td><td>pointer to an <a class="el" href="struct_i2_c___init_type_def.html" title="I2C Init structure definition. ">I2C_InitTypeDef</a> structure which will be initialized. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaa27d1440290fe601e730b6980999afe3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_TransmitPEC </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_i2_c___type_def.html">I2C_TypeDef</a> *&#160;</td>
<td class="paramname"><em>I2Cx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FunctionalState&#160;</td>
<td class="paramname"><em>NewState</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the specified I2C PEC transfer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">I2Cx</td><td>where x can be 1, 2 or 3 to select the I2C peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the I2C PEC transmission. This parameter can be: ENABLE or DISABLE. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">None</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 10 2015 15:15:20 for discoverpixy by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>