mirror of
https://github.com/jialexd/sdk-ameba-v4.0c_180328.git
synced 2024-11-01 03:44:17 +00:00
280 lines
12 KiB
HTML
Executable file
280 lines
12 KiB
HTML
Executable file
<!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>SDK3.5: WDT</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">SDK3.5
|
|
</div>
|
|
<div id="projectbrief">This document shows Ameba SDK 3.5 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 Page</span></a></li>
|
|
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Data 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="headertitle">
|
|
<div class="title">WDT<div class="ingroups"><a class="el" href="group__sdk.html">Ameba SDK</a> » <a class="el" href="group__hal.html">HAL</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>wdt functions
|
|
<a href="#details">More...</a></p>
|
|
<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:gac14ab8a8dd42b259b5987166420c8787"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac14ab8a8dd42b259b5987166420c8787"></a>
|
|
typedef void(* </td><td class="memItemRight" valign="bottom"><b>wdt_irq_handler</b>) (uint32_t id)</td></tr>
|
|
<tr class="separator:gac14ab8a8dd42b259b5987166420c8787"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6790d1a45a85ea205f1dc88d7743364d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wdt.html#ga6790d1a45a85ea205f1dc88d7743364d">watchdog_init</a> (uint32_t timeout_ms)</td></tr>
|
|
<tr class="memdesc:ga6790d1a45a85ea205f1dc88d7743364d"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the watch dog, include time setting, mode register. <a href="#ga6790d1a45a85ea205f1dc88d7743364d">More...</a><br /></td></tr>
|
|
<tr class="separator:ga6790d1a45a85ea205f1dc88d7743364d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9eeb628cdc696984c5fe147b8237483b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wdt.html#ga9eeb628cdc696984c5fe147b8237483b">watchdog_start</a> (void)</td></tr>
|
|
<tr class="memdesc:ga9eeb628cdc696984c5fe147b8237483b"><td class="mdescLeft"> </td><td class="mdescRight">Start the watchdog counting. <a href="#ga9eeb628cdc696984c5fe147b8237483b">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9eeb628cdc696984c5fe147b8237483b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga284d9a9542a5fa2c84bf4a70bfbc80aa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wdt.html#ga284d9a9542a5fa2c84bf4a70bfbc80aa">watchdog_stop</a> (void)</td></tr>
|
|
<tr class="memdesc:ga284d9a9542a5fa2c84bf4a70bfbc80aa"><td class="mdescLeft"> </td><td class="mdescRight">Stop the watchdog counting. <a href="#ga284d9a9542a5fa2c84bf4a70bfbc80aa">More...</a><br /></td></tr>
|
|
<tr class="separator:ga284d9a9542a5fa2c84bf4a70bfbc80aa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4ae5ad65c961268051560516eeff623f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wdt.html#ga4ae5ad65c961268051560516eeff623f">watchdog_refresh</a> (void)</td></tr>
|
|
<tr class="memdesc:ga4ae5ad65c961268051560516eeff623f"><td class="mdescLeft"> </td><td class="mdescRight">Refresh the watchdog counting to prevent WDT timeout. <a href="#ga4ae5ad65c961268051560516eeff623f">More...</a><br /></td></tr>
|
|
<tr class="separator:ga4ae5ad65c961268051560516eeff623f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaac3d110c27e55083ead43d44cc4f0594"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wdt.html#gaac3d110c27e55083ead43d44cc4f0594">watchdog_irq_init</a> (wdt_irq_handler handler, uint32_t id)</td></tr>
|
|
<tr class="memdesc:gaac3d110c27e55083ead43d44cc4f0594"><td class="mdescLeft"> </td><td class="mdescRight">Switch the watchdog timer to interrupt mode and register a watchdog timer timeout interrupt handler. The interrupt handler will be called when the watch-dog timer is timeout. <a href="#gaac3d110c27e55083ead43d44cc4f0594">More...</a><br /></td></tr>
|
|
<tr class="separator:gaac3d110c27e55083ead43d44cc4f0594"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>wdt functions </p>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a class="anchor" id="ga6790d1a45a85ea205f1dc88d7743364d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void watchdog_init </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>timeout_ms</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Initializes the watch dog, include time setting, mode register. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">timeout_ms</td><td>the watch-dog timer timeout value, in ms. default action of timeout is to reset the whole system. </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="gaac3d110c27e55083ead43d44cc4f0594"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void watchdog_irq_init </td>
|
|
<td>(</td>
|
|
<td class="paramtype">wdt_irq_handler </td>
|
|
<td class="paramname"><em>handler</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>id</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Switch the watchdog timer to interrupt mode and register a watchdog timer timeout interrupt handler. The interrupt handler will be called when the watch-dog timer is timeout. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">handler</td><td>the callback function for WDT timeout interrupt. </td></tr>
|
|
<tr><td class="paramname">id</td><td>the parameter for the callback function </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="ga4ae5ad65c961268051560516eeff623f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void watchdog_refresh </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Refresh the watchdog counting to prevent WDT timeout. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">None</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">none</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga9eeb628cdc696984c5fe147b8237483b"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void watchdog_start </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Start the watchdog counting. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">None</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">none</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga284d9a9542a5fa2c84bf4a70bfbc80aa"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void watchdog_stop </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Stop the watchdog counting. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">None</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">none</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
</html>
|