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

368 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: Interrupts and flags management 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">Interrupts and flags management 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>Interrupts and flags management functions.
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Interrupts and flags management functions:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group___c_r_y_p___group5.png" border="0" alt="" usemap="#group______c__r__y__p______group5"/>
<map name="group______c__r__y__p______group5" id="group______c__r__y__p______group5">
<area shape="rect" id="node2" href="group___c_r_y_p___private___functions.html" title="CRYP_Private_Functions" alt="" coords="5,13,173,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:gafbf5ee5f2c3ae4404149a994e15b33d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_r_y_p___group5.html#gafbf5ee5f2c3ae4404149a994e15b33d8">CRYP_ITConfig</a> (uint8_t CRYP_IT, FunctionalState NewState)</td></tr>
<tr class="memdesc:gafbf5ee5f2c3ae4404149a994e15b33d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified CRYP interrupts. <a href="#gafbf5ee5f2c3ae4404149a994e15b33d8">More...</a><br /></td></tr>
<tr class="separator:gafbf5ee5f2c3ae4404149a994e15b33d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga00a48b748ed127fa517cacec9dbf18f4"><td class="memItemLeft" align="right" valign="top">ITStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_r_y_p___group5.html#ga00a48b748ed127fa517cacec9dbf18f4">CRYP_GetITStatus</a> (uint8_t CRYP_IT)</td></tr>
<tr class="memdesc:ga00a48b748ed127fa517cacec9dbf18f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified CRYP interrupt has occurred or not. <a href="#ga00a48b748ed127fa517cacec9dbf18f4">More...</a><br /></td></tr>
<tr class="separator:ga00a48b748ed127fa517cacec9dbf18f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe26186adf64660a4a573bd6a4368fee"><td class="memItemLeft" align="right" valign="top">FunctionalState&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_r_y_p___group5.html#gabe26186adf64660a4a573bd6a4368fee">CRYP_GetCmdStatus</a> (void)</td></tr>
<tr class="memdesc:gabe26186adf64660a4a573bd6a4368fee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether CRYP peripheral is enabled or disabled. <a href="#gabe26186adf64660a4a573bd6a4368fee">More...</a><br /></td></tr>
<tr class="separator:gabe26186adf64660a4a573bd6a4368fee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga993d568b626a74b2973d4a6848a681f6"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___c_r_y_p___group5.html#ga993d568b626a74b2973d4a6848a681f6">CRYP_GetFlagStatus</a> (uint8_t CRYP_FLAG)</td></tr>
<tr class="memdesc:ga993d568b626a74b2973d4a6848a681f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified CRYP flag is set or not. <a href="#ga993d568b626a74b2973d4a6848a681f6">More...</a><br /></td></tr>
<tr class="separator:ga993d568b626a74b2973d4a6848a681f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Interrupts and flags management functions. </p>
<pre class="fragment"> ===============================================================================
##### Interrupts and flags management functions #####
===============================================================================
[..] This section provides functions allowing to configure the CRYP Interrupts and
to get the status and Interrupts pending bits.
[..] The CRYP provides 2 Interrupts sources and 7 Flags:
*** Flags : ***
===============
[..]
(#) CRYP_FLAG_IFEM : Set when Input FIFO is empty. This Flag is cleared only
by hardware.
(#) CRYP_FLAG_IFNF : Set when Input FIFO is not full. This Flag is cleared
only by hardware.
(#) CRYP_FLAG_INRIS : Set when Input FIFO Raw interrupt is pending it gives
the raw interrupt state prior to masking of the input FIFO service interrupt.
This Flag is cleared only by hardware.
(#) CRYP_FLAG_OFNE : Set when Output FIFO not empty. This Flag is cleared
only by hardware.
(#) CRYP_FLAG_OFFU : Set when Output FIFO is full. This Flag is cleared only
by hardware.
(#) CRYP_FLAG_OUTRIS : Set when Output FIFO Raw interrupt is pending it gives
the raw interrupt state prior to masking of the output FIFO service interrupt.
This Flag is cleared only by hardware.
(#) CRYP_FLAG_BUSY : Set when the CRYP core is currently processing a block
of data or a key preparation (for AES decryption). This Flag is cleared
only by hardware. To clear it, the CRYP core must be disabled and the last
processing has completed.
*** Interrupts : ***
====================
[..]
(#) CRYP_IT_INI : The input FIFO service interrupt is asserted when there
are less than 4 words in the input FIFO. This interrupt is associated to
CRYP_FLAG_INRIS flag.
-@- This interrupt is cleared by performing write operations to the input FIFO
until it holds 4 or more words. The input FIFO service interrupt INMIS is
enabled with the CRYP enable bit. Consequently, when CRYP is disabled, the
INMIS signal is low even if the input FIFO is empty.
(#) CRYP_IT_OUTI : The output FIFO service interrupt is asserted when there
is one or more (32-bit word) data items in the output FIFO. This interrupt
is associated to CRYP_FLAG_OUTRIS flag.
-@- This interrupt is cleared by reading data from the output FIFO until there
is no valid (32-bit) word left (that is, the interrupt follows the state
of the OFNE (output FIFO not empty) flag).
*** Managing the CRYP controller events : ***
=============================================
[..] The user should identify which mode will be used in his application to manage
the CRYP controller events: Polling mode or Interrupt mode.
(#) In the Polling Mode it is advised to use the following functions:
(++) CRYP_GetFlagStatus() : to check if flags events occur.
-@@- The CRYPT flags do not need to be cleared since they are cleared as
soon as the associated event are reset.
(#) In the Interrupt Mode it is advised to use the following functions:
(++) CRYP_ITConfig() : to enable or disable the interrupt source.
(++) CRYP_GetITStatus() : to check if Interrupt occurs.
-@@- The CRYPT interrupts have no pending bits, the interrupt is cleared as
soon as the associated event is reset. </pre> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gabe26186adf64660a4a573bd6a4368fee"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FunctionalState CRYP_GetCmdStatus </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns whether CRYP peripheral is enabled or disabled. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">none.</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">Current</td><td>state of the CRYP peripheral (ENABLE or DISABLE). </td></tr>
</table>
</dd>
</dl>
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group___c_r_y_p___group5_gabe26186adf64660a4a573bd6a4368fee_icgraph.png" border="0" usemap="#group___c_r_y_p___group5_gabe26186adf64660a4a573bd6a4368fee_icgraph" alt=""/></div>
<map name="group___c_r_y_p___group5_gabe26186adf64660a4a573bd6a4368fee_icgraph" id="group___c_r_y_p___group5_gabe26186adf64660a4a573bd6a4368fee_icgraph">
<area shape="rect" id="node2" href="group___c_r_y_p___group6.html#ga79ff82ece0e9620dc86d6e57abe639e1" title="Encrypt and decrypt using AES in ECB Mode. " alt="" coords="207,5,334,32"/><area shape="rect" id="node3" href="group___c_r_y_p___group6.html#gaa43eadf707257710f6a53b3295b39d70" title="Encrypt and decrypt using AES in CBC Mode. " alt="" coords="207,56,334,83"/><area shape="rect" id="node4" href="group___c_r_y_p___group6.html#ga2f36aea6e94452e5e5e938547fb89d4c" title="Encrypt and decrypt using AES in CTR Mode. " alt="" coords="209,107,333,133"/><area shape="rect" id="node5" href="group___c_r_y_p___group6.html#ga74b48d820c5c360eb303fc2fb78af055" title="Encrypt and decrypt using AES in GCM Mode. The GCM and CCM modes are available only on STM32F437x Dev..." alt="" coords="206,157,335,184"/><area shape="rect" id="node6" href="group___c_r_y_p___group6.html#ga9d9f5c74b634b85b7aa8c2a2ea0bcd51" title="Encrypt and decrypt using AES in CCM Mode. The GCM and CCM modes are available only on STM32F437x Dev..." alt="" coords="207,208,335,235"/><area shape="rect" id="node7" href="group___c_r_y_p___group8.html#ga3b96b7608b39197209abed5f5845f590" title="Encrypt and decrypt using DES in ECB Mode. " alt="" coords="207,259,334,285"/><area shape="rect" id="node8" href="group___c_r_y_p___group8.html#ga75724391a8560c557e1152b805f5cad1" title="Encrypt and decrypt using DES in CBC Mode. " alt="" coords="207,309,334,336"/><area shape="rect" id="node9" href="group___c_r_y_p___group7.html#ga17c03ab4f0566fcbc3dd8c052e6f9886" title="Encrypt and decrypt using TDES in ECB Mode. " alt="" coords="204,360,337,387"/><area shape="rect" id="node10" href="group___c_r_y_p___group7.html#gabe52a368c4882450c1e82f16bc1eb686" title="Encrypt and decrypt using TDES in CBC Mode. " alt="" coords="204,411,337,437"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga993d568b626a74b2973d4a6848a681f6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FlagStatus CRYP_GetFlagStatus </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>CRYP_FLAG</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the specified CRYP flag is set or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">CRYP_FLAG</td><td>specifies the CRYP flag to check. This parameter can be one of the following values: <ul>
<li>CRYP_FLAG_IFEM: Input FIFO Empty flag. </li>
<li>CRYP_FLAG_IFNF: Input FIFO Not Full flag. </li>
<li>CRYP_FLAG_OFNE: Output FIFO Not Empty flag. </li>
<li>CRYP_FLAG_OFFU: Output FIFO Full flag. </li>
<li>CRYP_FLAG_BUSY: Busy flag. </li>
<li>CRYP_FLAG_OUTRIS: Output FIFO raw interrupt flag. </li>
<li>CRYP_FLAG_INRIS: Input FIFO raw interrupt flag. </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>new state of CRYP_FLAG (SET or RESET). </td></tr>
</table>
</dd>
</dl>
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="group___c_r_y_p___group5_ga993d568b626a74b2973d4a6848a681f6_icgraph.png" border="0" usemap="#group___c_r_y_p___group5_ga993d568b626a74b2973d4a6848a681f6_icgraph" alt=""/></div>
<map name="group___c_r_y_p___group5_ga993d568b626a74b2973d4a6848a681f6_icgraph" id="group___c_r_y_p___group5_ga993d568b626a74b2973d4a6848a681f6_icgraph">
<area shape="rect" id="node2" href="group___c_r_y_p___group6.html#ga79ff82ece0e9620dc86d6e57abe639e1" title="Encrypt and decrypt using AES in ECB Mode. " alt="" coords="206,5,333,32"/><area shape="rect" id="node3" href="group___c_r_y_p___group6.html#gaa43eadf707257710f6a53b3295b39d70" title="Encrypt and decrypt using AES in CBC Mode. " alt="" coords="206,56,333,83"/><area shape="rect" id="node4" href="group___c_r_y_p___group6.html#ga2f36aea6e94452e5e5e938547fb89d4c" title="Encrypt and decrypt using AES in CTR Mode. " alt="" coords="207,107,331,133"/><area shape="rect" id="node5" href="group___c_r_y_p___group6.html#ga74b48d820c5c360eb303fc2fb78af055" title="Encrypt and decrypt using AES in GCM Mode. The GCM and CCM modes are available only on STM32F437x Dev..." alt="" coords="205,157,334,184"/><area shape="rect" id="node6" href="group___c_r_y_p___group6.html#ga9d9f5c74b634b85b7aa8c2a2ea0bcd51" title="Encrypt and decrypt using AES in CCM Mode. The GCM and CCM modes are available only on STM32F437x Dev..." alt="" coords="205,208,333,235"/><area shape="rect" id="node7" href="group___c_r_y_p___group8.html#ga3b96b7608b39197209abed5f5845f590" title="Encrypt and decrypt using DES in ECB Mode. " alt="" coords="206,259,333,285"/><area shape="rect" id="node8" href="group___c_r_y_p___group8.html#ga75724391a8560c557e1152b805f5cad1" title="Encrypt and decrypt using DES in CBC Mode. " alt="" coords="206,309,333,336"/><area shape="rect" id="node9" href="group___c_r_y_p___group7.html#ga17c03ab4f0566fcbc3dd8c052e6f9886" title="Encrypt and decrypt using TDES in ECB Mode. " alt="" coords="203,360,336,387"/><area shape="rect" id="node10" href="group___c_r_y_p___group7.html#gabe52a368c4882450c1e82f16bc1eb686" title="Encrypt and decrypt using TDES in CBC Mode. " alt="" coords="203,411,336,437"/></map>
</div>
</p>
</div>
</div>
<a class="anchor" id="ga00a48b748ed127fa517cacec9dbf18f4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ITStatus CRYP_GetITStatus </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>CRYP_IT</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the specified CRYP interrupt has occurred or not. </p>
<dl class="section note"><dt>Note</dt><dd>This function checks the status of the masked interrupt (i.e the interrupt should be previously enabled). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">CRYP_IT</td><td>specifies the CRYP (masked) interrupt source to check. This parameter can be one of the following values: <ul>
<li>CRYP_IT_INI: Input FIFO interrupt </li>
<li>CRYP_IT_OUTI: Output FIFO interrupt </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>new state of CRYP_IT (SET or RESET). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gafbf5ee5f2c3ae4404149a994e15b33d8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void CRYP_ITConfig </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>CRYP_IT</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 CRYP interrupts. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">CRYP_IT</td><td>specifies the CRYP interrupt source to be enabled or disabled. This parameter can be any combination of the following values: <ul>
<li>CRYP_IT_INI: Input FIFO interrupt </li>
<li>CRYP_IT_OUTI: Output FIFO interrupt </li>
</ul>
</td></tr>
<tr><td class="paramname">NewState</td><td>new state of the specified CRYP interrupt. 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>
</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>