sdk-ameba-v4.0b_without_nda.../doc/api_doc/group__sleep__ex.html
2017-10-15 14:36:37 +08:00

615 lines
37 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.11"/>
<title>SDK4.0: SLEEP_EX</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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">SDK4.0
</div>
<div id="projectbrief">This document shows Ameba SDK 4.0 APIs</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<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 class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</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="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">SLEEP_EX<div class="ingroups"><a class="el" href="group__sdk.html">Ameba SDK</a> &raquo; <a class="el" href="group__hal.html">HAL</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>sleep extended functions
<a href="#details">More...</a></p>
<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:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct___s_l_e_e_p___w_k_u_p___e_v_e_n_t__.html">_SLEEP_WKUP_EVENT_</a></td></tr>
<tr class="separator:"><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:gad65d777333881159b786f5de0789ebde"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#gad65d777333881159b786f5de0789ebde">deepsleep_ex</a> (uint32_t wakeup_event, uint32_t sleep_duration)</td></tr>
<tr class="memdesc:gad65d777333881159b786f5de0789ebde"><td class="mdescLeft">&#160;</td><td class="mdescRight">To make the system entering the Deep Sleep power saving mode. The CPU, memory and peripheral power is off when entering deep sleep power saving mode. The program needs to be reload and all peripheral needs be re-configure when system resume. <a href="#gad65d777333881159b786f5de0789ebde">More...</a><br /></td></tr>
<tr class="separator:gad65d777333881159b786f5de0789ebde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa5f3ff69148b38477bc0c5c1504d8cd4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#gaa5f3ff69148b38477bc0c5c1504d8cd4">standby_wakeup_event_del</a> (uint32_t wakeup_event)</td></tr>
<tr class="memdesc:gaa5f3ff69148b38477bc0c5c1504d8cd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">To delete a wake up event for wakeing up the system from the deep standby power saving mode. <a href="#gaa5f3ff69148b38477bc0c5c1504d8cd4">More...</a><br /></td></tr>
<tr class="separator:gaa5f3ff69148b38477bc0c5c1504d8cd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Ameba1 Only</h2></td></tr>
<tr class="memitem:gac9e1fab9bc098befc811583d8095b449"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac9e1fab9bc098befc811583d8095b449"></a>
typedef struct <a class="el" href="struct___s_l_e_e_p___w_k_u_p___e_v_e_n_t__.html">_SLEEP_WKUP_EVENT_</a>&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_EVENT</b></td></tr>
<tr class="separator:gac9e1fab9bc098befc811583d8095b449"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadef508882a286eba1083ab0626781db6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadef508882a286eba1083ab0626781db6"></a>
typedef struct <a class="el" href="struct___s_l_e_e_p___w_k_u_p___e_v_e_n_t__.html">_SLEEP_WKUP_EVENT_</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>PSLEEP_WAKEUP_EVENT</b></td></tr>
<tr class="separator:gadef508882a286eba1083ab0626781db6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb5d5ab57b78c67cca30d616bb00935c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#gabb5d5ab57b78c67cca30d616bb00935c">deepstandby_ex</a> (void)</td></tr>
<tr class="memdesc:gabb5d5ab57b78c67cca30d616bb00935c"><td class="mdescLeft">&#160;</td><td class="mdescRight">To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. <a href="#gabb5d5ab57b78c67cca30d616bb00935c">More...</a><br /></td></tr>
<tr class="separator:gabb5d5ab57b78c67cca30d616bb00935c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga61b6fa80941e0754db9dcd7cb38ac809"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#ga61b6fa80941e0754db9dcd7cb38ac809">standby_wakeup_event_add</a> (uint32_t wakeup_event, uint32_t sleep_duration_ms, uint32_t gpio_active)</td></tr>
<tr class="memdesc:ga61b6fa80941e0754db9dcd7cb38ac809"><td class="mdescLeft">&#160;</td><td class="mdescRight">To add a wake up event to wake up the system from the deep standby power saving mode. <a href="#ga61b6fa80941e0754db9dcd7cb38ac809">More...</a><br /></td></tr>
<tr class="separator:ga61b6fa80941e0754db9dcd7cb38ac809"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae521114242501f349e48137896178c2c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae521114242501f349e48137896178c2c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_GTIMER</b>&#160;&#160;&#160;(SLP_GTIMER)</td></tr>
<tr class="separator:gae521114242501f349e48137896178c2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadb1136890967725e14caf91d07251455"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadb1136890967725e14caf91d07251455"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_NFC</b>&#160;&#160;&#160;(SLP_NFC)</td></tr>
<tr class="separator:gadb1136890967725e14caf91d07251455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga67ee39eea4cb15c6d37bcf8ab730ced8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga67ee39eea4cb15c6d37bcf8ab730ced8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_NFC</b>&#160;&#160;&#160;(BIT1)</td></tr>
<tr class="separator:ga67ee39eea4cb15c6d37bcf8ab730ced8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace4b96ed3bde73c0d436fbdce9e3a34c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gace4b96ed3bde73c0d436fbdce9e3a34c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_PA5</b>&#160;&#160;&#160;(BIT4)</td></tr>
<tr class="separator:gace4b96ed3bde73c0d436fbdce9e3a34c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea985cda5328345021d3e118663a2730"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaea985cda5328345021d3e118663a2730"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_PC7</b>&#160;&#160;&#160;(BIT5)</td></tr>
<tr class="separator:gaea985cda5328345021d3e118663a2730"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e60f55b4467c6e1ae46e99db4e4a1de"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2e60f55b4467c6e1ae46e99db4e4a1de"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_PD5</b>&#160;&#160;&#160;(BIT6)</td></tr>
<tr class="separator:ga2e60f55b4467c6e1ae46e99db4e4a1de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d8dae22048d93251c20dcca272be94b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6d8dae22048d93251c20dcca272be94b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_PE3</b>&#160;&#160;&#160;(BIT7)</td></tr>
<tr class="separator:ga6d8dae22048d93251c20dcca272be94b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
AmebaZ Only</h2></td></tr>
<tr class="memitem:gac303f28059f7dafb72cc9bdd780a415f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#gac303f28059f7dafb72cc9bdd780a415f">deepstandby_ex</a> (uint32_t sleep_duration_ms)</td></tr>
<tr class="memdesc:gac303f28059f7dafb72cc9bdd780a415f"><td class="mdescLeft">&#160;</td><td class="mdescRight">To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. <a href="#gac303f28059f7dafb72cc9bdd780a415f">More...</a><br /></td></tr>
<tr class="separator:gac303f28059f7dafb72cc9bdd780a415f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37da777f9d57ebb429f03dd830681f0a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#ga37da777f9d57ebb429f03dd830681f0a">standby_wakeup_event_add</a> (uint32_t wakeup_event, uint32_t gpio_active)</td></tr>
<tr class="memdesc:ga37da777f9d57ebb429f03dd830681f0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">To add a wake up event to wake up the system from the deep standby power saving mode. <a href="#ga37da777f9d57ebb429f03dd830681f0a">More...</a><br /></td></tr>
<tr class="separator:ga37da777f9d57ebb429f03dd830681f0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ffe6db37ec3542c838b9d8fb4ebdb3a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2ffe6db37ec3542c838b9d8fb4ebdb3a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_STIMER</b>&#160;&#160;&#160;(SLP_STIMER)</td></tr>
<tr class="separator:ga2ffe6db37ec3542c838b9d8fb4ebdb3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ffe6db37ec3542c838b9d8fb4ebdb3a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2ffe6db37ec3542c838b9d8fb4ebdb3a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_STIMER</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_SYSTIM_MSK)</td></tr>
<tr class="separator:ga2ffe6db37ec3542c838b9d8fb4ebdb3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8775c4025b35432632a50727fa3333ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8775c4025b35432632a50727fa3333ec"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_GPIO_INT</b>&#160;&#160;&#160;(SLP_GPIO)</td></tr>
<tr class="separator:ga8775c4025b35432632a50727fa3333ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8775c4025b35432632a50727fa3333ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8775c4025b35432632a50727fa3333ec"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_GPIO_INT</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_GPIO_MSK)</td></tr>
<tr class="separator:ga8775c4025b35432632a50727fa3333ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga761d395622e53541c14053d1908e42ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga761d395622e53541c14053d1908e42ab"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_WLAN</b>&#160;&#160;&#160;(SLP_WL)</td></tr>
<tr class="separator:ga761d395622e53541c14053d1908e42ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga761d395622e53541c14053d1908e42ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga761d395622e53541c14053d1908e42ab"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_WLAN</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_WLAN_MSK)</td></tr>
<tr class="separator:ga761d395622e53541c14053d1908e42ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45ddd7ffbbff11818a0e0725fb1e1ed1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga45ddd7ffbbff11818a0e0725fb1e1ed1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_SDIO</b>&#160;&#160;&#160;(SLP_SDIO)</td></tr>
<tr class="separator:ga45ddd7ffbbff11818a0e0725fb1e1ed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45ddd7ffbbff11818a0e0725fb1e1ed1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga45ddd7ffbbff11818a0e0725fb1e1ed1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_SDIO</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_SDIO_MSK)</td></tr>
<tr class="separator:ga45ddd7ffbbff11818a0e0725fb1e1ed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa96d78e6b11347127b4758dbcf92044c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa96d78e6b11347127b4758dbcf92044c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_USB</b>&#160;&#160;&#160;(SLP_USB)</td></tr>
<tr class="separator:gaa96d78e6b11347127b4758dbcf92044c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa96d78e6b11347127b4758dbcf92044c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa96d78e6b11347127b4758dbcf92044c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_USB</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_USB_MSK)</td></tr>
<tr class="separator:gaa96d78e6b11347127b4758dbcf92044c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga423c3ef7b857b200461c8a0785a79b7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga423c3ef7b857b200461c8a0785a79b7f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_STIMER</b>&#160;&#160;&#160;(BIT0)</td></tr>
<tr class="separator:ga423c3ef7b857b200461c8a0785a79b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga423c3ef7b857b200461c8a0785a79b7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga423c3ef7b857b200461c8a0785a79b7f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_STIMER</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_A33_AND_A33GPIO_MSK)</td></tr>
<tr class="separator:ga423c3ef7b857b200461c8a0785a79b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3bc0d1c55b256e2609ce1b491946f0d2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3bc0d1c55b256e2609ce1b491946f0d2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DSLEEP_WAKEUP_BY_TIMER</b>&#160;&#160;&#160;(DS_TIMER33)</td></tr>
<tr class="separator:ga3bc0d1c55b256e2609ce1b491946f0d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3bc0d1c55b256e2609ce1b491946f0d2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3bc0d1c55b256e2609ce1b491946f0d2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DSLEEP_WAKEUP_BY_TIMER</b>&#160;&#160;&#160;BIT(0)</td></tr>
<tr class="separator:ga3bc0d1c55b256e2609ce1b491946f0d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa615ba3d337c11bba477ab8be49c30b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa615ba3d337c11bba477ab8be49c30b0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DSLEEP_WAKEUP_BY_GPIO</b>&#160;&#160;&#160;(DS_GPIO)</td></tr>
<tr class="separator:gaa615ba3d337c11bba477ab8be49c30b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa615ba3d337c11bba477ab8be49c30b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa615ba3d337c11bba477ab8be49c30b0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DSLEEP_WAKEUP_BY_GPIO</b>&#160;&#160;&#160;BIT(2)</td></tr>
<tr class="separator:gaa615ba3d337c11bba477ab8be49c30b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga786010a2a30c3af83a1bcf496feace20"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga786010a2a30c3af83a1bcf496feace20"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_GPIO</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_GPIO_DSTBY_MSK)</td></tr>
<tr class="separator:ga786010a2a30c3af83a1bcf496feace20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21ba21875a247afc6fb04ee3756a4669"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga21ba21875a247afc6fb04ee3756a4669"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_UART</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_UART0_MSK | BIT_SYSON_WEVT_UART1_MSK)</td></tr>
<tr class="separator:ga21ba21875a247afc6fb04ee3756a4669"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8c2084aa7cc4178a57163cffa2ab3dbd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8c2084aa7cc4178a57163cffa2ab3dbd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_I2C</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_I2C0_MSK | BIT_SYSON_WEVT_I2C1_MSK)</td></tr>
<tr class="separator:ga8c2084aa7cc4178a57163cffa2ab3dbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga84af7843c34402ec4a19748b8c81e384"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga84af7843c34402ec4a19748b8c81e384"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLEEP_WAKEUP_BY_RTC</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_RTC_MSK)</td></tr>
<tr class="separator:ga84af7843c34402ec4a19748b8c81e384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5dad9f7c379c29506639fe4964047e7e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5dad9f7c379c29506639fe4964047e7e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_GPIO</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_GPIO_DSTBY_MSK)</td></tr>
<tr class="separator:ga5dad9f7c379c29506639fe4964047e7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b216763bcaeee636a66b555e3576d99"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0b216763bcaeee636a66b555e3576d99"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>STANDBY_WAKEUP_BY_RTC</b>&#160;&#160;&#160;(BIT_SYSON_WEVT_RTC_MSK)</td></tr>
<tr class="separator:ga0b216763bcaeee636a66b555e3576d99"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Ameba Common</h2></td></tr>
<tr class="memitem:gad4d449c4cb94b1db597594779d59b7d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#gad4d449c4cb94b1db597594779d59b7d0">sleep_ex</a> (uint32_t wakeup_event, uint32_t sleep_duration)</td></tr>
<tr class="memdesc:gad4d449c4cb94b1db597594779d59b7d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt, G-Timer timeout, etc. befor entering power saving mode. <a href="#gad4d449c4cb94b1db597594779d59b7d0">More...</a><br /></td></tr>
<tr class="separator:gad4d449c4cb94b1db597594779d59b7d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadd8b28252d4c529fdc5beb3db6c023b2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sleep__ex.html#gadd8b28252d4c529fdc5beb3db6c023b2">sleep_ex_selective</a> (uint32_t wakeup_event, uint32_t sleep_duration, uint32_t clk_sourec_enable, uint32_t sdr_enable)</td></tr>
<tr class="memdesc:gadd8b28252d4c529fdc5beb3db6c023b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt , G-Timer timeout, etc. befor entering power saving mode. <a href="#gadd8b28252d4c529fdc5beb3db6c023b2">More...</a><br /></td></tr>
<tr class="separator:gadd8b28252d4c529fdc5beb3db6c023b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>sleep extended functions </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gad65d777333881159b786f5de0789ebde"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void deepsleep_ex </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>wakeup_event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>sleep_duration</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To make the system entering the Deep Sleep power saving mode. The CPU, memory and peripheral power is off when entering deep sleep power saving mode. The program needs to be reload and all peripheral needs be re-configure when system resume. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wakeup_event</td><td>A bit map of wake up event. This parameter can be any combination of the following values: <ul>
<li>DSLEEP_WAKEUP_BY_TIMER </li>
<li>DSLEEP_WAKEUP_BY_GPIO </li>
</ul>
</td></tr>
<tr><td class="paramname">sleep_duration</td><td>the system sleep duration in ms, only valid for DSLEEP_WAKEUP_BY_TIMER wake up event. </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>
<a class="anchor" id="gabb5d5ab57b78c67cca30d616bb00935c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void deepstandby_ex </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. </p>
<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="gac303f28059f7dafb72cc9bdd780a415f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void deepstandby_ex </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>sleep_duration_ms</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sleep_duration_ms</td><td>the system sleep duration in ms, only valid for STANDBY_WAKEUP_BY_STIMER wake up event. </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>
<a class="anchor" id="gad4d449c4cb94b1db597594779d59b7d0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sleep_ex </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>wakeup_event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>sleep_duration</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt, G-Timer timeout, etc. befor entering power saving mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wakeup_event</td><td>A bit map of wake up event. This parameter can be any combination of the following values: <ul>
<li>SLEEP_WAKEUP_BY_STIMER </li>
<li>SLEEP_WAKEUP_BY_GTIMER </li>
<li>SLEEP_WAKEUP_BY_GPIO_INT </li>
<li>SLEEP_WAKEUP_BY_WLAN </li>
<li>SLEEP_WAKEUP_BY_SDIO </li>
<li>SLEEP_WAKEUP_BY_USB </li>
<li>SLEEP_WAKEUP_BY_GPIO </li>
<li>SLEEP_WAKEUP_BY_UART </li>
<li>SLEEP_WAKEUP_BY_I2C </li>
<li>SLEEP_WAKEUP_BY_RTC </li>
<li>SLEEP_WAKEUP_BY_RESETPIN </li>
</ul>
</td></tr>
<tr><td class="paramname">sleep_duration</td><td>the system sleep duration in ms, only valid for SLEEP_WAKEUP_BY_STIMER wake up event. </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>
<a class="anchor" id="gadd8b28252d4c529fdc5beb3db6c023b2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sleep_ex_selective </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>wakeup_event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>sleep_duration</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>clk_sourec_enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>sdr_enable</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt , G-Timer timeout, etc. befor entering power saving mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wakeup_event</td><td>A bit map of wake up event. This parameter can be any combination of the following values: <ul>
<li>SLEEP_WAKEUP_BY_STIMER </li>
<li>SLEEP_WAKEUP_BY_GTIMER </li>
<li>SLEEP_WAKEUP_BY_GPIO_INT </li>
<li>SLEEP_WAKEUP_BY_WLAN </li>
<li>SLEEP_WAKEUP_BY_SDIO </li>
<li>SLEEP_WAKEUP_BY_USB </li>
<li>SLEEP_WAKEUP_BY_GPIO </li>
<li>SLEEP_WAKEUP_BY_UART </li>
<li>SLEEP_WAKEUP_BY_I2C </li>
<li>SLEEP_WAKEUP_BY_RTC </li>
<li>SLEEP_WAKEUP_BY_RESETPIN </li>
</ul>
</td></tr>
<tr><td class="paramname">sleep_duration</td><td>the system sleep duration in ms, only valid for SLEEP_WAKEUP_BY_STIMER wake up event. </td></tr>
<tr><td class="paramname">clk_sourec_enable</td><td>the option for SCLK on(1)/off(0) </td></tr>
<tr><td class="paramname">sdr_enable</td><td>the option for turn off the SDR controller (1:off, 0:on) </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>
<a class="anchor" id="ga61b6fa80941e0754db9dcd7cb38ac809"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void standby_wakeup_event_add </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>wakeup_event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>sleep_duration_ms</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>gpio_active</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To add a wake up event to wake up the system from the deep standby power saving mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wakeup_event</td><td>A bit map of wake up event. This parameter can be any combination of the following values: <ul>
<li>STANDBY_WAKEUP_BY_STIMER </li>
<li>STANDBY_WAKEUP_BY_GPIO </li>
<li>STANDBY_WAKEUP_BY_RTC </li>
<li>STANDBY_WAKEUP_BY_RESETPIN </li>
</ul>
</td></tr>
<tr><td class="paramname">sleep_duration_ms</td><td>the system sleep duration in ms, only valid for STANDBY_WAKEUP_BY_STIMER wake up event. </td></tr>
<tr><td class="paramname">gpio_option</td><td>for a GPIO pin to wake up the system by goes high or low This parameter can be any combination of the following values: <ul>
<li>WAKEUP_BY_GPIO_NONE </li>
<li>WAKEUP_BY_GPIO_WAKEUP0_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP0_HIG </li>
<li>WAKEUP_BY_GPIO_WAKEUP1_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP1_HIG </li>
<li>WAKEUP_BY_GPIO_WAKEUP2_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP2_HIG </li>
<li>WAKEUP_BY_GPIO_WAKEUP3_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP3_HIG </li>
</ul>
</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>
<a class="anchor" id="ga37da777f9d57ebb429f03dd830681f0a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void standby_wakeup_event_add </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>wakeup_event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>gpio_active</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To add a wake up event to wake up the system from the deep standby power saving mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wakeup_event</td><td>A bit map of wake up event. This parameter can be any combination of the following values: <ul>
<li>STANDBY_WAKEUP_BY_STIMER </li>
<li>STANDBY_WAKEUP_BY_GPIO </li>
<li>STANDBY_WAKEUP_BY_RTC </li>
<li>STANDBY_WAKEUP_BY_RESETPIN </li>
</ul>
</td></tr>
<tr><td class="paramname">gpio_option</td><td>for a GPIO pin to wake up the system by goes high or low This parameter can be any combination of the following values: <ul>
<li>WAKEUP_BY_GPIO_NONE </li>
<li>WAKEUP_BY_GPIO_WAKEUP0_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP0_HIG </li>
<li>WAKEUP_BY_GPIO_WAKEUP1_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP1_HIG </li>
<li>WAKEUP_BY_GPIO_WAKEUP2_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP2_HIG </li>
<li>WAKEUP_BY_GPIO_WAKEUP3_LOW </li>
<li>WAKEUP_BY_GPIO_WAKEUP3_HIG </li>
</ul>
</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>
<a class="anchor" id="gaa5f3ff69148b38477bc0c5c1504d8cd4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void standby_wakeup_event_del </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>wakeup_event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>To delete a wake up event for wakeing up the system from the deep standby power saving mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wakeup_event</td><td>A bit map of wake up event. This parameter can be any combination of the following values: <ul>
<li>STANDBY_WAKEUP_BY_STIMER </li>
<li>STANDBY_WAKEUP_BY_GPIO </li>
<li>STANDBY_WAKEUP_BY_RTC </li>
<li>STANDBY_WAKEUP_BY_RESETPIN </li>
</ul>
</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 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>