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

380 lines
20 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___d_m_a.html">DMA</a> &raquo; <a class="el" href="group___d_m_a___private___functions.html">DMA_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___d_m_a___group1.png" border="0" alt="" usemap="#group______d__m__a______group1"/>
<map name="group______d__m__a______group1" id="group______d__m__a______group1">
<area shape="rect" id="node2" href="group___d_m_a___private___functions.html" title="DMA_Private_Functions" alt="" coords="5,13,167,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:ga38d4a4ab8990299f8a6cf064e1e811d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga38d4a4ab8990299f8a6cf064e1e811d0">DMA_DeInit</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
<tr class="memdesc:ga38d4a4ab8990299f8a6cf064e1e811d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitialize the DMAy Streamx registers to their default reset values. <a href="#ga38d4a4ab8990299f8a6cf064e1e811d0">More...</a><br /></td></tr>
<tr class="separator:ga38d4a4ab8990299f8a6cf064e1e811d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaced8a4149acfb0a50b50e63273a87148"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#gaced8a4149acfb0a50b50e63273a87148">DMA_Init</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, <a class="el" href="struct_d_m_a___init_type_def.html">DMA_InitTypeDef</a> *DMA_InitStruct)</td></tr>
<tr class="memdesc:gaced8a4149acfb0a50b50e63273a87148"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure. <a href="#gaced8a4149acfb0a50b50e63273a87148">More...</a><br /></td></tr>
<tr class="separator:gaced8a4149acfb0a50b50e63273a87148"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f7f95f750a90a6824f4e9b6f58adc7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga0f7f95f750a90a6824f4e9b6f58adc7e">DMA_StructInit</a> (<a class="el" href="struct_d_m_a___init_type_def.html">DMA_InitTypeDef</a> *DMA_InitStruct)</td></tr>
<tr class="memdesc:ga0f7f95f750a90a6824f4e9b6f58adc7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills each DMA_InitStruct member with its default value. <a href="#ga0f7f95f750a90a6824f4e9b6f58adc7e">More...</a><br /></td></tr>
<tr class="separator:ga0f7f95f750a90a6824f4e9b6f58adc7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2bea22f9f6dc62fdd7afb385a0c1f73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#gab2bea22f9f6dc62fdd7afb385a0c1f73">DMA_Cmd</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gab2bea22f9f6dc62fdd7afb385a0c1f73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified DMAy Streamx. <a href="#gab2bea22f9f6dc62fdd7afb385a0c1f73">More...</a><br /></td></tr>
<tr class="separator:gab2bea22f9f6dc62fdd7afb385a0c1f73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga210a9861460b3c9b3fa14fdc1a949744"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga210a9861460b3c9b3fa14fdc1a949744">DMA_PeriphIncOffsetSizeConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_Pincos)</td></tr>
<tr class="memdesc:ga210a9861460b3c9b3fa14fdc1a949744"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses). <a href="#ga210a9861460b3c9b3fa14fdc1a949744">More...</a><br /></td></tr>
<tr class="separator:ga210a9861460b3c9b3fa14fdc1a949744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77f7628f6be9d6d088127eceb090b8b2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga77f7628f6be9d6d088127eceb090b8b2">DMA_FlowControllerConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_FlowCtrl)</td></tr>
<tr class="memdesc:ga77f7628f6be9d6d088127eceb090b8b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory). <a href="#ga77f7628f6be9d6d088127eceb090b8b2">More...</a><br /></td></tr>
<tr class="separator:ga77f7628f6be9d6d088127eceb090b8b2"><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 functions allowing to initialize the DMA Stream source
and destination addresses, incrementation and data sizes, transfer direction,
buffer size, circular/normal mode selection, memory-to-memory mode selection
and Stream priority value.
[..]
The DMA_Init() function follows the DMA configuration procedures as described in
reference manual (RM0090) except the first point: waiting on EN bit to be reset.
This condition should be checked by user application using the function DMA_GetCmdStatus()
before calling the DMA_Init() function.</pre> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab2bea22f9f6dc62fdd7afb385a0c1f73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_Cmd </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *&#160;</td>
<td class="paramname"><em>DMAy_Streamx</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 DMAy Streamx. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">DMAy_Streamx</td><td>where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. </td></tr>
<tr><td class="paramname">NewState</td><td>new state of the DMAy Streamx. This parameter can be: ENABLE or DISABLE.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function may be used to perform Pause-Resume operation. When a transfer is ongoing, calling this function to disable the Stream will cause the transfer to be paused. All configuration registers and the number of remaining data will be preserved. When calling again this function to re-enable the Stream, the transfer will be resumed from the point where it was paused.</dd>
<dd>
After configuring the DMA Stream (<a class="el" href="group___d_m_a___group1.html#gaced8a4149acfb0a50b50e63273a87148" title="Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure...">DMA_Init()</a> function) and enabling the stream, it is recommended to check (or wait until) the DMA Stream is effectively enabled. A Stream may remain disabled if a configuration parameter is wrong. After disabling a DMA Stream, it is also recommended to check (or wait until) the DMA Stream is effectively disabled. If a Stream is disabled while a data transfer is ongoing, the current data will be transferred and the Stream will be effectively disabled only after the transfer of this single data is finished.</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="ga38d4a4ab8990299f8a6cf064e1e811d0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_DeInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *&#160;</td>
<td class="paramname"><em>DMAy_Streamx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deinitialize the DMAy Streamx registers to their default reset values. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">DMAy_Streamx</td><td>where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. </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="ga77f7628f6be9d6d088127eceb090b8b2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_FlowControllerConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *&#160;</td>
<td class="paramname"><em>DMAy_Streamx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>DMA_FlowCtrl</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory). </p>
<dl class="section note"><dt>Note</dt><dd>Before enabling this feature, check if the used peripheral supports the Flow Controller mode or not.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">DMAy_Streamx</td><td>where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. </td></tr>
<tr><td class="paramname">DMA_FlowCtrl</td><td>specifies the DMA flow controller. This parameter can be one of the following values: <ul>
<li>DMA_FlowCtrl_Memory: DMAy_Streamx transactions flow controller is the DMA controller. </li>
<li>DMA_FlowCtrl_Peripheral: DMAy_Streamx transactions flow controller is the peripheral. </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="gaced8a4149acfb0a50b50e63273a87148"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_Init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *&#160;</td>
<td class="paramname"><em>DMAy_Streamx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_d_m_a___init_type_def.html">DMA_InitTypeDef</a> *&#160;</td>
<td class="paramname"><em>DMA_InitStruct</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure. </p>
<dl class="section note"><dt>Note</dt><dd>Before calling this function, it is recommended to check that the Stream is actually disabled using the function <a class="el" href="group___d_m_a___group4.html#gaa4d631cdd6cd020106435f30c0c6fb15" title="Returns the status of EN bit for the specified DMAy Streamx. ">DMA_GetCmdStatus()</a>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">DMAy_Streamx</td><td>where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. </td></tr>
<tr><td class="paramname">DMA_InitStruct</td><td>pointer to a <a class="el" href="struct_d_m_a___init_type_def.html" title="DMA Init structure definition. ">DMA_InitTypeDef</a> structure that contains the configuration information for the specified DMA Stream. </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="ga210a9861460b3c9b3fa14fdc1a949744"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_PeriphIncOffsetSizeConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *&#160;</td>
<td class="paramname"><em>DMAy_Streamx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>DMA_Pincos</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses). </p>
<dl class="section note"><dt>Note</dt><dd>This function has no effect if the Peripheral Increment mode is disabled.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">DMAy_Streamx</td><td>where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. </td></tr>
<tr><td class="paramname">DMA_Pincos</td><td>specifies the Peripheral increment offset size. This parameter can be one of the following values: <ul>
<li>DMA_PINCOS_Psize: Peripheral address increment is done accordingly to PSIZE parameter. </li>
<li>DMA_PINCOS_WordAligned: Peripheral address increment offset is fixed to 4 (32-bit aligned addresses). </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="ga0f7f95f750a90a6824f4e9b6f58adc7e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_StructInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d_m_a___init_type_def.html">DMA_InitTypeDef</a> *&#160;</td>
<td class="paramname"><em>DMA_InitStruct</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Fills each DMA_InitStruct member with its default value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">DMA_InitStruct</td><td>: pointer to a <a class="el" href="struct_d_m_a___init_type_def.html" title="DMA Init structure definition. ">DMA_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: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>