mirror of
https://github.com/cwyark/sdk-ameba-v4.0b_without_nda_gcc.git
synced 2024-11-22 05:54:19 +00:00
282 lines
11 KiB
HTML
282 lines
11 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: GPIO_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 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="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">GPIO_EX<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 extended functions
|
|
<a href="#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ga96eee4084b798ca6f4b1a8c72ebe45c7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__ex.html#ga96eee4084b798ca6f4b1a8c72ebe45c7">gpio_direct_write</a> (gpio_t *obj, BOOL value)</td></tr>
|
|
<tr class="memdesc:ga96eee4084b798ca6f4b1a8c72ebe45c7"><td class="mdescLeft"> </td><td class="mdescRight">Sets value to the selected output port pin. <a href="#ga96eee4084b798ca6f4b1a8c72ebe45c7">More...</a><br /></td></tr>
|
|
<tr class="separator:ga96eee4084b798ca6f4b1a8c72ebe45c7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga94178a2675322895b3fe83894fd510b6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__ex.html#ga94178a2675322895b3fe83894fd510b6">gpio_pull_ctrl</a> (gpio_t *obj, PinMode pull_type)</td></tr>
|
|
<tr class="memdesc:ga94178a2675322895b3fe83894fd510b6"><td class="mdescLeft"> </td><td class="mdescRight">Sets pull type to the selected pin. <a href="#ga94178a2675322895b3fe83894fd510b6">More...</a><br /></td></tr>
|
|
<tr class="separator:ga94178a2675322895b3fe83894fd510b6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga99b42c1df43337a63742e7e31fef1fae"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__ex.html#ga99b42c1df43337a63742e7e31fef1fae">gpio_deinit</a> (gpio_t *obj)</td></tr>
|
|
<tr class="memdesc:ga99b42c1df43337a63742e7e31fef1fae"><td class="mdescLeft"> </td><td class="mdescRight">Deinitializes the GPIO device, include mode/direction/pull control registers. <a href="#ga99b42c1df43337a63742e7e31fef1fae">More...</a><br /></td></tr>
|
|
<tr class="separator:ga99b42c1df43337a63742e7e31fef1fae"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab0f90db4820daa65f777891fceaa7e8f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__ex.html#gab0f90db4820daa65f777891fceaa7e8f">gpio_change_dir</a> (gpio_t *obj, PinDirection direction)</td></tr>
|
|
<tr class="memdesc:gab0f90db4820daa65f777891fceaa7e8f"><td class="mdescLeft"> </td><td class="mdescRight">Set GPIO direction. <a href="#gab0f90db4820daa65f777891fceaa7e8f">More...</a><br /></td></tr>
|
|
<tr class="separator:gab0f90db4820daa65f777891fceaa7e8f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>gpio extended functions </p>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a class="anchor" id="gab0f90db4820daa65f777891fceaa7e8f"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void gpio_change_dir </td>
|
|
<td>(</td>
|
|
<td class="paramtype">gpio_t * </td>
|
|
<td class="paramname"><em>obj</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">PinDirection </td>
|
|
<td class="paramname"><em>direction</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set GPIO direction. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">obj</td><td>gpio object define in application software. </td></tr>
|
|
<tr><td class="paramname">direction</td><td>this parameter can be one of the following values: <ul>
|
|
<li>PIN_INPUT: this pin is input </li>
|
|
<li>PIN_OUTPUT: this pin is output </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="ga99b42c1df43337a63742e7e31fef1fae"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void gpio_deinit </td>
|
|
<td>(</td>
|
|
<td class="paramtype">gpio_t * </td>
|
|
<td class="paramname"><em>obj</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Deinitializes the GPIO device, include mode/direction/pull control registers. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">obj</td><td>gpio 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="ga96eee4084b798ca6f4b1a8c72ebe45c7"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void gpio_direct_write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">gpio_t * </td>
|
|
<td class="paramname"><em>obj</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">BOOL </td>
|
|
<td class="paramname"><em>value</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets value to the selected output port pin. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">obj</td><td>gpio object define in application software. </td></tr>
|
|
<tr><td class="paramname">value</td><td>specifies the value to be written to the selected pin This parameter can be one of the following values: <ul>
|
|
<li>0: Pin state set to low </li>
|
|
<li>1: Pin state set to high </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="ga94178a2675322895b3fe83894fd510b6"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void gpio_pull_ctrl </td>
|
|
<td>(</td>
|
|
<td class="paramtype">gpio_t * </td>
|
|
<td class="paramname"><em>obj</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">PinMode </td>
|
|
<td class="paramname"><em>pull_type</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets pull type to the selected pin. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">obj</td><td>gpio object define in application software. </td></tr>
|
|
<tr><td class="paramname">pull_type</td><td>this parameter can be one of the following values: <ul>
|
|
<li>PullNone: HighZ, user can input high or low use this pin </li>
|
|
<li>OpenDrain(is OpenDrain output): no pull + OUT + GPIO[gpio_bit] = 0 </li>
|
|
<li>PullDown: pull down </li>
|
|
<li>PullUp: pull up </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>
|