mirror of
https://github.com/jialexd/sdk-ameba-v4.0c_180328.git
synced 2024-12-28 16:45:16 +00:00
384 lines
16 KiB
HTML
384 lines
16 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>SDK3.5: GPIO_IRQ</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="summary">
|
||
|
<a href="#enumval-members">Enumerator</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">GPIO_IRQ<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>gpio IRQ 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:gaa0af91058c138031cbcc5b93121644af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa0af91058c138031cbcc5b93121644af"></a>enum  </td><td class="memItemRight" valign="bottom"><b>gpio_irq_event</b> { <b>IRQ_NONE</b>,
|
||
|
<b>IRQ_RISE</b>,
|
||
|
<b>IRQ_FALL</b>
|
||
|
}</td></tr>
|
||
|
<tr class="separator:gaa0af91058c138031cbcc5b93121644af"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga4f80240a9d73b8366c9accba5710d9c2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4f80240a9d73b8366c9accba5710d9c2"></a>
|
||
|
typedef void(* </td><td class="memItemRight" valign="bottom"><b>gpio_irq_handler</b>) (uint32_t id, gpio_irq_event event)</td></tr>
|
||
|
<tr class="separator:ga4f80240a9d73b8366c9accba5710d9c2"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga6172134a981e1244772096c754e00456"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__irq__api.html#ga6172134a981e1244772096c754e00456">gpio_irq_init</a> (gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id)</td></tr>
|
||
|
<tr class="memdesc:ga6172134a981e1244772096c754e00456"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the GPIO device interrupt mode, include mode/trigger/polarity registers. <a href="#ga6172134a981e1244772096c754e00456">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga6172134a981e1244772096c754e00456"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga7737a15a96b480bdaa8808a7cc4f2413"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__irq__api.html#ga7737a15a96b480bdaa8808a7cc4f2413">gpio_irq_free</a> (gpio_irq_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga7737a15a96b480bdaa8808a7cc4f2413"><td class="mdescLeft"> </td><td class="mdescRight">Deinitializes the GPIO device interrupt mode, include mode/trigger/polarity registers. <a href="#ga7737a15a96b480bdaa8808a7cc4f2413">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga7737a15a96b480bdaa8808a7cc4f2413"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga201303d06fbcecf88ccd6e87db2d2aaf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__irq__api.html#ga201303d06fbcecf88ccd6e87db2d2aaf">gpio_irq_set</a> (gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)</td></tr>
|
||
|
<tr class="memdesc:ga201303d06fbcecf88ccd6e87db2d2aaf"><td class="mdescLeft"> </td><td class="mdescRight">Enable/Disable gpio interrupt. <a href="#ga201303d06fbcecf88ccd6e87db2d2aaf">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga201303d06fbcecf88ccd6e87db2d2aaf"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga1c8afe7c67f55f2df903806650555ee8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__irq__api.html#ga1c8afe7c67f55f2df903806650555ee8">gpio_irq_enable</a> (gpio_irq_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga1c8afe7c67f55f2df903806650555ee8"><td class="mdescLeft"> </td><td class="mdescRight">Enable gpio interrupt. <a href="#ga1c8afe7c67f55f2df903806650555ee8">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga1c8afe7c67f55f2df903806650555ee8"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga437a99b34e5c1938d91f61f12aa69f27"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__irq__api.html#ga437a99b34e5c1938d91f61f12aa69f27">gpio_irq_disable</a> (gpio_irq_t *obj)</td></tr>
|
||
|
<tr class="memdesc:ga437a99b34e5c1938d91f61f12aa69f27"><td class="mdescLeft"> </td><td class="mdescRight">Disable gpio interrupt. <a href="#ga437a99b34e5c1938d91f61f12aa69f27">More...</a><br /></td></tr>
|
||
|
<tr class="separator:ga437a99b34e5c1938d91f61f12aa69f27"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gaaa71cacc38696728cb75171ef14b01fe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__irq__api.html#gaaa71cacc38696728cb75171ef14b01fe">gpio_irq_set_event</a> (gpio_irq_t *obj, gpio_irq_event event)</td></tr>
|
||
|
<tr class="memdesc:gaaa71cacc38696728cb75171ef14b01fe"><td class="mdescLeft"> </td><td class="mdescRight">Enable the specified gpio interrupt event. <a href="#gaaa71cacc38696728cb75171ef14b01fe">More...</a><br /></td></tr>
|
||
|
<tr class="separator:gaaa71cacc38696728cb75171ef14b01fe"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<p>gpio IRQ functions </p>
|
||
|
<h2 class="groupheader">Function Documentation</h2>
|
||
|
<a class="anchor" id="ga437a99b34e5c1938d91f61f12aa69f27"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void gpio_irq_disable </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">gpio_irq_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Disable gpio interrupt. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>gpio irq object define in application software. </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="ga1c8afe7c67f55f2df903806650555ee8"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void gpio_irq_enable </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">gpio_irq_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Enable gpio interrupt. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>gpio irq object define in application software. </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="ga7737a15a96b480bdaa8808a7cc4f2413"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void gpio_irq_free </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">gpio_irq_t * </td>
|
||
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Deinitializes the GPIO device interrupt mode, include mode/trigger/polarity registers. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>gpio irq object define in application software. </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>
|
||
|
<dl class="section note"><dt>Note</dt><dd>this API only works for Port A pins </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga6172134a981e1244772096c754e00456"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int gpio_irq_init </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">gpio_irq_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">PinName </td>
|
||
|
<td class="paramname"><em>pin</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">gpio_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>Initializes the GPIO device interrupt mode, include mode/trigger/polarity registers. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>gpio irq object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">pin</td><td>PinName according to pinmux spec. </td></tr>
|
||
|
<tr><td class="paramname">handler</td><td>Interrupt handler to be assigned to the specified pin. </td></tr>
|
||
|
<tr><td class="paramname">id</td><td>handler id. </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>
|
||
|
<dl class="section note"><dt>Note</dt><dd>this API only works for Port A pins </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga201303d06fbcecf88ccd6e87db2d2aaf"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void gpio_irq_set </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">gpio_irq_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">gpio_irq_event </td>
|
||
|
<td class="paramname"><em>event</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">uint32_t </td>
|
||
|
<td class="paramname"><em>enable</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Enable/Disable gpio interrupt. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>gpio irq object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">event</td><td>gpio interrupt event, this parameter can be one of the following values: <ul>
|
||
|
<li>IRQ_RISE: rising edge interrupt event </li>
|
||
|
<li>IRQ_FALL: falling edge interrupt event </li>
|
||
|
<li>IRQ_LOW: low level interrupt event </li>
|
||
|
<li>IRQ_HIGH: high level interrupt event </li>
|
||
|
<li>IRQ_NONE: no interrupt event </li>
|
||
|
</ul>
|
||
|
</td></tr>
|
||
|
<tr><td class="paramname">enable</td><td>this parameter can be one of the following values: <ul>
|
||
|
<li>0 disable gpio interrupt </li>
|
||
|
<li>1 enable gpio interrupt </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="gaaa71cacc38696728cb75171ef14b01fe"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void gpio_irq_set_event </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">gpio_irq_t * </td>
|
||
|
<td class="paramname"><em>obj</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">gpio_irq_event </td>
|
||
|
<td class="paramname"><em>event</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Enable the specified gpio interrupt event. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">obj</td><td>gpio irq object define in application software. </td></tr>
|
||
|
<tr><td class="paramname">event</td><td>gpio interrupt event, this parameter can be one of the following values: <ul>
|
||
|
<li>IRQ_RISE: rising edge interrupt event </li>
|
||
|
<li>IRQ_FALL: falling edge interrupt event </li>
|
||
|
<li>IRQ_LOW: low level interrupt event </li>
|
||
|
<li>IRQ_HIGH: high level interrupt event </li>
|
||
|
<li>IRQ_NONE: no interrupt event </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  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.11
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|