MCUXpresso_LPC55S69/docs/MCUXpresso SDK API Referenc.../a00042.html

925 lines
65 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.5"/>
<title>MCUXpresso SDK API Reference Manual: Notification Framework</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.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 id="projectlogo"><img alt="Logo" src="fs_logo.gif"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">MCUXpresso SDK API Reference Manual
&#160;<span id="projectnumber">Rev 2.15.000</span>
</div>
<div id="projectbrief">NXP Semiconductors</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<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>API&#160;Reference</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 -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('a00042.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></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="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Notification Framework</div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>This section describes the programming interface of the Notifier driver.</p>
<h1><a class="anchor" id="NotifierOv"></a>
Notifier Overview</h1>
<p>The Notifier provides a configuration dynamic change service. Based on this service, applications can switch between pre-defined configurations. The Notifier enables drivers and applications to register callback functions to this framework. Each time that the configuration is changed, drivers and applications receive a notification and change their settings. To simplify, the Notifier only supports the static callback registration. This means that, for applications, all callback functions are collected into a static table and passed to the Notifier.</p>
<p>These are the steps for the configuration transition.</p>
<ol type="1">
<li>Before configuration transition, the Notifier sends a "BEFORE" message to the callback table. When this message is received, IP drivers should check whether any current processes can be stopped and stop them. If the processes cannot be stopped, the callback function returns an error.<br/>
The Notifier supports two types of transition policies, a graceful policy and a forceful policy. When the graceful policy is used, if some callbacks return an error while sending a "BEFORE" message, the configuration transition stops and the Notifier sends a "RECOVER" message to all drivers that have stopped. Then, these drivers can recover the previous status and continue to work. When the forceful policy is used, drivers are stopped forcefully.</li>
<li>After the "BEFORE" message is processed successfully, the system switches to the new configuration.</li>
<li>After the configuration changes, the Notifier sends an "AFTER" message to the callback table to notify drivers that the configuration transition is finished.</li>
</ol>
<p>This example shows how to use the Notifier in the Power Manager application.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;fsl_notifier.h&quot;</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// Definition of the Power Manager callback.</span></div>
<div class="line"><a class="code" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> callback0(<a class="code" href="a00042.html#a00378">notifier_notification_block_t</a> *notify, <span class="keywordtype">void</span> *data)</div>
<div class="line">{</div>
<div class="line"></div>
<div class="line"> <a class="code" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> ret = <a class="code" href="a00242.html#ggadf764cbdea00d65edcd07bb9953ad2b7a829bee76c6b02225d9c891ae8ef70881">kStatus_Success</a>;</div>
<div class="line"></div>
<div class="line"> ...</div>
<div class="line"> ...</div>
<div class="line"> ...</div>
<div class="line"></div>
<div class="line"> <span class="keywordflow">return</span> ret;</div>
<div class="line">}</div>
<div class="line"><span class="comment">// Definition of the Power Manager user function.</span></div>
<div class="line"><a class="code" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> APP_PowerModeSwitch(<a class="code" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> *targetConfig, <span class="keywordtype">void</span> *userData)</div>
<div class="line">{</div>
<div class="line"> ...</div>
<div class="line"> ...</div>
<div class="line"> ...</div>
<div class="line">}</div>
<div class="line">...</div>
<div class="line">...</div>
<div class="line">...</div>
<div class="line">...</div>
<div class="line">...</div>
<div class="line"><span class="comment">// Main function.</span></div>
<div class="line">int main(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Define a notifier handle.</span></div>
<div class="line"> <a class="code" href="a00042.html#a00377">notifier_handle_t</a> powerModeHandle;</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Callback configuration.</span></div>
<div class="line"> user_callback_data_t callbackData0;</div>
<div class="line"></div>
<div class="line"> <a class="code" href="a00042.html#a00376">notifier_callback_config_t</a> callbackCfg0 = {callback0,</div>
<div class="line"> <a class="code" href="a00042.html#gga120d15994388722016ef487b8159f3dfada6451efe227571a1442e70ddf36e005">kNOTIFIER_CallbackBeforeAfter</a>,</div>
<div class="line"> (<span class="keywordtype">void</span> *)&amp;callbackData0};</div>
<div class="line"></div>
<div class="line"> <a class="code" href="a00042.html#a00376">notifier_callback_config_t</a> callbacks[] = {callbackCfg0};</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Power mode configurations.</span></div>
<div class="line"> power_user_config_t vlprConfig;</div>
<div class="line"> power_user_config_t stopConfig;</div>
<div class="line"></div>
<div class="line"> <a class="code" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> *powerConfigs[] = {&amp;vlprConfig, &amp;stopConfig};</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Definition of a transition to and out the power modes.</span></div>
<div class="line"> vlprConfig.mode = kAPP_PowerModeVlpr;</div>
<div class="line"> vlprConfig.enableLowPowerWakeUpOnInterrupt = <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line"> stopConfig = vlprConfig;</div>
<div class="line"> stopConfig.mode = kAPP_PowerModeStop;</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Create Notifier handle.</span></div>
<div class="line"> <a class="code" href="a00042.html#gaa2dfe33b4724d9c1025acdde1b1b3c31">NOTIFIER_CreateHandle</a>(&amp;powerModeHandle, powerConfigs, 2U, callbacks, 1U, APP_PowerModeSwitch, NULL);</div>
<div class="line"> ...</div>
<div class="line"> ...</div>
<div class="line"> <span class="comment">// Power mode switch.</span></div>
<div class="line"> NOTIFIER_switchConfig(&amp;powerModeHandle, targetConfigIndex, <a class="code" href="a00042.html#gga876c38aa0c3eb40cd6d9fa62106efd65a4513243b3cacd0aec289531dfb53e964">kNOTIFIER_PolicyAgreement</a>);</div>
<div class="line">}</div>
</div><!-- fragment --> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:a00378"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a00378">_notifier_notification_block</a></td></tr>
<tr class="memdesc:a00378"><td class="mdescLeft">&#160;</td><td class="mdescRight">notification block passed to the registered callback function. <a href="a00042.html#a00378">More...</a><br/></td></tr>
<tr class="separator:a00378"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00376"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a00376">_notifier_callback_config</a></td></tr>
<tr class="memdesc:a00376"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback configuration structure. <a href="a00042.html#a00376">More...</a><br/></td></tr>
<tr class="separator:a00376"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00377"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a00377">_notifier_handle</a></td></tr>
<tr class="memdesc:a00377"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier handle structure. <a href="a00042.html#a00377">More...</a><br/></td></tr>
<tr class="separator:a00377"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga80f2ccc799b1cca21a091e2b28fbf36c"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="a00042.html#ga876c38aa0c3eb40cd6d9fa62106efd65">_notifier_policy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga80f2ccc799b1cca21a091e2b28fbf36c">notifier_policy_t</a></td></tr>
<tr class="memdesc:ga80f2ccc799b1cca21a091e2b28fbf36c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier policies. <a href="#ga80f2ccc799b1cca21a091e2b28fbf36c">More...</a><br/></td></tr>
<tr class="separator:ga80f2ccc799b1cca21a091e2b28fbf36c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad7a79c7191c37e1cf4367bcda45b6943"><td class="memItemLeft" align="right" valign="top">typedef enum <br class="typebreak"/>
<a class="el" href="a00042.html#gae4fbfb346e65c17b618dcedb491a864b">_notifier_notification_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gad7a79c7191c37e1cf4367bcda45b6943">notifier_notification_type_t</a></td></tr>
<tr class="memdesc:gad7a79c7191c37e1cf4367bcda45b6943"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notification type. <a href="#gad7a79c7191c37e1cf4367bcda45b6943">More...</a><br/></td></tr>
<tr class="separator:gad7a79c7191c37e1cf4367bcda45b6943"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3fdecfea1f1a6b56c8d74c3608ee9657"><td class="memItemLeft" align="right" valign="top">typedef enum <br class="typebreak"/>
<a class="el" href="a00042.html#ga120d15994388722016ef487b8159f3df">_notifier_callback_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga3fdecfea1f1a6b56c8d74c3608ee9657">notifier_callback_type_t</a></td></tr>
<tr class="memdesc:ga3fdecfea1f1a6b56c8d74c3608ee9657"><td class="mdescLeft">&#160;</td><td class="mdescRight">The callback type, which indicates kinds of notification the callback handles. <a href="#ga3fdecfea1f1a6b56c8d74c3608ee9657">More...</a><br/></td></tr>
<tr class="separator:ga3fdecfea1f1a6b56c8d74c3608ee9657"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad0b6e919f3ff69992b36a2734a650ec7"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a></td></tr>
<tr class="memdesc:gad0b6e919f3ff69992b36a2734a650ec7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier user configuration type. <a href="#gad0b6e919f3ff69992b36a2734a650ec7">More...</a><br/></td></tr>
<tr class="separator:gad0b6e919f3ff69992b36a2734a650ec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb6a6d6f99e6ddfbb96dae53382949b2"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gacb6a6d6f99e6ddfbb96dae53382949b2">notifier_user_function_t</a> )(<a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> *targetConfig, void *userData)</td></tr>
<tr class="memdesc:gacb6a6d6f99e6ddfbb96dae53382949b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier user function prototype Use this function to execute specific operations in configuration switch. <a href="#gacb6a6d6f99e6ddfbb96dae53382949b2">More...</a><br/></td></tr>
<tr class="separator:gacb6a6d6f99e6ddfbb96dae53382949b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3dc913bdf7b5e3b40b347e0f748189a"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
<a class="el" href="a00042.html#a00378">_notifier_notification_block</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gac3dc913bdf7b5e3b40b347e0f748189a">notifier_notification_block_t</a></td></tr>
<tr class="memdesc:gac3dc913bdf7b5e3b40b347e0f748189a"><td class="mdescLeft">&#160;</td><td class="mdescRight">notification block passed to the registered callback function. <a href="#gac3dc913bdf7b5e3b40b347e0f748189a">More...</a><br/></td></tr>
<tr class="separator:gac3dc913bdf7b5e3b40b347e0f748189a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafd1d8cc01c496de8b4cd3990ff85415c"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gafd1d8cc01c496de8b4cd3990ff85415c">notifier_callback_t</a> )(<a class="el" href="a00042.html#gac3dc913bdf7b5e3b40b347e0f748189a">notifier_notification_block_t</a> *notify, void *data)</td></tr>
<tr class="memdesc:gafd1d8cc01c496de8b4cd3990ff85415c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback prototype. <a href="#gafd1d8cc01c496de8b4cd3990ff85415c">More...</a><br/></td></tr>
<tr class="separator:gafd1d8cc01c496de8b4cd3990ff85415c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1ed8b5576d410ff76c7707f7fc58435f"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
<a class="el" href="a00042.html#a00376">_notifier_callback_config</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga1ed8b5576d410ff76c7707f7fc58435f">notifier_callback_config_t</a></td></tr>
<tr class="memdesc:ga1ed8b5576d410ff76c7707f7fc58435f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback configuration structure. <a href="#ga1ed8b5576d410ff76c7707f7fc58435f">More...</a><br/></td></tr>
<tr class="separator:ga1ed8b5576d410ff76c7707f7fc58435f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fb6d98190b8a419a8d4b4150b0eae2a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="a00042.html#a00377">_notifier_handle</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a></td></tr>
<tr class="memdesc:ga5fb6d98190b8a419a8d4b4150b0eae2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier handle structure. <a href="#ga5fb6d98190b8a419a8d4b4150b0eae2a">More...</a><br/></td></tr>
<tr class="separator:ga5fb6d98190b8a419a8d4b4150b0eae2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gacac871f1b98f53906b07b2663943c784"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gacac871f1b98f53906b07b2663943c784">_notifier_status</a> { <br/>
&#160;&#160;<a class="el" href="a00042.html#ggacac871f1b98f53906b07b2663943c784a23344b22d4d82fea2f17f4979d515c5c">kStatus_NOTIFIER_ErrorNotificationBefore</a>,
<br/>
&#160;&#160;<a class="el" href="a00042.html#ggacac871f1b98f53906b07b2663943c784a7b48bf0cf849b07c6131a0abb65d2d58">kStatus_NOTIFIER_ErrorNotificationAfter</a>
<br/>
}</td></tr>
<tr class="memdesc:gacac871f1b98f53906b07b2663943c784"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier error codes. <a href="a00042.html#gacac871f1b98f53906b07b2663943c784">More...</a><br/></td></tr>
<tr class="separator:gacac871f1b98f53906b07b2663943c784"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga876c38aa0c3eb40cd6d9fa62106efd65"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga876c38aa0c3eb40cd6d9fa62106efd65">_notifier_policy</a> { <br/>
&#160;&#160;<a class="el" href="a00042.html#gga876c38aa0c3eb40cd6d9fa62106efd65a4513243b3cacd0aec289531dfb53e964">kNOTIFIER_PolicyAgreement</a>,
<br/>
&#160;&#160;<a class="el" href="a00042.html#gga876c38aa0c3eb40cd6d9fa62106efd65a97a2587e9e4c523dc028778ba1f72dc8">kNOTIFIER_PolicyForcible</a>
<br/>
}</td></tr>
<tr class="memdesc:ga876c38aa0c3eb40cd6d9fa62106efd65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifier policies. <a href="a00042.html#ga876c38aa0c3eb40cd6d9fa62106efd65">More...</a><br/></td></tr>
<tr class="separator:ga876c38aa0c3eb40cd6d9fa62106efd65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4fbfb346e65c17b618dcedb491a864b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gae4fbfb346e65c17b618dcedb491a864b">_notifier_notification_type</a> { <br/>
&#160;&#160;<a class="el" href="a00042.html#ggae4fbfb346e65c17b618dcedb491a864ba49e6ad28b9d351a051035c8065de5d94">kNOTIFIER_NotifyRecover</a> = 0x00U,
<br/>
&#160;&#160;<a class="el" href="a00042.html#ggae4fbfb346e65c17b618dcedb491a864ba91707ed2be51db6da2a9d6cc6eaee39c">kNOTIFIER_NotifyBefore</a> = 0x01U,
<br/>
&#160;&#160;<a class="el" href="a00042.html#ggae4fbfb346e65c17b618dcedb491a864ba6e89a377b2890077646fc6af6b5c2e00">kNOTIFIER_NotifyAfter</a> = 0x02U
<br/>
}</td></tr>
<tr class="memdesc:gae4fbfb346e65c17b618dcedb491a864b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notification type. <a href="a00042.html#gae4fbfb346e65c17b618dcedb491a864b">More...</a><br/></td></tr>
<tr class="separator:gae4fbfb346e65c17b618dcedb491a864b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga120d15994388722016ef487b8159f3df"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga120d15994388722016ef487b8159f3df">_notifier_callback_type</a> { <br/>
&#160;&#160;<a class="el" href="a00042.html#gga120d15994388722016ef487b8159f3dfab9c117f1eccd38f914d0e4d05015d6a1">kNOTIFIER_CallbackBefore</a> = 0x01U,
<br/>
&#160;&#160;<a class="el" href="a00042.html#gga120d15994388722016ef487b8159f3dfa8d5832eddd0d8cf976413aea02f3bfdc">kNOTIFIER_CallbackAfter</a> = 0x02U,
<br/>
&#160;&#160;<a class="el" href="a00042.html#gga120d15994388722016ef487b8159f3dfada6451efe227571a1442e70ddf36e005">kNOTIFIER_CallbackBeforeAfter</a> = 0x03U
<br/>
}</td></tr>
<tr class="memdesc:ga120d15994388722016ef487b8159f3df"><td class="mdescLeft">&#160;</td><td class="mdescRight">The callback type, which indicates kinds of notification the callback handles. <a href="a00042.html#ga120d15994388722016ef487b8159f3df">More...</a><br/></td></tr>
<tr class="separator:ga120d15994388722016ef487b8159f3df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa2dfe33b4724d9c1025acdde1b1b3c31"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gaa2dfe33b4724d9c1025acdde1b1b3c31">NOTIFIER_CreateHandle</a> (<a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a> *notifierHandle, <a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> **configs, uint8_t configsNumber, <a class="el" href="a00042.html#ga1ed8b5576d410ff76c7707f7fc58435f">notifier_callback_config_t</a> *callbacks, uint8_t callbacksNumber, <a class="el" href="a00042.html#gacb6a6d6f99e6ddfbb96dae53382949b2">notifier_user_function_t</a> userFunction, void *userData)</td></tr>
<tr class="memdesc:gaa2dfe33b4724d9c1025acdde1b1b3c31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a Notifier handle. <a href="#gaa2dfe33b4724d9c1025acdde1b1b3c31">More...</a><br/></td></tr>
<tr class="separator:gaa2dfe33b4724d9c1025acdde1b1b3c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ca08c8f6fa9a7bafa9ecbe08603cd97"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97">NOTIFIER_SwitchConfig</a> (<a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a> *notifierHandle, uint8_t configIndex, <a class="el" href="a00042.html#ga80f2ccc799b1cca21a091e2b28fbf36c">notifier_policy_t</a> policy)</td></tr>
<tr class="memdesc:ga9ca08c8f6fa9a7bafa9ecbe08603cd97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switches the configuration according to a pre-defined structure. <a href="#ga9ca08c8f6fa9a7bafa9ecbe08603cd97">More...</a><br/></td></tr>
<tr class="separator:ga9ca08c8f6fa9a7bafa9ecbe08603cd97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9736632c3beca486ec3f8dab504b839c"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga9736632c3beca486ec3f8dab504b839c">NOTIFIER_GetErrorCallbackIndex</a> (<a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a> *notifierHandle)</td></tr>
<tr class="memdesc:ga9736632c3beca486ec3f8dab504b839c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the last failed notification callback. <a href="#ga9736632c3beca486ec3f8dab504b839c">More...</a><br/></td></tr>
<tr class="separator:ga9736632c3beca486ec3f8dab504b839c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="a00378" id="a00378"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct _notifier_notification_block</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"></div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a018195ff797af865b0d49c0a40c5150a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a018195ff797af865b0d49c0a40c5150a">targetConfig</a></td></tr>
<tr class="memdesc:a018195ff797af865b0d49c0a40c5150a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to target configuration. <a href="#a018195ff797af865b0d49c0a40c5150a">More...</a><br/></td></tr>
<tr class="separator:a018195ff797af865b0d49c0a40c5150a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba07cda193bd7b533b525d8272cceeb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#ga80f2ccc799b1cca21a091e2b28fbf36c">notifier_policy_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#aba07cda193bd7b533b525d8272cceeb2">policy</a></td></tr>
<tr class="memdesc:aba07cda193bd7b533b525d8272cceeb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure transition policy. <a href="#aba07cda193bd7b533b525d8272cceeb2">More...</a><br/></td></tr>
<tr class="separator:aba07cda193bd7b533b525d8272cceeb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc67fe829150c3c2a679db904432d7ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#gad7a79c7191c37e1cf4367bcda45b6943">notifier_notification_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#adc67fe829150c3c2a679db904432d7ea">notifyType</a></td></tr>
<tr class="memdesc:adc67fe829150c3c2a679db904432d7ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure notification type. <a href="#adc67fe829150c3c2a679db904432d7ea">More...</a><br/></td></tr>
<tr class="separator:adc67fe829150c3c2a679db904432d7ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a018195ff797af865b0d49c0a40c5150a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a>* _notifier_notification_block::targetConfig</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="aba07cda193bd7b533b525d8272cceeb2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#ga80f2ccc799b1cca21a091e2b28fbf36c">notifier_policy_t</a> _notifier_notification_block::policy</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="adc67fe829150c3c2a679db904432d7ea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#gad7a79c7191c37e1cf4367bcda45b6943">notifier_notification_type_t</a> _notifier_notification_block::notifyType</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div>
</div>
<a name="a00376" id="a00376"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct _notifier_callback_config</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>This structure holds the configuration of callbacks. Callbacks of this type are expected to be statically allocated. This structure contains the following application-defined data. callback - pointer to the callback function callbackType - specifies when the callback is called callbackData - pointer to the data passed to the callback. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a85eb3076fe6c084c74669e67c62213a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#gafd1d8cc01c496de8b4cd3990ff85415c">notifier_callback_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a85eb3076fe6c084c74669e67c62213a7">callback</a></td></tr>
<tr class="memdesc:a85eb3076fe6c084c74669e67c62213a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the callback function. <a href="#a85eb3076fe6c084c74669e67c62213a7">More...</a><br/></td></tr>
<tr class="separator:a85eb3076fe6c084c74669e67c62213a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a89d9f29db8d7cd160febde83d28059"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#ga3fdecfea1f1a6b56c8d74c3608ee9657">notifier_callback_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a3a89d9f29db8d7cd160febde83d28059">callbackType</a></td></tr>
<tr class="memdesc:a3a89d9f29db8d7cd160febde83d28059"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback type. <a href="#a3a89d9f29db8d7cd160febde83d28059">More...</a><br/></td></tr>
<tr class="separator:a3a89d9f29db8d7cd160febde83d28059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3157da142ad8e9147093b734f7f9c1c8"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a3157da142ad8e9147093b734f7f9c1c8">callbackData</a></td></tr>
<tr class="memdesc:a3157da142ad8e9147093b734f7f9c1c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the data passed to the callback. <a href="#a3157da142ad8e9147093b734f7f9c1c8">More...</a><br/></td></tr>
<tr class="separator:a3157da142ad8e9147093b734f7f9c1c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a85eb3076fe6c084c74669e67c62213a7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#gafd1d8cc01c496de8b4cd3990ff85415c">notifier_callback_t</a> _notifier_callback_config::callback</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a3a89d9f29db8d7cd160febde83d28059"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#ga3fdecfea1f1a6b56c8d74c3608ee9657">notifier_callback_type_t</a> _notifier_callback_config::callbackType</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a3157da142ad8e9147093b734f7f9c1c8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* _notifier_callback_config::callbackData</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div>
</div>
<a name="a00377" id="a00377"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct _notifier_handle</td>
</tr>
</table>
</div><div class="memdoc">
<div class="textblock"><p>Notifier handle structure. Contains data necessary for the Notifier proper function. Stores references to registered configurations, callbacks, information about their numbers, user function, user data, and other internal data. <a class="el" href="a00042.html#gaa2dfe33b4724d9c1025acdde1b1b3c31" title="Creates a Notifier handle. ">NOTIFIER_CreateHandle()</a> must be called to initialize this handle. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a3ecaf5ebe809ffe87e3fd765df0ce8f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a3ecaf5ebe809ffe87e3fd765df0ce8f4">configsTable</a></td></tr>
<tr class="memdesc:a3ecaf5ebe809ffe87e3fd765df0ce8f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to configure table. <a href="#a3ecaf5ebe809ffe87e3fd765df0ce8f4">More...</a><br/></td></tr>
<tr class="separator:a3ecaf5ebe809ffe87e3fd765df0ce8f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3922e6509dd3d21571e07367e2aa578"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#aa3922e6509dd3d21571e07367e2aa578">configsNumber</a></td></tr>
<tr class="memdesc:aa3922e6509dd3d21571e07367e2aa578"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of configurations. <a href="#aa3922e6509dd3d21571e07367e2aa578">More...</a><br/></td></tr>
<tr class="separator:aa3922e6509dd3d21571e07367e2aa578"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf74e82056bd7b4e19ac11ce554b0e6e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#ga1ed8b5576d410ff76c7707f7fc58435f">notifier_callback_config_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#abf74e82056bd7b4e19ac11ce554b0e6e">callbacksTable</a></td></tr>
<tr class="memdesc:abf74e82056bd7b4e19ac11ce554b0e6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to callback table. <a href="#abf74e82056bd7b4e19ac11ce554b0e6e">More...</a><br/></td></tr>
<tr class="separator:abf74e82056bd7b4e19ac11ce554b0e6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3800d55438441a0091a84516381bba10"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a3800d55438441a0091a84516381bba10">callbacksNumber</a></td></tr>
<tr class="memdesc:a3800d55438441a0091a84516381bba10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of callback configurations. <a href="#a3800d55438441a0091a84516381bba10">More...</a><br/></td></tr>
<tr class="separator:a3800d55438441a0091a84516381bba10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af91a8551d975e6a2354efc9c8ef3b585"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#af91a8551d975e6a2354efc9c8ef3b585">errorCallbackIndex</a></td></tr>
<tr class="memdesc:af91a8551d975e6a2354efc9c8ef3b585"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index of callback returns error. <a href="#af91a8551d975e6a2354efc9c8ef3b585">More...</a><br/></td></tr>
<tr class="separator:af91a8551d975e6a2354efc9c8ef3b585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a482028570c5e46c6ed018885dc45204f"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a482028570c5e46c6ed018885dc45204f">currentConfigIndex</a></td></tr>
<tr class="memdesc:a482028570c5e46c6ed018885dc45204f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index of current configuration. <a href="#a482028570c5e46c6ed018885dc45204f">More...</a><br/></td></tr>
<tr class="separator:a482028570c5e46c6ed018885dc45204f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51562248abd92ea71aea469d7f2599b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00042.html#gacb6a6d6f99e6ddfbb96dae53382949b2">notifier_user_function_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a51562248abd92ea71aea469d7f2599b8">userFunction</a></td></tr>
<tr class="memdesc:a51562248abd92ea71aea469d7f2599b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">User function. <a href="#a51562248abd92ea71aea469d7f2599b8">More...</a><br/></td></tr>
<tr class="separator:a51562248abd92ea71aea469d7f2599b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ff25f57ffc4b15c365d03afe1d65ca5"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#a6ff25f57ffc4b15c365d03afe1d65ca5">userData</a></td></tr>
<tr class="memdesc:a6ff25f57ffc4b15c365d03afe1d65ca5"><td class="mdescLeft">&#160;</td><td class="mdescRight">User data passed to user function. <a href="#a6ff25f57ffc4b15c365d03afe1d65ca5">More...</a><br/></td></tr>
<tr class="separator:a6ff25f57ffc4b15c365d03afe1d65ca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a3ecaf5ebe809ffe87e3fd765df0ce8f4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a>** _notifier_handle::configsTable</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="aa3922e6509dd3d21571e07367e2aa578"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t _notifier_handle::configsNumber</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="abf74e82056bd7b4e19ac11ce554b0e6e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#ga1ed8b5576d410ff76c7707f7fc58435f">notifier_callback_config_t</a>* _notifier_handle::callbacksTable</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a3800d55438441a0091a84516381bba10"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t _notifier_handle::callbacksNumber</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="af91a8551d975e6a2354efc9c8ef3b585"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t _notifier_handle::errorCallbackIndex</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a482028570c5e46c6ed018885dc45204f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t _notifier_handle::currentConfigIndex</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a51562248abd92ea71aea469d7f2599b8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00042.html#gacb6a6d6f99e6ddfbb96dae53382949b2">notifier_user_function_t</a> _notifier_handle::userFunction</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a6ff25f57ffc4b15c365d03afe1d65ca5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* _notifier_handle::userData</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga80f2ccc799b1cca21a091e2b28fbf36c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="a00042.html#ga876c38aa0c3eb40cd6d9fa62106efd65">_notifier_policy</a> <a class="el" href="a00042.html#ga80f2ccc799b1cca21a091e2b28fbf36c">notifier_policy_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Defines whether the user function execution is forced or not. For kNOTIFIER_PolicyForcible, the user function is executed regardless of the callback results, while kNOTIFIER_PolicyAgreement policy is used to exit <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> when any of the callbacks returns error code. See also <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> description. </p>
</div>
</div>
<a class="anchor" id="gad7a79c7191c37e1cf4367bcda45b6943"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="a00042.html#gae4fbfb346e65c17b618dcedb491a864b">_notifier_notification_type</a> <a class="el" href="a00042.html#gad7a79c7191c37e1cf4367bcda45b6943">notifier_notification_type_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to notify registered callbacks </p>
</div>
</div>
<a class="anchor" id="ga3fdecfea1f1a6b56c8d74c3608ee9657"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="a00042.html#ga120d15994388722016ef487b8159f3df">_notifier_callback_type</a> <a class="el" href="a00042.html#ga3fdecfea1f1a6b56c8d74c3608ee9657">notifier_callback_type_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used in the callback configuration structure (notifier_callback_config_t) to specify when the registered callback is called during configuration switch initiated by the <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a>. Callback can be invoked in following situations.</p>
<ul>
<li>Before the configuration switch (Callback return value can affect <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> execution. See the <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> and notifier_policy_t documentation).</li>
<li>After an unsuccessful attempt to switch configuration</li>
<li>After a successful configuration switch </li>
</ul>
</div>
</div>
<a class="anchor" id="gad0b6e919f3ff69992b36a2734a650ec7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void <a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reference of the user defined configuration is stored in an array; the notifier switches between these configurations based on this array. </p>
</div>
</div>
<a class="anchor" id="gacb6a6d6f99e6ddfbb96dae53382949b2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef <a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>(* notifier_user_function_t)(<a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> *targetConfig, void *userData)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Before and after this function execution, different notification is sent to registered callbacks. If this function returns any error code, <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> exits.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">targetConfig</td><td>target Configuration. </td></tr>
<tr><td class="paramname">userData</td><td>Refers to other specific data passed to user function. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An error code or kStatus_Success. </dd></dl>
</div>
</div>
<a class="anchor" id="gac3dc913bdf7b5e3b40b347e0f748189a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="a00042.html#a00378">_notifier_notification_block</a> <a class="el" href="a00042.html#gac3dc913bdf7b5e3b40b347e0f748189a">notifier_notification_block_t</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="gafd1d8cc01c496de8b4cd3990ff85415c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef <a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a>(* notifier_callback_t)(<a class="el" href="a00042.html#gac3dc913bdf7b5e3b40b347e0f748189a">notifier_notification_block_t</a> *notify, void *data)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Declaration of a callback. It is common for registered callbacks. Reference to function of this type is part of the notifier_callback_config_t callback configuration structure. Depending on callback type, function of this prototype is called (see <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a>) before configuration switch, after it or in both use cases to notify about the switch progress (see notifier_callback_type_t). When called, the type of the notification is passed as a parameter along with the reference to the target configuration structure (see notifier_notification_block_t) and any data passed during the callback registration. When notified before the configuration switch, depending on the configuration switch policy (see notifier_policy_t), the callback may deny the execution of the user function by returning an error code different than kStatus_Success (see <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a>).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">notify</td><td>Notification block. </td></tr>
<tr><td class="paramname">data</td><td>Callback data. Refers to the data passed during callback registration. Intended to pass any driver or application data such as internal state information. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An error code or kStatus_Success. </dd></dl>
</div>
</div>
<a class="anchor" id="ga1ed8b5576d410ff76c7707f7fc58435f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="a00042.html#a00376">_notifier_callback_config</a> <a class="el" href="a00042.html#ga1ed8b5576d410ff76c7707f7fc58435f">notifier_callback_config_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This structure holds the configuration of callbacks. Callbacks of this type are expected to be statically allocated. This structure contains the following application-defined data. callback - pointer to the callback function callbackType - specifies when the callback is called callbackData - pointer to the data passed to the callback. </p>
</div>
</div>
<a class="anchor" id="ga5fb6d98190b8a419a8d4b4150b0eae2a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="a00042.html#a00377">_notifier_handle</a> <a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Notifier handle structure. Contains data necessary for the Notifier proper function. Stores references to registered configurations, callbacks, information about their numbers, user function, user data, and other internal data. <a class="el" href="a00042.html#gaa2dfe33b4724d9c1025acdde1b1b3c31" title="Creates a Notifier handle. ">NOTIFIER_CreateHandle()</a> must be called to initialize this handle. </p>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gacac871f1b98f53906b07b2663943c784"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00042.html#gacac871f1b98f53906b07b2663943c784">_notifier_status</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used as return value of Notifier functions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggacac871f1b98f53906b07b2663943c784a23344b22d4d82fea2f17f4979d515c5c"></a>kStatus_NOTIFIER_ErrorNotificationBefore</em>&nbsp;</td><td class="fielddoc">
<p>An error occurs during send "BEFORE" notification. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggacac871f1b98f53906b07b2663943c784a7b48bf0cf849b07c6131a0abb65d2d58"></a>kStatus_NOTIFIER_ErrorNotificationAfter</em>&nbsp;</td><td class="fielddoc">
<p>An error occurs during send "AFTER" notification. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="ga876c38aa0c3eb40cd6d9fa62106efd65"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00042.html#ga876c38aa0c3eb40cd6d9fa62106efd65">_notifier_policy</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Defines whether the user function execution is forced or not. For kNOTIFIER_PolicyForcible, the user function is executed regardless of the callback results, while kNOTIFIER_PolicyAgreement policy is used to exit <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> when any of the callbacks returns error code. See also <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> description. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga876c38aa0c3eb40cd6d9fa62106efd65a4513243b3cacd0aec289531dfb53e964"></a>kNOTIFIER_PolicyAgreement</em>&nbsp;</td><td class="fielddoc">
<p><a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> method is exited when any of the callbacks returns error code. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga876c38aa0c3eb40cd6d9fa62106efd65a97a2587e9e4c523dc028778ba1f72dc8"></a>kNOTIFIER_PolicyForcible</em>&nbsp;</td><td class="fielddoc">
<p>The user function is executed regardless of the results. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="gae4fbfb346e65c17b618dcedb491a864b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00042.html#gae4fbfb346e65c17b618dcedb491a864b">_notifier_notification_type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to notify registered callbacks </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggae4fbfb346e65c17b618dcedb491a864ba49e6ad28b9d351a051035c8065de5d94"></a>kNOTIFIER_NotifyRecover</em>&nbsp;</td><td class="fielddoc">
<p>Notify IP to recover to previous work state. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae4fbfb346e65c17b618dcedb491a864ba91707ed2be51db6da2a9d6cc6eaee39c"></a>kNOTIFIER_NotifyBefore</em>&nbsp;</td><td class="fielddoc">
<p>Notify IP that configuration setting is going to change. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae4fbfb346e65c17b618dcedb491a864ba6e89a377b2890077646fc6af6b5c2e00"></a>kNOTIFIER_NotifyAfter</em>&nbsp;</td><td class="fielddoc">
<p>Notify IP that configuration setting has been changed. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="ga120d15994388722016ef487b8159f3df"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00042.html#ga120d15994388722016ef487b8159f3df">_notifier_callback_type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used in the callback configuration structure (notifier_callback_config_t) to specify when the registered callback is called during configuration switch initiated by the <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a>. Callback can be invoked in following situations.</p>
<ul>
<li>Before the configuration switch (Callback return value can affect <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> execution. See the <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> and notifier_policy_t documentation).</li>
<li>After an unsuccessful attempt to switch configuration</li>
<li>After a successful configuration switch </li>
</ul>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga120d15994388722016ef487b8159f3dfab9c117f1eccd38f914d0e4d05015d6a1"></a>kNOTIFIER_CallbackBefore</em>&nbsp;</td><td class="fielddoc">
<p>Callback handles BEFORE notification. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga120d15994388722016ef487b8159f3dfa8d5832eddd0d8cf976413aea02f3bfdc"></a>kNOTIFIER_CallbackAfter</em>&nbsp;</td><td class="fielddoc">
<p>Callback handles AFTER notification. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga120d15994388722016ef487b8159f3dfada6451efe227571a1442e70ddf36e005"></a>kNOTIFIER_CallbackBeforeAfter</em>&nbsp;</td><td class="fielddoc">
<p>Callback handles BEFORE and AFTER notification. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaa2dfe33b4724d9c1025acdde1b1b3c31"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> NOTIFIER_CreateHandle </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a> *&#160;</td>
<td class="paramname"><em>notifierHandle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00042.html#gad0b6e919f3ff69992b36a2734a650ec7">notifier_user_config_t</a> **&#160;</td>
<td class="paramname"><em>configs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>configsNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00042.html#ga1ed8b5576d410ff76c7707f7fc58435f">notifier_callback_config_t</a> *&#160;</td>
<td class="paramname"><em>callbacks</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>callbacksNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00042.html#gacb6a6d6f99e6ddfbb96dae53382949b2">notifier_user_function_t</a>&#160;</td>
<td class="paramname"><em>userFunction</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>userData</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">notifierHandle</td><td>A pointer to the notifier handle. </td></tr>
<tr><td class="paramname">configs</td><td>A pointer to an array with references to all configurations which is handled by the Notifier. </td></tr>
<tr><td class="paramname">configsNumber</td><td>Number of configurations. Size of the configuration array. </td></tr>
<tr><td class="paramname">callbacks</td><td>A pointer to an array of callback configurations. If there are no callbacks to register during Notifier initialization, use NULL value. </td></tr>
<tr><td class="paramname">callbacksNumber</td><td>Number of registered callbacks. Size of the callbacks array. </td></tr>
<tr><td class="paramname">userFunction</td><td>User function. </td></tr>
<tr><td class="paramname">userData</td><td>User data passed to user function. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An error Code or kStatus_Success. </dd></dl>
</div>
</div>
<a class="anchor" id="ga9ca08c8f6fa9a7bafa9ecbe08603cd97"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00242.html#gaaabdaf7ee58ca7269bd4bf24efcde092">status_t</a> NOTIFIER_SwitchConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a> *&#160;</td>
<td class="paramname"><em>notifierHandle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>configIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00042.html#ga80f2ccc799b1cca21a091e2b28fbf36c">notifier_policy_t</a>&#160;</td>
<td class="paramname"><em>policy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the system to the target configuration. Before transition, the Notifier sends notifications to all callbacks registered to the callback table. Callbacks are invoked in the following order: All registered callbacks are notified ordered by index in the callbacks array. The same order is used for before and after switch notifications. The notifications before the configuration switch can be used to obtain confirmation about the change from registered callbacks. If any registered callback denies the configuration change, further execution of this function depends on the notifier policy: the configuration change is either forced (kNOTIFIER_PolicyForcible) or exited (kNOTIFIER_PolicyAgreement). When configuration change is forced, the result of the before switch notifications are ignored. If an agreement is required, if any callback returns an error code, further notifications before switch notifications are cancelled and all already notified callbacks are re-invoked. The index of the callback which returned error code during pre-switch notifications is stored (any error codes during callbacks re-invocation are ignored) and NOTIFIER_GetErrorCallback() can be used to get it. Regardless of the policies, if any callback returns an error code, an error code indicating in which phase the error occurred is returned when <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> exits. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">notifierHandle</td><td>pointer to notifier handle </td></tr>
<tr><td class="paramname">configIndex</td><td>Index of the target configuration. </td></tr>
<tr><td class="paramname">policy</td><td>Transaction policy, kNOTIFIER_PolicyAgreement or kNOTIFIER_PolicyForcible.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An error code or kStatus_Success. </dd></dl>
</div>
</div>
<a class="anchor" id="ga9736632c3beca486ec3f8dab504b839c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t NOTIFIER_GetErrorCallbackIndex </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00042.html#ga5fb6d98190b8a419a8d4b4150b0eae2a">notifier_handle_t</a> *&#160;</td>
<td class="paramname"><em>notifierHandle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns an index of the last callback that failed during the configuration switch while the last <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> was called. If the last <a class="el" href="a00042.html#ga9ca08c8f6fa9a7bafa9ecbe08603cd97" title="Switches the configuration according to a pre-defined structure. ">NOTIFIER_SwitchConfig()</a> call ended successfully value equal to callbacks number is returned. The returned value represents an index in the array of static call-backs.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">notifierHandle</td><td>Pointer to the notifier handle </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Callback Index of the last failed callback or value equal to callbacks count. </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul class="foot">
<li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
</li>
</ul>
</div>
</body>
</html>