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

231 lines
25 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: discovery/libs/StmCoreNPheriph/src/stm32f4xx_gpio.c File Reference</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 class="current"><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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_84db96586f7d962b526d6d9627d831c2.html">discovery</a></li><li class="navelem"><a class="el" href="dir_07523c13f04fd35d8848cb17a371cb5b.html">libs</a></li><li class="navelem"><a class="el" href="dir_1d60ba7d807ff336a2be2f2de640bf2b.html">StmCoreNPheriph</a></li><li class="navelem"><a class="el" href="dir_12f7a99b9d2a0e5955a2ac990af20021.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">stm32f4xx_gpio.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This file provides firmware functions to manage the following functionalities of the GPIO peripheral:
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="stm32f4xx__gpio_8h_source.html">stm32f4xx_gpio.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="stm32f4xx__rcc_8h_source.html">stm32f4xx_rcc.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for stm32f4xx_gpio.c:</div>
<div class="dyncontent">
<div class="center"><img src="stm32f4xx__gpio_8c__incl.png" border="0" usemap="#discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__gpio_8c" alt=""/></div>
<map name="discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__gpio_8c" id="discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__gpio_8c">
<area shape="rect" id="node2" href="stm32f4xx__gpio_8h.html" title="This file contains all the functions prototypes for the GPIO firmware library. " alt="" coords="2288,95,2412,121"/><area shape="rect" id="node20" href="stm32f4xx__rcc_8h.html" title="This file contains all the functions prototypes for the RCC firmware library. " alt="" coords="4024,319,4143,345"/><area shape="rect" id="node3" href="stm32f4xx_8h.html" title="CMSIS Cortex&#45;M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg..." alt="" coords="2178,169,2271,196"/><area shape="rect" id="node4" href="core__cm4_8h.html" title="CMSIS Cortex&#45;M4 Core Peripheral Access Layer Header File. " alt="" coords="350,244,441,271"/><area shape="rect" id="node9" href="system__stm32f4xx_8h.html" title="CMSIS Cortex&#45;M4 Device System Source File for STM32F4xx devices. " alt="" coords="183,244,325,271"/><area shape="rect" id="node10" href="stm32f4xx__conf_8h_source.html" title="stm32f4xx_conf.h" alt="" coords="2288,244,2412,271"/><area shape="rect" id="node6" href="core__cm_instr_8h.html" title="CMSIS Cortex&#45;M Core Instruction Access Header File. " alt="" coords="245,319,351,345"/><area shape="rect" id="node7" href="core__cm_func_8h.html" title="CMSIS Cortex&#45;M Core Function Access Header File. " alt="" coords="375,319,487,345"/><area shape="rect" id="node8" href="core__cm4__simd_8h.html" title="CMSIS Cortex&#45;M4 SIMD Header File. " alt="" coords="95,319,221,345"/><area shape="rect" id="node11" href="stm32f4xx__adc_8h.html" title="This file contains all the functions prototypes for the ADC firmware library. " alt="" coords="512,319,633,345"/><area shape="rect" id="node12" href="stm32f4xx__crc_8h.html" title="This file contains all the functions prototypes for the CRC firmware library. " alt="" coords="657,319,776,345"/><area shape="rect" id="node13" href="stm32f4xx__dbgmcu_8h.html" title="This file contains all the functions prototypes for the DBGMCU firmware library. " alt="" coords="801,319,947,345"/><area shape="rect" id="node14" href="stm32f4xx__dma_8h.html" title="This file contains all the functions prototypes for the DMA firmware library. " alt="" coords="971,319,1097,345"/><area shape="rect" id="node15" href="stm32f4xx__exti_8h.html" title="This file contains all the functions prototypes for the EXTI firmware library. " alt="" coords="1121,319,1243,345"/><area shape="rect" id="node16" href="stm32f4xx__flash_8h.html" title="This file contains all the functions prototypes for the FLASH firmware library. " alt="" coords="1267,319,1393,345"/><area shape="rect" id="node17" href="stm32f4xx__i2c_8h.html" title="This file contains all the functions prototypes for the I2C firmware library. " alt="" coords="1418,319,1535,345"/><area shape="rect" id="node18" href="stm32f4xx__iwdg_8h.html" title="This file contains all the functions prototypes for the IWDG firmware library. " alt="" coords="1560,319,1687,345"/><area shape="rect" id="node19" href="stm32f4xx__pwr_8h.html" title="This file contains all the functions prototypes for the PWR firmware library. " alt="" coords="1711,319,1829,345"/><area shape="rect" id="node21" href="stm32f4xx__rtc_8h.html" title="This file contains all the functions prototypes for the RTC firmware library. " alt="" coords="1854,319,1969,345"/><area shape="rect" id="node22" href="stm32f4xx__sdio_8h.html" title="This file contains all the functions prototypes for the SDIO firmware library. " alt="" coords="1993,319,2117,345"/><area shape="rect" id="node23" href="stm32f4xx__spi_8h.html" title="This file contains all the functions prototypes for the SPI firmware library. " alt="" coords="2141,319,2258,345"/><area shape="rect" id="node24" href="stm32f4xx__syscfg_8h.html" title="This file contains all the functions prototypes for the SYSCFG firmware library. " alt="" coords="2282,319,2421,345"/><area shape="rect" id="node25" href="stm32f4xx__tim_8h.html" title="This file contains all the functions prototypes for the TIM firmware library. " alt="" coords="2445,319,2564,345"/><area shape="rect" id="node26" href="stm32f4xx__usart_8h.html" title="This file contains all the functions prototypes for the USART firmware library. " alt="" coords="2588,319,2717,345"/><area shape="rect" id="node27" href="stm32f4xx__wwdg_8h.html" title="This file contains all the functions prototypes for the WWDG firmware library. " alt="" coords="2741,319,2873,345"/><area shape="rect" id="node28" href="misc_8h.html" title="This file contains all the functions prototypes for the miscellaneous firmware library functions (add..." alt="" coords="2898,319,2959,345"/><area shape="rect" id="node29" href="stm32f4xx__cryp_8h.html" title="This file contains all the functions prototypes for the Cryptographic processor(CRYP) firmware librar..." alt="" coords="2983,319,3109,345"/><area shape="rect" id="node30" href="stm32f4xx__hash_8h.html" title="This file contains all the functions prototypes for the HASH firmware library. " alt="" coords="3133,319,3261,345"/><area shape="rect" id="node31" href="stm32f4xx__rng_8h.html" title="This file contains all the functions prototypes for the Random Number Generator(RNG) firmware library..." alt="" coords="3285,319,3404,345"/><area shape="rect" id="node32" href="stm32f4xx__can_8h.html" title="This file contains all the functions prototypes for the CAN firmware library. " alt="" coords="3428,319,3549,345"/><area shape="rect" id="node33" href="stm32f4xx__dac_8h.html" title="This file contains all the functions prototypes for the DAC firmware library. " alt="" coords="3573,319,3695,345"/><area shape="rect" id="node34" href="stm32f4xx__dcmi_8h.html" title="This file contains all the functions prototypes for the DCMI firmware library. " alt="" coords="3719,319,3847,345"/><area shape="rect" id="node35" href="stm32f4xx__fsmc_8h.html" title="This file contains all the functions prototypes for the FSMC firmware library. " alt="" coords="3871,319,3999,345"/></map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa60bdf3182c44b5fa818f237042f52ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group1.html#gaa60bdf3182c44b5fa818f237042f52ee">GPIO_DeInit</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx)</td></tr>
<tr class="memdesc:gaa60bdf3182c44b5fa818f237042f52ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initializes the GPIOx peripheral registers to their default reset values. <a href="group___g_p_i_o___group1.html#gaa60bdf3182c44b5fa818f237042f52ee">More...</a><br /></td></tr>
<tr class="separator:gaa60bdf3182c44b5fa818f237042f52ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga71abf9404261370d03cca449b88d3a65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group1.html#ga71abf9404261370d03cca449b88d3a65">GPIO_Init</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, <a class="el" href="struct_g_p_i_o___init_type_def.html">GPIO_InitTypeDef</a> *GPIO_InitStruct)</td></tr>
<tr class="memdesc:ga71abf9404261370d03cca449b88d3a65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct. <a href="group___g_p_i_o___group1.html#ga71abf9404261370d03cca449b88d3a65">More...</a><br /></td></tr>
<tr class="separator:ga71abf9404261370d03cca449b88d3a65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab28de41278e7f8c63d0851e2733b10df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group1.html#gab28de41278e7f8c63d0851e2733b10df">GPIO_StructInit</a> (<a class="el" href="struct_g_p_i_o___init_type_def.html">GPIO_InitTypeDef</a> *GPIO_InitStruct)</td></tr>
<tr class="memdesc:gab28de41278e7f8c63d0851e2733b10df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills each GPIO_InitStruct member with its default value. <a href="group___g_p_i_o___group1.html#gab28de41278e7f8c63d0851e2733b10df">More...</a><br /></td></tr>
<tr class="separator:gab28de41278e7f8c63d0851e2733b10df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad2f2e615928c69fd0d8c641a7cedaafc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group1.html#gad2f2e615928c69fd0d8c641a7cedaafc">GPIO_PinLockConfig</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin)</td></tr>
<tr class="memdesc:gad2f2e615928c69fd0d8c641a7cedaafc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Locks GPIO Pins configuration registers. <a href="group___g_p_i_o___group1.html#gad2f2e615928c69fd0d8c641a7cedaafc">More...</a><br /></td></tr>
<tr class="separator:gad2f2e615928c69fd0d8c641a7cedaafc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga98772ef6b639b3fa06c8ae5ba28d3aaa"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#ga98772ef6b639b3fa06c8ae5ba28d3aaa">GPIO_ReadInputDataBit</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin)</td></tr>
<tr class="memdesc:ga98772ef6b639b3fa06c8ae5ba28d3aaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified input port pin. <a href="group___g_p_i_o___group2.html#ga98772ef6b639b3fa06c8ae5ba28d3aaa">More...</a><br /></td></tr>
<tr class="separator:ga98772ef6b639b3fa06c8ae5ba28d3aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga139a33adc8409288e9f193bbebb5a0f7"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#ga139a33adc8409288e9f193bbebb5a0f7">GPIO_ReadInputData</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx)</td></tr>
<tr class="memdesc:ga139a33adc8409288e9f193bbebb5a0f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified GPIO input data port. <a href="group___g_p_i_o___group2.html#ga139a33adc8409288e9f193bbebb5a0f7">More...</a><br /></td></tr>
<tr class="separator:ga139a33adc8409288e9f193bbebb5a0f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga138270f8695b105b7c6ed405792919c1"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#ga138270f8695b105b7c6ed405792919c1">GPIO_ReadOutputDataBit</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin)</td></tr>
<tr class="memdesc:ga138270f8695b105b7c6ed405792919c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified output data port bit. <a href="group___g_p_i_o___group2.html#ga138270f8695b105b7c6ed405792919c1">More...</a><br /></td></tr>
<tr class="separator:ga138270f8695b105b7c6ed405792919c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8938a34280b7dc3e39872a7c17bb323"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#gaf8938a34280b7dc3e39872a7c17bb323">GPIO_ReadOutputData</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx)</td></tr>
<tr class="memdesc:gaf8938a34280b7dc3e39872a7c17bb323"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified GPIO output data port. <a href="group___g_p_i_o___group2.html#gaf8938a34280b7dc3e39872a7c17bb323">More...</a><br /></td></tr>
<tr class="separator:gaf8938a34280b7dc3e39872a7c17bb323"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e1352eed7c6620e18af2d86f6b6ff8e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#ga9e1352eed7c6620e18af2d86f6b6ff8e">GPIO_SetBits</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin)</td></tr>
<tr class="memdesc:ga9e1352eed7c6620e18af2d86f6b6ff8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the selected data port bits. <a href="group___g_p_i_o___group2.html#ga9e1352eed7c6620e18af2d86f6b6ff8e">More...</a><br /></td></tr>
<tr class="separator:ga9e1352eed7c6620e18af2d86f6b6ff8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fcd35b207a66608dd2c9d7de9247dc8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#ga6fcd35b207a66608dd2c9d7de9247dc8">GPIO_ResetBits</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin)</td></tr>
<tr class="memdesc:ga6fcd35b207a66608dd2c9d7de9247dc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the selected data port bits. <a href="group___g_p_i_o___group2.html#ga6fcd35b207a66608dd2c9d7de9247dc8">More...</a><br /></td></tr>
<tr class="separator:ga6fcd35b207a66608dd2c9d7de9247dc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f7b237fd744d9f7456fbe0da47a9b80"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#ga8f7b237fd744d9f7456fbe0da47a9b80">GPIO_WriteBit</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin, <a class="el" href="group___g_p_i_o.html#ga176130b21c0e719121470a6042d4cf19">BitAction</a> BitVal)</td></tr>
<tr class="memdesc:ga8f7b237fd744d9f7456fbe0da47a9b80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets or clears the selected data port bit. <a href="group___g_p_i_o___group2.html#ga8f7b237fd744d9f7456fbe0da47a9b80">More...</a><br /></td></tr>
<tr class="separator:ga8f7b237fd744d9f7456fbe0da47a9b80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa925f19c8547a00c7a0c269a84873bf9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#gaa925f19c8547a00c7a0c269a84873bf9">GPIO_Write</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t PortVal)</td></tr>
<tr class="memdesc:gaa925f19c8547a00c7a0c269a84873bf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes data to the specified GPIO data port. <a href="group___g_p_i_o___group2.html#gaa925f19c8547a00c7a0c269a84873bf9">More...</a><br /></td></tr>
<tr class="separator:gaa925f19c8547a00c7a0c269a84873bf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1b837c66258872740d5f89f23549ab1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group2.html#gac1b837c66258872740d5f89f23549ab1">GPIO_ToggleBits</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_Pin)</td></tr>
<tr class="memdesc:gac1b837c66258872740d5f89f23549ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Toggles the specified GPIO pins.. <a href="group___g_p_i_o___group2.html#gac1b837c66258872740d5f89f23549ab1">More...</a><br /></td></tr>
<tr class="separator:gac1b837c66258872740d5f89f23549ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a77617a322562ae84f8d72486032c5d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_p_i_o___group3.html#ga0a77617a322562ae84f8d72486032c5d">GPIO_PinAFConfig</a> (<a class="el" href="struct_g_p_i_o___type_def.html">GPIO_TypeDef</a> *GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF)</td></tr>
<tr class="memdesc:ga0a77617a322562ae84f8d72486032c5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the mapping of the specified pin. <a href="group___g_p_i_o___group3.html#ga0a77617a322562ae84f8d72486032c5d">More...</a><br /></td></tr>
<tr class="separator:ga0a77617a322562ae84f8d72486032c5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This file provides firmware functions to manage the following functionalities of the GPIO peripheral: </p>
<dl class="section author"><dt>Author</dt><dd>MCD Application Team </dd></dl>
<dl class="section version"><dt>Version</dt><dd>V1.4.0 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>04-August-2014<ul>
<li>Initialization and Configuration</li>
<li>GPIO Read and Write</li>
<li>GPIO Alternate functions configuration</li>
</ul>
</dd></dl>
<pre class="fragment"> ===============================================================================
##### How to use this driver #####
===============================================================================
[..]
(#) Enable the GPIO AHB clock using the following function
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOx, ENABLE);
(#) Configure the GPIO pin(s) using GPIO_Init()
Four possible configuration are available for each pin:
(++) Input: Floating, Pull-up, Pull-down.
(++) Output: Push-Pull (Pull-up, Pull-down or no Pull)
Open Drain (Pull-up, Pull-down or no Pull). In output mode, the speed
is configurable: 2 MHz, 25 MHz, 50 MHz or 100 MHz.
(++) Alternate Function: Push-Pull (Pull-up, Pull-down or no Pull) Open
Drain (Pull-up, Pull-down or no Pull).
(++) Analog: required mode when a pin is to be used as ADC channel or DAC
output.
(#) Peripherals alternate function:
(++) For ADC and DAC, configure the desired pin in analog mode using
GPIO_InitStruct-&gt;GPIO_Mode = GPIO_Mode_AN;
(+++) For other peripherals (TIM, USART...):
(+++) Connect the pin to the desired peripherals' Alternate
Function (AF) using GPIO_PinAFConfig() function
(+++) Configure the desired pin in alternate function mode using
GPIO_InitStruct-&gt;GPIO_Mode = GPIO_Mode_AF
(+++) Select the type, pull-up/pull-down and output speed via
GPIO_PuPd, GPIO_OType and GPIO_Speed members
(+++) Call GPIO_Init() function
(#) To get the level of a pin configured in input mode use GPIO_ReadInputDataBit()
(#) To set/reset the level of a pin configured in output mode use
GPIO_SetBits()/GPIO_ResetBits()
(#) During and just after reset, the alternate functions are not
active and the GPIO pins are configured in input floating mode (except JTAG
pins).
(#) The LSE oscillator pins OSC32_IN and OSC32_OUT can be used as general purpose
(PC14 and PC15, respectively) when the LSE oscillator is off. The LSE has
priority over the GPIO function.
(#) The HSE oscillator pins OSC_IN/OSC_OUT can be used as
general purpose PH0 and PH1, respectively, when the HSE oscillator is off.
The HSE has priority over the GPIO function.</pre><pre class="fragment">@attention
&lt;h2&gt;&lt;center&gt;&amp;copy; COPYRIGHT 2014 STMicroelectronics&lt;/center&gt;&lt;/h2&gt;
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</pre></div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 10 2015 15:15:18 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>