mirror of
https://github.com/cwyark/sdk-ameba-v4.0b_without_nda_gcc.git
synced 2024-12-26 16:15:23 +00:00
200 lines
17 KiB
HTML
200 lines
17 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: i2s_api.h File Reference</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><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><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 id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- 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 id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_59865070466a2d887ccae359ce349522.html">sdk-ameba</a></li><li class="navelem"><a class="el" href="dir_bb17c7c1f6b5d4e42018e46e245402cf.html">project</a></li><li class="navelem"><a class="el" href="dir_4d8a5561b87cbdbe66a2580ebcb931d0.html">realtek_8195a_gen_project</a></li><li class="navelem"><a class="el" href="dir_d55a6639c0ef2e769c54f3d73fdcd6ae.html">rtl8195a</a></li><li class="navelem"><a class="el" href="dir_218701c72f38a637f56ccea9eb201b28.html">sw</a></li><li class="navelem"><a class="el" href="dir_467016183711ec67a0924a03f0be9cbd.html">lib</a></li><li class="navelem"><a class="el" href="dir_91cf82b8388ba308ddfe17c7b1476a41.html">sw_lib</a></li><li class="navelem"><a class="el" href="dir_d752387d37b25b2ddfb0bd02d399f93a.html">mbed</a></li><li class="navelem"><a class="el" href="dir_adf298d7cff763ecf28c97eaa1fb8ba3.html">hal_ext</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">i2s_api.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>This file provides following mbed I2S API.
|
|
<a href="#details">More...</a></p>
|
|
<div class="textblock"><code>#include "device.h"</code><br />
|
|
<code>#include "ameba_soc.h"</code><br />
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">Ameba1 Only</div></td></tr>
|
|
<tr class="memitem:ga64b640f74cd24fa1686a0345cbd6b321"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga64b640f74cd24fa1686a0345cbd6b321">i2s_init</a> (i2s_t *obj, PinName sck, PinName ws, PinName sd)</td></tr>
|
|
<tr class="memdesc:ga64b640f74cd24fa1686a0345cbd6b321"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the I2S device, include clock/function/interrupt/I2S registers. <a href="group__i2s.html#ga64b640f74cd24fa1686a0345cbd6b321">More...</a><br /></td></tr>
|
|
<tr class="separator:ga64b640f74cd24fa1686a0345cbd6b321"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">AmebaZ Only</div></td></tr>
|
|
<tr class="memitem:gadc1fff20e8cde565f4d3e19c43de138a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#gadc1fff20e8cde565f4d3e19c43de138a">i2s_init</a> (i2s_t *obj, PinName sck, PinName ws, PinName sd_tx, PinName sd_rx, PinName mck)</td></tr>
|
|
<tr class="memdesc:gadc1fff20e8cde565f4d3e19c43de138a"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the I2S device, include clock/function/interrupt/I2S registers. <a href="group__i2s.html#gadc1fff20e8cde565f4d3e19c43de138a">More...</a><br /></td></tr>
|
|
<tr class="separator:gadc1fff20e8cde565f4d3e19c43de138a"><td class="memSeparator" colspan="2"> </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:ga61dadd085c1777f559549e05962b2c9e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga61dadd085c1777f559549e05962b2c9e"></a>enum  </td><td class="memItemRight" valign="bottom">{ <br />
|
|
  <b>SR_8KHZ</b> = I2S_SR_8KHZ,
|
|
<b>SR_16KHZ</b> = I2S_SR_16KHZ,
|
|
<b>SR_24KHZ</b> = I2S_SR_24KHZ,
|
|
<b>SR_32KHZ</b> = I2S_SR_32KHZ,
|
|
<br />
|
|
  <b>SR_48KHZ</b> = I2S_SR_48KHZ,
|
|
<b>SR_96KHZ</b> = I2S_SR_96KHZ,
|
|
<b>SR_7p35KHZ</b> = I2S_SR_7p35KHZ,
|
|
<b>SR_14p7KHZ</b> = I2S_SR_14p7KHZ,
|
|
<br />
|
|
  <b>SR_22p05KHZ</b> = I2S_SR_22p05KHZ,
