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

536 lines
27 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: Initialization and Configuration functions</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="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Initialization and Configuration functions<div class="ingroups"><a class="el" href="group___s_t_m32_f4xx___std_periph___driver.html">STM32F4xx_StdPeriph_Driver</a> &raquo; <a class="el" href="group___u_s_a_r_t.html">USART</a> &raquo; <a class="el" href="group___u_s_a_r_t___private___functions.html">USART_Private_Functions</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Initialization and Configuration functions.
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Initialization and Configuration functions:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group___u_s_a_r_t___group1.png" border="0" alt="" usemap="#group______u__s__a__r__t______group1"/>
<map name="group______u__s__a__r__t______group1" id="group______u__s__a__r__t______group1">
<area shape="rect" id="node2" href="group___u_s_a_r_t___private___functions.html" title="USART_Private_Functions" alt="" coords="5,13,180,39"/></map>
</td></tr></table></center>
</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: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="#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="#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="#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="#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="#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="#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="#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="#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="#ga3ed89ea8765d851510cfe90f7d90cbbb">More...</a><br /></td></tr>
<tr class="separator:ga3ed89ea8765d851510cfe90f7d90cbbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Initialization and Configuration functions. </p>
<pre class="fragment"> ===============================================================================
##### Initialization and Configuration functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to initialize the USART
in asynchronous and in synchronous modes.
(+) For the asynchronous mode only these parameters can be configured:
(++) Baud Rate
(++) Word Length
(++) Stop Bit
(++) Parity: If the parity is enabled, then the MSB bit of the data written
in the data register is transmitted but is changed by the parity bit.
Depending on the frame length defined by the M bit (8-bits or 9-bits),
the possible USART frame formats are as listed in the following table:
+-------------------------------------------------------------+
| M bit | PCE bit | USART frame |
|---------------------|---------------------------------------|
| 0 | 0 | | SB | 8 bit data | STB | |
|---------|-----------|---------------------------------------|
| 0 | 1 | | SB | 7 bit data | PB | STB | |
|---------|-----------|---------------------------------------|
| 1 | 0 | | SB | 9 bit data | STB | |
|---------|-----------|---------------------------------------|
| 1 | 1 | | SB | 8 bit data | PB | STB | |
+-------------------------------------------------------------+
(++) Hardware flow control
(++) Receiver/transmitter modes
[..]
The USART_Init() function follows the USART asynchronous configuration
procedure (details for the procedure are available in reference manual (RM0090)).
(+) For the synchronous mode in addition to the asynchronous mode parameters these
parameters should be also configured:
(++) USART Clock Enabled
(++) USART polarity
(++) USART phase
(++) USART LastBit
[..]
These parameters can be configured using the USART_ClockInit() function.</pre> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gadb50c7a2175c91acd3728f8eefd0c63d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_ClockInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___clock_init_type_def.html">USART_ClockInitTypeDef</a> *&#160;</td>
<td class="paramname"><em>USART_ClockInitStruct</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the USARTx peripheral Clock according to the specified parameters in the USART_ClockInitStruct . </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3 or 6 to select the USART peripheral. </td></tr>
<tr><td class="paramname">USART_ClockInitStruct</td><td>pointer to a <a class="el" href="struct_u_s_a_r_t___clock_init_type_def.html" title="USART Clock Init Structure definition. ">USART_ClockInitTypeDef</a> structure that contains the configuration information for the specified USART peripheral. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The Smart Card and Synchronous modes are not available for UART4 and UART5. </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="ga59df27d0adda18b16ee28d47672cc724"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_ClockStructInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___clock_init_type_def.html">USART_ClockInitTypeDef</a> *&#160;</td>
<td class="paramname"><em>USART_ClockInitStruct</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Fills each USART_ClockInitStruct member with its default value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USART_ClockInitStruct</td><td>pointer to a <a class="el" href="struct_u_s_a_r_t___clock_init_type_def.html" title="USART Clock Init Structure definition. ">USART_ClockInitTypeDef</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="ga45e51626739c5f22a6567c8a85d1d85e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_Cmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</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 USART peripheral. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the USARTx 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="ga2f8e1ce72da21b6539d8e1f299ec3b0d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_DeInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deinitializes the USARTx peripheral registers to their default reset values. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART 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___u_s_a_r_t___group1_ga2f8e1ce72da21b6539d8e1f299ec3b0d_cgraph.png" border="0" usemap="#group___u_s_a_r_t___group1_ga2f8e1ce72da21b6539d8e1f299ec3b0d_cgraph" alt=""/></div>
<map name="group___u_s_a_r_t___group1_ga2f8e1ce72da21b6539d8e1f299ec3b0d_cgraph" id="group___u_s_a_r_t___group1_ga2f8e1ce72da21b6539d8e1f299ec3b0d_cgraph">
<area shape="rect" id="node2" href="group___r_c_c.html#gad94553850ac07106a27ee85fec37efdf" title="Forces or releases High Speed APB (APB2) peripheral reset. " alt="" coords="159,5,347,32"/><area shape="rect" id="node3" href="group___r_c_c.html#gab197ae4369c10b92640a733b40ed2801" title="Forces or releases Low Speed APB (APB1) peripheral reset. " alt="" coords="159,56,347,83"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga98da340ea0324002ba1b4263e91ab2ff"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_Init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___init_type_def.html">USART_InitTypeDef</a> *&#160;</td>
<td class="paramname"><em>USART_InitStruct</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the USARTx peripheral according to the specified parameters in the USART_InitStruct . </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. </td></tr>
<tr><td class="paramname">USART_InitStruct</td><td>pointer to a <a class="el" href="struct_u_s_a_r_t___init_type_def.html" title="USART Init Structure definition. ">USART_InitTypeDef</a> structure that contains the configuration information for the specified USART 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___u_s_a_r_t___group1_ga98da340ea0324002ba1b4263e91ab2ff_cgraph.png" border="0" usemap="#group___u_s_a_r_t___group1_ga98da340ea0324002ba1b4263e91ab2ff_cgraph" alt=""/></div>
<map name="group___u_s_a_r_t___group1_ga98da340ea0324002ba1b4263e91ab2ff_cgraph" id="group___u_s_a_r_t___group1_ga98da340ea0324002ba1b4263e91ab2ff_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="143,5,285,32"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga3ed89ea8765d851510cfe90f7d90cbbb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_OneBitMethodCmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</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 USART's one bit sampling method. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the USART one bit sampling method. 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="ga3897bab07491d9239f8a238a9a7cddea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_OverSampling8Cmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</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 USART's 8x oversampling mode. </p>
<dl class="section note"><dt>Note</dt><dd>This function has to be called before calling <a class="el" href="group___u_s_a_r_t___group1.html#ga98da340ea0324002ba1b4263e91ab2ff" title="Initializes the USARTx peripheral according to the specified parameters in the USART_InitStruct ...">USART_Init()</a> function in order to have correct baudrate Divider value. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the USART 8x oversampling 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="gaf5da8f2eee8245425584d85d4f62cc33"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_SetPrescaler </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___type_def.html">USART_TypeDef</a> *&#160;</td>
<td class="paramname"><em>USARTx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>USART_Prescaler</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the system clock prescaler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USARTx</td><td>where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. </td></tr>
<tr><td class="paramname">USART_Prescaler</td><td>specifies the prescaler clock. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The function is used for IrDA mode with UART4 and UART5. </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="ga34e1faa2f312496c16cfd05155f4c8b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void USART_StructInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_u_s_a_r_t___init_type_def.html">USART_InitTypeDef</a> *&#160;</td>
<td class="paramname"><em>USART_InitStruct</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Fills each USART_InitStruct member with its default value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">USART_InitStruct</td><td>pointer to a <a class="el" href="struct_u_s_a_r_t___init_type_def.html" title="USART Init Structure definition. ">USART_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>
</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>