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

287 lines
39 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_usart.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="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">stm32f4xx_usart.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This file provides firmware functions to manage the following functionalities of the Universal synchronous asynchronous receiver transmitter (USART):
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="stm32f4xx__usart_8h_source.html">stm32f4xx_usart.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_usart.c:</div>
<div class="dyncontent">
<div class="center"><img src="stm32f4xx__usart_8c__incl.png" border="0" usemap="#discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__usart_8c" alt=""/></div>
<map name="discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__usart_8c" id="discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__usart_8c">
<area shape="rect" id="node2" href="stm32f4xx__usart_8h.html" title="This file contains all the functions prototypes for the USART firmware library. " alt="" coords="2284,95,2413,121"/><area shape="rect" id="node21" href="stm32f4xx__rcc_8h.html" title="This file contains all the functions prototypes for the RCC firmware library. " alt="" coords="4017,319,4136,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="2177,169,2270,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="2287,244,2411,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__gpio_8h.html" title="This file contains all the functions prototypes for the GPIO firmware library. " alt="" coords="1417,319,1541,345"/><area shape="rect" id="node18" href="stm32f4xx__i2c_8h.html" title="This file contains all the functions prototypes for the I2C firmware library. " alt="" coords="1565,319,1682,345"/><area shape="rect" id="node19" href="stm32f4xx__iwdg_8h.html" title="This file contains all the functions prototypes for the IWDG firmware library. " alt="" coords="1707,319,1833,345"/><area shape="rect" id="node20" href="stm32f4xx__pwr_8h.html" title="This file contains all the functions prototypes for the PWR firmware library. " alt="" coords="1857,319,1976,345"/><area shape="rect" id="node22" href="stm32f4xx__rtc_8h.html" title="This file contains all the functions prototypes for the RTC firmware library. " alt="" coords="2001,319,2115,345"/><area shape="rect" id="node23" href="stm32f4xx__sdio_8h.html" title="This file contains all the functions prototypes for the SDIO firmware library. " alt="" coords="2140,319,2264,345"/><area shape="rect" id="node24" href="stm32f4xx__spi_8h.html" title="This file contains all the functions prototypes for the SPI firmware library. " alt="" coords="2287,319,2405,345"/><area shape="rect" id="node25" href="stm32f4xx__syscfg_8h.html" title="This file contains all the functions prototypes for the SYSCFG firmware library. " alt="" coords="2429,319,2567,345"/><area shape="rect" id="node26" href="stm32f4xx__tim_8h.html" title="This file contains all the functions prototypes for the TIM firmware library. " alt="" coords="2592,319,2711,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="2735,319,2867,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="2891,319,2953,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="2977,319,3102,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="3126,319,3254,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="3279,319,3397,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="3421,319,3543,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="3567,319,3688,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="3713,319,3841,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="3865,319,3993,345"/></map>
</div>
</div><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">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t.html#ga8d425258898b4af4ebc820f52635fad8">CR1_CLEAR_MASK</a></td></tr>
<tr class="separator:ga8d425258898b4af4ebc820f52635fad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7834b3d9be4875de242f87c12fd79f02"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t.html#ga7834b3d9be4875de242f87c12fd79f02">CR2_CLOCK_CLEAR_MASK</a></td></tr>
<tr class="separator:ga7834b3d9be4875de242f87c12fd79f02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c882571db73abc5d1837368a1cb0a64"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t.html#ga5c882571db73abc5d1837368a1cb0a64">CR3_CLEAR_MASK</a>&#160;&#160;&#160;((uint16_t)(<a class="el" href="group___peripheral___registers___bits___definition.html#ga7c5d6fcd84a4728cda578a0339b4cac2">USART_CR3_RTSE</a> | <a class="el" href="group___peripheral___registers___bits___definition.html#gaa125f026b1ca2d76eab48b191baed265">USART_CR3_CTSE</a>))</td></tr>
<tr class="separator:ga5c882571db73abc5d1837368a1cb0a64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacde7fc0e46b3a5fc7e2002b2915884d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacde7fc0e46b3a5fc7e2002b2915884d5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>IT_MASK</b>&#160;&#160;&#160;((uint16_t)0x001F)</td></tr>
<tr class="separator:gacde7fc0e46b3a5fc7e2002b2915884d5"><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:ga2f8e1ce72da21b6539d8e1f299ec3b0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga2f8e1ce72da21b6539d8e1f299ec3b0d">USART_DeInit</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx)</td></tr>
<tr class="memdesc:ga2f8e1ce72da21b6539d8e1f299ec3b0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitializes the USARTx peripheral registers to their default reset values. <a href="group___u_s_a_r_t___group1.html#ga2f8e1ce72da21b6539d8e1f299ec3b0d">More...</a><br /></td></tr>
<tr class="separator:ga2f8e1ce72da21b6539d8e1f299ec3b0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga98da340ea0324002ba1b4263e91ab2ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga98da340ea0324002ba1b4263e91ab2ff">USART_Init</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, <a class="el" href="struct_u_s_a_r_t___init_type_def.html">USART_InitTypeDef</a> *USART_InitStruct)</td></tr>
<tr class="memdesc:ga98da340ea0324002ba1b4263e91ab2ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the USARTx peripheral according to the specified parameters in the USART_InitStruct . <a href="group___u_s_a_r_t___group1.html#ga98da340ea0324002ba1b4263e91ab2ff">More...</a><br /></td></tr>
<tr class="separator:ga98da340ea0324002ba1b4263e91ab2ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34e1faa2f312496c16cfd05155f4c8b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga34e1faa2f312496c16cfd05155f4c8b1">USART_StructInit</a> (<a class="el" href="struct_u_s_a_r_t___init_type_def.html">USART_InitTypeDef</a> *USART_InitStruct)</td></tr>
<tr class="memdesc:ga34e1faa2f312496c16cfd05155f4c8b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills each USART_InitStruct member with its default value. <a href="group___u_s_a_r_t___group1.html#ga34e1faa2f312496c16cfd05155f4c8b1">More...</a><br /></td></tr>
<tr class="separator:ga34e1faa2f312496c16cfd05155f4c8b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadb50c7a2175c91acd3728f8eefd0c63d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#gadb50c7a2175c91acd3728f8eefd0c63d">USART_ClockInit</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, <a class="el" href="struct_u_s_a_r_t___clock_init_type_def.html">USART_ClockInitTypeDef</a> *USART_ClockInitStruct)</td></tr>
<tr class="memdesc:gadb50c7a2175c91acd3728f8eefd0c63d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the USARTx peripheral Clock according to the specified parameters in the USART_ClockInitStruct . <a href="group___u_s_a_r_t___group1.html#gadb50c7a2175c91acd3728f8eefd0c63d">More...</a><br /></td></tr>
<tr class="separator:gadb50c7a2175c91acd3728f8eefd0c63d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59df27d0adda18b16ee28d47672cc724"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga59df27d0adda18b16ee28d47672cc724">USART_ClockStructInit</a> (<a class="el" href="struct_u_s_a_r_t___clock_init_type_def.html">USART_ClockInitTypeDef</a> *USART_ClockInitStruct)</td></tr>
<tr class="memdesc:ga59df27d0adda18b16ee28d47672cc724"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills each USART_ClockInitStruct member with its default value. <a href="group___u_s_a_r_t___group1.html#ga59df27d0adda18b16ee28d47672cc724">More...</a><br /></td></tr>
<tr class="separator:ga59df27d0adda18b16ee28d47672cc724"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45e51626739c5f22a6567c8a85d1d85e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga45e51626739c5f22a6567c8a85d1d85e">USART_Cmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga45e51626739c5f22a6567c8a85d1d85e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified USART peripheral. <a href="group___u_s_a_r_t___group1.html#ga45e51626739c5f22a6567c8a85d1d85e">More...</a><br /></td></tr>
<tr class="separator:ga45e51626739c5f22a6567c8a85d1d85e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5da8f2eee8245425584d85d4f62cc33"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#gaf5da8f2eee8245425584d85d4f62cc33">USART_SetPrescaler</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint8_t USART_Prescaler)</td></tr>
<tr class="memdesc:gaf5da8f2eee8245425584d85d4f62cc33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the system clock prescaler. <a href="group___u_s_a_r_t___group1.html#gaf5da8f2eee8245425584d85d4f62cc33">More...</a><br /></td></tr>
<tr class="separator:gaf5da8f2eee8245425584d85d4f62cc33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3897bab07491d9239f8a238a9a7cddea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga3897bab07491d9239f8a238a9a7cddea">USART_OverSampling8Cmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga3897bab07491d9239f8a238a9a7cddea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's 8x oversampling mode. <a href="group___u_s_a_r_t___group1.html#ga3897bab07491d9239f8a238a9a7cddea">More...</a><br /></td></tr>
<tr class="separator:ga3897bab07491d9239f8a238a9a7cddea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ed89ea8765d851510cfe90f7d90cbbb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group1.html#ga3ed89ea8765d851510cfe90f7d90cbbb">USART_OneBitMethodCmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga3ed89ea8765d851510cfe90f7d90cbbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's one bit sampling method. <a href="group___u_s_a_r_t___group1.html#ga3ed89ea8765d851510cfe90f7d90cbbb">More...</a><br /></td></tr>
<tr class="separator:ga3ed89ea8765d851510cfe90f7d90cbbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b43d42da9540f446d494bf69823c6fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group2.html#ga0b43d42da9540f446d494bf69823c6fb">USART_SendData</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t Data)</td></tr>
<tr class="memdesc:ga0b43d42da9540f446d494bf69823c6fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits single data through the USARTx peripheral. <a href="group___u_s_a_r_t___group2.html#ga0b43d42da9540f446d494bf69823c6fb">More...</a><br /></td></tr>
<tr class="separator:ga0b43d42da9540f446d494bf69823c6fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac67a91845b0b1d54d31bdfb1c5e9867c"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group2.html#gac67a91845b0b1d54d31bdfb1c5e9867c">USART_ReceiveData</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx)</td></tr>
<tr class="memdesc:gac67a91845b0b1d54d31bdfb1c5e9867c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the most recent received data by the USARTx peripheral. <a href="group___u_s_a_r_t___group2.html#gac67a91845b0b1d54d31bdfb1c5e9867c">More...</a><br /></td></tr>
<tr class="separator:gac67a91845b0b1d54d31bdfb1c5e9867c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65ec9928817f3f031dd9a4dfc95d6666"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group3.html#ga65ec9928817f3f031dd9a4dfc95d6666">USART_SetAddress</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint8_t USART_Address)</td></tr>
<tr class="memdesc:ga65ec9928817f3f031dd9a4dfc95d6666"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the address of the USART node. <a href="group___u_s_a_r_t___group3.html#ga65ec9928817f3f031dd9a4dfc95d6666">More...</a><br /></td></tr>
<tr class="separator:ga65ec9928817f3f031dd9a4dfc95d6666"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac27b78ce445a16fe33851d2f87781c02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group3.html#gac27b78ce445a16fe33851d2f87781c02">USART_ReceiverWakeUpCmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gac27b78ce445a16fe33851d2f87781c02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if the USART is in mute mode or not. <a href="group___u_s_a_r_t___group3.html#gac27b78ce445a16fe33851d2f87781c02">More...</a><br /></td></tr>
<tr class="separator:gac27b78ce445a16fe33851d2f87781c02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4965417c2412c36e462fcad50a8d5393"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group3.html#ga4965417c2412c36e462fcad50a8d5393">USART_WakeUpConfig</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_WakeUp)</td></tr>
<tr class="memdesc:ga4965417c2412c36e462fcad50a8d5393"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selects the USART WakeUp method. <a href="group___u_s_a_r_t___group3.html#ga4965417c2412c36e462fcad50a8d5393">More...</a><br /></td></tr>
<tr class="separator:ga4965417c2412c36e462fcad50a8d5393"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bc2d291831cbc5e53e73337308029b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group4.html#ga7bc2d291831cbc5e53e73337308029b5">USART_LINBreakDetectLengthConfig</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_LINBreakDetectLength)</td></tr>
<tr class="memdesc:ga7bc2d291831cbc5e53e73337308029b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the USART LIN Break detection length. <a href="group___u_s_a_r_t___group4.html#ga7bc2d291831cbc5e53e73337308029b5">More...</a><br /></td></tr>
<tr class="separator:ga7bc2d291831cbc5e53e73337308029b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9fdd6296f4ca4acdfcbd58bf56bd4185"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group4.html#ga9fdd6296f4ca4acdfcbd58bf56bd4185">USART_LINCmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga9fdd6296f4ca4acdfcbd58bf56bd4185"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's LIN mode. <a href="group___u_s_a_r_t___group4.html#ga9fdd6296f4ca4acdfcbd58bf56bd4185">More...</a><br /></td></tr>
<tr class="separator:ga9fdd6296f4ca4acdfcbd58bf56bd4185"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga39a3d33e23ee28529fa8f7259ce6811e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group4.html#ga39a3d33e23ee28529fa8f7259ce6811e">USART_SendBreak</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx)</td></tr>
<tr class="memdesc:ga39a3d33e23ee28529fa8f7259ce6811e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits break characters. <a href="group___u_s_a_r_t___group4.html#ga39a3d33e23ee28529fa8f7259ce6811e">More...</a><br /></td></tr>
<tr class="separator:ga39a3d33e23ee28529fa8f7259ce6811e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa23b05fe0e1896bad90da7f82750831"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group5.html#gaaa23b05fe0e1896bad90da7f82750831">USART_HalfDuplexCmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gaaa23b05fe0e1896bad90da7f82750831"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's Half Duplex communication. <a href="group___u_s_a_r_t___group5.html#gaaa23b05fe0e1896bad90da7f82750831">More...</a><br /></td></tr>
<tr class="separator:gaaa23b05fe0e1896bad90da7f82750831"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4a35c6acd71ae7e0d67c1f03f0a8777"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group6.html#gac4a35c6acd71ae7e0d67c1f03f0a8777">USART_SetGuardTime</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint8_t USART_GuardTime)</td></tr>
<tr class="memdesc:gac4a35c6acd71ae7e0d67c1f03f0a8777"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the specified USART guard time. <a href="group___u_s_a_r_t___group6.html#gac4a35c6acd71ae7e0d67c1f03f0a8777">More...</a><br /></td></tr>
<tr class="separator:gac4a35c6acd71ae7e0d67c1f03f0a8777"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd1347e244c623447151ba3a5e986c5f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group6.html#gabd1347e244c623447151ba3a5e986c5f">USART_SmartCardCmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gabd1347e244c623447151ba3a5e986c5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's Smart Card mode. <a href="group___u_s_a_r_t___group6.html#gabd1347e244c623447151ba3a5e986c5f">More...</a><br /></td></tr>
<tr class="separator:gabd1347e244c623447151ba3a5e986c5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62e22f47e38aa53f2edce8771f7a5dfa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group6.html#ga62e22f47e38aa53f2edce8771f7a5dfa">USART_SmartCardNACKCmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga62e22f47e38aa53f2edce8771f7a5dfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables NACK transmission. <a href="group___u_s_a_r_t___group6.html#ga62e22f47e38aa53f2edce8771f7a5dfa">More...</a><br /></td></tr>
<tr class="separator:ga62e22f47e38aa53f2edce8771f7a5dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81a0cd36199040bf6d266b57babd678e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group7.html#ga81a0cd36199040bf6d266b57babd678e">USART_IrDAConfig</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_IrDAMode)</td></tr>
<tr class="memdesc:ga81a0cd36199040bf6d266b57babd678e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the USART's IrDA interface. <a href="group___u_s_a_r_t___group7.html#ga81a0cd36199040bf6d266b57babd678e">More...</a><br /></td></tr>
<tr class="separator:ga81a0cd36199040bf6d266b57babd678e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabff56ebb494fdfadcc6ef4fe9ac8dd24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group7.html#gabff56ebb494fdfadcc6ef4fe9ac8dd24">USART_IrDACmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gabff56ebb494fdfadcc6ef4fe9ac8dd24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's IrDA interface. <a href="group___u_s_a_r_t___group7.html#gabff56ebb494fdfadcc6ef4fe9ac8dd24">More...</a><br /></td></tr>
<tr class="separator:gabff56ebb494fdfadcc6ef4fe9ac8dd24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga902857f199ebfba21c63d725354af66f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group8.html#ga902857f199ebfba21c63d725354af66f">USART_DMACmd</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_DMAReq, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga902857f199ebfba21c63d725354af66f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the USART's DMA interface. <a href="group___u_s_a_r_t___group8.html#ga902857f199ebfba21c63d725354af66f">More...</a><br /></td></tr>
<tr class="separator:ga902857f199ebfba21c63d725354af66f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d8f2dd1f34060ae7e386e3e5d56b6f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group9.html#ga6d8f2dd1f34060ae7e386e3e5d56b6f6">USART_ITConfig</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_IT, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga6d8f2dd1f34060ae7e386e3e5d56b6f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified USART interrupts. <a href="group___u_s_a_r_t___group9.html#ga6d8f2dd1f34060ae7e386e3e5d56b6f6">More...</a><br /></td></tr>
<tr class="separator:ga6d8f2dd1f34060ae7e386e3e5d56b6f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga144630722defc9e312f0ad280b68e9da"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group9.html#ga144630722defc9e312f0ad280b68e9da">USART_GetFlagStatus</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_FLAG)</td></tr>
<tr class="memdesc:ga144630722defc9e312f0ad280b68e9da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified USART flag is set or not. <a href="group___u_s_a_r_t___group9.html#ga144630722defc9e312f0ad280b68e9da">More...</a><br /></td></tr>
<tr class="separator:ga144630722defc9e312f0ad280b68e9da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad962e148fc466ae1b45b288f6c91d966"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group9.html#gad962e148fc466ae1b45b288f6c91d966">USART_ClearFlag</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_FLAG)</td></tr>
<tr class="memdesc:gad962e148fc466ae1b45b288f6c91d966"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the USARTx's pending flags. <a href="group___u_s_a_r_t___group9.html#gad962e148fc466ae1b45b288f6c91d966">More...</a><br /></td></tr>
<tr class="separator:gad962e148fc466ae1b45b288f6c91d966"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93d8f031241bcdbe938d091a85295445"><td class="memItemLeft" align="right" valign="top">ITStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group9.html#ga93d8f031241bcdbe938d091a85295445">USART_GetITStatus</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_IT)</td></tr>
<tr class="memdesc:ga93d8f031241bcdbe938d091a85295445"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified USART interrupt has occurred or not. <a href="group___u_s_a_r_t___group9.html#ga93d8f031241bcdbe938d091a85295445">More...</a><br /></td></tr>
<tr class="separator:ga93d8f031241bcdbe938d091a85295445"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1fc25d0338695063be5e50156955d9bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___u_s_a_r_t___group9.html#ga1fc25d0338695063be5e50156955d9bc">USART_ClearITPendingBit</a> (<a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *USARTx, uint16_t USART_IT)</td></tr>
<tr class="memdesc:ga1fc25d0338695063be5e50156955d9bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the USARTx's interrupt pending bits. <a href="group___u_s_a_r_t___group9.html#ga1fc25d0338695063be5e50156955d9bc">More...</a><br /></td></tr>
<tr class="separator:ga1fc25d0338695063be5e50156955d9bc"><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 Universal synchronous asynchronous receiver transmitter (USART): </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>Data transfers</li>
<li>Multi-Processor Communication</li>
<li>LIN mode</li>
<li>Half-duplex mode</li>
<li>Smartcard mode</li>
<li>IrDA mode</li>
<li>DMA transfers management</li>
<li>Interrupts and flags management</li>
</ul>
</dd></dl>
<pre class="fragment">===============================================================================
##### How to use this driver #####
===============================================================================
[..]
(#) Enable peripheral clock using the following functions
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USARTx, ENABLE) for USART1 and USART6
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USARTx, ENABLE) for USART2, USART3,
UART4 or UART5.
(#) According to the USART mode, enable the GPIO clocks using
RCC_AHB1PeriphClockCmd() function. (The I/O can be TX, RX, CTS,
or/and SCLK).
(#) Peripheral's alternate function:
(++) Connect the pin to the desired peripherals' Alternate
Function (AF) using GPIO_PinAFConfig() function
(++) Configure the desired pin in alternate function by:
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
(#) Program the Baud Rate, Word Length , Stop Bit, Parity, Hardware
flow control and Mode(Receiver/Transmitter) using the USART_Init()
function.
(#) For synchronous mode, enable the clock and program the polarity,
phase and last bit using the USART_ClockInit() function.
(#) Enable the NVIC and the corresponding interrupt using the function
USART_ITConfig() if you need to use interrupt mode.
(#) When using the DMA mode
(++) Configure the DMA using DMA_Init() function
(++) Active the needed channel Request using USART_DMACmd() function
(#) Enable the USART using the USART_Cmd() function.
(#) Enable the DMA using the DMA_Cmd() function, when using DMA mode.
-@- Refer to Multi-Processor, LIN, half-duplex, Smartcard, IrDA sub-sections
for more details
[..]
In order to reach higher communication baudrates, it is possible to
enable the oversampling by 8 mode using the function USART_OverSampling8Cmd().
This function should be called after enabling the USART clock (RCC_APBxPeriphClockCmd())
and before calling the function USART_Init().</pre><dl class="section attention"><dt>Attention</dt><dd></dd></dl>
<h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
<p>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: </p><pre class="fragment"> http://www.st.com/software_license_agreement_liberty_v2
</pre><p>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. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 10 2015 15:15:19 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>