|
|
<b>SR_29p4KHZ</b> = I2S_SR_29p4KHZ,
|
|
<b>SR_44p1KHZ</b> = I2S_SR_44p1KHZ,
|
|
<b>SR_88p2KHZ</b> = I2S_SR_88p2KHZ
|
|
<br />
|
|
}</td></tr>
|
|
<tr class="separator:ga61dadd085c1777f559549e05962b2c9e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga726ca809ffd3d67ab4b8476646f26635"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga726ca809ffd3d67ab4b8476646f26635"></a>enum  </td><td class="memItemRight" valign="bottom">{ <b>CH_STEREO</b> = I2S_CH_STEREO,
|
|
<b>CH_MONO</b> = I2S_CH_MONO
|
|
}</td></tr>
|
|
<tr class="separator:ga726ca809ffd3d67ab4b8476646f26635"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga0411cd49bb5b71852cecd93bcbf0ca2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0411cd49bb5b71852cecd93bcbf0ca2d"></a>enum  </td><td class="memItemRight" valign="bottom">{ <b>WL_16b</b> = I2S_WL_16,
|
|
<b>WL_24b</b> = I2S_WL_24
|
|
}</td></tr>
|
|
<tr class="separator:ga0411cd49bb5b71852cecd93bcbf0ca2d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gabed82baf7f470b522273a3e37c24c600"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabed82baf7f470b522273a3e37c24c600"></a>enum  </td><td class="memItemRight" valign="bottom">{ <b>I2S_DIR_RX</b> = I2S_ONLY_RX,
|
|
<b>I2S_DIR_TX</b> = I2S_ONLY_TX,
|
|
<b>I2S_DIR_TXRX</b> = I2S_TXRX
|
|
}</td></tr>
|
|
<tr class="separator:gabed82baf7f470b522273a3e37c24c600"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga1dce5ac8f29993c9f64379fe9e546159"><td class="memItemLeft" align="right" valign="top">
|
|
typedef void(* </td><td class="memItemRight" valign="bottom"><b>i2s_irq_handler</b>) (uint32_t id, char *pbuf)</td></tr>
|
|
<tr class="separator:ga1dce5ac8f29993c9f64379fe9e546159"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6642a1e40fe8f355e221ac21cf04dfd6"><td class="memItemLeft" align="right" valign="top">
|
|
typedef struct i2s_s </td><td class="memItemRight" valign="bottom"><b>i2s_t</b></td></tr>
|
|
<tr class="separator:ga6642a1e40fe8f355e221ac21cf04dfd6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga321e0dcc5b8c1e84d9100446721f1a31"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga321e0dcc5b8c1e84d9100446721f1a31">i2s_deinit</a> (i2s_t *obj)</td></tr>
|
|
<tr class="memdesc:ga321e0dcc5b8c1e84d9100446721f1a31"><td class="mdescLeft"> </td><td class="mdescRight">Deinitializes the I2S device, include function/interrupt/I2S registers. <a href="group__i2s.html#ga321e0dcc5b8c1e84d9100446721f1a31">More...</a><br /></td></tr>
|
|
<tr class="separator:ga321e0dcc5b8c1e84d9100446721f1a31"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaac2ff4d602d4f65651de034b1c17b7b6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#gaac2ff4d602d4f65651de034b1c17b7b6">i2s_set_dma_buffer</a> (i2s_t *obj, char *tx_buf, char *rx_buf, uint32_t page_num, uint32_t page_size)</td></tr>
|
|
<tr class="memdesc:gaac2ff4d602d4f65651de034b1c17b7b6"><td class="mdescLeft"> </td><td class="mdescRight">Sets page number, page size, page address. <a href="group__i2s.html#gaac2ff4d602d4f65651de034b1c17b7b6">More...</a><br /></td></tr>
|
|
<tr class="separator:gaac2ff4d602d4f65651de034b1c17b7b6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa1c150e5fa2de45f6c6a6fb238a0496b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#gaa1c150e5fa2de45f6c6a6fb238a0496b">i2s_tx_irq_handler</a> (i2s_t *obj, i2s_irq_handler handler, uint32_t id)</td></tr>
|
|
<tr class="memdesc:gaa1c150e5fa2de45f6c6a6fb238a0496b"><td class="mdescLeft"> </td><td class="mdescRight">Sets TX interrupt handler. <a href="group__i2s.html#gaa1c150e5fa2de45f6c6a6fb238a0496b">More...</a><br /></td></tr>
|
|
<tr class="separator:gaa1c150e5fa2de45f6c6a6fb238a0496b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga96ff405b0abff00bbcee9b82cb9c2cd7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga96ff405b0abff00bbcee9b82cb9c2cd7">i2s_rx_irq_handler</a> (i2s_t *obj, i2s_irq_handler handler, uint32_t id)</td></tr>
|
|
<tr class="memdesc:ga96ff405b0abff00bbcee9b82cb9c2cd7"><td class="mdescLeft"> </td><td class="mdescRight">Sets RX interrupt handler. <a href="group__i2s.html#ga96ff405b0abff00bbcee9b82cb9c2cd7">More...</a><br /></td></tr>
|
|
<tr class="separator:ga96ff405b0abff00bbcee9b82cb9c2cd7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga215ab83c7bcd74a02fb968e4b58093c2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga215ab83c7bcd74a02fb968e4b58093c2">i2s_set_direction</a> (i2s_t *obj, int trx_type)</td></tr>
|
|
<tr class="memdesc:ga215ab83c7bcd74a02fb968e4b58093c2"><td class="mdescLeft"> </td><td class="mdescRight">Sets i2s data transfer direction. <a href="group__i2s.html#ga215ab83c7bcd74a02fb968e4b58093c2">More...</a><br /></td></tr>
|
|
<tr class="separator:ga215ab83c7bcd74a02fb968e4b58093c2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4110092c5664a7807d7f3f3208acab0f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga4110092c5664a7807d7f3f3208acab0f">i2s_set_param</a> (i2s_t *obj, int channel_num, int rate, int word_len)</td></tr>
|
|
<tr class="memdesc:ga4110092c5664a7807d7f3f3208acab0f"><td class="mdescLeft"> </td><td class="mdescRight">Sets i2s channel number, sample rate, word length. <a href="group__i2s.html#ga4110092c5664a7807d7f3f3208acab0f">More...</a><br /></td></tr>
|
|
<tr class="separator:ga4110092c5664a7807d7f3f3208acab0f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaee962b74efaa65f7bd0d3b897010367a"><td class="memItemLeft" align="right" valign="top">int * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#gaee962b74efaa65f7bd0d3b897010367a">i2s_get_tx_page</a> (i2s_t *obj)</td></tr>
|
|
<tr class="memdesc:gaee962b74efaa65f7bd0d3b897010367a"><td class="mdescLeft"> </td><td class="mdescRight">Gets current tx page address. <a href="group__i2s.html#gaee962b74efaa65f7bd0d3b897010367a">More...</a><br /></td></tr>
|
|
<tr class="separator:gaee962b74efaa65f7bd0d3b897010367a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae1f067937d0622be9ce59ee3c4f52558"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#gae1f067937d0622be9ce59ee3c4f52558">i2s_send_page</a> (i2s_t *obj, uint32_t *pbuf)</td></tr>
|
|
<tr class="memdesc:gae1f067937d0622be9ce59ee3c4f52558"><td class="mdescLeft"> </td><td class="mdescRight">Sets current tx page own by i2s. <a href="group__i2s.html#gae1f067937d0622be9ce59ee3c4f52558">More...</a><br /></td></tr>
|
|
<tr class="separator:gae1f067937d0622be9ce59ee3c4f52558"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga29ee082ef52be9597fbe2dbbc07bacc6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga29ee082ef52be9597fbe2dbbc07bacc6">i2s_recv_page</a> (i2s_t *obj)</td></tr>
|
|
<tr class="memdesc:ga29ee082ef52be9597fbe2dbbc07bacc6"><td class="mdescLeft"> </td><td class="mdescRight">Sets current rx page own by i2s. <a href="group__i2s.html#ga29ee082ef52be9597fbe2dbbc07bacc6">More...</a><br /></td></tr>
|
|
<tr class="separator:ga29ee082ef52be9597fbe2dbbc07bacc6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga22890a58d7f933f95bcf336391486941"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga22890a58d7f933f95bcf336391486941">i2s_enable</a> (i2s_t *obj)</td></tr>
|
|
<tr class="memdesc:ga22890a58d7f933f95bcf336391486941"><td class="mdescLeft"> </td><td class="mdescRight">Enable i2s interrupt and function. <a href="group__i2s.html#ga22890a58d7f933f95bcf336391486941">More...</a><br /></td></tr>
|
|
<tr class="separator:ga22890a58d7f933f95bcf336391486941"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga91f12ce2864d78b46d95111b8de284c5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2s.html#ga91f12ce2864d78b46d95111b8de284c5">i2s_disable</a> (i2s_t *obj)</td></tr>
|
|
<tr class="memdesc:ga91f12ce2864d78b46d95111b8de284c5"><td class="mdescLeft"> </td><td class="mdescRight">Disable i2s interrupt and function. <a href="group__i2s.html#ga91f12ce2864d78b46d95111b8de284c5">More...</a><br /></td></tr>
|
|
<tr class="separator:ga91f12ce2864d78b46d95111b8de284c5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This file provides following mbed I2S API. </p>
|
|
<p>mbed Microcontroller Library</p>
|
|
<dl class="section author"><dt>Author</dt><dd></dd></dl>
|
|
<dl class="section version"><dt>Version</dt><dd>V1.0.0 </dd></dl>
|
|
<dl class="section attention"><dt>Attention</dt><dd></dd></dl>
|
|
<p>Copyright (c) 2006-2013 ARM Limited</p>
|
|
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at </p><pre class="fragment">http://www.apache.org/licenses/LICENSE-2.0
|
|
</pre><p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>
|
|
</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>
|