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

225 lines
11 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: Data Counter 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">Data Counter 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>Data Counter functions.
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Data Counter functions:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group___d_m_a___group2.png" border="0" alt="" usemap="#group______d__m__a______group2"/>
<map name="group______d__m__a______group2" id="group______d__m__a______group2">
<area shape="rect" id="node2" href="group___d_m_a___private___functions.html" title="DMA_Private_Functions" alt="" coords="5,5,167,32"/></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:ga6a11a2c951cff59b125ba8857d44e3f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group2.html#ga6a11a2c951cff59b125ba8857d44e3f3">DMA_SetCurrDataCounter</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint16_t Counter)</td></tr>
<tr class="memdesc:ga6a11a2c951cff59b125ba8857d44e3f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the number of data units to be transferred on the DMAy Streamx. <a href="#ga6a11a2c951cff59b125ba8857d44e3f3">More...</a><br /></td></tr>
<tr class="separator:ga6a11a2c951cff59b125ba8857d44e3f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a76444a92423f5f15a4328738d6dc46"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group2.html#ga4a76444a92423f5f15a4328738d6dc46">DMA_GetCurrDataCounter</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
<tr class="memdesc:ga4a76444a92423f5f15a4328738d6dc46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of remaining data units in the current DMAy Streamx transfer. <a href="#ga4a76444a92423f5f15a4328738d6dc46">More...</a><br /></td></tr>
<tr class="separator:ga4a76444a92423f5f15a4328738d6dc46"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Data Counter functions. </p>
<pre class="fragment"> ===============================================================================
##### Data Counter functions #####
===============================================================================
[..]
This subsection provides function allowing to configure and read the buffer size
(number of data to be transferred).
[..]
The DMA data counter can be written only when the DMA Stream is disabled
(ie. after transfer complete event).
[..]
The following function can be used to write the Stream data counter value:
(+) void DMA_SetCurrDataCounter(DMA_Stream_TypeDef* DMAy_Streamx, uint16_t Counter);
-@- It is advised to use this function rather than DMA_Init() in situations
where only the Data buffer needs to be reloaded.
-@- If the Source and Destination Data Sizes are different, then the value
written in data counter, expressing the number of transfers, is relative
to the number of transfers from the Peripheral point of view.
ie. If Memory data size is Word, Peripheral data size is Half-Words,
then the value to be configured in the data counter is the number
of Half-Words to be transferred from/to the peripheral.
[..]
The DMA data counter can be read to indicate the number of remaining transfers for
the relative DMA Stream. This counter is decremented at the end of each data
transfer and when the transfer is complete:
(+) If Normal mode is selected: the counter is set to 0.
(+) If Circular mode is selected: the counter is reloaded with the initial value
(configured before enabling the DMA Stream)
[..]
The following function can be used to read the Stream data counter value:
(+) uint16_t DMA_GetCurrDataCounter(DMA_Stream_TypeDef* DMAy_Streamx);</pre> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga4a76444a92423f5f15a4328738d6dc46"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t DMA_GetCurrDataCounter </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>Returns the number of remaining data units in the current DMAy Streamx transfer. </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">The</td><td>number of remaining data units in the current DMAy Streamx transfer. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga6a11a2c951cff59b125ba8857d44e3f3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DMA_SetCurrDataCounter </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">uint16_t&#160;</td>
<td class="paramname"><em>Counter</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the number of data units to be transferred on the 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">Counter</td><td>Number of data units to be transferred (from 0 to 65535) Number of data items depends only on the Peripheral data format.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If Peripheral data format is Bytes: number of data units is equal to total number of bytes to be transferred.</dd>
<dd>
If Peripheral data format is Half-Word: number of data units is equal to total number of bytes to be transferred / 2.</dd>
<dd>
If Peripheral data format is Word: number of data units is equal to total number of bytes to be transferred / 4.</dd>
<dd>
In Memory-to-Memory transfer mode, the memory buffer pointed by DMAy_SxPAR register is considered as Peripheral.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>number of remaining data units in the current DMAy Streamx transfer. </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>