mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
172 lines
8.2 KiB
HTML
172 lines
8.2 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.6"/>
|
|
<title>tinyusb: Application - Stack API</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="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
$(window).load(resizeHeight);
|
|
</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 style="padding-left: 0.5em;">
|
|
<div id="projectname">tinyusb
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</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><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){initNavTree('group__group__application__api.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Application - Stack API</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Non-Class driver API.
|
|
<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:gac22290570402ecf491cf585a00e16b71"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__application__api.html#gac22290570402ecf491cf585a00e16b71">tusb_isr</a> (uint8_t coreid)</td></tr>
|
|
<tr class="memdesc:gac22290570402ecf491cf585a00e16b71"><td class="mdescLeft"> </td><td class="mdescRight">USB interrupt handler. <a href="#gac22290570402ecf491cf585a00e16b71">More...</a><br/></td></tr>
|
|
<tr class="separator:gac22290570402ecf491cf585a00e16b71"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae5e5337c5ac56048ee326db2121f415e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__application__api.html#gae5e5337c5ac56048ee326db2121f415e">tusb_init</a> (void)</td></tr>
|
|
<tr class="memdesc:gae5e5337c5ac56048ee326db2121f415e"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the usb stack. <a href="#gae5e5337c5ac56048ee326db2121f415e">More...</a><br/></td></tr>
|
|
<tr class="separator:gae5e5337c5ac56048ee326db2121f415e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa03e39232c87572815dd9b854a95163e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__application__api.html#gaa03e39232c87572815dd9b854a95163e">tusb_task_runner</a> (void)</td></tr>
|
|
<tr class="memdesc:gaa03e39232c87572815dd9b854a95163e"><td class="mdescLeft"> </td><td class="mdescRight">Run all tinyusb's internal tasks (e.g host task, device task). <a href="#gaa03e39232c87572815dd9b854a95163e">More...</a><br/></td></tr>
|
|
<tr class="separator:gaa03e39232c87572815dd9b854a95163e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>Non-Class driver API. </p>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a class="anchor" id="gae5e5337c5ac56048ee326db2121f415e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a> tusb_init </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Initialize the usb stack. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Error Code of the TUSB_ERROR enum </dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>Function will initialize the stack according to configuration in the configure file (tusb_config.h) </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gac22290570402ecf491cf585a00e16b71"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void tusb_isr </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>coreid</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>USB interrupt handler. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">coreid</td><td>Controller ID where the interrupt happened </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>This function must be called by HAL layer or Application for the stack to manage USB events/transfers. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaa03e39232c87572815dd9b854a95163e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void tusb_task_runner </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Run all tinyusb's internal tasks (e.g host task, device task). </p>
|
|
<dl class="section note"><dt>Note</dt><dd>This function is only required when using no RTOS (<a class="el" href="group__group__configuration.html#ga4614c6e63e1e3e83f4e1b2525f42ee80">TUSB_CFG_OS</a> == TUSB_OS_NONE). All the stack functions & callback are invoked within this function, so it should be called periodically within the mainloop</dd></dl>
|
|
<div class="fragment"><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">void</span>)</div>
|
|
<div class="line">{</div>
|
|
<div class="line"> <span class="comment">// some init code</span></div>
|
|
<div class="line"> <a class="code" href="group__group__application__api.html#gae5e5337c5ac56048ee326db2121f415e">tusb_init</a>();</div>
|
|
<div class="line"> <span class="keywordflow">while</span>(1) <span class="comment">// the mainloop</span></div>
|
|
<div class="line"> {</div>
|
|
<div class="line"> <a class="code" href="tusb_8c.html#aa03e39232c87572815dd9b854a95163e">tusb_task_runner</a>();</div>
|
|
<div class="line"> <span class="comment">// other code</span></div>
|
|
<div class="line"> }</div>
|
|
<div class="line">}</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="footer">Generated on Wed Mar 26 2014 16:23:18 for tinyusb by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|