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

204 lines
10 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: Context swapping 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">Context swapping 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___c_r_y_p.html">CRYP</a> &raquo; <a class="el" href="group___c_r_y_p___private___functions.html">CRYP_Private_Functions</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Context swapping functions.
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Context swapping functions:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group___c_r_y_p___group3.png" border="0" alt="" usemap="#group______c__r__y__p______group3"/>
<map name="group______c__r__y__p______group3" id="group______c__r__y__p______group3">
<area shape="rect" id="node2" href="group___c_r_y_p___private___functions.html" title="CRYP_Private_Functions" alt="" coords="5,5,173,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:ga41a14be7fa43d500e7c94cce40910ea8"><td class="memItemLeft" align="right" valign="top">ErrorStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_r_y_p___group3.html#ga41a14be7fa43d500e7c94cce40910ea8">CRYP_SaveContext</a> (<a class="el" href="struct_c_r_y_p___context.html">CRYP_Context</a> *CRYP_ContextSave, <a class="el" href="struct_c_r_y_p___key_init_type_def.html">CRYP_KeyInitTypeDef</a> *CRYP_KeyInitStruct)</td></tr>
<tr class="memdesc:ga41a14be7fa43d500e7c94cce40910ea8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the CRYP peripheral Context. <a href="#ga41a14be7fa43d500e7c94cce40910ea8">More...</a><br /></td></tr>
<tr class="separator:ga41a14be7fa43d500e7c94cce40910ea8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf2986782fa66ea95b2a389595e17e0e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_r_y_p___group3.html#gaf2986782fa66ea95b2a389595e17e0e5">CRYP_RestoreContext</a> (<a class="el" href="struct_c_r_y_p___context.html">CRYP_Context</a> *CRYP_ContextRestore)</td></tr>
<tr class="memdesc:gaf2986782fa66ea95b2a389595e17e0e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restores the CRYP peripheral Context. <a href="#gaf2986782fa66ea95b2a389595e17e0e5">More...</a><br /></td></tr>
<tr class="separator:gaf2986782fa66ea95b2a389595e17e0e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Context swapping functions. </p>
<pre class="fragment"> ===============================================================================
##### Context swapping functions #####
===============================================================================
[..] This section provides functions allowing to save and store CRYP Context
[..] It is possible to interrupt an encryption/ decryption/ key generation process
to perform another processing with a higher priority, and to complete the
interrupted process later on, when the higher-priority task is complete. To do
so, the context of the interrupted task must be saved from the CRYP registers
to memory, and then be restored from memory to the CRYP registers.
(#) To save the current context, use CRYP_SaveContext() function
(#) To restore the saved context, use CRYP_RestoreContext() function </pre> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf2986782fa66ea95b2a389595e17e0e5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CRYP_RestoreContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_c_r_y_p___context.html">CRYP_Context</a> *&#160;</td>
<td class="paramname"><em>CRYP_ContextRestore</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Restores the CRYP peripheral Context. </p>
<dl class="section note"><dt>Note</dt><dd>Since teh DMA transfer is stopped in <a class="el" href="group___c_r_y_p___group3.html#ga41a14be7fa43d500e7c94cce40910ea8" title="Saves the CRYP peripheral Context. ">CRYP_SaveContext()</a> function, after restoring the context, you have to enable the DMA again (if the DMA was previously used). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">CRYP_ContextRestore</td><td>pointer to a <a class="el" href="struct_c_r_y_p___context.html" title="CRYP context swapping structure definition. ">CRYP_Context</a> structure that contains the repository for saved context. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The data that were saved during context saving must be rewrited into the IN FIFO. </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="ga41a14be7fa43d500e7c94cce40910ea8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ErrorStatus CRYP_SaveContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_c_r_y_p___context.html">CRYP_Context</a> *&#160;</td>
<td class="paramname"><em>CRYP_ContextSave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_c_r_y_p___key_init_type_def.html">CRYP_KeyInitTypeDef</a> *&#160;</td>
<td class="paramname"><em>CRYP_KeyInitStruct</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Saves the CRYP peripheral Context. </p>
<dl class="section note"><dt>Note</dt><dd>This function stops DMA transfer before to save the context. After restoring the context, you have to enable the DMA again (if the DMA was previously used). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">CRYP_ContextSave</td><td>pointer to a <a class="el" href="struct_c_r_y_p___context.html" title="CRYP context swapping structure definition. ">CRYP_Context</a> structure that contains the repository for current context. </td></tr>
<tr><td class="paramname">CRYP_KeyInitStruct</td><td>pointer to a <a class="el" href="struct_c_r_y_p___key_init_type_def.html" title="CRYP Key(s) structure definition. ">CRYP_KeyInitTypeDef</a> structure that contains the configuration information for the CRYP Keys. </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>