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

561 lines
28 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___s_a_i.html">SAI</a> &raquo; <a class="el" href="group___s_a_i___private___functions.html">SAI_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___s_a_i___group4.png" border="0" alt="" usemap="#group______s__a__i______group4"/>
<map name="group______s__a__i______group4" id="group______s__a__i______group4">
<area shape="rect" id="node2" href="group___s_a_i___private___functions.html" title="SAI_Private_Functions" alt="" coords="5,13,159,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:ga77597e3c2eb2613de8c79f72d2f10929"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#ga77597e3c2eb2613de8c79f72d2f10929">SAI_ITConfig</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x, uint32_t SAI_IT, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga77597e3c2eb2613de8c79f72d2f10929"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified SAI <a class="el" href="struct_block.html">Block</a> interrupts. <a href="#ga77597e3c2eb2613de8c79f72d2f10929">More...</a><br /></td></tr>
<tr class="separator:ga77597e3c2eb2613de8c79f72d2f10929"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga538f303601c97a0ef68817ac2d7d9fd4"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#ga538f303601c97a0ef68817ac2d7d9fd4">SAI_GetFlagStatus</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x, uint32_t SAI_FLAG)</td></tr>
<tr class="memdesc:ga538f303601c97a0ef68817ac2d7d9fd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified SAI block x flag is set or not. <a href="#ga538f303601c97a0ef68817ac2d7d9fd4">More...</a><br /></td></tr>
<tr class="separator:ga538f303601c97a0ef68817ac2d7d9fd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf860a01907d09f518de3bee94f85e3f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#gaf860a01907d09f518de3bee94f85e3f9">SAI_ClearFlag</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x, uint32_t SAI_FLAG)</td></tr>
<tr class="memdesc:gaf860a01907d09f518de3bee94f85e3f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the specified SAI <a class="el" href="struct_block.html">Block</a> x flag. <a href="#gaf860a01907d09f518de3bee94f85e3f9">More...</a><br /></td></tr>
<tr class="separator:gaf860a01907d09f518de3bee94f85e3f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59e69b3e20a327395bc89b5e643c3e9a"><td class="memItemLeft" align="right" valign="top">ITStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#ga59e69b3e20a327395bc89b5e643c3e9a">SAI_GetITStatus</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x, uint32_t SAI_IT)</td></tr>
<tr class="memdesc:ga59e69b3e20a327395bc89b5e643c3e9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified SAI <a class="el" href="struct_block.html">Block</a> x interrupt has occurred or not. <a href="#ga59e69b3e20a327395bc89b5e643c3e9a">More...</a><br /></td></tr>
<tr class="separator:ga59e69b3e20a327395bc89b5e643c3e9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4aa9cc16b2722d001540a4c7fd278efd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#ga4aa9cc16b2722d001540a4c7fd278efd">SAI_ClearITPendingBit</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x, uint32_t SAI_IT)</td></tr>
<tr class="memdesc:ga4aa9cc16b2722d001540a4c7fd278efd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the SAI <a class="el" href="struct_block.html">Block</a> x interrupt pending bit. <a href="#ga4aa9cc16b2722d001540a4c7fd278efd">More...</a><br /></td></tr>
<tr class="separator:ga4aa9cc16b2722d001540a4c7fd278efd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe56cd82fe1137249f5acb8907d28fd3"><td class="memItemLeft" align="right" valign="top">FunctionalState&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#gabe56cd82fe1137249f5acb8907d28fd3">SAI_GetCmdStatus</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x)</td></tr>
<tr class="memdesc:gabe56cd82fe1137249f5acb8907d28fd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of EN bit for the specified SAI <a class="el" href="struct_block.html">Block</a> x. <a href="#gabe56cd82fe1137249f5acb8907d28fd3">More...</a><br /></td></tr>
<tr class="separator:gabe56cd82fe1137249f5acb8907d28fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga03d763ba656a9eec5dd5e7b83b8ee361"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_a_i___group4.html#ga03d763ba656a9eec5dd5e7b83b8ee361">SAI_GetFIFOStatus</a> (<a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *SAI_Block_x)</td></tr>
<tr class="memdesc:ga03d763ba656a9eec5dd5e7b83b8ee361"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current SAI <a class="el" href="struct_block.html">Block</a> x FIFO filled level. <a href="#ga03d763ba656a9eec5dd5e7b83b8ee361">More...</a><br /></td></tr>
<tr class="separator:ga03d763ba656a9eec5dd5e7b83b8ee361"><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 a set of functions allowing to configure the SAI Interrupts
sources and check or clear the flags or pending bits status.
The user should identify which mode will be used in his application to manage
the communication: Polling mode, Interrupt mode or DMA mode.
*** Polling Mode ***
====================
[..]
In Polling Mode, the SAI communication can be managed by 7 flags:
(#) SAI_FLAG_FREQ : to indicate if there is a FIFO Request to write or to read.
(#) SAI_FLAG_MUTEDET : to indicate if a MUTE frame detected
(#) SAI_FLAG_OVRUDR : to indicate if an Overrun or Underrun error occur
(#) SAI_FLAG_AFSDET : to indicate if there is the detection of a audio frame
synchronisation (FS) earlier than expected
(#) SAI_FLAG_LFSDET : to indicate if there is the detection of a audio frame
synchronisation (FS) later than expected
(#) SAI_FLAG_CNRDY : to indicate if the codec is not ready to communicate during
the reception of the TAG 0 (slot0) of the AC97 audio frame
(#) SAI_FLAG_WCKCFG: to indicate if wrong clock configuration in master mode
error occurs.
[..]
In this Mode it is advised to use the following functions:
(+) FlagStatus SAI_GetFlagStatus(SAI_Block_TypeDef* SAI_Block_x, uint32_t SAI_FLAG);
(+) void SAI_ClearFlag(SAI_Block_TypeDef* SAI_Block_x, uint32_t SAI_FLAG);
*** Interrupt Mode ***
======================
[..]
In Interrupt Mode, the SAI communication can be managed by 7 interrupt sources
and 7 pending bits:
(+) Pending Bits:
(##) SAI_IT_FREQ : to indicate if there is a FIFO Request to write or to read.
(##) SAI_IT_MUTEDET : to indicate if a MUTE frame detected.
(##) SAI_IT_OVRUDR : to indicate if an Overrun or Underrun error occur.
(##) SAI_IT_AFSDET : to indicate if there is the detection of a audio frame
synchronisation (FS) earlier than expected.
(##) SAI_IT_LFSDET : to indicate if there is the detection of a audio frame
synchronisation (FS) later than expected.
(##) SAI_IT_CNRDY : to indicate if the codec is not ready to communicate during
the reception of the TAG 0 (slot0) of the AC97 audio frame.
(##) SAI_IT_WCKCFG: to indicate if wrong clock configuration in master mode
error occurs.
(+) Interrupt Source:
(##) SAI_IT_FREQ : specifies the interrupt source for FIFO Request.
(##) SAI_IT_MUTEDET : specifies the interrupt source for MUTE frame detected.
(##) SAI_IT_OVRUDR : specifies the interrupt source for overrun or underrun error.
(##) SAI_IT_AFSDET : specifies the interrupt source for anticipated frame synchronization
detection interrupt.
(##) SAI_IT_LFSDET : specifies the interrupt source for late frame synchronization
detection interrupt.
(##) SAI_IT_CNRDY : specifies the interrupt source for codec not ready interrupt
(##) SAI_IT_WCKCFG: specifies the interrupt source for wrong clock configuration
interrupt.
[..]
In this Mode it is advised to use the following functions:
(+) void SAI_ITConfig(SAI_Block_TypeDef* SAI_Block_x, uint32_t SAI_IT, FunctionalState NewState);
(+) ITStatus SAI_GetITStatus(SAI_Block_TypeDef* SAI_Block_x, uint32_t SAI_IT);
(+) void SAI_ClearITPendingBit(SAI_Block_TypeDef* SAI_Block_x, uint32_t SAI_IT);
*** DMA Mode ***
================
[..]
In DMA Mode, each SAI audio block has an independent DMA interface in order to
read or to write into the SAI_xDR register (to hit the internal FIFO).
There is one DMA channel by audio block following basic DMA request/acknowledge
protocol.
[..]
In this Mode it is advised to use the following function:
(+) void SAI_DMACmd(SAI_Block_TypeDef* SAI_Block_x, FunctionalState NewState);
[..]
This section provides also functions allowing to
(+) Check the SAI Block enable status
(+)Check the FIFO status
*** SAI Block Enable status ***
===============================
[..]
After disabling a SAI Block, it is recommended to check (or wait until) the SAI Block
is effectively disabled. If a Block is disabled while an audio frame transfer is ongoing
the current frame will be transferred and the block will be effectively disabled only at
the end of audio frame.
To monitor this state it is possible to use the following function:
(+) FunctionalState SAI_GetCmdStatus(SAI_Block_TypeDef* SAI_Block_x);
*** SAI Block FIFO status ***
=============================
[..]
It is possible to monitor the FIFO status when a transfer is ongoing using the following
function:
(+) uint32_t SAI_GetFIFOStatus(SAI_Block_TypeDef* SAI_Block_x);</pre> <h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf860a01907d09f518de3bee94f85e3f9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SAI_ClearFlag </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>SAI_FLAG</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the specified SAI <a class="el" href="struct_block.html">Block</a> x flag. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral. </td></tr>
<tr><td class="paramname">SAI_FLAG</td><td>specifies the SAI block flag to check. This parameter can be one of the following values: <ul>
<li>SAI_FLAG_MUTEDET: MUTE detection flag. </li>
<li>SAI_FLAG_OVRUDR: overrun/underrun flag. </li>
<li>SAI_FLAG_WCKCFG: wrong clock configuration flag. </li>
<li>SAI_FLAG_CNRDY: codec not ready flag. </li>
<li>SAI_FLAG_AFSDET: anticipated frame synchronization detection flag. </li>
<li>SAI_FLAG_LFSDET: late frame synchronization detection flag.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>FREQ (FIFO Request) flag is cleared :<ul>
<li>When the audio block is transmitter and the FIFO is full or the FIFO has one data (one buffer mode) depending the bit FTH in the SAI_xCR2 register.</li>
<li>When the audio block is receiver and the FIFO is not empty</li>
</ul>
</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="ga4aa9cc16b2722d001540a4c7fd278efd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SAI_ClearITPendingBit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>SAI_IT</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the SAI <a class="el" href="struct_block.html">Block</a> x interrupt pending bit. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral. </td></tr>
<tr><td class="paramname">SAI_IT</td><td>specifies the SAI <a class="el" href="struct_block.html">Block</a> interrupt pending bit to clear. This parameter can be one of the following values: <ul>
<li>SAI_IT_MUTEDET: MUTE detection interrupt. </li>
<li>SAI_IT_OVRUDR: overrun/underrun interrupt. </li>
<li>SAI_IT_WCKCFG: wrong clock configuration interrupt. </li>
<li>SAI_IT_CNRDY: codec not ready interrupt. </li>
<li>SAI_IT_AFSDET: anticipated frame synchronization detection interrupt. </li>
<li>SAI_IT_LFSDET: late frame synchronization detection interrupt.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>FREQ (FIFO Request) flag is cleared :<ul>
<li>When the audio block is transmitter and the FIFO is full or the FIFO has one data (one buffer mode) depending the bit FTH in the SAI_xCR2 register.</li>
<li>When the audio block is receiver and the FIFO is not empty</li>
</ul>
</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="gabe56cd82fe1137249f5acb8907d28fd3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FunctionalState SAI_GetCmdStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the status of EN bit for the specified SAI <a class="el" href="struct_block.html">Block</a> x. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>After disabling a SAI <a class="el" href="struct_block.html">Block</a>, it is recommended to check (or wait until) the SAI <a class="el" href="struct_block.html">Block</a> is effectively disabled. If a <a class="el" href="struct_block.html">Block</a> is disabled while an audio frame transfer is ongoing, the current frame will be transferred and the block will be effectively disabled only at the end of audio frame.</dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">Current</td><td>state of the DMAy Streamx (ENABLE or DISABLE). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga03d763ba656a9eec5dd5e7b83b8ee361"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t SAI_GetFIFOStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current SAI <a class="el" href="struct_block.html">Block</a> x FIFO filled level. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral.</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">The</td><td>FIFO filling state.<ul>
<li>SAI_FIFOStatus_Empty: when FIFO is empty</li>
<li>SAI_FIFOStatus_Less1QuarterFull: when FIFO is less than 1 quarter-full and not empty.</li>
<li>SAI_FIFOStatus_1QuarterFull: if more than 1 quarter-full.</li>
<li>SAI_FIFOStatus_HalfFull: if more than 1 half-full.</li>
<li>SAI_FIFOStatus_3QuartersFull: if more than 3 quarters-full.</li>
<li>SAI_FIFOStatus_Full: when FIFO is full </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga538f303601c97a0ef68817ac2d7d9fd4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FlagStatus SAI_GetFlagStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>SAI_FLAG</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the specified SAI block x flag is set or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral. </td></tr>
<tr><td class="paramname">SAI_FLAG</td><td>specifies the SAI block flag to check. This parameter can be one of the following values: <ul>
<li>SAI_FLAG_FREQ: FIFO Request flag. </li>
<li>SAI_FLAG_MUTEDET: MUTE detection flag. </li>
<li>SAI_FLAG_OVRUDR: overrun/underrun flag. </li>
<li>SAI_FLAG_WCKCFG: wrong clock configuration flag. </li>
<li>SAI_FLAG_CNRDY: codec not ready flag. </li>
<li>SAI_FLAG_AFSDET: anticipated frame synchronization detection flag. </li>
<li>SAI_FLAG_LFSDET: late frame synchronization detection 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 SAI_FLAG (SET or RESET). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga59e69b3e20a327395bc89b5e643c3e9a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ITStatus SAI_GetITStatus </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>SAI_IT</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether the specified SAI <a class="el" href="struct_block.html">Block</a> x interrupt has occurred or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral. </td></tr>
<tr><td class="paramname">SAI_IT</td><td>specifies the SAI interrupt source to be enabled or disabled. This parameter can be one of the following values: <ul>
<li>SAI_IT_FREQ: FIFO Request interrupt </li>
<li>SAI_IT_MUTEDET: MUTE detection interrupt </li>
<li>SAI_IT_OVRUDR: overrun/underrun interrupt </li>
<li>SAI_IT_AFSDET: anticipated frame synchronization detection interrupt </li>
<li>SAI_IT_LFSDET: late frame synchronization detection interrupt </li>
<li>SAI_IT_CNRDY: codec not ready interrupt </li>
<li>SAI_IT_WCKCFG: wrong clock configuration 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 SAI_IT (SET or RESET). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga77597e3c2eb2613de8c79f72d2f10929"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SAI_ITConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_s_a_i___block___type_def.html">SAI_Block_TypeDef</a> *&#160;</td>
<td class="paramname"><em>SAI_Block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>SAI_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 SAI <a class="el" href="struct_block.html">Block</a> interrupts. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">SAI_Block_x</td><td>where x can be A or B to select the SAI <a class="el" href="struct_block.html">Block</a> peripheral. </td></tr>
<tr><td class="paramname">SAI_IT</td><td>specifies the SAI interrupt source to be enabled or disabled. This parameter can be one of the following values: <ul>
<li>SAI_IT_FREQ: FIFO Request interrupt mask </li>
<li>SAI_IT_MUTEDET: MUTE detection interrupt mask </li>
<li>SAI_IT_OVRUDR: overrun/underrun interrupt mask </li>
<li>SAI_IT_AFSDET: anticipated frame synchronization detection interrupt mask </li>
<li>SAI_IT_LFSDET: late frame synchronization detection interrupt mask </li>
<li>SAI_IT_CNRDY: codec not ready interrupt mask </li>
<li>SAI_IT_WCKCFG: wrong clock configuration interrupt mask </li>
</ul>
</td></tr>
<tr><td class="paramname">NewState</td><td>new state of the specified SAI 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: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>